Skip to content

Shell Setup

vibe needs a shell wrapper function to change directories after creating or cleaning up worktrees. Add the appropriate configuration to your shell.

Add one of the following to ~/.zshrc. Do not add both — the wrapper would be defined twice.

Recommended — wrapper function with tab completion (subcommands, flags, and branch names for vibe start / vibe jump):

Terminal window
autoload -Uz compinit && compinit
eval "$(vibe shell-setup --shell zsh --with-completion)"

The two lines define the vibe wrapper and register the zsh completion together. The compinit line is required for zsh’s completion system — if you already invoke compinit elsewhere in your ~/.zshrc, place the eval line after that call. If compinit has not run, the completion registration is silently skipped and the vibe wrapper is still defined.

Wrapper only (no tab completion):

Terminal window
vibe() { eval "$(command vibe "$@")" }

If you installed vibe with mise, you can automate shell setup using mise’s hooks feature.

Add the following to your project’s .mise.toml:

[hooks]
enter = 'eval "$(vibe shell-setup)"'

When vibe creates a worktree, it needs to change your current working directory to the new worktree. However, a subprocess cannot change the parent process’s directory directly.

The shell wrapper function captures vibe’s output (which contains shell commands like cd /path/to/worktree) and executes it in the current shell context.

After adding the shell configuration, reload your shell and verify:

Terminal window
# Reload your shell or open a new terminal
source ~/.zshrc # or ~/.bashrc, etc.
# Check vibe is working
vibe --help