DeepSeek TUI - Unofficial terminal UI + CLI for DeepSeek models. Features: - Interactive TUI with multiple modes (Normal, Plan, Agent, YOLO, RLM, Duo) - Comprehensive tool access with approval gating - File operations, shell execution, task management - Sub-agent system for parallel work - MCP integration for external tool servers - Session management and skills system - Cross-platform support (macOS, Linux, Windows) 🤖 Generated with [Claude Code](https://claude.ai/code)
3.4 KiB
Contributing to DeepSeek CLI
Thank you for your interest in contributing to DeepSeek CLI! This document provides guidelines and instructions for contributing.
Getting Started
Prerequisites
- Rust 1.85 or later (edition 2024)
- Cargo package manager
- Git
Setting Up Development Environment
-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/DeepSeek-CLI.git cd DeepSeek-CLI -
Build the project:
cargo build -
Run tests:
cargo test -
Run with development settings:
cargo run
Development Workflow
Code Style
- Run
cargo fmtbefore committing to ensure consistent formatting - Run
cargo clippyand address all warnings - Follow Rust naming conventions (snake_case for functions/variables, CamelCase for types)
- Add documentation comments for public APIs
Testing
- Write tests for new functionality
- Ensure all existing tests pass:
cargo test - For integration tests, use the
tests/directory
Commit Messages
Use clear, descriptive commit messages following conventional commits:
feat:New featurefix:Bug fixdocs:Documentation changesrefactor:Code refactoringtest:Adding or updating testschore:Maintenance tasks
Example: feat: add --doctor command for system diagnostics
Project Structure
src/
├── main.rs # Entry point and CLI definition
├── config.rs # Configuration management
├── client.rs # HTTP client for DeepSeek API
├── llm_client.rs # LLM abstraction layer
├── models.rs # Data structures
├── mcp.rs # Model Context Protocol support
├── hooks.rs # Hook system for extensibility
├── skills.rs # Skills/plugin system
├── core/ # Core engine components
│ ├── engine.rs # Main agent loop
│ ├── session.rs # Session management
│ └── ...
├── tools/ # Built-in tools
│ ├── shell.rs # Shell execution
│ ├── file.rs # File operations
│ └── ...
├── tui/ # Terminal UI
│ ├── app.rs # Application state
│ ├── ui.rs # Rendering logic
│ └── ...
└── sandbox/ # Sandbox execution (macOS)
Submitting Changes
-
Create a feature branch from
main:git checkout -b feat/your-feature -
Make your changes and commit them
-
Ensure CI passes:
cargo fmt --check cargo clippy cargo test -
Push your branch and create a Pull Request
-
Describe your changes clearly in the PR description
Pull Request Guidelines
- Keep PRs focused on a single change
- Update documentation if needed
- Add tests for new functionality
- Ensure CI passes before requesting review
Reporting Issues
When reporting issues, please include:
- Operating system and version
- Rust version (
rustc --version) - DeepSeek CLI version (
deepseek --version) - Steps to reproduce the issue
- Expected vs actual behavior
- Relevant error messages or logs
Code of Conduct
Be respectful and inclusive. We welcome contributors of all backgrounds and experience levels.
License
By contributing to DeepSeek CLI, you agree that your contributions will be licensed under the MIT License.
Questions?
Feel free to open an issue for any questions about contributing.