Shell Config Management

Stop editing dotfiles by hand.

wayu is a zero-dependency CLI for Zsh and Bash. Manage PATH entries, aliases, env vars, and plugins with one command. Every change backed up automatically.

474 Tests
0 Dependencies
31K Lines of Odin
MIT License

Everything your shell
config actually needs

wayu replaces the scattered, manual editing of shell config files with structured commands — each with validation, dry-run preview, and automatic backups.

Core

The foundation — every config change, validated, backed up, and predictable.

Auto Backup & Restore

Every modification creates a timestamped backup automatically. Keeps the last 5. Restore any config type with one command. You cannot accidentally lose your shell config.

Multi-Shell

Automatic Zsh/Bash detection from $SHELL. Shell-specific config files with correct syntax. Fish support is experimental. Migrate between shells with wayu migrate.

Input Validation

Shell identifier validation, reserved word checking (if, export, etc.), dangerous character escaping, and path sanitization.

External Alias Sources

Surface read-only aliases from external tools (e.g. fabric patterns) in wayu alias list via alias-sources.conf.

Power

Declarative config, fuzzy search, plugin ecosystem, dual-mode UX.

Global Fuzzy Search

wayu search <query> across PATH entries, aliases, and constants at once. Acronym matching: frwrks finds FIREWORKS_AI_API_KEY.

Plugin Registry

62 curated plugins. Install from registry name or any Git URL. Dependency resolution with cycle detection. Conflict detection across env vars, functions, aliases. Priority-based load ordering.

CLI / TUI Dual Mode

CLI mode is pipe-safe and CI-ready. Run wayu with no args (or --tui) for a 9-view full-screen interface with vim-style navigation, fuzzy filter, confirmation modals.

Workflow

Diagnostics, automation, and integration with the rest of your toolchain.

wayu doctor

Health-check every config: install, source line, PATH entries, plugins, backups, TOML, dependencies. --fix auto-repairs known issues. --json output for CI.

Hot Reload

wayu reload start watches wayu.toml and config files. Regenerates static output on save (debounced 500ms). No more source ~/.zshrc after every tweak.

Pre/Post Hooks

Configure custom commands to run before or after operations via hooks.conf. Supports pre_path_add, post_alias_add, etc. Logging, notifications, custom integrations.

Templates

Bootstrap with wayu template apply developer. Presets: developer, minimal, data-science, full. Each preset adds common paths, aliases, and constants to your wayu.toml.

Custom Functions

wayu function add mkcd seeds a shell-specific skeleton in ~/.config/wayu/functions/ and opens it in $EDITOR. Every file is sourced at shell startup. list and remove round it out.

Shell Migration

wayu migrate --from zsh --to bash. Generates equivalent shell-specific config files. Switch between Zsh and Bash without losing PATH, aliases, env, or plugin state. Fish migration is experimental.

Dry-Run Everywhere

The --dry-run flag previews any change before it’s written to disk. BSD sysexits.h exit codes (0, 1, 64–78). Fails fast, never silently.

One syntax.
Every config.

Every command follows the same pattern: wayu <command> <action> [args]. No flags to memorize. No config files to learn.

path management
# Add a new PATH entry
wayu path add ~/.cargo/bin

# List all entries
wayu path list

# Remove an entry
wayu path rm /usr/local/bin

# Remove broken entries (preview first)
wayu path clean --dry-run
wayu path clean --yes

# Remove duplicates
wayu path dedup --yes
alias management
# Add aliases
wayu alias add ll 'ls -la'
wayu alias add gs 'git status'
wayu alias add gc 'git commit'

# List wayu-managed (--full for external too)
wayu alias list

# Remove an alias
wayu alias rm ll

plugin management
# Browse 62 popular plugins
wayu plugin search
wayu plugin search syntax

# Install from registry or URL
wayu plugin add autosuggestions
wayu plugin add https://github.com/user/plugin.git

# Manage plugins
wayu plugin list
wayu plugin enable zsh-autosuggestions
wayu plugin priority zsh-autosuggestions 50
wayu plugin update --all
health check & auto-fix
# Run all checks (9 diagnostics)
wayu doctor

# Auto-fix issues marked 🔧
wayu doctor --fix

# Machine-readable output (CI-friendly)
wayu doctor --json

# Generate optimized init for faster startup
wayu doctor --optimize
declarative TOML config
# Edit declarative wayu.toml
wayu config edit

# Validate schema
wayu toml validate

# Watch mode — regenerate on save
wayu reload start

# Custom shell scripts (extra.<shell>)
wayu config extend

# Detect inline scripts to migrate
wayu config scan
backup & restore
# Backups are created automatically.
# These commands let you manage them.

# List all backups
wayu backup list

# List backups for one config type
wayu backup list path

# Restore most recent backup
wayu backup restore path

# Clean up old backups (keeps last 5)
wayu backup rm
Consistent syntax across everything

Every command is wayu <noun> <verb>. No flags to memorize, no subcommand trees. Muscle memory transfers instantly.

Preview before you commit

Add --dry-run to any command to see exactly what would change. No surprises, no rollbacks needed.

Pipe-safe and CI-ready

Zero interactive prompts in CLI mode. BSD exit codes for proper error handling. Add --yes for unattended operations.

Real shell files, no magic

Generates plain .zsh / .bash files you can read and edit directly. No lock-in, no proprietary format.

One file.
Your whole shell.

~/.config/wayu/wayu.toml is the single source of truth: PATH, aliases, constants, plugins, prompt, and inline scripts. Commit it to your dotfiles. Restore your entire shell on any machine in one command. Hot-reload on every save.

Imperative or declarative — use wayu <cmd> add to mutate, or edit the TOML directly. Wayu detects which is your source of truth.
Pre-compiled prompt — native zsh prompt format with Nerd Font icons, no external binaries (no starship, no oh-my-zsh).
Hot reloadwayu reload start watches the TOML and regenerates static .zsh files on save (debounced 500ms).
Schema-validatedwayu toml validate catches typos, malformed values, and missing required keys.
~/.config/wayu/wayu.toml declarative
# Single source of truth for your shell

[shell]
type = "zsh"

[prompt]
format = "{username}{dir}{git_branch}\n{character}"
command_timeout = 60000

[paths]
cargo_bin    = "$HOME/.cargo/bin"
local_bin    = "$HOME/.local/bin"
homebrew_bin = "/opt/homebrew/bin"

[aliases]
ll  = "ls -la"
gs  = "git status"
gco = "git checkout"

[env]
EDITOR = "nvim"
PAGER  = "less -R"

# Plugins managed separately in plugins.json
# Install with: wayu plugin add autosuggestions
wayu config edit wayu toml validate wayu reload start
31K
Lines of Odin
Pure, zero-dependency systems code. Compiles in seconds.
474
Tests
Unit, integration, and golden-file visual regression.
62
Plugins in Registry
Curated popular plugins. Install any Git URL too.
0
Runtime Dependencies
Single binary. No Python, no Node, no package manager.

Built for scripts.
Built for humans.

$ CLI Mode

Non-interactive.
Pipe-safe. Scriptable.

Activated when you pass a command. Zero prompts, zero interactive elements. Designed for shell scripts, CI/CD pipelines, and provisioning tools.

  • BSD sysexits.h exit codes (0, 1, 64–78)
  • No fuzzy finders or interactive prompts, no TTY required
  • --yes flag for confirmation-free destructive ops
  • Fails fast on errors with categorized messages
  • Safe to use in if statements and pipes
⬛ TUI Mode

Full-screen.
Visual. Interactive.

Launch with wayu (no args) or wayu --tui. A complete terminal UI built from scratch — no external TUI libraries.

  • Vim-style navigation (j/k, arrow keys)
  • 9 views: PATH, Aliases, Constants, Plugins, Completions, Backups, Hooks, Settings…
  • Fuzzy search and inline filtering
  • Confirmation modals before destructive actions
  • Alternate screen buffer — terminal history preserved

wayu doctor
knows what's
wrong before you do.

9 checks across install state, shell sourcing, PATH validity, plugin health, backups, TOML schema, and external dependencies. Auto-fix what's mechanical. JSON output for CI pipelines.

  • wayu doctor — interactive run with status, summary, and fix suggestions
  • wayu doctor --fix — auto-repair issues marked 🔧
  • wayu doctor --json — structured output for CI / monitoring
  • wayu doctor --optimize — generate optimized init for faster shell startup
wayu doctor
🔬 wayu Doctor — System Health Check wayu installation wayu 4.2.0 installed shell configuration init.zsh sourced from ~/.zshrc PATH entries 12 entries, all directories exist plugins 8 plugin(s) installed backups Backup system configured TOML config wayu.toml exists and is readable turbo export 🔧 Turbo export generated but not used in shell config dependency: git, zsh All required dependencies found 󰋽 Summary 7 OK 1 warning 0 errors 🔧 1 issue can be auto-fixed Run with --fix to attempt automatic fixes: wayu doctor --fix
wayu doctor --json | jq .
{ "checks": [ { "name": "wayu installation", "status": "ok", "message": "wayu 4.2.0 installed", "fixable": false }, { "name": "shell configuration", "status": "ok", "message": "init.zsh sourced", "fixable": false }, { "name": "turbo export", "status": "warning", "message": "Turbo export generated but not used", "fixable": true } ], "summary": { "ok": 7, "warnings": 1, "errors": 0, "info": 0, "fixable": 1 } }

Up and running
in three steps

One command via Homebrew. No compiler, no build system, no drama.

Tap and install
brew tap dvrd/wayu
brew install wayu
Initialize your config directory
wayu init
Source the init file in your shell RC
# ~/.zshrc or ~/.bashrc
source ~/.local/share/wayu/init.zsh

Config & runtime files in ~/.config/wayu/ + ~/.local/share/wayu/

wayu.toml
Declarative config — source of truth for PATH entries, aliases, and environment variables. Version-controllable.
init.{zsh,bash} + core, lazy, helpers
Generated init files in ~/.local/share/wayu/. Source init.zsh from your shell RC — it loads core, lazy, and helper scripts automatically.
plugins.json
Installed plugin metadata (JSON5). Tracks enabled state, priority, dependencies, and git commit SHAs.
plugins.{zsh,bash}
Generated plugin loader. Resolves dependencies, respects priority order, detects conflicts.
alias-sources.conf
Shell-agnostic. Surface read-only aliases from external tools like fabric patterns.
backup/
Timestamped backups. Created automatically before every modification. Keeps last 5.

Ready to clean up?

Your shell. Under control.

One binary. Zero dependencies. Every shell config change backed up, validated, and reversible.