learningdog1

CommandCodeGo-manager

CommandCodeGo-manager is a local service that turns Command Code subscription quota into OpenAI- and Anthropic-compatible endpoints, with a Chinese web console and desktop builds for macOS and Windows.

v0.2.17
Published at
24d ago
108
Stars
1.6k
Download

Latest release

v0.2.17Nov 11, 2026, 12:53 PM
Downloads slow? Switch the source anytime above

README

Project Overview

Using a cheap subscription quota to drive a harness like Claude Code usually stalls because the plan exposes no standard API, and CommandCodeGo-manager works around it with a local reverse proxy: upstream speaks Command Code's protocol, while downstream exposes /v1/chat/completions, /v1/responses, and /v1/messages, so any OpenAI- or Anthropic-compatible client connects directly.

Item Value
Shape Node service, web console, and macOS / Windows desktop builds
Default address http://127.0.0.1:3050
Runtime Node.js 22.5 or later, with zero runtime dependencies
Storage SQLite via built-in node:sqlite, request logs kept 30 days by default
License MIT

The upstream protocol stays as it is, the downstream speaks what every harness already knows.

Key Features

  • Three compatible endpoints: Chat Completions, Responses, and Anthropic Messages, streaming over SSE and non-streaming alike
  • Capability passthrough: tool calls, multimodal image input, reasoning_effort, and cache-hit accounting all survive the hop
  • Device fingerprints: every upstream key deterministically impersonates one Windows device, matching the official CLI 1.53.1 on CPU, memory, timezone, MAC, MachineGuid, hostname, and git email, salted with command-code:device-fingerprint:v1
  • Key model: client keys look like sk-ccp-*, stored hashed, explicitly bound to an upstream key, and revocable; user_* passthrough also works
  • Quota rotation: a 402 marks a key as exhausted persistently, a 429 window marks it until reset, and exhaustion reported inside an SSE body with status 200 is detected too
  • Usage panel: one card per account with 5-hour rolling, weekly, and monthly quota bars, three credit pools, and period totals refreshed every 5 minutes
  • Model pricing: official prices for 71 models sit next to 30 days of local usage to compute and sort a reference cost
  • Web console: live request logs over SSE, filtering by endpoint and status, key management, and protocol-drift warnings
  • Desktop builds: a tray icon keeps the service running after the window closes, with update checks at start and every 6 hours

Connecting a Harness

  1. Get an upstream key under key management: a machine with the CLI logged in offers one-click import from ~/.commandcode/auth.json, and multiple accounts come in by pasting user_* values
  2. Create a client key sk-ccp-*, or use user_* in passthrough mode
  3. Point any OpenAI-compatible client at http://127.0.0.1:3050/v1:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:3050/v1", api_key="sk-ccp-xxxx")
  1. For Claude Code, switch two environment variables and start it:
export ANTHROPIC_BASE_URL=http://127.0.0.1:3050
export ANTHROPIC_AUTH_TOKEN=sk-ccp-xxxx
claude

Configuration

Key Default Meaning
port 3050 Listen port, via PORT
host 127.0.0.1 Listen address, 0.0.0.0 opens it to the LAN
apiBase https://api.commandcode.ai Upstream base URL
logRetentionDays 30 Days of request logs kept
useProviderModels true Fetch the model list dynamically, cached 5 minutes
allowDirectUpstreamKey true Whether user_* passthrough is allowed

Runtime knobs are environment-only: CC_MAX_BODY_MB defaults to 100, CC_STREAM_IDLE_MS to 30000, CC_NONSTREAM_IDLE_MS to 90000, and CC_KEEPALIVE_TIMEOUT_MS to 65000.

Deployment

  1. The desktop build is simplest: launch it and the console answers on http://127.0.0.1:3050/
  2. Bare Node needs 22.5 or later, and node server.mjs writes defaults to data/config.json on first start
  3. Single-file distribution comes from npm run bundle, producing dist/commandcodego-manager.mjs
  4. For Docker, pull the published image and change CCP_ADMIN_TOKEN in the compose file to a value from openssl rand -hex 24

System Requirements

Item Requirement
OS macOS, Windows, or any Linux host that runs Docker
Runtime Node.js 22.5 or later, bundled in the desktop builds
Reverse proxy proxy_buffering off for streaming, keepalive_timeout under 65 seconds
Memory A public request can peak near 550 MB, so do not build on a 1 GB machine

Notes

  • Upstream keys are stored in plain text: keep data/ at 600 / 700 permissions and never commit it
  • It listens on loopback only by default: switching to 0.0.0.0 exposes both proxy and console, so public use needs a reverse proxy with TLS
  • Auth depends on deployment: bare and desktop runs are login-free and rely on same-origin checks for writes, while Docker and public setups need CCP_ADMIN_TOKEN
  • Structured output returns 400: the upstream protocol has no response_format field, so json_object and json_schema requests are refused explicitly rather than silently ignored
  • Unofficial reverse engineering: unrelated to Command Code, potentially against its terms of service, with account risk borne by the user

Release history

Sort