Repository navigation
CLI Reference
All commands accept --cwd <path> to run against another directory. Default: the Git root, or the current directory outside Git.
Interactive setup. Order of questions:
-
Tools — multiselect: VS Code (
.github), Cursor (.cursor), Claude (.claude), Pi (.pi), or customname+folder. - Sources — Git URL or local path, optional branch. Add as many as you like.
- Sources are fetched.
-
Domains — one grouped checklist, one group per source. Toggle a source to take all its domains. Each domain shows a hint like
12 skills, 2 agents. - Sync everything? — Yes (default) syncs the full domains. No opens one checklist per selected domain, pre-ticked, where you deselect individual skills, agents, feature types or files.
-
Git hooks? — install
post-checkout/post-mergehooks that runsyncin the background. - Run sync now? — Yes by default.
Re-running init overwrites the existing config. If a source has no domains selected it is dropped.
Pass both --tools and --source to skip every prompt.
| Option | Description |
|---|---|
--tools <list> |
Comma-separated: cursor, vscode, claude, pi, or name:folder for custom tools |
-s, --source <url> |
Repeatable. Git URL or path; append #branch to pin a branch |
--domains <list> |
Comma-separated domains, applied to every source. Default: every domain found |
--hooks |
Install git hooks without asking |
--force |
Overwrite foreign git hooks; also clears an opt-out tombstone |
agent-bridge init \
--tools cursor,claude,windsurf:.windsurf \
--source https://github.com/sofatutor/ai-hub.git#main \
--source /abs/path/to/local-hub \
--domains sofatutor-shared \
--hooksPer-domain include lists are not available as flags; edit config.yml (see Configuration).
- Runs pending config migrations.
- Clones new remote sources, pulls existing ones (
--ff-only), removes clones for sources no longer in config. - Scans domains → feature types → features, honoring
include. - Stops on duplicates or on a destination that exists but isn't managed by Agent Bridge.
- Adds, updates and removes features, root files and tool root files. Prints counts.
Exit code is non-zero on any error, so it's safe in CI.
agent-bridge update(pre-0.14) is a hidden alias that runssync. Hooks installed by older versions keep working; the firstsyncrewrites them to callsynconly.
Removes Agent Bridge from the current repo without prompts:
- deletes every feature and tool root file tracked in
.agentbridgemanifests - removes Agent Bridge git hooks (foreign hooks are kept)
- deletes
.agent-bridge/(config and clones) - writes a
.agent-bridge/optouttombstone
Root files (AGENTS.md, CLAUDE.md, SYSTEM.md) are left in place.
While the tombstone exists, init and sync are no-ops (exit 0). It is gitignored, so opting out is per machine; git add -f .agent-bridge/optout makes it repo-wide. Re-enable with agent-bridge init --force or by deleting the file.
init can install post-checkout and post-merge hooks. They run agent-bridge sync (falling back to npx @sofatutor/agent-bridge sync) in the background after a one-second delay and log to .agent-bridge/hook.log (trimmed to 200 lines).
-
Hooks are marked with
# agent-bridge-hookso Agent Bridge only ever overwrites its own. -
Existing foreign hooks are skipped. Use
--forceto replace them, or add this to your hook:( sleep 1; agent-bridge sync ) >/dev/null 2>&1 &
-
Remove them with
agent-bridge opt-outorrm .git/hooks/post-checkout .git/hooks/post-merge.
"postinstall": "test -d .agent-bridge || (npx @sofatutor/agent-bridge init --tools claude --source https://github.com/org/hub.git --hooks && npx @sofatutor/agent-bridge sync) || true"opt-out keeps .agent-bridge/ (holding only the tombstone), so the guard stays false after opting out and nothing is reinstalled.