deepseek-coder-agent-cli
v1.0.26
Published
DeepSeek AI-powered CLI agent for code assistance and automation
Maintainers
Readme
DeepSeek Coder CLI
An AI-powered coding assistant for the terminal. Built for developers who prefer working in the command line.
Features
- Interactive Shell - Full-featured terminal interface with multi-line input support
- Code Editing - Read, write, and edit files with AI assistance
- Bash Integration - Execute shell commands with real-time status display
- Multi-Provider Support - Works with DeepSeek, OpenAI, Anthropic, Google, and xAI
- Session Management - Save and restore conversation sessions
- File Change Tracking - Revert all changes made during a session with
/revert
Installation
npm install -g deepseek-coder-agent-cliSetup
Get your API key from DeepSeek Platform, then:
deepseek --key YOUR_API_KEYOr set via environment variable:
export DEEPSEEK_API_KEY=your_key_hereUsage
# Start interactive mode
deepseek
# Start with an initial prompt
deepseek "explain this codebase"
# Quick mode (non-interactive, single response)
deepseek -q "list all TypeScript files"Commands
| Command | Description |
|---------|-------------|
| /help | Show help information |
| /exit | Exit the shell |
| /model | Switch AI model/provider |
| /context | Refresh workspace context |
| /sessions | Manage conversation sessions |
| /revert | Revert file changes made this session |
| /tools | Show available tools |
| /shortcuts | Show keyboard shortcuts |
Keyboard Shortcuts
| Shortcut | Action |
|----------|--------|
| Ctrl+C | Cancel current operation / Exit |
| Ctrl+U | Clear input line |
| Option+A | Toggle auto-approve mode |
| Option+G | Toggle agentic mode |
| Option+T | Toggle thinking depth |
Tools Available to AI
| Tool | Description |
|------|-------------|
| read_file | Read file contents with line numbers |
| write_file | Create or overwrite files |
| edit_file | Make precise edits to existing files |
| bash | Execute shell commands |
| search | Search for files by pattern |
| grep | Search file contents with regex |
| web_search | Search the web for information |
Supported Providers
| Provider | Environment Variable | Models |
|----------|---------------------|--------|
| DeepSeek | DEEPSEEK_API_KEY | DeepSeek V3, DeepSeek Coder |
| OpenAI | OPENAI_API_KEY | GPT-4, GPT-4o |
| Anthropic | ANTHROPIC_API_KEY | Claude 3.5 Sonnet, Claude 3 Opus |
| Google | GOOGLE_API_KEY | Gemini 2.0 |
| xAI | XAI_API_KEY | Grok |
CLI Options
deepseek [options] [prompt]
Options:
-v, --version Show version
-h, --help Show help
-q, --quick Quick mode (non-interactive)
--provider <id> Select provider
--model <name> Select model
--key <api-key> Set API key
--debug Enable debug loggingDevelopment
# Clone and install
git clone https://github.com/anthropics/deepseek-cli.git
cd deepseek-cli
npm install
# Build
npm run build
# Run locally
npm startLicense
MIT
