Skip to content

Shortcuts ​

For the git-native commands (e.g., git worktree-checkout), daft provides short symlink aliases. Note that the daft verb commands (daft go, daft start, etc.) are already concise and don't need shortcuts.

Shortcut Styles ​

Three styles are available. Enable the one that fits your preference.

Git Style (default) ​

Prefix: gwt (Git Worktree)

ShortcutFull Command
gwtclonegit-worktree-clone
gwtinitgit-worktree-init
gwtcogit-worktree-checkout
gwtcbgit-worktree-checkout -b
gwtbdgit-worktree-branch -d
gwtprunegit-worktree-prune
gwtcarrygit-worktree-carry
gwtfetchgit-worktree-fetch
gwtlsgit-worktree-list
gwtsyncgit-worktree-sync

Shell Style ​

Prefix: gw (shorter, shell-friendly)

ShortcutFull Command
gwcogit-worktree-checkout
gwcobgit-worktree-checkout -b

Legacy Style ​

From earlier versions of daft:

ShortcutFull Command
gclonegit-worktree-clone
gcwgit-worktree-checkout
gcbwgit-worktree-checkout -b
gprunegit-worktree-prune

Default-Branch Shortcuts (shell-init only) ​

These shortcuts resolve the remote's default branch dynamically. They require shell integration (daft shell-init) and are not available as symlinks.

ShortcutStyleDescription
gwtcmGitCheck out the default branch
gwtcbmGitCreate branch from default branch (git-worktree-checkout -b)
gwcobdShellCreate branch from default branch (git-worktree-checkout -b)
gcbdwLegacyCreate branch from default branch (git-worktree-checkout -b)

Managing Shortcuts ​

bash
# List all available styles and mappings
daft activate shortcuts list

# Show which shortcuts are currently installed
daft activate shortcuts status

# Enable a style (creates symlinks)
daft activate shortcuts enable git

# Disable a style (removes symlinks)
daft activate shortcuts disable legacy

# Enable only one style (disable all others)
daft activate shortcuts only shell

# Preview changes without applying
daft activate shortcuts only git --dry-run

How They Work ​

Shortcuts are implemented as symlinks that point to the daft binary. When the binary starts, it inspects argv[0] (how it was invoked) and maps the shortcut name to the corresponding full command.

For example, gwtco is a symlink to daft. When invoked, the binary sees argv[0] = "gwtco", resolves it to git-worktree-checkout, and runs that command.

Shell Integration Aliases ​

Alternatively, daft shell-init can generate shell aliases with the --aliases flag:

bash
eval "$(daft shell-init bash --aliases)"

This creates shell functions (not symlinks) for the shell-style shortcuts (gwco, gwcob) with proper cd behavior built in. The gwcob alias maps to git-worktree-checkout -b. Default-branch shortcuts (gwtcm, gwtcbm, gwcobd, gcbdw) are always included in daft shell-init output regardless of the --aliases flag.

daft shell-init also generates shell functions for gwtrn (maps to daft rename) and gwtsync (maps to git-worktree-sync). These are always included in the shell-init output and provide the same cd behavior as other shell wrappers.

Released under MIT or Apache-2.0.