Documentation

Command reference

By jhyunwoo
Last updated November 30, 2026
Checked with ccam 0.16.1 and Claude Code 2.1.302

On this page

Put --dry-run before a command to see what it would do without doing it, for example ccam --dry-run work. It works when starting Claude Code (ccam <name>, ccam run, ccam next, ccam agent, ccam attach, ccam ccusage) and with group, migrate, folder, shortcut, pick, update, uninstall and doctor --fix. Commands that only read, such as list, usage, share and ext, accept it and change nothing anyway. The rest refuse it instead of running, including group rename.

CommandWhat it does
ccamOpen the dashboard: accounts, agents, groups, folders, extensions, sign-ins and health
ccam <name|number> [claude arguments]Start Claude Code as that account; arguments are passed through unchanged
ccam --fallback [name|number] -p [claude arguments]For -p runs: at a usage limit, run the same command again as the account with the most room
ccam add [name]Add an account: config folder, login and an optional shortcut
ccam agent [--model <model>] [--resume <id>] [--json] [--] <task> | ccam agent --list [--session <id>] [--json]Run a task as another account, like a subagent that uses that account's usage
ccam agents [--all] [--json]List the background agents and open sessions of every account
ccam attach <id|name> [claude args]Open a background session as the account that started it
ccam ccusage [-a name[,name…]] [ccusage args]Show ccusage's token and cost reports for the conversations of every account
ccam completion bash|zsh|powershellPrint bash, zsh or PowerShell completion
ccam doctorCheck links, permissions, logins and versions, and repair
ccam ext [name|number] [--json]Show the skills, commands, plugins, MCP servers and hooks each account loads
ccam folder [name|number] [folder]Use an account in a folder and its subfolders when no account is named
ccam groupCreate and change groups, which set what their accounts share; every change shows a plan first
ccam hook stop-failure|switchRun by the ccam plugin's hooks in Claude Code (usage limits, /ccam:switch)
ccam import [folder]Register an existing ~/.claude folder in place
ccam listList accounts
ccam login <name|number> | login --expiredLog an account in again; --expired logs in every account that needs it
ccam logout <name|number>Log an account out: its login and its MCP server sign-ins
ccam mcp [command]Manage shared MCP servers
ccam migrate [folder]Copy an existing Claude Code setup (~/.claude) into a shared group
ccam next [--auto] [--continue [--brief]] [-- claude args]Open the next account; --continue carries the conversation over, --auto picks the most room
ccam pick [--json] [--model <model>] [--max-usage N] [--strategy S] [--wait[=D]]Print the account with the most room, for scripts and parallel workers
ccam remove <name|number>Remove an account: it is logged out, and its folder goes to the trash folder
ccam rename <name> <new-name>Rename an account; its shortcut command stays the same
ccam share <name|number>Show what an account shares, and through which group
ccam shims [command]Recreate the shortcut links of all accounts
ccam shortcut <name|number> [command]Show, create, rename or remove an account's shortcut command, such as ccwork
ccam statuslineShow the account and usage in Claude Code's status line
ccam uninstallRemove every account, the shortcuts, ccam's folders and ccam itself
ccam updateUpdate ccam to the latest release after checking its checksum
ccam usageShow 5-hour and weekly usage of every account
ccam use <name|number>Set the default account

Adding and removing accounts

  • ccam add opens the wizard: name, sign-in, groups and shortcut.
  • ccam add work --group default --group team adds work without the wizard and puts it in both groups.
  • ccam add side --shortcut ccside also creates the command ccside, which starts side.
  • ccam add ci --no-login creates ci without signing in; sign in later with ccam login ci.
  • ccam add gw --api --base-url https://llm.example.com --auth bearer --key-from env:GW_KEY adds an account that uses an API key instead of a Claude login. ccam reads the key at each launch and never stores it (API key accounts).
  • ccam login --expired signs in, one after another, every account whose login no longer works, including logins Claude Code cleared.
  • ccam logout side logs side out, and asks first when MCP sign-ins go with the login.
  • ccam rename work job renames work to job. On macOS the folder keeps its name, since the Keychain keeps the login under the folder's path.
  • ccam remove side asks, logs out a managed account (one whose folder ccam created, as opposed to one registered with ccam import) unless another account holds the same login, and moves its folder to ~/.local/share/ccam/trash. Removing an imported account takes it out of its groups and leaves a copy of each shared item in its folder.
  • ccam import ~/.claude-old --name old registers a folder you already have as old, where it is; ccam never moves or copies a login.

ccam import without a folder looks for ~/.claude and ~/.claude-* and asks about each one; a folder that fails is reported as Skipped <path>: <reason> and the others are registered. If a folder's name is already taken, import that folder on its own with ccam import <folder> --name <name>.

ccam rename, ccam remove and the ccam group commands refuse to change an account while Claude Code is running as that account, however it was started (including background sessions). Quit the session first. They also refuse while a group change is unfinished: the last group change stopped halfway; finish it with `ccam doctor --fix` first.

ccam list --json prints every account with its slot, shortcut, email and folder. Its groups array lists the account's groups, and its share object maps each item (mcp, settings, memory, extensions, history) to the group it comes from, or local.

Starting Claude Code

ccam <name|number> [arguments] starts Claude Code as that account. ccam does not read the arguments after the name; it passes them to claude in the same order, and standard input, the exit code and signals behave exactly as with claude itself. A -- after the name is optional.

ccam with arguments but no account name, such as ccam -p "summarise", uses the account set for the current folder, otherwise the default account:

  • ccam folder work ~/code/company makes work the account inside ~/code/company and every folder below it.
  • ccam folder lists those folders and the account used in the current one.
  • ccam folder --remove ~/code/company removes that folder's entry.
  • ccam use work makes work the default account.

--fallback before the account name, as in ccam --fallback work -p "fix the tests", is for -p/--print runs. When the account reaches its usage limit, ccam runs the same command again as the logged-in account with the most room and prints only the output of the run that finished. See Accounts by folder and Run again at the limit.

A shortcut such as ccwork starts its account the same way: ccwork --resume does what ccam work --resume does. See Shortcuts below.

Shortcuts

  • ccam shortcut work ccwork creates the shortcut ccwork for work, or renames the one it has.
  • ccam shortcut work shows it.
  • ccam shortcut work --remove deletes it.

A shortcut is a command you name yourself that starts Claude Code as one account. Like ccam work, it passes every argument to Claude Code unchanged, so ccwork --resume and ccwork -p "hi" work as you would expect. It is a link to ccam in ~/.local/bin.

Shortcuts are optional. The ccam add wizard asks whether to create one, ccam add <name> --shortcut <command> creates one without asking, and ccam list shows each account's shortcut, or - when it has none.

Names use the characters a-z, 0-9, ., - and _. A name cannot be a ccam command, another account's shortcut, or the name of another program on your PATH, nor a file in ~/.local/bin that ccam did not create, such as your own copy or link of ccam. A shortcut edited by hand in config.toml that breaks these rules, is claude or ccam, or is given to two accounts makes config.toml fail to load, naming the account.

ccam rename keeps the shortcut name, and ccam remove deletes the shortcut together with the account. ccam shims install recreates the links of all accounts, for example after you have moved ccam; a file in the way of one shortcut does not stop the others.

Usage and switching

  • ccam usage (or ccam u) shows the 5-hour and weekly usage of every account. --watch redraws it every 60 seconds, --json prints it for scripts, and --source claude lets Claude Code look it up, so ccam sends no token.
  • ccam next --continue continues this folder's last conversation as the next account; with --brief, as a new conversation from a summary of the last one.
  • ccam next --auto starts the account with the most room. --max-usage 80 prefers accounts below 80%, and --wait waits for a reset when no account has room.
  • ccam next -c --auto -- --dangerously-skip-permissions does both and passes Claude Code's own option after --.
  • ccam pick prints the account with the most room for a script, and ccam "$(ccam pick)" -p "…" starts a worker on it.
  • ccam agent "…" runs a task as another account, like a subagent, and ccam agent --resume <id> "…" follows that agent up.
  • ccam agents lists the background sessions of every account, and ccam attach 49ec0028 opens one, by its ID or name, as the account that started it.
  • ccam ccusage claude daily reports Claude Code's tokens and costs over every account with ccusage, and ccam ccusage -a work blocks --active shows one account's current 5-hour block.

Team and Enterprise seats. Automatic account selection (ccam next, --fallback, ccam pick, ccam agent, the dashboard's n and, once you turn it on, auto_switch) also switches between seats of the same Claude Team or Enterprise organization, which may violate Anthropic's terms. Read the FAQ and check with your organization and Anthropic before you rely on it.

  • next --auto, --fallback, ccam pick and ccam agent choose the same way (How ccam picks an account): below auto_max_usage (config.toml, default 100) first, by auto_strategy (headroom, expiring or balance), counting the --model weekly window. They never choose an account at 100% (a window Claude Code reported full counts as 100% until its reset) or an API key login, and they stay within the organization of the account they start from (--cross-org or cross_org = true to look further).
  • --wait takes its value after = (--wait=2h); written with a space it is refused with a hint. When none can be chosen they exit with code 75, or, with --wait, wait for the first account to reset.
  • ccam next --continue carries a conversation over even between accounts that do not share history: Claude Code then copies it into the new account. With --brief, the new account starts a new conversation instead, from a summary ccam writes of the last one without a model (--brief).
  • Unlike ccam <name>, ccam next reads its own options, so Claude Code's options go after --; without it ccam stops with unknown flag.
  • ccam agent runs a task with claude -p in this folder as another account than the one it is called from, in the calling session's permission mode and effort, and prints Claude's last reply. At that account's limit the conversation goes on as another (Subagents on other accounts).
  • Inside Claude Code, the plugin's /ccam:switch [account] hands a conversation on, and ccam hook is what its hooks run.
  • With auto_switch = true in config.toml (Linux and macOS; off by default), the limit hook also ends an interactive session that ccam started and continues it on another account with room, but only one of the same kind: another seat of the same organization, or another personal plan (auto_switch).

See Continuing at the limit, Picking an account for scripts, Subagents on other accounts and Background sessions of every account.

Sharing

  • ccam group lists the groups, what each one shares and its accounts.
  • ccam group add team --items history --members work,side creates the group team, which shares conversation history between work and side.
  • ccam group set default --add history makes every account in default start sharing history.
  • ccam group join team personal puts personal in team.
  • ccam group leave team side --fresh takes side out of team; with --fresh it starts without the group's items instead of with a copy.
  • ccam share work shows what work shares, and through which group.

A group shares items between its accounts; an account can be in several groups, but each item comes from one group only. See sharing between accounts.

Copying an existing setup

  • ccam migrate copies ~/.claude into the default group.
  • ccam --dry-run migrate shows the plan and copies nothing.
  • ccam migrate ~/.claude-work --group work --settings --mcp copies only settings.json and the MCP servers of ~/.claude-work, into the group work.
  • ccam migrate --history --yes copies only the conversation history, without asking.

ccam migrate copies settings.json, CLAUDE.md, extensions and user MCP servers from a Claude Code folder into a group, so every account that shares those items gets them. The folder is only read.

  • --settings, --memory, --extensions, --mcp and --history copy only the items you name. Without them, a checklist on a terminal lets you choose, with everything except conversation history checked; elsewhere everything except conversation history is copied.
  • --mcp also works when ~/.claude is empty or missing but ~/.claude.json has servers.
  • -g or --group picks the group.
  • -y or --yes copies without asking and keeps the group's copy when a file differs.

MCP sign-ins are not copied, since a copied sign-in logs the other holders out; the plan names the accounts that sign in with /mcp. See copying an existing setup.

MCP servers

  • ccam mcp add fs -- npx -y @modelcontextprotocol/server-filesystem ~/code adds a server that runs a command, for every account of the group.
  • ccam mcp add docs --url https://mcp.example.com/mcp --header "Authorization: Bearer $TOKEN" adds a remote server, with a header sent on each request.
  • ccam mcp add-json db '{"type":"stdio","command":"db-mcp"}' adds a server from the JSON that claude mcp add-json takes.
  • ccam mcp list lists the servers of every group, and those only one account has.
  • ccam mcp import work gh moves the server gh that only work has into its group.
  • ccam mcp remove fs removes a server from the group.

ccam mcp import <account> moves the servers that only that account has into its group, including those it has for one folder only (plain claude mcp add), which then load in every folder. A server whose name the group already uses for a different definition is skipped; add --force to replace the group's copy, which ccam backs up first.

Maintenance

  • ccam doctor checks ccam's setup and changes nothing; ccam doctor --fix repairs what is safe to repair, with backups (Checking and repairing).
  • ccam statusline install puts the account name and its usage in Claude Code's status line.
  • ccam ext shows the skills, commands, MCP servers and hooks of every account, and the problems that keep them from loading.
  • ccam shims install recreates the shortcut links.
  • ccam update installs the latest ccam release, and ccam update --check only says whether a newer one exists.
  • ccam uninstall removes every account, ccam's folders and ccam itself.
  • ccam version, ccam -v and ccam --version print the version.
  • ccam completion bash prints a completion script for bash; zsh and powershell work the same way.

ccam update checks the release's SHA-256 checksum before it replaces ccam, and --version v0.2.0 installs a particular release. A copy of ccam installed from the .deb package is updated with apt instead. See update.

ccam uninstall lists what it removes and asks first: every account as ccam remove does, the shortcut commands, ccam's folders and the ccam command. An imported folder stays where it is. See uninstall.

Files

Path Contents
~/.config/ccam/config.toml Accounts, groups and settings (theme, usage_source, relay, auto_switch, cross_org …). Settings go at the top, above the first [[group]], [[profile]] or [[folder]]: one below a table belongs to that table, so ccam warns about it at every launch and in ccam doctor, and commands that save the config refuse until it is moved. Comments are not kept when ccam saves the file
~/.local/share/ccam/profiles/<name>/ Each account's CLAUDE_CONFIG_DIR
~/.local/share/ccam/groups/<group>/ Shared settings, MCP servers, extensions and history
~/.local/state/ccam/ Usage cache, limit records, locks, notes and other state (see the list below the table)
~/.local/bin/<shortcut> Shortcut commands such as ccwork, links to ccam

The state folder holds:

  • the usage cache and limit records (usage/<name>.json, usage/<name>.limit.json);
  • last-used times;
  • session markers and locks (locks/);
  • the shortcuts ccam created (shortcuts.json);
  • a group change that has not finished (group-change.json);
  • the notes /ccam:switch and the limit hook leave (handoff/<account>/<session>.json);
  • when ccam pick, ccam agent or auto_switch last chose each account (picks/<name>; a choice counts for 2 minutes);
  • the summaries of --brief, kept 7 days (brief/<session>.md);
  • the conversations ccam agent ran, kept 30 days (agent/<session id>.json).

Setting XDG_CONFIG_HOME, XDG_DATA_HOME or XDG_STATE_HOME changes where these folders are. On Windows, ~ is %USERPROFILE% and shortcuts are <shortcut>.exe.