Skip to content

daft shared ​

Manage shared files across worktrees

Description ​

Centralize untracked configuration files (.env, .idea/, .vscode/, etc.) so they are shared across worktrees via symlinks.

Files are stored in .git/.daft/shared/ and symlinked into each worktree. Use 'materialize' to make a worktree-local copy, and 'link' to rejoin the shared version.

Without a subcommand, shows status.

Usage ​

daft shared

Subcommands ​

add ​

Collect file/dir from current worktree into shared storage

daft shared add [OPTIONS] <PATHS>

Arguments ​

ArgumentDescriptionRequired
<PATHS>Paths to share (relative to worktree root)Yes

Options ​

OptionDescriptionDefault
--declareOnly declare the path in daft.yml without collecting (file need not exist)

remove ​

Stop sharing a file (materialize everywhere, then remove)

daft shared remove [OPTIONS] <PATHS>

Arguments ​

ArgumentDescriptionRequired
<PATHS>Paths to stop sharingYes

Options ​

OptionDescriptionDefault
--deleteDelete shared file and all symlinks instead of materializing

materialize ​

Replace symlink with a local copy in current worktree

daft shared materialize [OPTIONS] <PATH> [WORKTREE]

Arguments ​

ArgumentDescriptionRequired
<PATH>Shared file path to materializeYes
<WORKTREE>Target worktree name or path (defaults to current worktree)No

Options ​

OptionDescriptionDefault
--overrideForce materialization even if a non-shared file exists

Replace local copy with symlink to shared version

daft shared link [OPTIONS] <PATH> [WORKTREE]

Arguments ​

ArgumentDescriptionRequired
<PATH>Shared file path to link back to shared versionYes
<WORKTREE>Target worktree name or path (defaults to current worktree)No

Options ​

OptionDescriptionDefault
--overrideReplace local file even if it differs from shared version

status ​

Show shared files and per-worktree state

daft shared status [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)

sync ​

Ensure all worktrees have symlinks for declared shared files

daft shared sync

manage ​

Interactive TUI for managing shared file state across worktrees

daft shared manage

Global Options ​

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

Structured Output ​

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

sh
# Shared file state as TSV (long-form: one row per file per worktree)
daft shared status --format tsv

# Wide pivot table in markdown for quick visual reading
daft shared status --format markdown

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

Released under MIT or Apache-2.0.