replaces export PATH="…:$PATH" in each rc file
PATH entries
Keyed, validated, deduplicated. Open shells pick up a change at their next prompt.
wayu path add ~/.cargo/bin
PATH entries, aliases, env vars, encrypted secrets, scripts and plugins — added with one command each, compiled into one file your shell sources at startup.
$ brew tap dvrd/wayu $ brew install wayu $ wayu init
$ curl -fsSL https://wayu.dvrd.io/install.sh | sh $ wayu init # checks the SHA-256, installs to ~/.local/bin
$ git clone https://github.com/dvrd/wayu && cd wayu $ odin build build -out:build_it && ./build_it install # builds, installs to ~/.local/bin, runs wayu init
wayu init offers to add one line to your rc file
Read the quickstart →
❯ wayu path add ~/.cargo/bin ✓ Added to PATH: /Users/ana/.cargo/bin Open shells apply it at their next prompt; new shells pick it up automatically.
# === PATH (live-synced at each prompt) === ⋯ 85 lines \_wayu_paths_apply 39325358edc66ae0 '/Users/ana/.cargo/bin' typeset -U path PATH
The dir is stored with a key in entries.json; open shells re-apply the list at their next prompt from path_sync.zsh.
❯ wayu alias add gs 'git status -sb' ✓ Alias added: gs ❯ wayu const add EDITOR nvim ✓ Constant added: EDITOR
# === Environment === export EDITOR="nvim" ⋯ 643 lines # === Aliases === alias gs='git status -sb'
Constants are exported first, in order; aliases come last, after plugins, so yours win.
❯ wayu const add OPENAI_API_KEY --secret Value for OPENAI_API_KEY (input hidden): ✓ Secret added (encrypted): OPENAI_API_KEY
# === Secrets (encrypted store, per-session cache) ===
_wayu_sc=${XDG_RUNTIME_DIR:-${TMPDIR:-'/Users/ana/.local/share/wayu/run'}}
[ "$_wayu_sc" = / ] || _wayu_sc=${_wayu_sc%/}
_wayu_sc="$_wayu_sc"'/wayu-501'
if [ -h "$_wayu_sc" ] || { [ -e "$_wayu_sc" ] && { [ ! -d "$_wayu_sc" ] || [ ! -O "$_wayu_sc" ] || ! () { emulate -L zsh; local -a m; m=( $1(N/f:go-rwx:) ); (( $#m )); } "$_wayu_sc"; }; }; then _wayu_sc='/Users/ana/.local/share/wayu/run/wayu-501'; fi
_wayu_sc="$_wayu_sc"'/secrets-4c8dfdfa98cbaab0.zsh'
{ [ -O "$_wayu_sc" ] && [ ! -h "$_wayu_sc" ] && [ "$_wayu_sc" -nt '/Users/ana/.local/share/wayu/secrets.json' ]; } || command '/opt/homebrew/bin/wayu' secrets cache --shell zsh </dev/null >/dev/null
if [ -O "$_wayu_sc" ] && [ ! -h "$_wayu_sc" ] && [ "$_wayu_sc" -nt '/Users/ana/.local/share/wayu/secrets.json' ]; then source "$_wayu_sc"; fi
unset _wayu_scNo value in core.zsh: it sources a per-session cache and calls wayu secrets cache only when secrets.json changed.
❯ wayu plugin add autosuggestions ✓ Cloned plugin repository ✓ Plugin 'zsh-autosuggestions' installed successfully
# === Plugins === if [[ -o interactive ]]; then if [ -f "/Users/ana/.local/share/wayu/plugins.zsh" ]; then source "/Users/ana/.local/share/wayu/plugins.zsh"; fi if [ -f "/Users/ana/.local/share/wayu/plugins/config.zsh" ]; then source "/Users/ana/.local/share/wayu/plugins/config.zsh"; fi fi # plugins.zsh, regenerated from plugins.json # zsh-autosuggestions (priority: 100, template: source) if [[ ":${_WAYU_PLUGINS_LOADED-}:" != *:'zsh-autosuggestions':* ]]; then _WAYU_PLUGINS_LOADED="${_WAYU_PLUGINS_LOADED-}:"'zsh-autosuggestions' if [ -f '/Users/ana/.local/share/wayu/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh' ]; then source '/Users/ana/.local/share/wayu/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh' fi fi
Loaders are regenerated from plugins.json; with defer_plugins = true they load after the first prompt.
# ~/.config/wayu/wayu.toml [prompt] enabled = true ❯ wayu build
# === Prompt (wayu native, interactive shells) === if [[ -o interactive ]]; then ⋯ 8 lines _wayu_update_git_info() { ⋯ 24 lines { read -r l < $g/HEAD } 2>/dev/null || return 0 ⋯ 13 lines autoload -Uz add-zsh-hook add-zsh-hook precmd _wayu_update_git_info ⋯ 1 line _wayu_prompt_full() { ⋯ 6 lines result+="%F{6}%B%~%f " if [[ -n "$_WAYU_GIT_BRANCH" ]]; then result+="on %F{5}%B${_WAYU_GIT_BRANCH//\%/%%}%f " fi
The branch comes from .git/HEAD without running git. fish gets the same prompt in core.fish.
What it replaces
Each card is something you used to do by hand in an rc file, or with another tool. In wayu it is a command, and the result lands in the same generated init.
replaces export PATH="…:$PATH" in each rc file
Keyed, validated, deduplicated. Open shells pick up a change at their next prompt.
wayu path add ~/.cargo/bin
replaces alias and export blocks
Constants expand $VAR; values that look like credentials are masked in every list.
wayu alias add gs 'git status -sb'
replaces API keys in plaintext .env files and dotfiles
ChaCha20-Poly1305, master key in the macOS Keychain, the Secret Service or a 0600 file. Value read with hidden input; config, generated files and backups only hold the name. Run-only secrets reach one command through wayu secrets run.
wayu const add OPENAI_API_KEY --secret
replaces a hand-kept ~/bin
Swift, Python, Ruby, Node, Bun, shells, Perl, Lua. Swift is compiled; the rest are linked into a dir on PATH.
wayu script new today --lang python
replaces a separate plugin manager
From a built-in registry or a git URL. Enable, disable, load priority, dependencies, conflict checks. Two of the usual ones are built in (below).
wayu plugin add autosuggestions
replaces a prompt framework (zsh, fish)
Opt-in, for zsh and fish. Git branch read from .git/HEAD without running git, project contexts, async right prompt, vi-mode.
[prompt] enabled = true
replaces eval "$(tool init zsh)" on every start
Init output cached until the binary changes; nvm, conda and sdkman load on first call.
zoxide = { kind = "evalcache", args = "init zsh" }
replaces installer lines piling up at the end of .zshrc
Moves source <(tool completion zsh), eval "$(… init zsh)", fpath edits, a second compinit, PATH exports and aliases from your rc file into wayu's cached init. Shows the diff first, backs the file up, and an open shell tells you when new lines appear.
wayu optimize --dry-run
replaces zsh-autosuggestions and zsh-syntax-highlighting
Opt-in and built into core.zsh: fish-like suggestions from history, and command-line highlighting with zsh-syntax-highlighting's style names, using zsh's own lexer. One zle-line-pre-redraw hook, no widgets re-wrapped before every prompt, no forks; a keystroke re-highlights only the last words. With them on, the two plugins are not loaded.
[settings] autosuggest = true · highlight = true
replaces functions pasted into .zshrc
One file per function, a skeleton opened in $EDITOR, sourced at startup.
wayu function add mkcd
replaces bisecting .zshrc to find what broke
Checks PATH, config, scripts, plugins, backups, secrets and slow startup lines. Exits 78 on errors, so CI can gate on it.
wayu doctor --fix --dry-run
A minute with wayu
The output below is what wayu prints. Click a step; hover or press Pause to hold it.
Path, alias and a run-only secret, the masked constants list, a Python script run with the secret, doctor, then an alias added in the TUI. Recorded with VHS in a throwaway home; the tape is in docs/demo/.
Encrypted secrets
A secret is a constant whose value is encrypted at rest. Your config, the generated shell code and the backups hold only its name; the key sits in your OS keystore.
01 · Add
The value is read with hidden input, so it stays out of ps and your shell history.
❯ wayu const add OPENAI_API_KEY --secret Value for OPENAI_API_KEY (input hidden): ✓ Secret added (encrypted): OPENAI_API_KEY
02 · Store
secrets.jsonChaCha20-Poly1305 under a 256-bit master key, a random nonce per value and the name as associated data. The file is 0600; entries.json keeps only the name.
# entries.json {"name": "OPENAI_API_KEY", "secret": true} # secrets.json "cipher": "chacha20poly1305", "values": { "OPENAI_API_KEY": "y12EtDqRw8ZHkB17hRRR…" }
03 · Use
New shells export it from a per-session cache, decrypted once. A --run-only secret is never exported: wayu secrets run hands it to one command, without a shell.
❯ echo ${#OPENAI_API_KEY} chars 27 chars ❯ echo ${GH_TOKEN:-not set in this shell} not set in this shell ❯ wayu secrets run GH_TOKEN -- sh -c 'echo ${#GH_TOKEN} chars' 18 chars
[secrets] backend = "auto" picks the first that fits. Each data dir has its own key; wayu secrets rekey replaces it and re-encrypts everything.
macOS · default
Login keychain, service wayu-master-key. Stored with /usr/bin/security -i over stdin: the key is never on a command line.
Linux · with secret-tool
The freedesktop Secret Service (GNOME Keyring and friends), through secret-tool from a system dir, never looked up in PATH.
Anywhere · fallback
~/.config/wayu/secret.key, 0600, refused if others can read it. Keep it out of your dotfiles repo.
The session cache is plaintext in a 0700 dir you own ($XDG_RUNTIME_DIR or $TMPDIR); any change to secrets.json and wayu secrets lock delete it. Five session secrets add about 0.6 ms to startup. How secrets work →
Batteries included
evalcache runs zoxide init zsh once and sources the cached output until the binary changes. nvm, conda and lazy load on first call. eager loads before the prompt; login_only only in login shells.
[tools] zoxide = { kind = "evalcache", args = "init zsh" } atuin = { args = "init zsh --disable-up-arrow", eager = true } nvm = { kind = "nvm" } keychain = { args = "--eval --quiet id_ed25519", login_only = true } [tools.sdk] kind = "lazy" init_script = "~/.sdkman/bin/sdkman-init.sh" hook_commands = ["sdk"]
Off by default. Generated into the same core.zsh or core.fish: the git branch comes from .git/HEAD, the changed-file count from an async right prompt, and vi-mode shows its mode in the prompt character.
[prompt] enabled = true vi_mode = true format = "{dir}{git_branch}[{language_context}](yellow){character} " [prompt.dir] format = "[$dir](cyan bold) " [prompt.git_branch] format = "on [$branch](magenta bold) " [prompt.character] success_symbol = "[>](green)" error_symbol = "[x](red)" [prompt.interactive] async_rprompt = true rprompt_format = "[ {git_pending}](242)"
Run a command before or after a PATH, alias, constant, plugin or export operation. Placeholders become quoted variables, never code; pre-hooks run only when something will change, none under --dry-run.
# event = command post_path_add = echo added {path} >> ~/hook.log pre_constant_remove = sh -c 'echo removing {name} >> ~/hook.log' post_constant_remove = echo "gone: $WAYU_HOOK_NAME" >> ~/hook.log
A run-only secret is never exported. wayu secrets run decrypts it into the environment of that one command and execs it, without a shell. Put it behind an alias and gh gets its token every time.
❯ wayu const add GH_TOKEN --run-only Value for GH_TOKEN (input hidden): ✓ Secret added (encrypted) (run-only: wayu secrets run): GH_TOKEN ❯ wayu alias add gh 'wayu secrets run GH_TOKEN -- gh' ✓ Alias added: gh ❯ wayu secrets list GH_TOKEN run-only
script new writes a skeleton with the interpreter's absolute path as the shebang, opens $EDITOR, and links it into bin/, first among wayu's PATH entries. script import adopts what you already have in ~/bin.
❯ wayu script new today --lang python ✓ Created script: /Users/ana/.local/share/wayu/scripts/today.py ✓ Linked /Users/ana/.local/share/wayu/bin/today -> ../scripts/today.py ❯ wayu script list 📜 Scripts today python ok /Users/ana/.local/share/wayu/scripts/today.py
The CLI never prompts. Lists, search and doctor print JSON with --json; exit codes follow sysexits.h; destructive actions need --yes; --dry-run previews any write.
❯ wayu path list --json { "paths": [ {"path": "/Users/ana/.cargo/bin", "source": "wayu", "exists": true} ] } ❯ wayu alias list --json | jq -r '.aliases[].command' git status -sb
PATH entries, config, scripts, plugins, backups, the secrets store and key, and startup-file lines that cost time. --fix repairs what it can; any error exits 78.
❯ wayu doctor 🔬 wayu Doctor - System Health Check ✓ wayu installation wayu 8.0.0 installed ✓ PATH entries 1 PATH entries, all valid ✓ scripts 1 script(s) built ✓ secrets backend keychain: key present, every secret decrypts ✓ startup files No startup-file line after wayu loads needs to move into wayu …
Compared
| Capability | wayu | Hand-written dotfiles | oh-my-zsh | zinit / antidote |
|---|---|---|---|---|
| PATH, aliases and env vars added by commandadd, remove, list; no editing files | Yes | No | No | No |
| Encrypted secretsrun-only secrets for a single command | Yes | No | No | No |
| zsh, bash and fish from one set of entries | Yes | Noone file per shell | Nozsh only | Nozsh only |
| Install plugins from a git URL | Yes | No | Noclone into $ZSH_CUSTOM by hand | Yes |
| Preview every write, automatic backups--dry-run; backup before the first write | Yes | No | No | No |
| JSON output and sysexits exit codes | Yes | No | No | No |
| Full-screen TUI for entries | Yes | No | No | No |
oh-my-zsh and zinit/antidote are good at what they do: themes, a large plugin collection, fast plugin loading. wayu can run alongside them; the table lists only what each one does out of the box.
CI checks memory handling, real shell sessions, upgrades, failed writes, interrupted operations and a full filesystem. Candidate trials repeat fresh sessions in Zsh, Bash and Fish on macOS and Linux. See the gates, retained evidence and limits →
Automated sessions do not replace multi-day use. Multi-machine secrets remain experimental while their independent review is pending.
wayu init asks before it adds one source line to your rc file (it only prints the line when it isn't run in a terminal). Everything else lives in ~/.config/wayu and ~/.local/share/wayu.
Every write is backed up first, keeping the newest five per file: wayu backup list, then wayu backup restore entries --yes (or .zshrc, toml). To uninstall, restore your rc file if optimize changed it, remove the line, brew uninstall wayu, and delete those two directories; if you stored secrets, also delete the wayu-master-key item from your keychain.
Yes. wayu init offers to add one line to your rc file and wayu leaves the rest alone, so oh-my-zsh, a plugin manager or your own lines keep running; move things over at your own pace. wayu optimize --dry-run lists the lines after wayu's that it could take over, without changing anything.
wayu optimize touch?Only top-level lines that come after the line that loads wayu, in your shell's startup files: eval "$(tool init zsh)" and source <(tool completion zsh) (cached instead), fpath edits, an extra compinit, PATH exports, aliases and exports. Anything inside if, loops, functions or here-documents stays. It prints a diff and exits without --yes; with it, the file is backed up and rewritten atomically. Full rules →
Values are encrypted in ~/.local/share/wayu/secrets.json (0600). The master key is in the macOS Keychain, the freedesktop Secret Service on Linux with secret-tool, or ~/.config/wayu/secret.key. Decrypted values go only to a per-session cache in a 0700 dir you own, never to core.zsh, backups or logs. How it works ↑
Prebuilt binaries for macOS 15 or later (Apple silicon and Intel) and Linux on x86_64 and arm64 (glibc), through Homebrew. Anything else (older macOS, musl Linux, the BSDs): build from source with Odin. Tested with zsh 5.9, bash 3.2 and 5.x, fish 4.x, on macOS 15, 26 and 27 and Ubuntu 24.04. Windows is not supported.
It is usually faster than what it replaces: everything is precomputed into one core.zsh (zcompiled), tool init output is cached until the binary changes, and plugins can load after the first prompt. See the benchmark, or run wayu build profile on your own setup.
From 7.0 on, the commands, flags, exit codes, --json shapes, wayu.toml keys and data files are stable within a major version. A release that changes a data format or moves a file migrates yours automatically (backup first), and anything being removed is deprecated for at least one minor release first. Stability guarantees →
Privately, through GitHub's Report a vulnerability, not in a public issue. Fixes ship in a patch release of the latest major. Security policy →
Prebuilt for macOS 15 or later (Apple silicon and Intel) and Linux (x86_64 and arm64). Anything else: build from source with Odin.
$ brew tap dvrd/wayu $ brew install wayu $ wayu init
$ curl -fsSL https://wayu.dvrd.io/install.sh | sh $ wayu init # checks the SHA-256, installs to ~/.local/bin
$ git clone https://github.com/dvrd/wayu && cd wayu $ odin build build -out:build_it && ./build_it install # needs the Odin release in .github/odin-release
wayu init offers to add one line to your rc file, e.g. for zsh: source "${WAYU_DATA_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/wayu}/init.zsh"