Shell integration
gji can create and resolve worktree paths on its own, but a normal CLI process cannot change the working directory of the shell that launched it.
That is why commands like gji go, gji new, and gji done need shell integration if you want them to move your current terminal session directly.
What shell integration does
When integration is installed:
gji new feature/foocreates the worktree and moves your shell into it.gji go mainjumps back to the main checkout.gji backreturns you to the last worktree you were in.gji done feature/foocan finish by returning you to a stable repo path.
Without integration, gji still works, but it prints paths rather than changing directories for you.
Install once
gji init
gji doctor
The interactive wizard detects your shell, installs the wrapper and completion, and lets you save an available editor CLI.
For dotfiles or non-interactive setup, the explicit commands remain available:
echo 'eval "$(gji init zsh)"' >> ~/.zshrc
echo 'eval "$(gji init bash)"' >> ~/.bashrc
gji init fish --write
Inspect before enabling
If you want to review what gets added to your shell:
gji init zsh
gji init bash
The command prints the shell function used for handoff.
Refresh after updates
If you reinstall or upgrade the CLI, refresh your current shell:
eval "$(gji init zsh)"
Script mode
For scripts, CI helpers, or custom aliases, use --print instead:
gji go --print feature/auth-refactor
gji root --print
That gives you the target path without shell handoff.