Skip to content

daft layout

Manage worktree layouts

Description

Manage worktree layouts for daft repositories.

Layouts control where worktrees are placed relative to the bare repository. Built-in layouts:

contained Worktrees inside the repo directory (bare required) contained-classic Like contained but default branch is a regular clone contained-flat Like contained but branch slashes flattened to dashes sibling Worktrees next to the repo directory (default) nested Worktrees in a hidden subdirectory centralized Worktrees in a global ~/worktrees/ directory

Use daft layout list to see all available layouts including custom ones defined in your global config (~/.config/daft/config.toml).

Use daft layout show to see the resolved layout for the current repo.

Use daft layout transform <layout> to convert a repo between layouts.

Use daft layout default to view or change the global default layout.

Usage

daft layout

Subcommands

list

List all available layouts

daft layout list [OPTIONS]

Options

OptionDescriptionDefault
--format <FORMAT>Output format. Mutually exclusive with --template
--template <STR>Tera template string. Mutually exclusive with --format
--no-headersOmit header row (tsv/csv only)

show

Show the resolved layout for the current repo

daft layout show [PATH]

Arguments

ArgumentDescriptionRequired
<PATH>Path to a git repository (defaults to current directory)No

transform

Transform the current repo to a different layout

daft layout transform [OPTIONS] <LAYOUT>

Arguments

ArgumentDescriptionRequired
<LAYOUT>Target layout name or templateYes

Options

OptionDescriptionDefault
-f, --forceForce transform even with uncommitted changes
--dry-runShow plan without executing
--include <BRANCH>Also relocate this non-conforming worktree (repeatable)
--include-allRelocate all non-conforming worktrees
-q, --quietOperate quietly; suppress progress reporting
-v, --verboseShow detailed hook execution

default

View or set the global default layout

daft layout default [OPTIONS] [LAYOUT]

Arguments

ArgumentDescriptionRequired
<LAYOUT>Layout name or template to set as the global defaultNo

Options

OptionDescriptionDefault
--resetRemove the global default, reverting to built-in (sibling)

reset

Clear the stored layout for a repo

daft layout reset [PATH]

Arguments

ArgumentDescriptionRequired
<PATH>Path to a git repository (defaults to current directory)No

Global Options

OptionDescription
-h, --helpPrint help information
-V, --versionPrint version information

Structured Output

daft layout list supports machine-readable output via --format: json, ndjson, tsv, csv, yaml, toon, markdown, plus --template <tera> for custom output.

sh
# Layout names and templates as TSV
daft layout list --format tsv | cut -f1,3

# List layouts as JSON for tooling
daft layout list --format json

See the Output Formats guide for format details and Tera syntax.

Released under MIT or Apache-2.0.