Skip to content

wtm init

This content is for v0.28. Switch to the latest version for up-to-date documentation.

Initialize wtm configuration

Interactive wizard to set up global config and project config in /wtm/config.toml. Pass --yes (or any config flag) to bootstrap from flags + auto-detection instead; without a terminal, init does so on its own and never prompts. Use --only env|hooks|worktrees to re-run init for specific sections and regenerate them cleanly. Services & tasks are configured separately with wtm run init.

wtm init [flags]
# The wizard
wtm init
# Unattended, from detection
wtm init --yes
wtm init --yes --base-path ../acme.trees --install-command "pnpm install"
# Regenerate the hooks section only
wtm init --only hooks
--base-branch string Default base branch for new worktrees
--base-path string Worktree directory, relative to repo root
--clean-command string Command to run before removing a worktree
--env-strategy string Env provisioning strategy: example, main, or parent
-h, --help help for init
--install-command string Command to run after creating a worktree
--only strings Re-init only these sections (env, hooks, worktrees); regenerates them cleanly
--shell string Global shell: zsh, bash, or fish
--skip-clean Skip on_clean hooks config
--skip-env Skip .env provisioning config
--skip-hooks Skip on_create hooks config
-y, --yes Run unattended: bootstrap (or re-init) from flags + auto-detection; never prompt
-q, --quiet Silence human output; errors and the exit code are unaffected, and --output json still emits its document
  • wtm - Orchestrate git worktrees and team dev workflows from the terminal