Install with a ZSH plugin manager
Repo Manager works with all major ZSH plugin managers. Choose the one you use:- antidote
- zinit
- sheldon
Add to your Then reload antidote:
.zsh_plugins.txt:Configuration
Base directory
By default, all repositories are cloned to$HOME/repos. To change this, set the REPO_BASE_DIR environment variable in your .zshrc before loading the plugin:
Make sure to set
REPO_BASE_DIR before your plugin manager loads Repo Manager.Example .zshrc configuration
Optional dependencies
Repo Manager works out of the box, but these optional tools enhance the experience:fzf (fuzzy finder)
Purpose: Enables interactive worktree selection when navigating to repos with multiple worktrees. Installation:repo goto user/repo on a repository with multiple worktrees, fzf presents an interactive picker:
Without fzf,
repo goto will navigate to the default branch worktree.gh (GitHub CLI)
Purpose: Required forrepo wt pr command to create worktrees from GitHub pull requests.
Installation:
Verify installation
Check that Repo Manager is loaded correctly:Customize hooks (optional)
Repo Manager provides hooks that execute after certain operations. By default, these hooks change to the new directory (cd), but you can customize them to open your editor, run scripts, or anything else.
Add to your .zshrc after the plugin loads:
Hooks must be defined after Repo Manager loads, so place them after your plugin manager configuration in
.zshrc.Next steps
Quickstart
Clone your first repository and start using worktrees