Setup commands are the commands you run the first time you set up a machine, and rarely after that. Once your instance is running and your profile is configured, you spend most of your time in the control plane commands.

company-agents login

Creates or updates a profile in your CLI config.
company-agents login
Prompts for:
  • Orchestrator URL (default: http://localhost:3100)
  • API token (pasted; the CLI masks input)
  • Profile name (default: default)
Writes the credentials to ~/.company-agents/cli/credentials with 0600 permissions and the profile pointer to ~/.company-agents/cli/config.yaml. Non-interactive form:
company-agents login \
  --url https://staging.example.com:3100 \
  --token ca_prod_... \
  --profile staging

company-agents logout

Removes the credentials for a profile. The profile pointer in the config file stays (you can log back in later); the token is wiped.
company-agents logout
company-agents logout --profile staging

company-agents new

Create a fresh instance. Used on a new machine or when you want a second instance alongside an existing one.
company-agents new
The CLI walks you through:
  1. Choose an instance location (default: ~/.company-agents/instances/default/)
  2. Choose a database flavor (PGlite or real Postgres)
  3. Generate a master key or point at an existing one
  4. Pick a default adapter
  5. Start the orchestrator
  6. Open the dashboard
Non-interactive form:
company-agents new \
  --home ~/.company-agents/instances/work \
  --db pglite \
  --adapter claude-code \
  --start

company-agents open

Opens the dashboard for the current profile in your default browser.
company-agents open
company-agents open --profile staging
No-op on headless servers; use --url to print the URL instead of opening it.

company-agents doctor

Runs a health check against the current profile.
company-agents doctor
Checks:
  • The CLI can reach the orchestrator
  • The token is valid and has at least read scope
  • The database is responding
  • The MCP server is reachable
  • Every configured adapter has its binary on PATH
  • Every integration has a valid secret
Output is a table of checks with one line per check and a summary. Exit code is 0 if everything is green, 1 if any check is yellow, 2 if any check is red. Use this in CI to validate a deployment before running real workflows.

company-agents key

Master key management. These commands are sensitive and require physical access to the machine or explicit admin scope.

company-agents key generate

Generates a new 32-byte AES-256 master key and writes it to the configured path:
company-agents key generate
Refuses to overwrite an existing key. If you want to rotate, use key rotate.

company-agents key rotate

Rotates the master key: generates a new one, re-encrypts every row in the secrets table, and archives the old key for the grace period:
company-agents key rotate
During rotation the secrets table is briefly read-only for writes. Normal operations continue. See deploy/secrets for the details.

company-agents key export

Exports the master key wrapped with a passphrase:
company-agents key export --passphrase-env MY_PASSPHRASE > master.key.wrapped
Used to move an instance to another machine.

company-agents key import

Imports a wrapped master key:
company-agents key import --passphrase-env MY_PASSPHRASE < master.key.wrapped

company-agents token

API token management.

company-agents token create

company-agents token create \
  --name "ci-pipeline" \
  --scopes "company:ampha-group:write" \
  --expires 2027-04-11
Prints the token value once. Save it to your secret manager.

company-agents token list

company-agents token list
Shows token metadata. No values.

company-agents token rotate

company-agents token rotate tok_a1b2c3
Prints the new value once. Old value valid for 24 hours.

company-agents token revoke

company-agents token revoke tok_a1b2c3
Immediate.

company-agents template

Template management, for installing Clipmart templates or publishing your own.

company-agents template install

company-agents template install ai-website-agency
Fetches the template from Clipmart, verifies the signature, imports it into your instance, and walks you through filling in the integration slots.

company-agents template list

company-agents template list
Lists installed templates and their versions.

company-agents template publish

company-agents template publish my-company --to clipmart
Packs the specified company as a template and publishes it to Clipmart. Requires you to be signed in to Clipmart (the CLI walks you through it on first use).

company-agents template update

company-agents template update my-company
Updates an installed template to the latest published version. Preserves local state (memory, audit trail, secrets) unless the update includes breaking changes, in which case the CLI prompts you.

company-agents backup

Backup and restore.

company-agents backup create

company-agents backup create --output ~/backups/company-agents-$(date +%F).tar.gz
Produces a tarball containing the database, the master key wrapped with a passphrase, the audit trail, and any retained workspaces.

company-agents backup restore

company-agents backup restore ~/backups/company-agents-2026-04-11.tar.gz
Restores into a new instance location. Refuses to restore over an existing instance.

company-agents completion

Shell completion scripts.
company-agents completion bash
company-agents completion zsh
company-agents completion fish
See the overview for how to install them.

Next