Skip to main content
Global flags can be used with any lazyworktree command, including when launching the TUI.

Available Flags

--worktree-dir
string
Override the default worktree root directory.Default: ~/.local/share/worktreesExample:
lazyworktree --worktree-dir ~/worktrees
--config-file
string
Path to configuration file, overriding the default XDG config directory location.Default: ~/.config/lazyworktree/config.yamlExample:
lazyworktree --config-file ~/my-config.yaml
--theme
string
Override the UI theme. Available themes: dracula, dracula-light, narna, clean-light, catppuccin-latte, rose-pine-dawn, one-light, everforest-light, everforest-dark, solarized-dark, solarized-light, gruvbox-dark, gruvbox-light, nord, monokai, catppuccin-mocha, modern, tokyo-night, one-dark, rose-pine, ayu-mirage, kanagawa.If unspecified, lazyworktree attempts to auto-detect the theme based on the terminal’s background colour.Example:
lazyworktree --theme nord
--search-auto-select
boolean
Start with filter focused and select first match on Enter.Example:
lazyworktree --search-auto-select
--output-selection
string
Write the selected worktree path to a file on exit (for shell integration).Example:
lazyworktree --output-selection /tmp/selected-worktree
--debug-log
string
Path to debug log file for troubleshooting.Example:
lazyworktree --debug-log /tmp/lazyworktree.log
--show-syntax-themes
boolean
Display the default delta syntax-theme values for each UI theme and exit.Example:
lazyworktree --show-syntax-themes
--version
boolean
Print version information and exit.Example:
lazyworktree --version

Examples

Combining Global Flags

# Custom worktree directory with nord theme
lazyworktree --worktree-dir ~/worktrees --theme nord

# Debug logging while creating worktree
lazyworktree --debug-log /tmp/debug.log create my-feature

# Custom config file with search auto-select
lazyworktree --config-file ~/custom-config.yaml --search-auto-select

With Subcommands

# List worktrees with custom directory
lazyworktree --worktree-dir ~/worktrees list

# Create worktree with theme override
lazyworktree --theme dracula create my-feature

# Delete with debug logging
lazyworktree --debug-log /tmp/debug.log delete my-feature

Build docs developers (and LLMs) love