# Command reference

Run `0b --help` for everything; the ones you'll use most:

- `0b setup`: sign in and add 0bridge to every AI tool
- `0b update`: install the newest `0b` with the package manager you installed it with, and restart its background jobs (`--check` only looks)
- `0b status`: is this machine and this repo set up? A checklist with the command that fixes each item. Ask your agent to "set up this repo" and it runs this, does the safe fixes and tells you the rest
- `0b connect <name or address>`: connect any service (`--label`, `--spec`, `--api`). In your terminal it lists the ways in to pick from: its MCP server (sign in in the browser), its API (you type the key; it stays with 0bridge) or its CLI (wrangler, gh: signed in to a profile on this machine). 0bridge's own connector is picked first, then the service's own MCP server; other people's servers are shown only when the service has nothing of its own. `0b key <service>` adds an API's key
- `0b cloud`: your connections
- `0b connect --team`: connect the connectors your team uses that you don't have yet, one by one, each with your own account. `0b team` shows your teams' connectors, skills and instructions and brings the skills (as `<team>--<skill>`) and instructions to this machine and its AI tools
- `0b project link`: make this repo a project and point its tools at it
- `0b project use <service>`: limit a connection to this project
- `0b vault unlock`: bring your vault key (it seals end-to-end history) to a new machine
- `0b exec -- <cmd>`: run a command with this repo's CLI accounts ([CLI accounts](/docs/profiles))
- `0b history on`, `0b history search <words>`, `0b history hooks on|off|status`: history, and uploading as each turn ends
- `0b resume <0b:id> [--tool claude|codex|gemini|cursor] [--print]`: continue a session from any tool ([Resume anywhere](/docs/resume))
- `0b context push|pull|status`, `0b context profile`, `0b memory add|search|rm`: your profile, instructions, skills and memory ([Profile, memory and skills](/docs/memory))
- `0b agent on|off|status`, `0b agent allow|deny <path>`: let your AI apps start and steer coding agents on this machine ([Your agents from your phone](/docs/remote-control))
- `0b settings`, `0b settings off agent-control|chat-events|chat-history`: what your AI apps may do with the account, and turning agent control, webhook events in chat apps or history in chat apps off; turning one on is on the dashboard, with your passkey ([Claude and ChatGPT](/docs/apps)). `0b settings on|off chat-tool-search` gives chat apps on an address ending in `?tools=all` a fixed tool list ([ChatGPT](/docs/clients/chatgpt#never-refresh-again))
- `0b apply --only <tool> --tool-search all|code`: that tool lists every 0bridge tool one by one (`?tools=all`), or the four that find and run the rest (code, the default) ([ChatGPT](/docs/clients/chatgpt#never-refresh-again))
- `0b agent supervisor openclaw --agent <name> [--label <l>] [--host-task <bin>] [--openclaw <bin>] [--herdr <bin>]`, `0b agent supervisor status|off`: let your AI apps hand tasks to the OpenClaw supervisor on this machine and answer its workers' questions; set only here, never from 0bridge ([Dots and your dev host](/docs/dots))
- `0b agent supervisor ledger [--label <l>] [--host-task <path>]`: instead, put what you tell your AI apps for this machine into its work ledger (`host-task`) as `dev_request`, `user_followup` and `user_decision`, for the team there to take up ([Ledger mode](/docs/dots#ledger-mode)). Both save the programs' full paths, so the background service finds them
- `0b host request "<text>" [--project p] [--repo r] [--priority P0-P3] [--machine m]`: from any terminal, hand work to your dev machine's work ledger; prints its request id (`hr_…`), or its task id once it has one. Also `0b host status [T-012|hr_…]`, `0b host followup <T-012|hr_…> "<text>"`, `0b host answer <question> --task T-012 "<text>" [--choice A]` (the question's task too, so an answer can't land on another question), `0b host questions` and `0b host updates [--cursor c] [--wait s] [--kinds question,completed,failed,progress,notice]`, whose last line is the next cursor. `-` as the text reads stdin, `--json` is for scripts, and a refusal exits non-zero ([From a terminal](/docs/dots#from-a-terminal))
- `0b sessions [--state needs-you] [--machine m] [--repo r]`, `0b sessions watch|on|off`: what your coding sessions are doing now, on every machine and in the cloud ([Session board](/docs/sessions))
- `0b login --qr <file.png>`, `0b login --email <you>`: print the sign-in link first, save it as a QR image, and ask for approval on your dashboard ([Approvals and sign-in](/docs/approvals))
- `0b drive ls [folder]`, `0b drive clone <folder> [dir]`, `0b drive sync|status|unlink [dir]`, `0b drive email <folder>`: your Drive and your teams' (`--workspace <team>`), and a Drive folder kept in sync with a folder on this computer (more below; [Drive](/docs/drive))
- `0b webhook add <name> [--preset channeltalk|github|generic] [--route run|listen] [--notify]`: an address other services send events to. It asks what each event does: run a command on this machine, or nothing runs and a session listens for it ([Triggers and webhooks](/docs/triggers))
- `0b webhook listen <name>`: wait for the webhook's next event, print it as JSON and end. Run it in the background from a session, handle the event, listen again; an event that came meanwhile comes at once ([Listen](/docs/triggers#listen-a-session-waits-for-the-next-event))
- `0b webhook run <name> [--debounce 30] [--timeout 300] [--machine <m>] -- <command…>`: run a command here for each event, with the event's JSON on stdin; the command stays on this machine and is never sent to 0bridge. `--off` stops it; `0b webhook listen on|off` keeps this machine connected for runs (`run` turns it on)
- `0b webhook set <name> --route run|listen` (or `--notify`), `0b webhook list|rm|test|rotate <name>`, `0b webhook events [name] [--follow]`: change what a webhook does, and see what came in
- `0b usage [--days 30] [--by tool|model|repo|day]`, `0b usage on|off`: tokens and an estimated cost; counts only ([Usage](/docs/usage))
- `0b profile add <name> wrangler gh`, `0b profile use <name>`: which CLI accounts this repo uses. A wrangler that's only in the repo's `node_modules` works too. Over SSH, paste the localhost address the browser ends on after you approve, and 0b passes it to the login on this machine
- `0b background on`: sync history, files and context every 15 minutes (a LaunchAgent on macOS, a systemd user timer on Linux, Task Scheduler on Windows; a crontab line where there is no systemd)
- `0b feedback [message] [--kind problem|idea|other] [--include-logs]`: send the 0bridge team a report; it shows you the whole report first ([Send feedback](/docs/feedback))

## Drive folders on your computer

`0b drive clone tax-invoices ~/projects/tax-invoices` makes a local folder that syncs both ways with the `tax-invoices` folder of your Drive (`--workspace Acme` for a team's Drive; `""` for all of it). It syncs when `0b drive sync` runs in the folder, and only then: run it right before you (or an agent) read or edit the folder, and right after writing, so the next machine gets the change. Nothing syncs Drive folders on a timer. `0b drive status` shows what changed here, what changed in Drive, and conflict copies waiting; `0b drive unlink` stops syncing and leaves the files in both places. `0b drive ls [folder]` lists a Drive folder with its README's status line, its AGENTS.md, skills and email address, and which local folders sync with it.

- **Conflicts:** a file changed here and in Drive since the last sync keeps this computer's version, which goes up, and Drive's is saved next to it as `<name>.0bridge-<who>-v<n>.<ext>`. Merge the two and delete the copy; copies never go up. A file deleted on one side and changed on the other comes back.
- **What stays here:** `.git/`, `node_modules/`, `__pycache__/`, `.venv/`, `.DS_Store`, files over 25 MB, symlinks, and whatever the folder's `.driveignore` lists (`.gitignore` syntax without `!`). In a git repo, new files git ignores stay here too. Sync never runs a git command that changes anything.
- **What never comes down:** anything into `.git` (in any spelling), outside the folder, or under a name this disk would read as something else (`:` or `\`, a trailing dot or space, `CON` and the other device names; on Windows also `* ? " < > |`). Sync says which ones it skipped. Files come down without the executable bit, except scripts in a skill (`.agents/skills/`).
- **Skills and instructions:** in every folder with them, `.claude/skills/<name>` links to `.agents/skills/<name>` and `CLAUDE.md` links to `AGENTS.md`, so Claude Code in that folder reads them. The links are made here and never sent up (Windows without Developer Mode makes none).
- **Proposals:** in a team, a change to `AGENTS.md`, `CLAUDE.md`, `.agents/`, `.claude/` or another instruction path from a member who isn't an owner or admin waits as a proposal in the dashboard (Drive › Proposals). Sync says so once and doesn't propose it again until the file changes here.

`0b drive email <folder>` prints the folder's email address: mail from you (or, in a team, its members) that passes our DKIM check lands in `<folder>/<date> <subject>/`, with a receipt. Addresses are made, rotated and turned off in the dashboard (Drive › Email).

## Several Claude Code accounts

A second Claude Code account run with `CLAUDE_CONFIG_DIR=~/.claude-b` gets what `~/.claude` gets: `0b apply` writes 0bridge, your MCP servers, skills and instructions there too, and `0b project link` adds the project endpoint to that account's settings. Any `~/.claude-*` folder Claude Code has used (it has a `.claude.json`) counts, as does `CLAUDE_CONFIG_DIR` itself. A second Codex home (`~/.codex-*`) gets your MCP servers, skills and instructions the same way.

`0b use` manages them as profiles:

- `0b use`: each account (folder), who it's signed in as, and which one starts here
- `0b use add work`: makes `~/.claude-work` (`--tool codex`: `~/.codex-work`; `--dir` for another folder) and prints the sign-in command to run once
- `0b use work`: this repo (and its other clones) starts Claude Code as `work`; `--global` everywhere else too; `eval "$(0b use work --shell)"` just this shell, which wins over both
- `0b use shims`: `claude` and `codex` stand-ins in `~/.0bridge/bin` that start the account picked for the repo you're in (`0b exec -- claude` does the same without them)

A running session keeps its account; `0b resume <0b:id>` continues it under another. History reads every profile and tags its sessions with the profile's name. On a Mac, Claude Code keeps its sign-in in the keychain: check `0b use` shows each profile's own email before you rely on it.

## Several 0bridge accounts

A company's 0bridge account and your own can both be signed in. `0b login` while signed in adds another account; `0b account` lists them, `0b account use <email>` picks the default (the one every AI tool's 0bridge entry uses) and `0b logout <email>` signs one out. A repo linked with `0b project link --account <email>` belongs to that account: its AI tools use that account's project, and repo commands run inside it (`connect`, `exec`, `project`, …) use that account on their own. `--account <email>` works on any command.

In the dashboard, the account menu lists the accounts signed in in this browser, switches between them and adds another. The consent screen Claude and ChatGPT open, and the `0b login` approval screen, show which account you're using and switch right there. An app that already has your consent goes straight to the account that's active in the browser, so switch first to connect it to another.

## Skills from a folder

`0b skill add <folder>` adds a skill you wrote or downloaded (a folder with `SKILL.md`, whose front matter has a `name` and a `description`) to your synced skills; `0b apply` puts it in every tool. It refuses a folder without them, a repo (`.git`, `node_modules`) or one over 20 MB. In Cursor, a skill that's already in Claude Code's or Codex's folder isn't copied to `~/.cursor/skills` too, since Cursor reads those folders and would list it twice; with neither tool, Cursor gets its own copy.
