AI Personal Learning
and practical guidance

DeepSeek Engineer: an experimental coding assistant based on the DeepSeek API, with hint words

General Introduction

DeepSeek Engineer is a powerful programming assistant tool developed based on the DeepSeek API, which is able to interact with the user through an intuitive command line interface to assist in a variety of software development tasks. The tool combines the power of large-scale language modeling with practical file system operations and intelligent code handling features, not only for regular code dialog, but also supports local file reading, creation and real-time modification. Through a structured JSON response mechanism, DeepSeek Engineer is able to accurately understand user intent and provide diverse development support such as code generation and file editing. It features support for multi-line streaming response output, and can realize rapid import and precise editing of file contents through simple commands, making it a powerful assistant for developers to improve programming efficiency.

DeepSeek Engineer: experimental/easy coding assistant based on DeepSeek API-1


 

Function List

  • DeepSeek API Client Integration with GPT Style Streaming Conversation Completion Support
  • Pydantic-based type-safe file operating system
  • Intelligent system prompts to ensure that all responses strictly follow the JSON output format
  • Local file reading and content analysis functions
  • File creation and update operation support
  • Visualization of Code Differences
  • Segment-level file modification functionality
  • The "/add" command quickly imports the contents of a file.
  • Ongoing dialog history tracking
  • Interactive terminal session support
  • Real-time document modification confirmation mechanism

 

Extracting Core Programming Cue Words

You are an elite software engineer called DeepSeek Engineer with decades of experience across all programming domains.
Your expertise spans system design, algorithms, testing, and best practices.
You provide thoughtful, well-structured solutions while explaining your reasoning.

Core capabilities.
1. Code Analysis & Discussion
- Analyze code with expert-level insight
- Explain complex concepts clearly
- Suggest optimizations and best practices
- Debug issues with precision

2. File Operations.
a) Read existing files
- Access user-provided file contents for context
- Analyze multiple files to understand project structure

b) Create new files
- Generate complete new files with proper structure
- Create complementary files (tests, configs, etc.)

c) Edit existing files
- Make precise changes using diff-based editing
- Modify specific sections while preserving context
- Suggest refactoring improvements

Output Format.
You must provide responses in this JSON structure.
{

"files_to_create": [
{ "path": "path/to_create": [
"path": "path/to/new/file",
"content": "complete file content"
}
], "files_to_edit": [ { "path": "path/to/new/file" "content": "complete file content" }
"files_to_edit": [
{
"path": "path/to/existing/file", "original_snippet": "exact code to be replaced", [ {
"original_snippet": "exact code to be replaced",
"new_snippet": "new code to insert"
}
]
}

Guidelines.
1. For normal responses, use 'assistant_reply'
2. When creating files, include full content in 'files_to_create'
3. For editing files.
- Use 'files_to_edit' for precise changes
- For editing files: Use 'files_to_edit' for precise changes Include enough context in original_snippet to locate the change
- Ensure new_snippet maintains proper indentation
- Prefer targeted edits over full file replacements
4. Always explain your changes and reasoning
5. Consider edge cases and potential impacts
6. Follow language-specific best practices
7. Suggest tests or validation steps when appropriate

Remember: You're a senior engineer - be thorough, precise, and thoughtful in your solutions.

 

Using Help

1. Environmental preparation

First, you need to prepare the following:

  1. Get DeepSeek API key
  2. establish.envfile and configure the API key:
DEEPSEEK_API_KEY=your_api_key_here

2. Installation steps

DeepSeek Engineer offers two installation options:

Installation using pip (traditional way)

pip install -r requirements.txt
python3 main.py

Use uv installation (faster alternative)

uv venv
uv run main.py

3. Guidance on the use of core functions

3.1 Basic Dialogue

  • After starting the program, you can enter programming-related questions or requests directly into the terminal
  • The system will process it through the DeepSeek API and return a structured response
  • Supports multi-line streaming output for smoother interaction

3.2 Document operations

  1. Import the contents of the file:
    • utilization/add path/to/filecommand adds the contents of the file to the dialog
    • Example:/add src/main.pyWill import the contents of main.py into the dialog context
  2. File creation and editing:
    • When the assistant suggests creating a new file or editing an existing file, a detailed change suggestion is displayed
    • The system displays a rich-text diff table that clearly shows the proposed changes
    • You can choose to confirm or reject these changes

3.3 Dialogue management

  • The system automatically maintains conversation_history to ensure contextual coherence
  • End the session with the "exit" or "quit" command.

4. Best practice recommendations

  1. File Operations:
    • Make sure the file path is correct before importing the file
    • It is recommended to make backups before modifying important files
  2. Dialogue Optimization:
    • Keep questions clear and specific
    • Use the /add command to supplement contextual information when appropriate
    • Carefully review changes before confirming document changes
  3. Efficiency gains:
    • Take advantage of the system's JSON structured output feature
    • Make good use of the File Difference Display function
    • Keep conversations simple by cleaning up your dialog history when appropriate

5. Troubleshooting

  1. API connectivity issues:
    • Check that the API key is configured correctly
    • Confirm network connection status
  2. File operation error:
    • Verify file permission settings
    • Ensure that the destination path is writable
  3. Response parsing issues:
    • Check that the input format is correct
    • Try restarting the session
May not be reproduced without permission:Chief AI Sharing Circle " DeepSeek Engineer: an experimental coding assistant based on the DeepSeek API, with hint words

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish