Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                

Security & Privacy

Command Code is designed with security and privacy as core principles. You control exactly what Command Code can access.

WhatStored?Where
Source codeSee Privacy PolicyYour machine only
Taste profileLocal + optional cloud sync.commandcode/taste/ and commandcode.ai
Conversation historyLocal only~/.commandcode/projects/
Authentication tokensLocal only~/.commandcode/auth.json
AGENTS.mdLocal onlyProject root
Privacy

Request content is retained as described in our Privacy Policy. Taste learning runs locally and stores preferences as structured rules - not code snippets.

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.

ModeFile readsFile writesShell commandsWhen to use
DefaultAllowedRequires approvalRequires approvalDay-to-day work
Accept EditsAllowedAllowedSafe filesystem commands only (mkdir, cp, non-recursive rm, …); other shell still asksTrusted iteration
PlanAllowedBlocked, except a plan file under ~/.commandcode/plans/Read-only only (e.g. git status)Exploring and designing
YoloAllowedAllowedAllowedThrowaway environments only; deny rules and the root/home removal check still apply
Dont-AskAllowedOnly pre-approvedOnly pre-approvedUnattended 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:

cmd --plan # Start in plan mode cmd --accept-edits # Start in accept edits mode cmd --permission-mode accept-edits # Start in accept edits mode (long form) cmd --permission-mode dont-ask # Start in dont-ask mode cmd --yolo # Start in yolo mode, permission bypass (use with care)
Note

Deny rules (and explicit ask rules) always win, in every mode, including yolo. See Permissions for the full decision pipeline, rule syntax, and the complete mode decision table.

The first time you run cmd in a project, Command Code asks whether to trust that directory. This prevents accidental execution in untrusted locations.

cmd --trust # Skip the trust prompt

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 .env in 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 ~/.commandcode only.
  • Headless runs (cmd -p, cmd --rpc) and cmd acp show no trust prompt. In a folder you have not approved they do not start the MCP servers in its .mcp.json or run the hooks in its .commandcode/settings.json, and they say on stderr how to approve it. Approve a folder once (the trust prompt in cmd, or --trust) and every later run loads them. --dangerously-skip-permissions loads them for one run without saving an approval.
  • Provider modules that the folder's .commandcode/settings.json names under providers (a module path or an npm package) are not imported until you approve the folder, by cmd -p, cmd --rpc, cmd acp, cmd providers or cmd login. Your own providers in ~/.commandcode always 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 export COMMAND_CODE_API_KEY from 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:

cmd -p "fix lint errors" --yolo

--dangerously-skip-permissions is also accepted as an alias.

Warning

Only use --yolo in trusted environments like your own CI pipelines. It allows Command Code to modify files and run shell commands without confirmation.

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:

  1. Your current project directory (where you ran cmd)
  2. Additional directories you explicitly add with --add-dir or /add-dir
  3. 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 list or /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 Esc twice 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.