DeepSeek Engineer v2 is a powerful AI-powered coding assistant that provides an interactive terminal interface for seamless code development. It integrates with DeepSeek's advanced reasoning models to offer intelligent file operations, code analysis, and development assistance through natural conversation and function calling.
Version 2.0 introduces a big upgrade from structured JSON output to native function calling, providing:
- Natural conversations with the AI without rigid response formats
- Automatic file operations through intelligent function calls
- Real-time reasoning visibility with Chain of Thought (CoT) capabilities
- Enhanced reliability and better error handling
- Elite Software Engineering: Decades of experience across all programming domains
- Chain of Thought Reasoning: Visible thought process before providing solutions
- Code Analysis & Discussion: Expert-level insights and optimization suggestions
- Intelligent Problem Solving: Automatic file reading and context understanding
The AI can automatically execute these operations when needed:
- Read single file content with automatic path normalization
- Built-in error handling for missing or inaccessible files
- Automatic: AI can read any file you mention or reference in conversation
- Batch read multiple files efficiently
- Formatted output with clear file separators
- Create new files or overwrite existing ones
- Automatic directory creation and safety checks
- Create multiple files in a single operation
- Perfect for scaffolding projects or creating related files
- Precise snippet-based file editing
- Safe replacement with exact matching
The AI can automatically read files you mention:
You> Can you review the main.py file and suggest improvements?
β AI automatically calls read_file("main.py")
You> Look at src/utils.py and tests/test_utils.py
β AI automatically calls read_multiple_files(["src/utils.py", "tests/test_utils.py"])
For when you want to preload files into conversation context:
/add path/to/file- Include single file in conversation context/add path/to/folder- Include entire directory (with smart filtering)
Note: The /add command is mainly useful when you want to provide extra context upfront. The AI can read files automatically via function calls whenever needed during the conversation.
- Color-coded feedback (green for success, red for errors, yellow for warnings)
- Real-time streaming with visible reasoning process
- Structured tables for diff previews
- Progress indicators for long operations
- Path normalization and validation
- Directory traversal protection
- File size limits (5MB per file)
- Binary file detection and exclusion
- DeepSeek API Key: Get your API key from DeepSeek Platform
- Python 3.11+: Required for optimal performance
-
Clone the repository:
git clone <repository-url> cd deepseek-engineer
-
Set up environment:
# Create .env file echo "DEEPSEEK_API_KEY=your_api_key_here" > .env
-
Install dependencies (choose one method):
uv venv uv run deepseek-eng.py
pip install -r requirements.txt python3 deepseek-eng.py
You> Can you read the main.py file and create a test file for it?
π Reasoning: I need to first read the main.py file to understand its structure...
π€ Assistant> I'll read the main.py file first to understand its structure.
β‘ Executing 1 function call(s)...
β read_file
β Read file 'main.py'
π Processing results...
Now I'll create comprehensive tests based on the code structure I found.
β‘ Executing 1 function call(s)...
β create_file
β Created/updated file at 'test_main.py'
I've analyzed main.py and created comprehensive tests covering all the main functions...
You> Compare the implementation in utils.py with the tests in test_utils.py
π Reasoning: I need to read both files to compare them...
π€ Assistant> I'll read both files to analyze the implementation and tests.
β‘ Executing 1 function call(s)...
β read_multiple_files
β Read files: utils.py, test_utils.py
π Processing results...
After analyzing both files, I can see several areas where the tests could be improved...
You> /add src/
β Added folder 'src/' to conversation.
π Added files: (15 files)
π src/utils.py
π src/models.py
...
You> Now review this codebase structure
π€ Assistant> I've reviewed your codebase and found several areas for improvement:
1. **Error Handling**: The utils.py file could benefit from more robust error handling...
- Powered by DeepSeek-R1 with Chain-of-Thought reasoning
- Real-time reasoning visibility during processing
- Enhanced problem-solving capabilities
- User Input β Natural language request
- AI Reasoning β Visible thought process (CoT)
- Function Calls β Automatic tool execution
- Real-time Feedback β Operation status and results
- Follow-up Response β AI processes results and responds
- Triple-stream processing: reasoning + content + tool_calls
- Real-time tool execution during streaming
- Automatic follow-up responses after tool completion
- Error recovery and graceful degradation
- Automatic file detection from user messages
- Smart conversation cleanup to prevent token overflow
- File content preservation across conversation history
- Tool message integration for complete operation tracking
You> Create a complete Flask API with models, routes, and tests
π€ Assistant> I'll create a complete Flask API structure for you.
β‘ Executing 1 function call(s)...
β create_multiple_files
β Created 4 files: app.py, models.py, routes.py, test_api.py
You> /add .
You> Analyze this entire project and suggest a refactoring plan
π€ Assistant> β‘ Executing 1 function call(s)...
β read_multiple_files
Based on my analysis of your project, here's a comprehensive refactoring plan...
| Method | When to Use | How It Works |
|---|---|---|
| Automatic Reading | Most cases - just mention files | AI automatically calls read_file() when you reference files |
/add Command |
Preload context, bulk operations | Manually adds files to conversation context upfront |
Recommendation: Use natural conversation - the AI will automatically read files as needed. Use /add only when you want to provide extra context upfront.
API Key Not Found
# Make sure .env file exists with your API key
echo "DEEPSEEK_API_KEY=your_key_here" > .envImport Errors
# Install dependencies
uv sync # or pip install -r requirements.txtFile Permission Errors
- Ensure you have write permissions in the working directory
- Check file paths are correct and accessible
This is an experimental project showcasing DeepSeek reasoning model capabilities. Contributions are welcome!
git clone <repository-url>
cd deepseek-engineer
uv venv
uv sync# Run the application (preferred)
uv run deepseek-eng.pyor
python3 deepseek-eng.pyThis project is licensed under the MIT License - see the LICENSE file for details.
This project is experimental and developed for testing DeepSeek reasoning model capabilities.
Note: This is an experimental project developed to explore the capabilities of DeepSeek's reasoning model with function calling. The AI can automatically read files you mention in conversation, while the
/addcommand is available for when you want to preload context. Use responsibly and enjoy the enhanced AI pair programming experience! π