Skip to content
 
 

Repository files navigation

DeepSeek CLI

DeepSeek CLI

A terminal-native coding agent configured for DeepSeek.
Built from a Claude Code source snapshot, with DeepSeek defaults, local config under ~/.deepseek, and the deepseek command.

Install Stars Issues Feature Flags IPFS


Quick Install

curl -fsSL https://raw.githubusercontent.com/Venompool888/deepseek-cli/main/install.sh | bash

Checks your system, installs Bun if needed, clones the repo, builds with all experimental features enabled, and symlinks deepseek and ds on your PATH.

Then run deepseek or ds and configure your DeepSeek API key.


Table of Contents


What is this

DeepSeek CLI is a clean, buildable fork of Anthropic's Claude Code CLI, wired to DeepSeek's Anthropic-compatible API by default. The upstream source became publicly available on March 31, 2026 through a source map exposure in the npm distribution.

This fork applies three categories of changes on top of that snapshot:

Telemetry removed

The upstream binary phones home through OpenTelemetry/gRPC, GrowthBook analytics, Sentry error reporting, and custom event logging. In this build:

  • All outbound telemetry endpoints are dead-code-eliminated or stubbed
  • GrowthBook feature flag evaluation still works locally (needed for runtime feature gates) but does not report back
  • No crash reports, no usage analytics, no session fingerprinting

Security-prompt guardrails removed

Anthropic injects system-level instructions into every conversation that constrain Claude's behavior beyond what the model itself enforces. These include hardcoded refusal patterns, injected "cyber risk" instruction blocks, and managed-settings security overlays pushed from Anthropic's servers.

This build strips those injections. The model's own safety training still applies -- this just removes the extra layer of prompt-level restrictions that the CLI wraps around it.

Experimental features unlocked

Claude Code ships with 88 feature flags gated behind bun:bundle compile-time switches. Most are disabled in the public npm release. This build unlocks all 54 flags that compile cleanly. See Experimental Features below, or refer to FEATURES.md for the full audit.


Model Providers

DeepSeek CLI supports multiple API providers out of the box. It defaults to DeepSeek; set the corresponding environment variable to switch providers.

DeepSeek API -- Default

Use DeepSeek's Anthropic-compatible API.

export DEEPSEEK_API_KEY="sk-..."
deepseek

Optional config lives at ~/.deepseek/anthropic.json:

{
  "apiKey": "sk-...",
  "baseUrl": "https://api.deepseek.com/anthropic",
  "model": "deepseek-v4-pro"
}

OpenAI Codex

Use OpenAI's Codex models for code generation. Requires a Codex subscription.

Model ID
GPT-5.3 Codex (recommended) gpt-5.3-codex
GPT-5.4 gpt-5.4
GPT-5.4 Mini gpt-5.4-mini
export CLAUDE_CODE_USE_OPENAI=1
deepseek

AWS Bedrock

Route requests through your AWS account via Amazon Bedrock.

export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION="us-east-1"   # or AWS_DEFAULT_REGION
deepseek

Uses your standard AWS credentials (environment variables, ~/.aws/config, or IAM role). Models are mapped to Bedrock ARN format automatically (e.g., us.anthropic.claude-opus-4-6-v1).

Variable Purpose
CLAUDE_CODE_USE_BEDROCK Enable Bedrock provider
AWS_REGION / AWS_DEFAULT_REGION AWS region (default: us-east-1)
ANTHROPIC_BEDROCK_BASE_URL Custom Bedrock endpoint
AWS_BEARER_TOKEN_BEDROCK Bearer token auth
CLAUDE_CODE_SKIP_BEDROCK_AUTH Skip auth (testing)

Google Cloud Vertex AI

Route requests through your GCP project via Vertex AI.

export CLAUDE_CODE_USE_VERTEX=1
deepseek

Uses Google Cloud Application Default Credentials (gcloud auth application-default login). Models are mapped to Vertex format automatically (e.g., claude-opus-4-6@latest).

Anthropic Foundry

Use Anthropic Foundry for dedicated deployments.

export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_API_KEY="..."
deepseek

Supports custom deployment IDs as model names.

Provider Selection Summary

Provider Env Variable Auth Method
DeepSeek (default) -- DEEPSEEK_API_KEY or ~/.deepseek/anthropic.json
OpenAI Codex CLAUDE_CODE_USE_OPENAI=1 OAuth via OpenAI
AWS Bedrock CLAUDE_CODE_USE_BEDROCK=1 AWS credentials
Google Vertex AI CLAUDE_CODE_USE_VERTEX=1 gcloud ADC
Anthropic Foundry CLAUDE_CODE_USE_FOUNDRY=1 ANTHROPIC_FOUNDRY_API_KEY

Requirements

  • Runtime: Bun >= 1.3.11
  • OS: macOS or Linux (Windows via WSL)
  • Auth: An API key or OAuth login for your chosen provider
# Install Bun if you don't have it
curl -fsSL https://bun.sh/install | bash

Build

git clone https://github.com/Venompool888/deepseek-cli.git
cd deepseek-cli
bun run build
./cli

Build Variants

Command Output Features Description
bun run build ./cli VOICE_MODE only Production-like binary
bun run build:dev ./cli-dev VOICE_MODE only Dev version stamp
bun run build:dev:full ./cli-dev All 54 experimental flags Full unlock build
bun run compile ./dist/cli VOICE_MODE only Alternative output path

Custom Feature Flags

Enable specific flags without the full bundle:

# Enable just ultraplan and ultrathink
bun run ./scripts/build.ts --feature=ULTRAPLAN --feature=ULTRATHINK

# Add a flag on top of the dev build
bun run ./scripts/build.ts --dev --feature=BRIDGE_MODE

Usage

# Installed command
deepseek

# Short alias
ds

# Source checkout
./cli

# Specify a model
deepseek --model deepseek-v4-pro

# Run from source (slower startup)
bun run dev

Environment Variables Reference

Variable Purpose
DEEPSEEK_API_KEY DeepSeek API key
DEEPSEEK_CONFIG_DIR Override config directory, default ~/.deepseek
CLAUDE_CODE_USE_OPENAI Enable OpenAI Codex provider
CLAUDE_CODE_USE_BEDROCK Enable AWS Bedrock provider
CLAUDE_CODE_USE_VERTEX Enable Google Vertex AI provider
CLAUDE_CODE_USE_FOUNDRY Enable Anthropic Foundry provider
ANTHROPIC_MODEL Override model for Anthropic-compatible providers
ANTHROPIC_BASE_URL Custom Anthropic-compatible endpoint

Experimental Features

The bun run build:dev:full build enables all 54 working feature flags. Highlights:

Interaction & UI

Flag Description
ULTRAPLAN Remote multi-agent planning on Claude Code web (Opus-class)
ULTRATHINK Deep thinking mode -- type "ultrathink" to boost reasoning effort
VOICE_MODE Push-to-talk voice input and dictation
TOKEN_BUDGET Token budget tracking and usage warnings
HISTORY_PICKER Interactive prompt history picker
MESSAGE_ACTIONS Message action entrypoints in the UI
QUICK_SEARCH Prompt quick-search
SHOT_STATS Shot-distribution stats

Agents, Memory & Planning

Flag Description
BUILTIN_EXPLORE_PLAN_AGENTS Built-in explore/plan agent presets
VERIFICATION_AGENT Verification agent for task validation
AGENT_TRIGGERS Local cron/trigger tools for background automation
AGENT_TRIGGERS_REMOTE Remote trigger tool path
EXTRACT_MEMORIES Post-query automatic memory extraction
COMPACTION_REMINDERS Smart reminders around context compaction
CACHED_MICROCOMPACT Cached microcompact state through query flows
TEAMMEM Team-memory files and watcher hooks

Tools & Infrastructure

Flag Description
BRIDGE_MODE IDE remote-control bridge (VS Code, JetBrains)
BASH_CLASSIFIER Classifier-assisted bash permission decisions
PROMPT_CACHE_BREAK_DETECTION Cache-break detection in compaction/query flow

See FEATURES.md for the complete audit of all 88 flags, including 34 broken flags with reconstruction notes.


Project Structure

scripts/
  build.ts                # Build script with feature flag system

src/
  entrypoints/cli.tsx     # CLI entrypoint
  commands.ts             # Command registry (slash commands)
  tools.ts                # Tool registry (agent tools)
  QueryEngine.ts          # LLM query engine
  screens/REPL.tsx        # Main interactive UI (Ink/React)

  commands/               # /slash command implementations
  tools/                  # Agent tool implementations (Bash, Read, Edit, etc.)
  components/             # Ink/React terminal UI components
  hooks/                  # React hooks
  services/               # API clients, MCP, OAuth, analytics
    api/                  # API client + Codex fetch adapter
    oauth/                # OAuth flows (Anthropic + OpenAI)
  state/                  # App state store
  utils/                  # Utilities
    model/                # Model configs, providers, validation
  skills/                 # Skill system
  plugins/                # Plugin system
  bridge/                 # IDE bridge
  voice/                  # Voice input
  tasks/                  # Background task management

Tech Stack

Runtime Bun
Language TypeScript
Terminal UI React + Ink
CLI Parsing Commander.js
Schema Validation Zod v4
Code Search ripgrep (bundled)
Protocols MCP, LSP
APIs Anthropic Messages, OpenAI Codex, AWS Bedrock, Google Vertex AI

IPFS Mirror

A full copy of this repository is permanently pinned on IPFS via Filecoin:

CID bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm
Gateway https://w3s.link/ipfs/bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm

If this repo gets taken down, the code lives on.


Contributing

Contributions are welcome. If you're working on restoring one of the 34 broken feature flags, check the reconstruction notes in FEATURES.md first -- many are close to compiling and just need a small wrapper or missing asset.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit your changes (git commit -m 'feat: add something')
  4. Push to the branch (git push origin feat/my-feature)
  5. Open a Pull Request

License

The original Claude Code source is the property of Anthropic. This fork exists because the source was publicly exposed through their npm distribution. Use at your own discretion.

About

The free build of Claude Code. All telemetry removed, security-prompt guardrails stripped, all experimental features enabled.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages