Decker is a versatile command-line coding agent that integrates with various Large Language Models (LLMs) to assist with coding tasks. Through an intuitive command-line interface, it can read local file contents, create new files, and apply diff edits to existing files in real time.
-
Multi-LLM Support
- Currently supports multiple LLM providers: • DeepSeek Chat • GPT-4o-Mini • Gemini 2.0 Flash
- Easily configurable through command-line arguments
- Extensible architecture for adding new LLM providers
-
Data Models
- Leverages Pydantic for type-safe handling of file operations, including: • FileToCreate – describes files to be created or updated • FileToEdit – describes specific snippet replacements in an existing file • AssistantResponse – structures chat responses and potential file operations
-
Interactive File Operations
- "/add" command to include file contents in the conversation
- Real-time file creation and modification
- Visual diff previews before applying changes
- Smart context management for referenced files
-
Rich Terminal Interface
- Streaming responses with syntax highlighting
- Interactive diff tables
- Clear success/error indicators
- Progress feedback for all operations
-
Set up your environment variables:
- Copy
.env.example
to.env
:cp .env.example .env
- Edit
.env
and add your API keys:# For DeepSeek DEEPSEEK_API_KEY=your_deepseek_key_here # For GPT-4-Mini OPENAI_API_KEY=your_openai_key_here # For Gemini GEMINI_API_KEY=your_gemini_key_here
Note: You only need to set the API key for the model you plan to use.
- Copy
-
Install dependencies (choose one method):
pip install -r requirements.txt
uv venv
-
Run Decker with your preferred model:
python main.py --model deepseek-chat
python main.py --model gpt-4o-mini
python main.py --model gemini-2.0-flash-exp
- Start a conversation with your chosen model
- Use "/add path/to/file" to include files in the conversation
- Ask questions or request changes to your code
- Review and approve any suggested file modifications
- Type "exit" or "quit" to end the session
/add path/to/file
- Add a file's contents to the conversationexit
orquit
- End the session
$ python main.py --model deepseek-chat
Welcome to Decker! 🐋
You> /add main.py
✓ Added file 'main.py' to conversation.
You> Help me optimize this file
Assistant> [Assistant analyzes and suggests optimizations...]