Security & Privacy
Command Code is designed with security and privacy as core principles. You control exactly what Command Code can access.
| What | Stored? | Where |
|---|---|---|
| Source code | See Privacy Policy | Your machine only |
| Taste profile | Local + optional cloud sync | .commandcode/taste/ and commandcode.ai |
| Conversation history | Local only | ~/.commandcode/projects/ |
| Authentication tokens | Local only | ~/.commandcode/auth.json |
| AGENTS.md | Local only | Project root |
Command Code uses a permission system that puts you in control of every action. By default, any action that modifies your system requires explicit approval.
Command Code has five permission modes.
| Mode | File reads | File writes | Shell commands | When to use |
|---|---|---|---|---|
| Default | Allowed | Requires approval | Requires approval | Day-to-day work |
| Accept Edits | Allowed | Allowed | Safe filesystem commands only (mkdir, cp, non-recursive rm, …); other shell still asks | Trusted iteration |
| Plan | Allowed | Blocked, except a plan file under ~/.commandcode/plans/ | Read-only only (e.g. git status) | Exploring and designing |
| Yolo | Allowed | Allowed | Allowed | Throwaway environments only; deny rules and the root/home removal check still apply |
| Dont-Ask | Allowed | Only pre-approved | Only pre-approved | Unattended runs where a wrong prompt should fail closed instead of waiting |
Switch modes with shift+tab inside a session, or start with a specific mode:
The first time you run cmd in a project, Command Code asks whether to trust that directory. This prevents accidental execution in untrusted locations.
Your answer is saved in ~/.commandcode/trusted-projects.json, keyed by the directory's real path. Only the trust prompt, --trust (interactive or headless), --yolo in interactive cmd, a --worktree entered from a trusted directory, or an empty directory adds an entry. Starting, resuming or saving a headless session (cmd -p, cmd --rpc, cmd acp) never trusts a directory. To revoke trust, delete the directory's entry from that file.
Until a folder is trusted, its own files do not configure Command Code:
- A
.envin the folder is never loaded into the CLI, and trusting the folder does not change that. API endpoints and keys come from your shell environment and~/.commandcodeonly. - Headless runs (
cmd -p,cmd --rpc) andcmd acpshow no trust prompt. In a folder you have not approved they do not start the MCP servers in its.mcp.jsonor run the hooks in its.commandcode/settings.json, and they say on stderr how to approve it. Approve a folder once (the trust prompt incmd, or--trust) and every later run loads them.--dangerously-skip-permissionsloads them for one run without saving an approval. - Provider modules that the folder's
.commandcode/settings.jsonnames underproviders(amodulepath or annpmpackage) are not imported until you approve the folder, bycmd -p,cmd --rpc,cmd acp,cmd providersorcmd login. Your ownprovidersin~/.commandcodealways load.
Earlier versions read a .env from the folder you started cmd in. If you kept Command Code settings there (COMMAND_CODE_API_KEY, COMMANDCODE_API_URL, provider keys), they no longer apply:
- For your API key, run
cmd login, or exportCOMMAND_CODE_API_KEYfrom your shell profile. - For any other variable, export it from your shell profile, or prefix one run:
COMMANDCODE_API_URL=… cmd.
Your project's own code can keep using its .env as before; only the CLI stopped reading it.
When running in headless mode (cmd -p), all write operations are blocked by default. This keeps CI/CD pipelines and scripts safe.
To enable writes in headless mode, you must explicitly pass:
--dangerously-skip-permissionsis also accepted as an alias.
Command Code connects to the internet for:
- API requests to the AI provider (Command Code or Anthropic)
- Authentication via OAuth (during
cmd login) - Taste sync when you push/pull taste profiles
- MCP servers you explicitly configure
Command Code does not make any network requests for telemetry or tracking without your knowledge. See Telemetry for details on what optional telemetry is collected and how to opt out.
Command Code only accesses files within:
- Your current project directory (where you ran
cmd) - Additional directories you explicitly add with
--add-diror/add-dir - Command Code config in
~/.commandcode/
It does not read files outside these boundaries.
Authentication credentials are stored locally at ~/.commandcode/auth.json. They are never sent to any third party.
When connecting MCP servers, be aware that:
- MCP tools can access external services (databases, APIs, etc.)
- Each MCP server connection requires explicit setup via
cmd mcp add - OAuth tokens for MCP servers are stored locally
- You can review connected servers anytime with
cmd mcp listor/mcp
Only connect MCP servers you trust.
Command Code creates checkpoints before every file modification. If anything goes wrong, you can instantly rewind to a previous state.
- Press
Esctwice to open the checkpoint selector - Restore files, conversation, or both
- Checkpoints are stored locally and per-session
For organizations with stricter requirements, Command Code Enterprise offers:
- Self-hosted deployment options
- Your code never leaves your infrastructure
- Custom security policies
Contact support@commandcode.ai for details.
- Telemetry for opt-out details
- Pricing & Limits for plan details
- Headless Mode for CI/CD security
- Join our Discord community for support