Cofounder CLI
Multiple Companies
Run more than one company under one account: active selection, per-command scoping, and token binding.
One Cofounder account can run many companies, and everything (knowledge, connections, resources, events, billing) stays scoped to one of them. So the only real question is which company a command is aimed at.
The active company
The CLI remembers your selection:
| MCP | CLI | API |
|---|---|---|
company_memberships_list | cofounder company list, cofounder company memberships list | GET /cofounder-cli/v1/company/memberships |
| — | cofounder me get | GET /cofounder-cli/v1/me |
company_get | cofounder company show, cofounder company get | GET /cofounder-cli/v1/company |
| — | cofounder company switch | — |
| — | cofounder company use <org-id-or-slug> | — |
company switch asks you to pick; company use <org-id-or-slug> sets the
default without prompting. company show is a readable summary with dashboard
links; company get returns the full overview: what's
ready, every resource, what the company knows, what's broken, and the next
step.
Aim a single call
Override the saved default when you need to:
--company-id <uuid>: a global flag on any CLI command.COFOUNDER_COMPANY_ID: pins the company for the whole shell or agent environment.
On MCP, first call user_get and company_memberships_list to check the
account and choose the company for this task. Pass its org_id as
company_id on company-scoped tools. Account-scoped tools such as
company_create do not take that argument. A working directory does not
select a company. Ask when the intended company is ambiguous.
When the hosted OAuth proxy is enabled, company_id is required for every
company-scoped tool. The OAuth connection identifies your account; switching
companies needs no token replacement or new login. Each operation checks your
current membership and permissions. In legacy mode, omitting company_id
uses the company named in the token's cf claim.
Company resources select their company through a
cofounder://companies/{company_id}/... URI in proxy mode. A previous tool
call does not select the company for a resource read. See
MCP Beyond Tools.
Token scope
The CLI saves one user login. Switching companies updates the saved default without
signing in or refreshing the token. Each command pins its company at startup and
sends it as X-Organization-Id; a concurrent switch or token refresh cannot move
a running command to another company. The server checks live membership and action
permissions for the requested company.
MCP OAuth connections identify the account and select companies per call with
company_id. Each host owns its login; a CLI switch does not retarget MCP. The
legacy stdio bridge requires the selected company to match its token claim and
refuses mismatches. Use native remote MCP for switching between companies.
The overrides above work for saved user logins. A fixed COFOUNDER_API_TOKEN
containing a company claim cannot switch to a different company. API keys don't bend: a key is
bound to the company it was minted under, and the API rejects a company_id
naming any other company. An Acme key can never act on Initech. If you run
two companies, mint a key for each. See
API Keys and Scripting.
Delete a company
cofounder org delete <org-id> --confirm "DELETE COMPANY"
cofounder org start-fresh <org-id> --name "NewCo" --reason <category> --confirm "START FRESH"Both are destructive, both demand the exact confirmation phrase, and neither
has an undo. Preview with --dry-run first.
Next steps
For credentials that don't depend on an interactive login, see API Keys and Scripting.