Skip to content

About

DeepSeek CLI — unofficial adaptation of Gemini CLI by sluisr. Full agentic AI in your terminal using DeepSeek API.

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

6,356 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐋 DeepSeek CLI

Warning

⚠️ DEPRECATED — this project is no longer maintained. DeepSeek CLI has been superseded by Corex, a native Rust rewrite that is actively developed and supports DeepSeek, Gemini, Claude, OpenAI & local LLMs. Known issues (e.g. config path inherited from Gemini CLI, reduced context limits) will not be fixed here. Please open any new issue in the Corex repository.

⚠️ DESCONTINUADO — este proyecto ya no recibe mantenimiento. Ahora el desarrollo continúa en Corex. Abre cualquier issue nuevo allí.

Unofficial fork of Google Gemini CLI adapted to use the DeepSeek API. Original work Copyright 2025 Google LLC — Adaptations Copyright 2026 sluisr — Apache 2.0 License.

License NPM Version

DeepSeek CLI is an open-source AI agent that brings the power of DeepSeek directly into your terminal. High-performance autonomous coding, tool execution, and context management by sluisr.


🚀 Why DeepSeek CLI?

  • 💰 Pay-per-use & Cost-Efficient: Pay only for tokens used via DeepSeek API with up to 90% KV Cache discount.
  • 🧠 DeepSeek V4 Models: Full support for deepseek-v4-flash and deepseek-v4-pro (Reasoning / Thinking CoT mode).
  • ⚡ Fast Code Patching: Atomic unified diff patching (apply_patch) for instant, token-efficient code modifications.
  • 🛠️ Built-in Developer Tools: File system operations, native server-side web search, shell execution, memory persistence, and FIM autocompletion.
  • 🔑 Silent Sudo & System Auth: Native non-blocking zero-lag AskPass integration for sudo, ssh, and git.
  • 🔌 MCP Extensible: Full Model Context Protocol (MCP) server support.
  • 🔒 Isolated Configuration: Operates under ~/.deepseek/ without polluting system or official CLI configurations.

📦 Installation

Quick Install (NPM Global)

npm install -g @sluisr/deepseek-cli

Then run:

deepseek

Update to Latest Version

npm install -g @sluisr/deepseek-cli@latest

🔐 Authentication

Get your API key at platform.deepseek.com/api_keys and export it:

export DEEPSEEK_API_KEY="your-api-key-here"
deepseek

Or enter it interactively when prompted on first launch.

Optional custom base URL or proxy:

export DEEPSEEK_BASE_URL="https://api.deepseek.com"

💻 Getting Started

Interactive Session

cd my-project/
deepseek

Non-Interactive (Headless Scripting)

deepseek -p "Explain the architecture of this codebase"

Include Multiple Directories

deepseek --include-directories ../lib,../docs

⚡ Slash Commands Reference

Command Description
/model Interactive model selector (deepseek-v4-flash, deepseek-v4-pro) with real-time reasoning effort (LOW, MEDIUM, HIGH, MAX) and temperature controls.
/balance Live DeepSeek account balance lookup (GET /user/balance). Alias: /wallet, /credits.
/fim <file> [<line> | <FIM_HOLE>] Fill-in-the-Middle code autocompletion via DeepSeek Beta API.
/prefix <text> Chat Prefix Completion to force exact output format without conversational filler.
/info Author credits, version info, and community links. Alias: /author, /credits.
/chat / /resume Search and resume previous conversation sessions.
/rewind Rewind conversation history to an earlier turn.
/compress Compress conversation context to stay within token limits.
/mcp Manage Model Context Protocol (MCP) servers and tools.
/skills Manage and activate agent skills.
/plan Enter interactive planning mode for complex multi-file architectural changes.
/stats View session token usage, cached token counts, and execution metrics.
/clear Clear terminal conversation screen.
/quit / /exit Exit the CLI session and generate resume command (deepseek --resume <id>).

🛠️ Built-in Agent Tools

DeepSeek CLI equips the AI agent with native developer tools to autonomously analyze, edit, and build projects:

  • ⚡ Atomic Code Patching (apply_patch): Fast, unified diff patching saving up to 80% tokens compared to full file rewrites.
  • 🌐 Server-Side Web Search (web_search): DeepSeek Responses API search engine with direct citation links and multi-level reasoning verification (search_reasoning: low | medium | high | max).
  • 📁 File System Operations: Read, write, smart-replace, search with ripgrep (grep), and directory discovery (glob).
  • 💻 Shell Command Execution: Autonomous bash commands, test runners, and builds with silent 0ms AskPass for sudo, ssh, and git.
  • 🧠 Memory & Context Files: Persistent agent memory in ~/.deepseek/DEEPSEEK.md and per-project DEEPSEEK.md.
  • 🔌 MCP Server Protocol: Integrations with databases, GitHub, Docker, and custom tools via Model Context Protocol.

⚙️ Configuration

Configuration and persistence settings are stored under ~/.deepseek/settings.json.

MCP Servers Configuration Example

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"]
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  }
}

🌐 Community & Author


🤝 Contributing

Issues and pull requests are welcome at github.com/sluisr/deepseek-cli.


📜 Legal & License


Built with 🐋 by sluisr (@sluisr) — Unofficial DeepSeek CLI

About

DeepSeek CLI — unofficial adaptation of Gemini CLI by sluisr. Full agentic AI in your terminal using DeepSeek API.

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages