# How to use Command Code with Subconscious

> To use Command Code with Subconscious, add a `subconscious` provider to `~/.commandcode/providers.json` with base URL `https://api.subconscious.dev/v1`, your key as `$SUBCONSCIOUS_API_KEY` and the model `subconscious/glm-5.3-marathon`. Run cmd, pick the model in /model, and requests go straight to Subconscious.

Canonical page: https://www.subconscious.dev/integrations/terminal-and-ide/commandcode
Category: [Terminal and IDE agents](https://www.subconscious.dev/integrations/terminal-and-ide)
Last verified: 2026-10-14
Command Code: https://commandcode.ai
Source: https://github.com/CommandCodeAI/command-code

## Before you start

- Node.js and npm, or the Command Code desktop app
- A Subconscious account and API key

## Set up Command Code

### 1. Install Command Code

The desktop app for macOS, Windows and Linux includes the agent runtime, so the CLI is optional.

```bash
npm i -g command-code
```

### 2. Create a Subconscious API key

Sign in at https://platform.subconscious.dev, create an API key, and export it so the tool can read it.

```bash
export SUBCONSCIOUS_API_KEY="your_key"
```

### 3. Add Subconscious as a provider

apiKey takes a reference to an environment variable, not the key itself. contextWindow defaults to 200K; 5,000,000 matches what the Subconscious CLI uses.

```json
{
  "provider": {
    "subconscious": {
      "name": "Subconscious",
      "baseURL": "https://api.subconscious.dev/v1",
      "apiKey": "$SUBCONSCIOUS_API_KEY",
      "models": {
        "subconscious/glm-5.3-marathon": { "name": "GLM-5.3 Marathon", "contextWindow": 5000000 }
      }
    }
  }
}
```

### 4. Pick the model

Start Command Code in your project, open /model and choose GLM-5.3 Marathon under the Subconscious heading.

```bash
cmd
```

## Connection details

- OpenAI-compatible base URL: https://api.subconscious.dev/v1
- Anthropic-compatible base URL: https://api.subconscious.dev
- API key: From subc login or the Subconscious dashboard
- Model: subconscious/glm-5.3-marathon
- Multimodal, high-throughput model: subconscious/deepseek-v4.1-flash-marathon

Full API reference: https://docs.subconscious.dev

## Frequently asked questions

### Can I add Subconscious without editing providers.json?

Yes. Run /connect, choose (BYOK) Add your own provider, enter subconscious as the id, keep the OpenAI-compatible wire, and enter the Subconscious base URL, your API key and the model ID.

### Do requests go through Command Code servers?

No. Command Code's docs say BYOK requests go straight from your machine to the provider's endpoint with your key.

### Which Subconscious model should I use with Command Code?

Start with subconscious/glm-5.3-marathon, an open frontier coding model built for long agent runs. subconscious/deepseek-v4.1-flash-marathon is a cheaper, high-throughput alternative that also takes image input. Use the full model ID, including the subconscious/ prefix.

### Is Command Code on Subconscious OpenAI- or Anthropic-compatible?

This guide connects Command Code through the OpenAI-compatible Subconscious API. Subconscious serves both formats: OpenAI Chat Completions at https://api.subconscious.dev/v1 and Anthropic Messages at https://api.subconscious.dev.

### How is Command Code usage on Subconscious billed?

Per token by default, with no commitment. Heavy users can switch to a Team Token Plan: a large monthly budget with 5x the usage, shared across your team.
