Configuration
Configure ghostree behavior and per-worktree Ghostty settings.
Config File
ghostree reads configuration from ~/.config/ghostree/config.toml:
# Default Ghostty config to use for new worktrees
[ghostty]
theme = "catppuccin-mocha"
font-size = 14
# Per-project overrides
[projects."/Users/me/code/my-app"]
theme = "dracula"
Per-Worktree Config
Each worktree can have its own Ghostty overrides. ghostree looks for a .ghostree.toml file in the worktree root:
[ghostty]
theme = "tokyo-night"
font-size = 16
This lets you visually distinguish which branch you're working on by using different themes per worktree.
Environment Variables
| Variable | Description | Default |
|---|---|---|
GHOSTREE_CONFIG | Path to config file | ~/.config/ghostree/config.toml |
GHOSTREE_WORKTREE_DIR | Base directory for worktrees | ../<repo>-worktrees |
GHOSTREE_AUTO_PRUNE | Auto-prune merged worktrees | false |
Shell Integration
Add to your .zshrc or .bashrc:
eval "$(ghostree shell-init zsh)"
This enables:
- Tab completion for worktree names
- Prompt integration showing the current worktree
- The
gtalias forghostree