CH·02CLI reference

deeprelay setup deep-code

Show how to point Deep Code at deeprelay (writes nothing)

Show how to point Deep Code at deeprelay (writes nothing)

Synopsis

Shows how to point Deep Code (deepcode, the @vegamo/deepcode-cli terminal agent) at deeprelay. Deep Code sends its requests to deeprelay's OpenAI-compatible /v1/chat/completions endpoint once its settings file names a deeprelay model, base URL and key.

What it writes

Nothing. Deep Code reads its API key only from env.API_KEY in its settings file. It has no environment variable and no command form for the key, and deeprelay never writes a key into a harness file. A settings file without the key does not work, so setup does not write a partial one either. Instead it checks the model against the deeprelay catalog and prints the exact block and steps, then exits non-zero so a script does not mistake it for a completed setup.

This was checked on 2026-10-07 against Deep Code 0.4.3: its README, deepcode --help, the package source (it reads no API key from the environment) and coding tasks run on deeprelay models.

The block it prints:

{
  "env": {
    "MODEL": "deeprelay/deepseek-v4.1-flash",
    "BASE_URL": "https://api.deeprelay.ai/v1",
    "API_KEY": "<paste the output of: deeprelay auth token>"
  },
  "thinkingEnabled": true
}
  • MODEL is the first model in deeprelay's list of models tested with coding agents, or the one you pass with --model. Setup checks that it exists and supports tool calling through GET /v1/models. It makes no billed call. If the API does not serve a recommended list, setup uses the list built into the CLI and says so.
  • BASE_URL is the API base setup runs against (--api-base, or DEEPRELAY_API_BASE), always ending in /v1.
  • thinkingEnabled is included when the catalog lists reasoning efforts for the model.
  • API_KEY is always the placeholder. Setup never prints your key, even when DEEPRELAY_API_KEY is set.

Manual steps

  1. Create ~/.deepcode/settings.json with the block (mkdir -p ~/.deepcode first). If the file already exists, merge the env keys and thinkingEnabled into it.
  2. Replace the API_KEY value with the output of deeprelay auth token.
  3. Run chmod 600 ~/.deepcode/settings.json, so only you can read the key.
  4. To configure one project instead, put the same block in ./.deepcode/settings.json and add .deepcode/settings.json to that project's .gitignore, so the key is never committed.

If you rotate your key, update API_KEY by hand.

Run it

deepcode                       # interactive
deepcode -x -p "<your task>"   # one-shot

Modes

  • Default: prints the block and steps, writes nothing, exits non-zero.
  • --model : uses that model instead of the first curated one. It must exist on deeprelay and support tool calling.
  • --print: prints the same block and steps and exits 0, since you asked for the snippet.
  • --remove: reports that there is nothing to remove, because setup never writes Deep Code's file, and exits 0. To stop using deeprelay in Deep Code, edit or delete the settings file yourself.
  • --yes: accepted so scripts can pass it to every target. It changes nothing here.

Setup resolves your key the way deeprelay auth token does (DEEPRELAY_API_KEY, else the credentials file from deeprelay login) only to read the catalog. No file, setup record or backup is created.

Examples

# Print the block and steps (exits non-zero: nothing was configured)
deeprelay setup deep-code

# Same output, exit 0
deeprelay setup deep-code --print

# Another model
deeprelay setup deep-code --print --model deeprelay/deepseek-v4-pro
deeprelay setup deep-code [flags]

Options

  -h, --help           help for deep-code
      --model string   Use this model instead of the first curated one
      --print          Print the settings.json block and steps, and exit 0
      --remove         Report that there is nothing to remove (this command never writes a file)
      --yes            Accepted for parity with other targets; this command never writes a file

Options inherited from parent commands

      --api-base string   API base URL (override with DEEPRELAY_API_BASE env) (default "https://api.deeprelay.ai/v1")
      --debug             Enable debug logging to stderr
      --no-preflight      Skip the plan/credit check before inference requests (override with DEEPRELAY_NO_PREFLIGHT env)
  -o, --output string     Output format: table|json (default table on TTY, json otherwise) (default "table")

SEE ALSO

← The gpu CLI