Skip to content

Configuration

daft reads configuration from Git's config system. Settings are loaded with standard Git priority: repository-local config overrides global config, which overrides built-in defaults.

Setting Values

bash
# Set for the current repository
git config daft.autocd false

# Set globally (all repositories)
git config --global daft.autocd false

General Settings

KeyDefaultDescription
daft.autocdtrueCD into new worktrees when using shell wrappers
daft.remote"origin"Default remote name for all operations
daft.updateChecktrueShow notifications when a new daft version is available
daft.experimental.gitoxidefalseUse gitoxide for supported Git operations
daft.go.autoStartfalseAuto-create worktree when branch not found in daft go

Layout Settings

Layout configuration uses ~/.config/daft/config.toml (TOML format), not git config. This is different from the other settings on this page.

See the Layouts guide for detailed explanations of each layout.

KeyFileDescription
defaults.layoutconfig.tomlGlobal default layout name or template
layoutdaft.yml (in repo)Team-recommended layout for this repository
[layouts.<name>]config.tomlCustom layout definition

Global Default

toml
# ~/.config/daft/config.toml
[defaults]
layout = "contained"

Or use the command: daft layout default contained

Custom Layouts

toml
# ~/.config/daft/config.toml
[layouts.my-team]
template = "../.worktrees/{{ repo }}/{{ branch | sanitize }}"

[layouts.isolated]
template = "~/worktrees/{{ repo }}/{{ branch | sanitize }}"

Team Convention (daft.yml)

yaml
# daft.yml (committed to repository)
layout: contained

Checkout Settings

KeyDefaultDescription
daft.checkout.pushtruePush new branches to remote after creation
daft.checkout.upstreamtrueSet upstream tracking for branches
daft.checkout.carryfalseCarry uncommitted changes when checking out existing branches
daft.checkoutBranch.carrytrueCarry uncommitted changes when creating new branches

Update Settings

KeyDefaultDescription
daft.update.args"--ff-only"Default arguments passed to git pull in update operations (same-branch mode)

List Settings

KeyDefaultDescription
daft.list.stat"summary"Default statistics mode for list command (summary or lines)
daft.list.columnsDefault column selection for list command (e.g., branch,path,age or +size,-annotation)
daft.list.sortDefault sort order for list command (e.g., +branch, -activity, +owner,-size). Sortable: branch, path, size, age, owner, activity

Prune Settings

KeyDefaultDescription
daft.prune.cdTarget"root"Where to cd after pruning the current worktree. Values: root (project root) or default-branch (default branch worktree)
daft.prune.stat"summary"Default statistics mode for prune command (summary or lines)
daft.prune.columnsDefault column selection for prune command
daft.prune.sortDefault sort order for prune command (e.g., +branch, -activity)

Sync Settings

KeyDefaultDescription
daft.sync.stat"summary"Default statistics mode for sync command (summary or lines)
daft.sync.columnsDefault column selection for sync command
daft.sync.sortDefault sort order for sync command (e.g., +branch, -activity)

Multi-Remote Settings

KeyDefaultDescription
daft.multiRemote.enabledfalseEnable multi-remote directory organization
daft.multiRemote.defaultRemote"origin"Default remote for new branches in multi-remote mode

Hooks Settings

KeyDefaultDescription
daft.hooks.enabledtrueMaster switch for all hooks
daft.hooks.defaultTrust"deny"Default trust level for unknown repositories (deny, prompt, or allow)
daft.hooks.userDirectory~/.config/daft/hooks/Path to user-global hooks directory
daft.hooks.timeout300Hook execution timeout in seconds
daft.hooks.trustPrunetrueAuto-prune stale entries from the trust database (background, once per 24h)

Per-Hook Settings

Each hook type can be configured individually. The hook name uses camelCase.

KeyDefaultDescription
daft.hooks.<hookName>.enabledtrueEnable/disable a specific hook type
daft.hooks.<hookName>.failModevariesBehavior on failure: abort or warn

Hook names: postClone, worktreePreCreate, worktreePostCreate, worktreePreRemove, worktreePostRemove.

Default fail modes:

  • worktreePreCreate: abort (setup must succeed before creating worktree)
  • All others: warn (don't block operations)

Hook Output Settings

KeyDefaultDescription
daft.hooks.output.quietfalseSuppress hook stdout/stderr
daft.hooks.output.timerDelay5Seconds before showing elapsed timer
daft.hooks.output.tailLines6Rolling output lines per job (0 = none)

YAML Hooks Configuration

Hooks can also be configured through a daft.yml file for richer features including multiple jobs, execution modes, job dependencies, and conditional execution.

See the Hooks guide for the complete daft.yml reference.

Examples

bash
# Don't push new branches automatically
git config daft.checkout.push false

# Use a different remote
git config daft.remote upstream

# Disable auto-cd globally
git config --global daft.autocd false

# After pruning, cd to default branch worktree instead of root
git config daft.prune.cdTarget default-branch

# Auto-create worktree when branch not found in daft go
git config daft.go.autoStart true

# Use rebase-style update by default
git config daft.update.args "--rebase"

# Disable hooks globally
git config --global daft.hooks.enabled false

# Make post-create hooks abort on failure
git config daft.hooks.worktreePostCreate.failMode abort

Environment Variables

VariableDescription
DAFT_CD_FILETemp file path for shell wrapper CD communication (set by shell wrappers)
DAFT_NO_HINTSSet to suppress contextual hint messages
DAFT_NO_TRUST_PRUNESet to disable automatic trust database pruning
DAFT_NO_UPDATE_CHECKSet to disable version update notifications
NO_COLORStandard variable to disable colored output
PAGEROverride the pager for daft release-notes

Git Hooks

daft's push operations are structural -- they manage branch topology as a side-effect of worktree management, not as user-initiated code pushes. Because of this, daft passes --no-verify on all git push calls, skipping any pre-push hooks configured in the repository.

This affects three commands:

  • daft start / git worktree-checkout -b -- pushes the new branch to set upstream tracking
  • daft remove / git worktree-branch -d -- pushes --delete to remove the remote branch
  • daft multi-remote move --push -- pushes an existing branch to a new remote

If a push fails (due to network issues, auth errors, or remote rejection rules), daft treats it as non-fatal: the local worktree and branch remain usable, and a warning is shown with the manual recovery command.

To disable pushing entirely for new branches, set daft.checkout.push to false.

This only applies to git's own hooks. daft's

lifecycle hooks (configured in daft.yml or .daft/hooks/) are always executed normally. :::

Released under the MIT License.