π CodeDev is an advanced open-source AI-powered coding assistant with terminal integration, personally crafted with β€οΈ by Ashok Kumar.
- Conversational AI Interface: Natural language interaction with your codebase
- Workspace Context: Automatically understands your project structure
- File Operations: Read, write, and edit files with AI assistance
- Code Analysis: Comprehensive codebase analysis and optimization suggestions
- Shell Integration: Execute commands and see results in context
- Real-time Streaming: Live AI responses as they're generated
- MCP Server Mode: JSON-over-stdio protocol for integration with other tools
- Ollama installed and running
- DeepSeek R1 8B model downloaded
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Start Ollama and get DeepSeek model
ollama serve
ollama pull deepseek-r1:8bpip install httpx# Easy way
./start.sh
# Or directly
python3 codedev.py
# Test everything works
python3 test.pyπ codedev> help # Show all commands
π codedev> analyze # Analyze your codebase
π codedev> files # List files
π codedev> read main.py # Read file
π codedev> ask "How can I optimize this?" # Ask AI questions
π codedev> run python test.py # Execute commands
π codedev> create hello.py # Create new file- Code Analysis: Understand your entire codebase
- AI Chat: Ask questions about your code naturally
- File Operations: Read, create, edit files with AI help
- Bug Detection: Find and fix issues automatically
- Code Review: Get optimization suggestions
- Shell Integration: Run commands with AI context
| Command | Description |
|---|---|
help |
Show all commands |
analyze |
Analyze entire codebase |
files [dir] |
List files in directory |
read <file> |
Read and display file |
create <file> |
Create new file interactively |
run <command> |
Execute shell command |
ask "<question>" |
Ask AI anything |
exit |
Exit CodeDev |
π codedev> ask "Find security vulnerabilities in my code"
π codedev> ask "Write unit tests for the User class"
π codedev> ask "Explain how this algorithm works"
π codedev> ask "Optimize this database query"
π codedev> ask "Add error handling to this function"For integration with other tools:
python3 server.py
# Send JSON commands:
{"id":"1","tool":"fs.list","input":{"dir":"."}}
{"id":"2","tool":"ollama.chat","input":{"prompt":"Hello","model":"deepseek-r1:8b"}}If you find CodeDev helpful and want to support my open-source journey, consider buying me a coffee! Your support helps me continue developing amazing tools for the developer community.
π Every contribution, no matter how small, means the world to me and keeps this project alive!
- π¦ GitHub Repository: https://github.com/ashokumar06/codedev
- π PyPI Package: https://pypi.org/project/codedev/
- π Documentation: GitHub Wiki
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π€ Author: Ashok Kumar
CodeDev is completely open source and free to use! This project is my passion and I've put countless hours into making it the best AI coding assistant for developers like you.
- β Star us on GitHub: github.com/ashokumar06/codedev - It really motivates me!
- π΄ Fork the project: Create your own improvements and innovations
- π Report bugs: Help me improve the software quality
- π‘ Suggest features: Share your brilliant ideas with me
- π€ Contribute code: Submit pull requests and be part of the journey
- π Support financially: Buy me a coffee or support via Razorpay
Personal Note: As an indie developer, your support and feedback mean everything to me. Every star, contribution, and coffee helps me dedicate more time to making CodeDev better! π
# Install the latest stable version
pip install codedev
# Use the commands
codedev --version
cdev --version
# Start using
codedev# Install directly from GitHub
pip install git+https://github.com/ashokumar06/codedev.git
# Or clone and install
git clone https://github.com/ashokumar06/codedev.git
cd codedev
pip install .# Clone the repository
git clone https://github.com/ashokumar06/codedev.git
cd codedev
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
# Test installation
codedev --version
cdev --version# Clone and build wheel
git clone https://github.com/ashokumar06/codedev.git
cd codedev
# Install build tools
pip install build
# Build the package
python -m build
# Install the wheel
pip install dist/codedev-*.whl- Automatic Ollama Detection: Checks for Ollama installation on startup
- One-Click Linux Installation: Auto-installs Ollama using
curl -fsSL https://ollama.com/install.sh | sh - Cross-Platform Support: Detects Linux, macOS, and Windows with appropriate instructions
- Model Auto-Selection: Automatically selects the best available coding model
- Health Checks: Verifies AI service connectivity before starting
- Natural Language Interface: Talk naturally - "create a web server", "fix this error"
- Context-Aware Responses: Understands your project structure and coding patterns
- Multiple AI Models: Support for DeepSeek, Codellama, Qwen2.5-Coder, Llama3.2, and more
- Smart Model Management: Auto-detects and recommends optimal models for coding tasks
- Improved Timeout Handling: Better stability with slow AI responses
- File Operations: Create, edit, refactor, move, copy, delete with full history
- Project Management: Generate complete projects with templates and AI assistance
- Version Control: Built-in undo/redo with automatic file versioning
- Smart File Detection: Auto-detects languages and applies appropriate coding standards
- File References: Use
@filenameto reference specific files - Todo/Comments: Add notes with
# todo add authentication - Conversational Commands: Casual interactions like "hi", "thanks", "what files do I have?"
- Context Understanding: Remembers previous conversations and file states
- Safe Command Execution: Whitelisted commands with sandboxing
- Path Protection: Prevents access to system directories
- File Size Limits: Configurable limits for file operations
- Backup Creation: Automatic backups before destructive operations
- Beautiful UI: Rich terminal interface with colors, tables, and panels
- Smart Completion: Auto-complete for commands and file names
- History Management: Persistent command history across sessions
- Interactive Prompts: Intuitive prompts with context information
-
Install CodeDev:
pip install codedev
-
Start using:
codedev # Start in current directory cdev # Short command
-
AI will auto-setup Ollama (Linux) or guide you through manual installation
codedev> create a web server
codedev> fix @app.py
codedev> show my files
codedev> # todo add authentication
codedev> refactor this code to use classescodedev> create server.py python "FastAPI web server with JWT auth"
codedev> edit @app.py python "add error handling"
codedev> models # Show available AI models
codedev> model deepseek-coder:6.7b # Switch to different model
codedev> help # Show all commandscodedev> create-project python myapi "REST API with FastAPI"
codedev> analyze-project
codedev> refactor-project "add type hints everywhere"The AI Coder automatically detects and manages AI models:
The system prioritizes models in this order:
- DeepSeek R1:
deepseek-r1:8b,deepseek-r1:1.5b - DeepSeek Coder:
deepseek-coder:6.7b,deepseek-coder:1.3b - Llama 3.2:
llama3.2:8b,llama3.2:3b,llama3.2:1b - Qwen2.5 Coder:
qwen2.5-coder:7b,qwen2.5-coder:3b - CodeLlama:
codellama:7b,codellama:13b - Phi3:
phi3:3.8b,phi3:mini
ai-coder> models # Show detailed model information
ai-coder> model llama3.2:8b # Switch to specific model
ai-coder> ollama pull deepseek-r1:8b # Install new model- Linux/macOS:
~/.config/ai-coder/config.yaml - Windows:
%APPDATA%/ai-coder/config.yaml
ai:
api_url: "http://127.0.0.1:11434"
model: "deepseek-r1:8b"
timeout: 120
max_retries: 5
temperature: 0.7
workspace:
directory: "."
history_dir: ".ai-coder-history"
auto_save: true
backup_on_edit: true
safety:
allowed_commands: ["python", "node", "git", ...]
blocked_paths: ["/etc", "/usr", "~/.ssh", ...]
max_file_size: 10485760 # 10MB| Platform | Installation | Status |
|---|---|---|
| Linux | β Automatic | Fully Supported |
| macOS | π Manual | Supported |
| Windows | π Manual | Supported |
- Auto-installs Ollama using official installer
- Auto-starts service via systemctl or direct command
- Full feature support
- Manual installation required
- Download from https://ollama.com/download
- All features supported after manual setup
Ollama Not Found
# Linux: AI Coder will offer to install automatically
# macOS/Windows: Download from https://ollama.com/downloadConnection Timeout
# Check if Ollama is running
ollama serve
# Check service status (Linux)
systemctl status ollamaNo Models Available
# AI Coder will automatically suggest and install recommended models
# Or manually: ollama pull deepseek-r1:8b- Every edit creates a timestamped backup
- Full undo/redo history per file
- Restore to any previous version
- Understands project structure
- Maintains conversation history
- Learns from your coding patterns
- Works identically on Linux, macOS, Windows
- Rich terminal UI with colors and formatting
- Intelligent error handling and recovery
We welcome contributions from the community! CodeDev is open source and thrives on community involvement.
- β Star the Repository: Show your support on GitHub
- π Report Bugs: Submit issues on GitHub Issues
- π‘ Feature Requests: Suggest new features via GitHub Discussions
- π Documentation: Improve docs and examples
- π§ Code Contributions: Submit pull requests
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/codedev.git
cd codedev
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -e .
# Run tests
python test_installation.py
# Make your changes and submit a pull request!codedev/
βββ ai_coder/ # Main package
β βββ ai/ # AI client and prompt management
β βββ core/ # Configuration and core utilities
β βββ operations/ # File and project operations
β βββ safety/ # Security and sandboxing
β βββ utils/ # Utilities and platform detection
β βββ cli.py # Main CLI interface
βββ config/ # Default configuration
βββ tests/ # Test suite
βββ .github/ # GitHub workflows
βββ setup.py # Package configuration
CodeDev is released under the MIT License - see LICENSE file for details.
This means you can:
- β Use it commercially
- β Modify and distribute
- β Private use
- β Include in your projects
If you find CodeDev useful, please consider:
- β Starring the repository on GitHub
- π Reporting bugs and suggesting features
- π€ Contributing code or documentation
- π¬ Sharing it with other developers
# Install and start using immediately
pip install codedev
codedev
# Or build from source
git clone https://github.com/ashokumar06/codedev.git
cd codedev && pip install -e .
codedev --versionReady to revolutionize your coding workflow with AI? π
Made with β€οΈ and countless cups of coffee by Ashok Kumar
GitHub β’ PyPI β’ Issues β’ Discussions
Connect with me for collaboration, feedback, and let's build something amazing together! π€