Skip to content

CLI Reference ​

Every public dotbrain command, grouped by task. Run any command with --help for the same information in the terminal.

Human reports group changes and problems by target, shorten home paths to ~, and use tables for catalogs and project inspection. Empty lists, previews, and skipped work are explicit. Doctor shows problems and warnings first; use doctor -v to include every healthy check. Troubleshooting lists doctor's drift warnings and their fixes. Runtime activation and session uncertainty are informational, shown with doctor -v and in JSON; they do not count as passed checks. Missing registered hook files and failed plugin checks remain warnings. With --all, a project whose shared .repo checkout is absent on this machine is reported as skipped, not failed; a missing .repo.local checkout or an explicit --project still fails. Colors follow terminal capabilities; redirected output stays plain.

Finite reports support --json: stdout contains one result with command, overall status, per-target results, and errors. Finding severities are info, warning, and error; warnings alone do not cause failure. Exit codes are 0 for success, 1 for operational failure or a partially failed batch, and 2 for invalid invocation or selection.

JSON consumers must replace checks for severity: advisory with severity: warning. The old severity is no longer emitted; other result fields and exit codes are unchanged.

Commands at a Glance ​

CommandDoes
bootstrapPrepare this machine for dotbrain: global skill and subagent links.
detachRemove dotbrain's machine-wide delivery from a runtime.
doctorRead-only health check of machine readiness and selected project setup.
wireCreate a Brainspace or attach a checkout, including a linked worktree.
refreshRepair setup while preserving project declarations and content.
unwireRemove a checkout's wiring while retaining its Brainspace and tracker databases.
projects listList every registered project using local declarations and wiring.
projects showInspect the current wired project or a named project's registered checkout.
skills listDiscover locally available skills.
skills linkReconcile selected skills in project or explicit global scope, selecting ENTRIES first.
skills unlinkRemove ENTRIES from the project or global selection, then reconcile, pruning their links.
skills addAdd a skill repository to ~/dotbrain/skills as a submodule of the home and commit it.
skills updateMove skill repositories to their remote's latest commit, commit each move, and relink.
skills removeDeselect a skill repository's skills everywhere, remove it, commit, and relink.
subagents listDiscover locally available custom subagents.
subagents linkReconcile selected custom subagents in project or explicit global scope.
beads syncSync declared local tracker bindings and pull configured remotes; never push.
beads migrateMigrate embedded trackers to a server, keeping history and rollback backups.
beads list-dbList remote database identifiers, including databases without a Brainspace.
beads drop-dbExplicitly delete a remote database; never infer it from the current project.
syncRecord uncommitted home changes as sync commits, integrate the upstream, and push.
hook session-startSync the home (waiting at most 10 s), then emit a wired repo's Brain context.
hook stopStart a detached push-only home sync and return at once.
hook session-endStart a detached full home sync and return at once.
hook runHandle a session event for any runtime adapter, without reading a hook payload.
hook antigravityRead an Antigravity hook payload and emit a JSON response.

Setup ​

Prepare a machine and check its health. See Getting started.

dotbrain bootstrap ​

Prepare this machine for dotbrain: global skill and subagent links.

text
dotbrain bootstrap [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--json—Emit one structured result.

dotbrain detach ​

Remove dotbrain's machine-wide delivery from a runtime.

text
dotbrain detach [OPTIONS]
OptionDefaultDescription
--runtime text—Filter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain doctor ​

Read-only health check of machine readiness and selected project setup.

text
dotbrain doctor [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--project text—Select a named Brainspace.
--all—Inspect every registered project.
--verbose, -v—Include healthy checks and informational context.
--json—Emit one structured result.

Projects ​

Connect code repos to Brainspaces and keep them in sync. See Wiring.

dotbrain wire ​

Create a Brainspace or attach a checkout, including a linked worktree.

text
dotbrain wire [OPTIONS]
OptionDefaultDescription
--repo path—Checkout to attach; defaults to the current Git checkout.
--project text—Select a named Brainspace.
--skip-beads—Create without a tracker.
--remote text—Dolt remote for initial tracker creation.
--server-host text—Dolt server host; defaults to config.
--server-port text—Dolt server port; defaults to config.
--server-user text—Dolt server user; defaults to config.
--database text—Tracker database; defaults to project name.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain refresh ​

Repair setup while preserving project declarations and content.

text
dotbrain refresh [OPTIONS]
OptionDefaultDescription
--project text—Select a named Brainspace.
--all—Refresh all registered projects.
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--json—Emit one structured result.

dotbrain unwire ​

Remove a checkout's wiring while retaining its Brainspace and tracker databases.

text
dotbrain unwire [OPTIONS]
OptionDefaultDescription
--repo path—Checkout whose wiring to remove.
--project text—Select a named Brainspace.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain projects list ​

List every registered project using local declarations and wiring.

text
dotbrain projects list [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain projects show ​

Inspect the current wired project or a named project's registered checkout.

text
dotbrain projects show [OPTIONS]
OptionDefaultDescription
--project text—Select a named Brainspace.
--home path—Override the private data root.
--json—Emit one structured result.

Skills and subagents ​

Manage the skill library and link skills and custom vendor-native subagents into agent runtimes. See Skills.

dotbrain skills list ​

Discover locally available skills.

text
dotbrain skills list [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--project text—Show selections for a named Brainspace.
--json—Emit one structured result.

Reconcile selected skills in project or explicit global scope, selecting ENTRIES first.

text
dotbrain skills link [OPTIONS] [ENTRIES]
ArgumentDescription
ENTRIESSkills or bundles under ~/dotbrain/skills to add to the scope's selection first.
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--scope textprojectDelivery scope: project or global.
--project text—Select a named Brainspace.
--repo path—Select a wired checkout; defaults to the current checkout.
--all—Reconcile every registered project.
--json—Emit one structured result.

Remove ENTRIES from the project or global selection, then reconcile, pruning their links.

text
dotbrain skills unlink [OPTIONS] ENTRIES
ArgumentDescription
ENTRIESSelected skills or bundles to remove from the scope's selection.
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--scope textprojectDelivery scope: project or global.
--project text—Select a named Brainspace.
--repo path—Select a wired checkout; defaults to the current checkout.
--json—Emit one structured result.

dotbrain skills add ​

Add a skill repository to ~/dotbrain/skills as a submodule of the home and commit it.

text
dotbrain skills add [OPTIONS] URL
ArgumentDescription
URLGit URL of the skill repository.
OptionDefaultDescription
--name text—Folder under ~/dotbrain/skills; defaults to the repository name.
--ref text—Tag, branch or commit to pin instead of the default branch.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain skills update ​

Move skill repositories to their remote's latest commit, commit each move, and relink.

text
dotbrain skills update [OPTIONS] [NAMES]
ArgumentDescription
NAMESSkill repositories to update; defaults to all.
OptionDefaultDescription
--ref text—Move one repository to this tag, branch or commit, including an older one.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain skills remove ​

Deselect a skill repository's skills everywhere, remove it, commit, and relink.

text
dotbrain skills remove [OPTIONS] NAME
ArgumentDescription
NAMESkill repository under ~/dotbrain/skills.
OptionDefaultDescription
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain subagents list ​

Discover locally available custom subagents.

text
dotbrain subagents list [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--project text—Show selections for a named Brainspace.
--json—Emit one structured result.

Reconcile selected custom subagents in project or explicit global scope.

text
dotbrain subagents link [OPTIONS]
OptionDefaultDescription
--home path—Override the private data root.
--runtime textallFilter runtimes: claude, codex, hermes, opencode, pi, cursor, antigravity, or all.
--scope textprojectDelivery scope: project or global.
--project text—Select a named Brainspace.
--repo path—Select a wired checkout; defaults to the current checkout.
--all—Reconcile every registered project.
--json—Emit one structured result.

Beads ​

Manage the Beads tracker's state and backend. See Beads backend.

dotbrain beads sync ​

Sync declared local tracker bindings and pull configured remotes; never push.

text
dotbrain beads sync [OPTIONS]
OptionDefaultDescription
--project text—Select a named Brainspace.
--all—Sync every registered project.
--dry-run—Preview tracker sync and configured pulls.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain beads migrate ​

Migrate embedded trackers to a server, keeping history and rollback backups.

text
dotbrain beads migrate [OPTIONS]
OptionDefaultDescription
--project text—Select a named Brainspace.
--all—Migrate every registered project.
--server-host text—Target Dolt server host; defaults to config.
--server-port text—Target Dolt server port; defaults to config.
--server-user text—Target Dolt server user; defaults to config.
--database text—Database override for a single project.
--dry-run—Preview the history-preserving migration.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain beads list-db ​

List remote database identifiers, including databases without a Brainspace.

text
dotbrain beads list-db [OPTIONS]
OptionDefaultDescription
--server-host text—Dolt server host; defaults to config.
--server-port text—Dolt server port; defaults to config.
--server-user text—Dolt server user; defaults to config.
--ssh-host text—Optional SSH hop; defaults to config.
--home path—Override the private data root.
--json—Emit one structured result.

dotbrain beads drop-db ​

Explicitly delete a remote database; never infer it from the current project.

text
dotbrain beads drop-db [OPTIONS] NAME
ArgumentDescription
NAMEDatabase identifier, including an orphaned database.
OptionDefaultDescription
--yes—Confirm the destructive drop.
--dry-run—Preview without deleting.
--server-host text—Dolt server host; defaults to config.
--server-port text—Dolt server port; defaults to config.
--server-user text—Dolt server user; defaults to config.
--ssh-host text—Optional SSH hop; defaults to config.
--home path—Override the private data root.
--json—Emit one structured result.

Exchange ​

Record the dotbrain home's changes and exchange them with its remote.

dotbrain sync ​

Record uncommitted home changes as sync commits, integrate the upstream, and push.

Acts on the whole home: one commit per changed Brainspace, then one home commit for the rest. A full sync then fetches and merges the upstream, keeping this machine's version of a file both sides changed and writing the other as NAME.sync-conflict-DATE-HOST.ext beside it (an edit wins over a delete). A push rejected because the remote moved is retried at most 3 times; sync never force-pushes. Files over sync.max-file-size in config.yaml (bytes, or a size such as 500KB or 1MB; default 1MB) stay uncommitted and are reported. If incoming changes would overwrite an uncommitted or ignored local file, Git refuses the merge; sync reports Git's diagnostic, pushes nothing, and fails. Offline, rejected, and remote-less homes exit 0 and keep the commits. Nested Git repositories are never recorded. A submodule declared in .gitmodules is recorded when new or moved forward to a commit its remote holds; after integrating, a full sync checks out every recorded submodule commit, cloning new ones. A submodule with uncommitted changes or unpublished commits is reported and left alone; to move one back, commit that yourself. Recording is refused during a merge, rebase, cherry-pick, or revert, with unmerged paths, or on a detached HEAD. Turn sync off with sync.enabled: false. Known limit: sync unstages everything before recording, so index-only state (partially staged hunks, git rm --cached, a staged mode change) is replaced by the working tree.

text
dotbrain sync [OPTIONS]
OptionDefaultDescription
--push-only—Record and push without fetching the remote.
--home path—Override the private data root.
--json—Emit one structured result.

Internal ​

Run by the plugin's hooks, not by hand. See Session context.

dotbrain hook session-start ​

Sync the home (waiting at most 10 s), then emit a wired repo's Brain context. Fail-open.

text
dotbrain hook session-start [ARGS]
ArgumentDescription
ARGS—

dotbrain hook stop ​

Start a detached push-only home sync and return at once. Fail-open and silent.

text
dotbrain hook stop [ARGS]
ArgumentDescription
ARGS—

dotbrain hook session-end ​

Start a detached full home sync and return at once. Fail-open and silent.

text
dotbrain hook session-end [ARGS]
ArgumentDescription
ARGS—

dotbrain hook run ​

Handle a session event for any runtime adapter, without reading a hook payload. Fail-open.

text
dotbrain hook run [OPTIONS]
OptionDefaultDescription
--event choice—Session event: startup, resume, clear, compaction, turn-end, or session-end.
--checkout path—Checkout the event belongs to. Default: the working directory.
--format choicetextContext output: text (raw) or json (an additional_context object).

dotbrain hook antigravity ​

Read an Antigravity hook payload and emit a JSON response. Fail-open.

text
dotbrain hook antigravity [OPTIONS]
OptionDefaultDescription
--event choice—Antigravity event: startup or turn-end.

Released under the MIT License.