Skip to content

CLI Reference

Terminal window
brew tap dotkit-run/cli
brew install dotkit

Or via the bootstrap installer. Dotkit CLI is installed automatically.

Apply a profile directory. Processes folders in execution order.

Terminal window
dotkit apply [--dry-run] DIR
FlagDescription
--dry-runPrint what would run without executing

Execution order: configs/tools/packages/ → other run folders → link folders → todo folders.

Customize with order.txt in DIR. Prefix with ! to exclude a folder.

Examples:

Terminal window
dotkit apply profiles/personal
dotkit apply --dry-run profiles/work

Execute a dotkit file, shell script, URL, or remote module.

Terminal window
dotkit run [--extension EXT] FILE|URL|REMOTE
ArgumentDescription
FILELocal file. No extension probes .sh.txt.md
URLRemote URL. Extension required.
REMOTEGitHub ref. See formats below.

Remote formats:

FormatResolves to
:pathdotkit-run/community at path
org/repo:pathAny GitHub repo at path
org/repo@ref:pathPinned to tag, branch, or SHA

Examples:

Terminal window
dotkit run packages/brew
dotkit run :tools/brew
dotkit run dotkit-run/[email protected]:tools/node-fnm
dotkit run https://raw.githubusercontent.com/dotkit-run/community/HEAD/tools/rust.txt

Append items to a map block in a module file and run them immediately.

Terminal window
dotkit add [FLAGS] MODULE [ITEMS...]

MODULE is relative to the active profile directory. File lookup order: .txt.md.sh.

FlagDescription
(none)Interactive: show map blocks, pick one, enter items, confirm
-ySkip confirmation. Auto-pick if only one map block.
-y0Use last map block. Skip confirmation.
-y1..-y9Use Nth map block (1 = first). Skip confirmation.

Requires an active profile (set by the bootstrap installer or DOTKIT_PROFILE_DIR env var).

Examples:

Terminal window
dotkit add packages/brew neovim
dotkit add -y packages/brew ripgrep fd bat
dotkit add -y1 packages/brew neovim

Symlink files from SRC into DEST, mirroring the directory structure.

Terminal window
dotkit link SRC [DEST]

If DEST is omitted, reads DEST from SRC/link.env.

Destination stateAction
MissingSymlink created
Correct symlinkReported ok, skipped
Stale symlinkBacked up, replaced
Real fileBacked up (with diff), replaced

Backups use the pattern filename.bak.YYYYMMDDHHMMSS.

link.env, todo.env, and run.env are never symlinked.

Examples:

Terminal window
dotkit link dotfiles
dotkit link profiles/personal/dotfiles ~

Generate a TODO.md checklist from a structured directory.

Terminal window
dotkit todo [-f] DIR
FlagDescription
-f, --forceOverwrite existing TODO.md

Reads todo.env for output location and heading. index.txt / index.md contributes content at the top level; other files and subdirectories become subsections.

Examples:

Terminal window
dotkit todo profiles/personal/manual
dotkit todo -f profiles/personal/manual

Apply a template to each row of data from stdin.

Terminal window
dotkit map TEMPLATE <<BODY
row1
key = value
BODY

Rows split on =. Blank lines and # comments skipped.

PlaceholderAliasValue
{{1}}{{item}}, {{key}}First field
{{2}}{{value}}Second field
{{3}}N/AThird field

Examples:

Terminal window
dotkit map 'brew install {{item}}' <<BODY
gh
ripgrep
BODY
dotkit map 'git config --global {{key}} {{value}}' <<BODY
user.name = Your Name
user.email = [email protected]
BODY

Parse a dotkit file and emit shell to stdout without executing.

Terminal window
dotkit parse [--extension EXT] FILE

Useful for debugging or piping into a custom executor.

Examples:

Terminal window
dotkit parse packages/brew.txt
dotkit parse packages/brew.md | sh
dotkit parse --extension txt packages/brew

Download and execute an installer script.

Terminal window
dotkit install URL [-- ARGS...]

Downloads with curl (or wget as fallback). Pass -- ARGS to forward arguments to the installer.

Examples:

Terminal window
dotkit install https://sh.rustup.rs -- -y
NONINTERACTIVE=1 dotkit install https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh

Manage the dotkit CLI installation.

Terminal window
dotkit self update
dotkit self uninstall

If dotkit was installed via Homebrew, use brew upgrade dotkit instead.