Run Claude Code against DeepSeek's Anthropic-compatible API.
Install once with a single command, enter your DeepSeek API key once (it asks
you interactively if you haven't included it yet), and from then on just run
deepclaude — it sets all the env vars and launches claude for you.
Requires the
claudeCLI to already be installed (instructions).
curl -fsSL https://raw.githubusercontent.com/RafiulM/deepclaude/main/install.sh | bashInstalls a single deepclaude script into ~/.local/bin. If that directory
isn't on your PATH, the installer prints the line to add.
irm https://raw.githubusercontent.com/RafiulM/deepclaude/main/install.ps1 | iexInstalls deepclaude into %LOCALAPPDATA%\Programs\deepclaude and adds it to
your user PATH. Open a new terminal afterward.
On Windows you can also use the macOS/Linux command above from Git Bash or WSL.
First run asks for your DeepSeek API key (hidden input) and saves it:
deepclaudeEvery run after that just works — same key, no prompt. Any arguments pass
straight through to claude:
deepclaude "refactor this module"
deepclaude --helpThe key is resolved in this order:
deepclaude config <KEY>— set it inline, no prompt.- The stored config file — set on a previous run.
DEEPSEEK_API_KEYenvironment variable — used and saved for next time.- Interactive prompt — asked for automatically if none of the above is set.
deepclaude change-key # change the stored key (interactive prompt)
deepclaude change-key <KEY> # change the key without a prompt
deepclaude reset # delete the stored keyconfig, set-key, and change are accepted as aliases for change-key.
deepclaude update # pull the latest version (re-runs the installer)| Platform | Where the key is stored |
|---|---|
| macOS / Linux | ~/.config/deepclaude/config (perms 600) |
| Windows | %APPDATA%\deepclaude\config (ACL: you only) |
It is stored in plaintext on your machine — anyone with access to your user account can read it. Treat it like any other local credential.
ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
ANTHROPIC_AUTH_TOKEN="<your DeepSeek API key>"
ANTHROPIC_MODEL="deepseek-v4-pro[1m]"
ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-pro[1m]"
ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-pro[1m]"
ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"
CLAUDE_CODE_SUBAGENT_MODEL="deepseek-v4-flash"
CLAUDE_CODE_EFFORT_LEVEL="max"Then runs: claude --dangerously-skip-permissions "$@"
Note:
--dangerously-skip-permissionslets Claude run tools without per-action approval prompts. Convenient, but it means commands and file edits execute without asking. Use it in a directory you trust.
macOS / Linux
rm ~/.local/bin/deepclaude
rm -rf ~/.config/deepclaudeWindows (PowerShell)
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Programs\deepclaude"
Remove-Item -Recurse -Force "$env:APPDATA\deepclaude"