Skip to main content
← TurnTwoMISSION CONTROL0.4812655050996505

CLI Quickstart

Install the CLI, sign in via device flow, and start capturing local Claude Code session telemetry.

Updated 2026-05-19

What the CLI does

The turntwo mc CLI extends Mission Control beyond the browser:

  • Device-flow sign-in — no API key paste; the CLI shows a code, you confirm in the browser, the CLI gets a scoped bearer token. Tokens are hashed at rest server-side; the raw value lives only in your CLI config dir.
  • Skill installer — drops a Claude Code skill into your ~/.claude/skills/turntwo-mc/ so Claude can call Mission Control endpoints from inside a session.
  • Telemetry capture (opt-in) — sends scrubbed session summaries to your cockpit so the audit / coach modules have real data to work with.
  • Cost / cache / audit shortcuts — run the same modules you use in the browser without leaving your terminal.

Commander tier or higher required for device-flow sign-in.

Install

The CLI ships under the parent platform's npm package:

npx --package=turntwo@latest mc login

The first run kicks off device flow:

  1. CLI prints a 6-character code + a URL.
  2. You open the URL in any browser, paste the code, and confirm. The confirm page is gated to Commander+ accounts.
  3. CLI polls every ~3 seconds; on confirm it receives a mc_dev_* bearer token and writes it to your config dir (Windows: %APPDATA%/turntwo-mc/, macOS: ~/Library/Application Support/turntwo-mc/, Linux: $XDG_CONFIG_HOME/turntwo-mc/).

The config file is 0600-permissioned on POSIX so other users on the machine cannot read your token.

Common commands

mc whoami            # confirm the token is valid + show your tier
mc init              # install the Claude Code skill into ~/.claude/skills
mc telemetry on      # opt in to session capture
mc telemetry status  # see what's enabled
mc telemetry purge   # delete all captured telemetry server-side
mc cost              # current period spend summary
mc cache-check       # run the cache-hit-rate monitor on your latest session
mc audit             # heuristic Seven Cardinal Sins audit on the last session
mc devices           # list active CLI devices on your account
mc revoke <id>       # invalidate a device by its short ID
mc logout            # delete the local token (server-side stays — use `mc revoke` to invalidate)
mc uninstall         # remove the Claude Code skill + clear config

Telemetry — what gets sent, what doesn't

When telemetry is on, the CLI POSTs a scrubbed summary of each session to /api/mc/cli/session:

Sent: model used, token counts (in/out/cache), cost in cents, duration, tool calls (names only), file paths type-only (e.g. *.ts), error categories.

Not sent: message content, prompt text, file contents, working directory paths, API keys or secrets seen in the session. The double-scrubber runs both client-side before send and server-side on ingest.

You can purge everything ever sent with mc telemetry purge. The server-side action runs an audit log entry, then deletes every row in mc_cli_sessions that matches your user_id.

Troubleshooting

  • Device flow stuck on "Waiting for confirm..." — the confirm page is Commander+ gated. If you're not on that tier, the page shows an upgrade prompt instead of a confirm button. Upgrade, then re-run mc login.
  • "Invalid token" after working fine — your device may have been revoked from the Devices page in Settings. Run mc login again.
  • Skill not loading in Claude Code — make sure ~/.claude/skills/turntwo-mc/ exists and SKILL.md is in it. mc init --force re-installs over an existing install.