Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepClaude Installer

One-command installer for an opinionated DeepClaude via Command Code setup: Claude Code's agent harness running with DeepSeek V4 Pro as the main model, powered by Command Code's subscription economics instead of a direct DeepSeek API-only setup.

bash <(curl -sSL https://raw.githubusercontent.com/rrmlima/deepclaude-installer/main/install.sh)

Why this exists

The common DeepClaude pattern is simple: point Claude Code at a DeepSeek-compatible Anthropic endpoint, use DeepSeek V4 Pro as the model, and keep Claude Code's terminal UX, tools, project memory, MCP support, and autonomous loop.

That idea is powerful because the harness matters. In AkitaOnRails' public LLM coding benchmark notes, DeepSeek V4 Pro moved from a solo/opencode Tier B result to Tier A when routed through Claude Code via a DeepClaude-style shim: 69 → 84/89, a reported +15–20 point lift from the harness/agent loop rather than the base model alone.

This repo takes that idea one step further:

Instead of requiring a direct DeepSeek API balance, it wires Claude Code to DeepSeek V4 Pro through Command Code, where the low-cost Go plan includes open-source model credits and DeepSeek V4 Pro has a permanent 4× usage deal.

Command Code's public pricing currently lists:

  • Go plan: $1/mo with $10 in included LLM credits for open-source models.
  • DeepSeek V4 Pro deal: credits go 4× further on this model, so the Go plan can represent up to about $40 effective DeepSeek V4 Pro usage when staying on that model.
  • Pro plan: $15/mo with $30 credits, up to about $120 effective DeepSeek V4 Pro usage under the same deal.
  • Provider API: a separate API-oriented plan; the Go plan does not include raw Provider API access.

So this installer is not just "DeepSeek API in Claude Code". It is a Command Code-backed DeepClaude harness that aims for a better cost/token envelope while preserving the Claude Code workflow.

What this installs

  • deepclaude command
  • Claude Code harness
  • Command Code-backed execution/auth integration
  • deepseek/deepseek-v4-pro as the main model
  • deepseek/deepseek-v4-flash for subagents and Haiku/small model
  • isolated Linux runtime user: ccpc
  • /opt/ccpc-runtime runtime directory
  • a local Anthropic-compatible bridge for Claude Code
  • operational fallback through Command Code CLI when raw Provider API access is unavailable
  • no --max-turns cap in fallback mode
  • DuckDuckGo MCP fix for Command Code web_search / web_fetch credit failures
  • SHA256-verified online bootstrap

Install

Basic install:

bash <(curl -sSL https://raw.githubusercontent.com/rrmlima/deepclaude-installer/main/install.sh)

With live validation:

bash <(curl -sSL https://raw.githubusercontent.com/rrmlima/deepclaude-installer/main/install.sh) --verify-live

With API key via environment variable:

COMMAND_CODE_API_KEY='YOUR_COMMAND_CODE_API_KEY' bash <(curl -sSL https://raw.githubusercontent.com/rrmlima/deepclaude-installer/main/install.sh) --verify-live

Or pass the key as an argument:

bash <(curl -sSL https://raw.githubusercontent.com/rrmlima/deepclaude-installer/main/install.sh) --api-key 'YOUR_COMMAND_CODE_API_KEY' --verify-live

The architecture

deepclaude
  -> Claude Code CLI/harness
  -> local Anthropic-compatible ccpc bridge
  -> Command Code / DeepSeek V4 Pro

Main model:

deepseek/deepseek-v4-pro

Subagent and small/Haiku model:

deepseek/deepseek-v4-flash

The goal is to keep the robust Claude Code loop: shell, edits, project context, MCP, subagents, settings, and autonomous iteration, while moving model spend to Command Code's open-source model credit pool.

Why Command Code instead of direct DeepSeek API?

Direct DeepSeek API is the simpler mental model, but Command Code changes the economics:

Route What you get Tradeoff
Direct DeepSeek API Simple direct billing, official DeepSeek endpoint You fund raw API usage directly
Command Code Go $1/mo subscription, $10 credits, open-source models, DeepSeek V4 Pro 4× usage deal Raw Provider API is not included in Go
Command Code Pro More credits and premium model access Higher monthly cost
Command Code Provider Raw API access Separate $15/mo API plan

For my own usage snapshot, Command Code showed roughly 82.9M tokens for about $4.26 used out of $10 credits. That is the economic reason this experiment is interesting: the subscription credit model can stretch much further than a tiny direct API balance, especially under model-specific deals.

Command Code Go usage dashboard showing 82.9M tokens, $4.26 of $10 used, and DeepSeek V4 Pro 4x credit stretch

Example dashboard snapshot from my Command Code Go usage. Results vary by model mix, cache behavior, context size, and task type.

Multi-model upside

This setup is not locked to DeepSeek forever. Command Code exposes a broad model catalog, including families such as:

  • DeepSeek V4 Pro / Flash
  • Kimi K2.x Code
  • GLM 5.x
  • MiniMax M-series
  • Qwen 3.x
  • Step Flash
  • MiMo V2.5
  • Nemotron 3 Ultra

That means this project can evolve from "DeepClaude" into a broader Claude Code harness router: same agent UX, different backends depending on price, latency, or task type.

Important caveat: Provider API vs CLI access

Command Code's docs are clear: raw Provider API access requires the Provider plan or higher. On the Go plan, direct Provider API calls can return:

403 upgrade_required
Your Go plan doesn't include API access. Upgrade to Provider or higher.

This installer handles that reality operationally by keeping Claude Code's harness intact and using the available Command Code path for model execution when raw Provider API access is unavailable.

In other words:

  • If Provider API is available, the bridge can use it.
  • If Provider API is unavailable on the current plan, the setup still runs through Command Code's CLI execution path.
  • This is not advertised as raw Provider API access on Go.

Web search/fetch fix

During testing, Command Code's built-in web_search and web_fetch paths could fail due to separate credit/permission behavior. This installer includes:

  • DuckDuckGo MCP configuration
  • a preload blocker that steers built-in web_search / web_fetch failures toward:
    • mcp__duckduckgo__search
    • mcp__duckduckgo__fetch_content

Security

  • No API key is embedded in this repository or release archive.
  • The installer asks for the Command Code API key if absent.
  • The online bootstrap verifies the release archive SHA256 before extraction.
  • The key is stored locally in /opt/ccpc-runtime/ccpc.env with 0600 permissions.
  • The installer creates an isolated ccpc user so the autonomous harness is not run as root.

Verification

After install:

deepclaude status
deepclaude doctor
deepclaude "Responda exatamente OK"

Expected status shape:

model: deepseek/deepseek-v4-pro
haiku model: deepseek/deepseek-v4-flash
subagent model: deepseek/deepseek-v4-flash
permission mode: bypassPermissions
dangerous permission: on
command code key: present

Side-effect test:

rm -f /home/ccpc/work/deepclaude_fixed_probe.txt
deepclaude "Crie o arquivo deepclaude_fixed_probe.txt no diretório atual com o texto OK-FIXED. Execute diretamente, sem pedir autorização."
cat /home/ccpc/work/deepclaude_fixed_probe.txt

Expected:

OK-FIXED

References

Troubleshooting

The release package includes a detailed LLM repair guide at:

docs/deepclaude-install-prompt-final.md

Use it if installation fails due to a machine-specific environment issue.

About

Command Code-backed DeepClaude installer: Claude Code harness on DeepSeek V4 Pro with low-cost credits, CLI fallback, and DuckDuckGo MCP fixes

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages