Shell Setup
vibe needs a shell wrapper function to change directories after creating or cleaning up worktrees. Add the appropriate configuration to your shell.
Shell Configuration
Section titled “Shell Configuration”Add to ~/.zshrc:
vibe() { eval "$(command vibe "$@")" }Add to ~/.bashrc:
vibe() { eval "$(command vibe "$@")"; }Add to ~/.config/fish/config.fish:
function vibe eval (command vibe $argv)endAdd to ~/.config/nushell/config.nu:
def --env vibe [...args] { ^vibe ...$args | lines | each { |line| nu -c $line }}Add to your $PROFILE:
function vibe { Invoke-Expression (& vibe.exe $args) }Using mise (automatic setup)
Section titled “Using mise (automatic setup)”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)"'Why is this needed?
Section titled “Why is this needed?”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.
Verify Installation
Section titled “Verify Installation”After adding the shell configuration, reload your shell and verify:
# Reload your shell or open a new terminalsource ~/.zshrc # or ~/.bashrc, etc.
# Check vibe is workingvibe --helpNext Steps
Section titled “Next Steps”- Configuration - Set up
.vibe.tomlfor automated workflows - Commands - Learn about available commands