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 to ~/.zshrc:

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

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