# AI Coder - Advanced AI Coding Assistant
<div align="center">
[](https://pypi.org/project/codedev/)
[](https://pypi.org/project/codedev/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/ashokumar06/codedev)
[](https://github.com/ashokumar06/codedev/issues)
[](https://github.com/ashokumar06/codedev/stargazers)
[](https://github.com/ashokumar06/codedev/network)
**✨ Currently available on TestPyPI - Production PyPI release coming soon! ✨**
</div>
---
🚀 **CodeDev** is an advanced open-source AI-powered coding assistant with terminal integration, personally crafted with ❤️ by [Ashok Kumar](https://ashokumar.in).
## ✨ Features
- **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
## 🛠️ Prerequisites
1. **Ollama** installed and running
2. **DeepSeek R1 8B** model downloaded
### Quick Setup
```bash
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh
# Start Ollama and get DeepSeek model
ollama serve
ollama pull deepseek-r1:8b
```
### 2. Install Dependencies
```bash
pip install httpx
```
### 3. Run CodeDev
```bash
# Easy way
./start.sh
# Or directly
python3 codedev.py
# Test everything works
python3 test.py
```
## 💡 Usage Examples
```bash
🚀 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
```
## 🎯 What It Can Do
- **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
## 🔧 Available Commands
| 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 |
## 🤖 AI Examples
```bash
🚀 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"
```
## 🔌 MCP Server Mode
For integration with other tools:
```bash
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"}}
```
## 💖 Support My Work
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.
[](https://buymeacoffee.com/ashokumar)
[](https://razorpay.me/@ashokumar06)
> 🌟 **Every contribution, no matter how small, means the world to me and keeps this project alive!**
## 🔗 Links & Resources
- 📦 **GitHub Repository**: [https://github.com/ashokumar06/codedev](https://github.com/ashokumar06/codedev)
- 🐍 **PyPI Package**: [https://pypi.org/project/codedev/](https://pypi.org/project/codedev/)
- 📚 **Documentation**: [GitHub Wiki](https://github.com/ashokumar06/codedev/wiki)
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/ashokumar06/codedev/issues)
- 💬 **Discussions**: [GitHub Discussions](https://github.com/ashokumar06/codedev/discussions)
- 👤 **Author**: [Ashok Kumar](https://ashokumar.in)
## 🎯 Open Source & Community
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.
### 🤝 How You Can Help
- ⭐ **Star us on GitHub**: [github.com/ashokumar06/codedev](https://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](https://buymeacoffee.com/ashokumar) or [support via Razorpay](https://razorpay.me/@ashokumar06)
> **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! 🚀
---
## 🚀 Installation Options
### Option 1: Install from PyPI (Recommended)
```bash
# Install the latest stable version
pip install codedev
# Use the commands
codedev --version
cdev --version
# Start using
codedev
```
### Option 2: Install from GitHub (Latest)
```bash
# 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 .
```
### Option 3: Build from Source (Development)
```bash
# 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
```
### Option 4: Direct Build and Install
```bash
# 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
```
## ✨ Key Features
### 🚀 Smart Initialization
- **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
### 🧠 AI-Powered Development
- **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
### 📁 Advanced File Management
- **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
### 💬 Enhanced Natural Language Processing
- **File References**: Use `@filename` to 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
### 🛡️ Safety & Security
- **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
### 🎨 Rich Terminal Experience
- **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
## 🔧 Setup & Usage
### Quick Start
1. **Install CodeDev**:
```bash
pip install codedev
```
2. **Start using**:
```bash
codedev # Start in current directory
cdev # Short command
```
3. **AI will auto-setup Ollama** (Linux) or guide you through manual installation
### Usage Examples
#### Natural Language Commands
```bash
codedev> create a web server
codedev> fix @app.py
codedev> show my files
codedev> # todo add authentication
codedev> refactor this code to use classes
```
#### Structured Commands
```bash
codedev> 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 commands
```
#### Project Operations
```bash
codedev> create-project python myapi "REST API with FastAPI"
codedev> analyze-project
codedev> refactor-project "add type hints everywhere"
```
## 🤖 Model Management
The AI Coder automatically detects and manages AI models:
### Automatic Model Selection
The system prioritizes models in this order:
1. **DeepSeek R1**: `deepseek-r1:8b`, `deepseek-r1:1.5b`
2. **DeepSeek Coder**: `deepseek-coder:6.7b`, `deepseek-coder:1.3b`
3. **Llama 3.2**: `llama3.2:8b`, `llama3.2:3b`, `llama3.2:1b`
4. **Qwen2.5 Coder**: `qwen2.5-coder:7b`, `qwen2.5-coder:3b`
5. **CodeLlama**: `codellama:7b`, `codellama:13b`
6. **Phi3**: `phi3:3.8b`, `phi3:mini`
### Model Commands
```bash
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
```
## ⚙️ Configuration
### Config File Location
- **Linux/macOS**: `~/.config/ai-coder/config.yaml`
- **Windows**: `%APPDATA%/ai-coder/config.yaml`
### Key Settings
```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 Support
| Platform | Installation | Status |
|----------|-------------|---------|
| **Linux** | ✅ Automatic | Fully Supported |
| **macOS** | 📋 Manual | Supported |
| **Windows** | 📋 Manual | Supported |
### Linux
- Auto-installs Ollama using official installer
- Auto-starts service via systemctl or direct command
- Full feature support
### macOS & Windows
- Manual installation required
- Download from https://ollama.com/download
- All features supported after manual setup
## 🔍 Troubleshooting
### Common Issues
**Ollama Not Found**
```bash
# Linux: AI Coder will offer to install automatically
# macOS/Windows: Download from https://ollama.com/download
```
**Connection Timeout**
```bash
# Check if Ollama is running
ollama serve
# Check service status (Linux)
systemctl status ollama
```
**No Models Available**
```bash
# AI Coder will automatically suggest and install recommended models
# Or manually: ollama pull deepseek-r1:8b
```
## 📚 Advanced Features
### File Versioning
- Every edit creates a timestamped backup
- Full undo/redo history per file
- Restore to any previous version
### Smart Context
- Understands project structure
- Maintains conversation history
- Learns from your coding patterns
### Cross-Platform CLI
- Works identically on Linux, macOS, Windows
- Rich terminal UI with colors and formatting
- Intelligent error handling and recovery
## 🤝 Contributing
We welcome contributions from the community! CodeDev is open source and thrives on community involvement.
### Ways to Contribute
1. **⭐ Star the Repository**: Show your support on [GitHub](https://github.com/ashokumar06/codedev)
2. **🐛 Report Bugs**: Submit issues on [GitHub Issues](https://github.com/ashokumar06/codedev/issues)
3. **💡 Feature Requests**: Suggest new features via [GitHub Discussions](https://github.com/ashokumar06/codedev/discussions)
4. **📖 Documentation**: Improve docs and examples
5. **🔧 Code Contributions**: Submit pull requests
### Development Setup
```bash
# 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!
```
### Project Structure
```
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
```
## 📄 License
CodeDev is released under the **MIT License** - see [LICENSE](https://github.com/ashokumar06/codedev/blob/main/LICENSE) file for details.
This means you can:
- ✅ Use it commercially
- ✅ Modify and distribute
- ✅ Private use
- ✅ Include in your projects
## � Support the Project
If you find CodeDev useful, please consider:
- ⭐ **Starring** the repository on [GitHub](https://github.com/ashokumar06/codedev)
- 🐛 **Reporting bugs** and suggesting features
- 🤝 **Contributing** code or documentation
- 💬 **Sharing** it with other developers
---
## 🎯 Get Started Now!
```bash
# 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 --version
```
**Ready to revolutionize your coding workflow with AI?** 🚀
---
<div align="center">
**Made with ❤️ and countless cups of coffee by [Ashok Kumar](https://ashokumar.in)**
[](https://buymeacoffee.com/ashokumar) [](https://razorpay.me/@ashokumar06)
[GitHub](https://github.com/ashokumar06/codedev) • [PyPI](https://pypi.org/project/codedev/) • [Issues](https://github.com/ashokumar06/codedev/issues) • [Discussions](https://github.com/ashokumar06/codedev/discussions)
**Connect with me for collaboration, feedback, and let's build something amazing together!** 🤝
</div>
Raw data
{
"_id": null,
"home_page": "https://ashokumar.in",
"name": "codedev",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ai, coding, assistant, terminal, automation, ollama, code-generation",
"author": "Ashok Kumar",
"author_email": "Ashok Kumar <contact@ashokumar.in>",
"download_url": "https://files.pythonhosted.org/packages/fc/be/4171f0ef79152bff8c358cbc6bcc0feffb232c97baa2097259f363b5425d/codedev-3.0.0.tar.gz",
"platform": null,
"description": "# AI Coder - Advanced AI Coding Assistant\n\n<div align=\"center\">\n\n[](https://pypi.org/project/codedev/)\n[](https://pypi.org/project/codedev/)\n[](https://opensource.org/licenses/MIT)\n\n[](https://github.com/ashokumar06/codedev)\n[](https://github.com/ashokumar06/codedev/issues)\n[](https://github.com/ashokumar06/codedev/stargazers)\n[](https://github.com/ashokumar06/codedev/network)\n\n**\u2728 Currently available on TestPyPI - Production PyPI release coming soon! \u2728**\n\n</div>\n\n---\n\n\ud83d\ude80 **CodeDev** is an advanced open-source AI-powered coding assistant with terminal integration, personally crafted with \u2764\ufe0f by [Ashok Kumar](https://ashokumar.in).\n\n\n\n## \u2728 Features\n\n- **Conversational AI Interface**: Natural language interaction with your codebase\n- **Workspace Context**: Automatically understands your project structure \n- **File Operations**: Read, write, and edit files with AI assistance\n- **Code Analysis**: Comprehensive codebase analysis and optimization suggestions\n- **Shell Integration**: Execute commands and see results in context\n- **Real-time Streaming**: Live AI responses as they're generated\n- **MCP Server Mode**: JSON-over-stdio protocol for integration with other tools\n\n## \ud83d\udee0\ufe0f Prerequisites\n\n1. **Ollama** installed and running\n2. **DeepSeek R1 8B** model downloaded\n\n### Quick Setup\n\n```bash\n# Install Ollama\ncurl -fsSL https://ollama.ai/install.sh | sh\n\n# Start Ollama and get DeepSeek model \nollama serve\nollama pull deepseek-r1:8b\n```\n\n### 2. Install Dependencies\n```bash\npip install httpx\n```\n\n### 3. Run CodeDev\n```bash\n# Easy way\n./start.sh\n\n# Or directly\npython3 codedev.py\n\n# Test everything works\npython3 test.py\n```\n\n## \ud83d\udca1 Usage Examples\n\n```bash\n\ud83d\ude80 codedev> help # Show all commands\n\ud83d\ude80 codedev> analyze # Analyze your codebase\n\ud83d\ude80 codedev> files # List files\n\ud83d\ude80 codedev> read main.py # Read file\n\ud83d\ude80 codedev> ask \"How can I optimize this?\" # Ask AI questions\n\ud83d\ude80 codedev> run python test.py # Execute commands\n\ud83d\ude80 codedev> create hello.py # Create new file\n```\n\n## \ud83c\udfaf What It Can Do\n\n- **Code Analysis**: Understand your entire codebase\n- **AI Chat**: Ask questions about your code naturally \n- **File Operations**: Read, create, edit files with AI help\n- **Bug Detection**: Find and fix issues automatically\n- **Code Review**: Get optimization suggestions\n- **Shell Integration**: Run commands with AI context\n\n## \ud83d\udd27 Available Commands\n\n| Command | Description |\n|---------|-------------|\n| `help` | Show all commands |\n| `analyze` | Analyze entire codebase |\n| `files [dir]` | List files in directory |\n| `read <file>` | Read and display file |\n| `create <file>` | Create new file interactively |\n| `run <command>` | Execute shell command |\n| `ask \"<question>\"` | Ask AI anything |\n| `exit` | Exit CodeDev |\n\n## \ud83e\udd16 AI Examples\n\n```bash\n\ud83d\ude80 codedev> ask \"Find security vulnerabilities in my code\"\n\ud83d\ude80 codedev> ask \"Write unit tests for the User class\" \n\ud83d\ude80 codedev> ask \"Explain how this algorithm works\"\n\ud83d\ude80 codedev> ask \"Optimize this database query\"\n\ud83d\ude80 codedev> ask \"Add error handling to this function\"\n```\n\n## \ud83d\udd0c MCP Server Mode\n\nFor integration with other tools:\n```bash\npython3 server.py\n\n# Send JSON commands:\n{\"id\":\"1\",\"tool\":\"fs.list\",\"input\":{\"dir\":\".\"}}\n{\"id\":\"2\",\"tool\":\"ollama.chat\",\"input\":{\"prompt\":\"Hello\",\"model\":\"deepseek-r1:8b\"}}\n```\n\n\n## \ud83d\udc96 Support My Work\n\nIf 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.\n\n[](https://buymeacoffee.com/ashokumar)\n[](https://razorpay.me/@ashokumar06)\n\n> \ud83c\udf1f **Every contribution, no matter how small, means the world to me and keeps this project alive!**\n\n## \ud83d\udd17 Links & Resources\n\n- \ud83d\udce6 **GitHub Repository**: [https://github.com/ashokumar06/codedev](https://github.com/ashokumar06/codedev)\n- \ud83d\udc0d **PyPI Package**: [https://pypi.org/project/codedev/](https://pypi.org/project/codedev/)\n- \ud83d\udcda **Documentation**: [GitHub Wiki](https://github.com/ashokumar06/codedev/wiki)\n- \ud83d\udc1b **Bug Reports**: [GitHub Issues](https://github.com/ashokumar06/codedev/issues)\n- \ud83d\udcac **Discussions**: [GitHub Discussions](https://github.com/ashokumar06/codedev/discussions)\n- \ud83d\udc64 **Author**: [Ashok Kumar](https://ashokumar.in)\n\n## \ud83c\udfaf Open Source & Community\n\nCodeDev 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.\n\n### \ud83e\udd1d How You Can Help\n\n- \u2b50 **Star us on GitHub**: [github.com/ashokumar06/codedev](https://github.com/ashokumar06/codedev) - It really motivates me!\n- \ud83c\udf74 **Fork the project**: Create your own improvements and innovations\n- \ud83d\udc1b **Report bugs**: Help me improve the software quality\n- \ud83d\udca1 **Suggest features**: Share your brilliant ideas with me\n- \ud83e\udd1d **Contribute code**: Submit pull requests and be part of the journey\n- \ud83d\udc96 **Support financially**: [Buy me a coffee](https://buymeacoffee.com/ashokumar) or [support via Razorpay](https://razorpay.me/@ashokumar06)\n\n> **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! \ud83d\ude80\n\n---\n\n## \ud83d\ude80 Installation Options\n\n### Option 1: Install from PyPI (Recommended)\n\n```bash\n# Install the latest stable version\npip install codedev\n\n# Use the commands\ncodedev --version\ncdev --version\n\n# Start using\ncodedev\n```\n\n### Option 2: Install from GitHub (Latest)\n\n```bash\n# Install directly from GitHub\npip install git+https://github.com/ashokumar06/codedev.git\n\n# Or clone and install\ngit clone https://github.com/ashokumar06/codedev.git\ncd codedev\npip install .\n```\n\n### Option 3: Build from Source (Development)\n\n```bash\n# Clone the repository\ngit clone https://github.com/ashokumar06/codedev.git\ncd codedev\n\n# Create virtual environment (recommended)\npython -m venv venv\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Install in development mode\npip install -e .\n\n# Test installation\ncodedev --version\ncdev --version\n```\n\n### Option 4: Direct Build and Install\n\n```bash\n# Clone and build wheel\ngit clone https://github.com/ashokumar06/codedev.git\ncd codedev\n\n# Install build tools\npip install build\n\n# Build the package\npython -m build\n\n# Install the wheel\npip install dist/codedev-*.whl\n```\n\n## \u2728 Key Features\n\n### \ud83d\ude80 Smart Initialization\n- **Automatic Ollama Detection**: Checks for Ollama installation on startup\n- **One-Click Linux Installation**: Auto-installs Ollama using `curl -fsSL https://ollama.com/install.sh | sh`\n- **Cross-Platform Support**: Detects Linux, macOS, and Windows with appropriate instructions\n- **Model Auto-Selection**: Automatically selects the best available coding model\n- **Health Checks**: Verifies AI service connectivity before starting\n\n### \ud83e\udde0 AI-Powered Development\n- **Natural Language Interface**: Talk naturally - \"create a web server\", \"fix this error\"\n- **Context-Aware Responses**: Understands your project structure and coding patterns\n- **Multiple AI Models**: Support for DeepSeek, Codellama, Qwen2.5-Coder, Llama3.2, and more\n- **Smart Model Management**: Auto-detects and recommends optimal models for coding tasks\n- **Improved Timeout Handling**: Better stability with slow AI responses\n\n### \ud83d\udcc1 Advanced File Management\n- **File Operations**: Create, edit, refactor, move, copy, delete with full history\n- **Project Management**: Generate complete projects with templates and AI assistance\n- **Version Control**: Built-in undo/redo with automatic file versioning\n- **Smart File Detection**: Auto-detects languages and applies appropriate coding standards\n\n### \ud83d\udcac Enhanced Natural Language Processing\n- **File References**: Use `@filename` to reference specific files\n- **Todo/Comments**: Add notes with `# todo add authentication`\n- **Conversational Commands**: Casual interactions like \"hi\", \"thanks\", \"what files do I have?\"\n- **Context Understanding**: Remembers previous conversations and file states\n\n### \ud83d\udee1\ufe0f Safety & Security\n- **Safe Command Execution**: Whitelisted commands with sandboxing\n- **Path Protection**: Prevents access to system directories\n- **File Size Limits**: Configurable limits for file operations\n- **Backup Creation**: Automatic backups before destructive operations\n\n### \ud83c\udfa8 Rich Terminal Experience\n- **Beautiful UI**: Rich terminal interface with colors, tables, and panels\n- **Smart Completion**: Auto-complete for commands and file names\n- **History Management**: Persistent command history across sessions\n- **Interactive Prompts**: Intuitive prompts with context information\n\n## \ud83d\udd27 Setup & Usage\n\n### Quick Start\n\n1. **Install CodeDev**:\n ```bash\n pip install codedev\n ```\n\n2. **Start using**:\n ```bash\n codedev # Start in current directory\n cdev # Short command\n ```\n\n3. **AI will auto-setup Ollama** (Linux) or guide you through manual installation\n\n### Usage Examples\n\n#### Natural Language Commands\n```bash\ncodedev> create a web server\ncodedev> fix @app.py\ncodedev> show my files \ncodedev> # todo add authentication\ncodedev> refactor this code to use classes\n```\n\n#### Structured Commands\n```bash\ncodedev> create server.py python \"FastAPI web server with JWT auth\"\ncodedev> edit @app.py python \"add error handling\"\ncodedev> models # Show available AI models\ncodedev> model deepseek-coder:6.7b # Switch to different model\ncodedev> help # Show all commands\n```\n\n#### Project Operations\n```bash\ncodedev> create-project python myapi \"REST API with FastAPI\"\ncodedev> analyze-project\ncodedev> refactor-project \"add type hints everywhere\"\n```\n\n## \ud83e\udd16 Model Management\n\nThe AI Coder automatically detects and manages AI models:\n\n### Automatic Model Selection\nThe system prioritizes models in this order:\n1. **DeepSeek R1**: `deepseek-r1:8b`, `deepseek-r1:1.5b`\n2. **DeepSeek Coder**: `deepseek-coder:6.7b`, `deepseek-coder:1.3b`\n3. **Llama 3.2**: `llama3.2:8b`, `llama3.2:3b`, `llama3.2:1b`\n4. **Qwen2.5 Coder**: `qwen2.5-coder:7b`, `qwen2.5-coder:3b`\n5. **CodeLlama**: `codellama:7b`, `codellama:13b`\n6. **Phi3**: `phi3:3.8b`, `phi3:mini`\n\n### Model Commands\n```bash\nai-coder> models # Show detailed model information\nai-coder> model llama3.2:8b # Switch to specific model\nai-coder> ollama pull deepseek-r1:8b # Install new model\n```\n\n## \u2699\ufe0f Configuration\n\n### Config File Location\n- **Linux/macOS**: `~/.config/ai-coder/config.yaml`\n- **Windows**: `%APPDATA%/ai-coder/config.yaml`\n\n### Key Settings\n```yaml\nai:\n api_url: \"http://127.0.0.1:11434\"\n model: \"deepseek-r1:8b\"\n timeout: 120\n max_retries: 5\n temperature: 0.7\n\nworkspace:\n directory: \".\"\n history_dir: \".ai-coder-history\"\n auto_save: true\n backup_on_edit: true\n\nsafety:\n allowed_commands: [\"python\", \"node\", \"git\", ...]\n blocked_paths: [\"/etc\", \"/usr\", \"~/.ssh\", ...]\n max_file_size: 10485760 # 10MB\n```\n\n## \ud83c\udf10 Platform Support\n\n| Platform | Installation | Status |\n|----------|-------------|---------|\n| **Linux** | \u2705 Automatic | Fully Supported |\n| **macOS** | \ud83d\udccb Manual | Supported |\n| **Windows** | \ud83d\udccb Manual | Supported |\n\n### Linux\n- Auto-installs Ollama using official installer\n- Auto-starts service via systemctl or direct command\n- Full feature support\n\n### macOS & Windows\n- Manual installation required\n- Download from https://ollama.com/download\n- All features supported after manual setup\n\n## \ud83d\udd0d Troubleshooting\n\n### Common Issues\n\n**Ollama Not Found**\n```bash\n# Linux: AI Coder will offer to install automatically\n# macOS/Windows: Download from https://ollama.com/download\n```\n\n**Connection Timeout**\n```bash\n# Check if Ollama is running\nollama serve\n\n# Check service status (Linux)\nsystemctl status ollama\n```\n\n**No Models Available**\n```bash\n# AI Coder will automatically suggest and install recommended models\n# Or manually: ollama pull deepseek-r1:8b\n```\n\n## \ud83d\udcda Advanced Features\n\n### File Versioning\n- Every edit creates a timestamped backup\n- Full undo/redo history per file\n- Restore to any previous version\n\n### Smart Context\n- Understands project structure\n- Maintains conversation history\n- Learns from your coding patterns\n\n### Cross-Platform CLI\n- Works identically on Linux, macOS, Windows\n- Rich terminal UI with colors and formatting\n- Intelligent error handling and recovery\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions from the community! CodeDev is open source and thrives on community involvement.\n\n### Ways to Contribute\n\n1. **\u2b50 Star the Repository**: Show your support on [GitHub](https://github.com/ashokumar06/codedev)\n2. **\ud83d\udc1b Report Bugs**: Submit issues on [GitHub Issues](https://github.com/ashokumar06/codedev/issues)\n3. **\ud83d\udca1 Feature Requests**: Suggest new features via [GitHub Discussions](https://github.com/ashokumar06/codedev/discussions)\n4. **\ud83d\udcd6 Documentation**: Improve docs and examples\n5. **\ud83d\udd27 Code Contributions**: Submit pull requests\n\n### Development Setup\n\n```bash\n# Fork the repository on GitHub, then:\ngit clone https://github.com/YOUR_USERNAME/codedev.git\ncd codedev\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\npip install -e .\n\n# Run tests\npython test_installation.py\n\n# Make your changes and submit a pull request!\n```\n\n### Project Structure\n\n```\ncodedev/\n\u251c\u2500\u2500 ai_coder/ # Main package\n\u2502 \u251c\u2500\u2500 ai/ # AI client and prompt management\n\u2502 \u251c\u2500\u2500 core/ # Configuration and core utilities \n\u2502 \u251c\u2500\u2500 operations/ # File and project operations\n\u2502 \u251c\u2500\u2500 safety/ # Security and sandboxing\n\u2502 \u251c\u2500\u2500 utils/ # Utilities and platform detection\n\u2502 \u2514\u2500\u2500 cli.py # Main CLI interface\n\u251c\u2500\u2500 config/ # Default configuration\n\u251c\u2500\u2500 tests/ # Test suite\n\u251c\u2500\u2500 .github/ # GitHub workflows\n\u2514\u2500\u2500 setup.py # Package configuration\n```\n\n## \ud83d\udcc4 License\n\nCodeDev is released under the **MIT License** - see [LICENSE](https://github.com/ashokumar06/codedev/blob/main/LICENSE) file for details.\n\nThis means you can:\n- \u2705 Use it commercially\n- \u2705 Modify and distribute\n- \u2705 Private use\n- \u2705 Include in your projects\n\n## \ufffd Support the Project\n\nIf you find CodeDev useful, please consider:\n\n- \u2b50 **Starring** the repository on [GitHub](https://github.com/ashokumar06/codedev)\n- \ud83d\udc1b **Reporting bugs** and suggesting features\n- \ud83e\udd1d **Contributing** code or documentation\n- \ud83d\udcac **Sharing** it with other developers\n\n---\n\n## \ud83c\udfaf Get Started Now!\n\n```bash\n# Install and start using immediately\npip install codedev\ncodedev\n\n# Or build from source\ngit clone https://github.com/ashokumar06/codedev.git\ncd codedev && pip install -e .\ncodedev --version\n```\n\n**Ready to revolutionize your coding workflow with AI?** \ud83d\ude80\n\n---\n\n<div align=\"center\">\n\n**Made with \u2764\ufe0f and countless cups of coffee by [Ashok Kumar](https://ashokumar.in)**\n\n[](https://buymeacoffee.com/ashokumar) [](https://razorpay.me/@ashokumar06)\n\n[GitHub](https://github.com/ashokumar06/codedev) \u2022 [PyPI](https://pypi.org/project/codedev/) \u2022 [Issues](https://github.com/ashokumar06/codedev/issues) \u2022 [Discussions](https://github.com/ashokumar06/codedev/discussions)\n\n**Connect with me for collaboration, feedback, and let's build something amazing together!** \ud83e\udd1d\n\n</div>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Advanced AI Coding Assistant with Terminal Integration",
"version": "3.0.0",
"project_urls": {
"Bug Reports": "https://github.com/ashokumar06/codedev/issues",
"Documentation": "https://ashokumar.in/codedev",
"Homepage": "https://ashokumar.in",
"Repository": "https://github.com/ashokumar06/codedev"
},
"split_keywords": [
"ai",
" coding",
" assistant",
" terminal",
" automation",
" ollama",
" code-generation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "972daf53526e71fe12552cecb61d3952486dc8a6e54e8907547dfd7ec9e67c7d",
"md5": "0ec9a44bfcf4969ebd0447eb1c66555e",
"sha256": "c5727072149f0813f7fb3b8cea2d56eb27949f5aa8fbe207f66afa4f012b8606"
},
"downloads": -1,
"filename": "codedev-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ec9a44bfcf4969ebd0447eb1c66555e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 26385,
"upload_time": "2025-09-08T09:33:50",
"upload_time_iso_8601": "2025-09-08T09:33:50.542075Z",
"url": "https://files.pythonhosted.org/packages/97/2d/af53526e71fe12552cecb61d3952486dc8a6e54e8907547dfd7ec9e67c7d/codedev-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fcbe4171f0ef79152bff8c358cbc6bcc0feffb232c97baa2097259f363b5425d",
"md5": "06fd96fec043e3660160b0b794cc1b17",
"sha256": "3e6cd3eb705ebbea4c3589e3f6fed63929489a2529cd16780c2e4da8c149608b"
},
"downloads": -1,
"filename": "codedev-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "06fd96fec043e3660160b0b794cc1b17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 30694,
"upload_time": "2025-09-08T09:33:52",
"upload_time_iso_8601": "2025-09-08T09:33:52.708856Z",
"url": "https://files.pythonhosted.org/packages/fc/be/4171f0ef79152bff8c358cbc6bcc0feffb232c97baa2097259f363b5425d/codedev-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-08 09:33:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ashokumar06",
"github_project": "codedev",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "requests",
"specs": [
[
">=",
"2.31.0"
]
]
},
{
"name": "prompt-toolkit",
"specs": [
[
">=",
"3.0.39"
]
]
},
{
"name": "rich",
"specs": [
[
">=",
"13.4.2"
]
]
},
{
"name": "pyyaml",
"specs": [
[
">=",
"6.0.1"
]
]
},
{
"name": "click",
"specs": [
[
">=",
"8.1.6"
]
]
},
{
"name": "colorama",
"specs": [
[
">=",
"0.4.6"
]
]
},
{
"name": "watchdog",
"specs": [
[
">=",
"3.0.0"
]
]
},
{
"name": "jsonschema",
"specs": [
[
">=",
"4.18.0"
]
]
},
{
"name": "httpx",
"specs": [
[
"==",
"0.24.0"
]
]
},
{
"name": "anyio",
"specs": [
[
"==",
"4.0.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.0.0"
]
]
}
],
"lcname": "codedev"
}