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 remove 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 remove 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
zsh
echo 'eval "$(gji init zsh)"' >> ~/.zshrc
source ~/.zshrc
bash
echo 'eval "$(gji init bash)"' >> ~/.bashrc
source ~/.bashrc
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.