https://github.com/feiskyer/koder
Koder - An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
https://github.com/feiskyer/koder
agent ai claude openai vibe-coding
Last synced: about 1 month ago
JSON representation
Koder - An intuitive AI coding assistant and interactive CLI tool that boosts developer productivity with intelligent automation and context-aware support.
- Host: GitHub
- URL: https://github.com/feiskyer/koder
- Owner: feiskyer
- License: mit
- Created: 2025-07-28T14:20:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-09-24T16:23:39.000Z (about 2 months ago)
- Last Synced: 2025-09-25T07:51:44.496Z (about 2 months ago)
- Topics: agent, ai, claude, openai, vibe-coding
- Language: Python
- Homepage:
- Size: 1.29 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Koder
[](https://www.python.org/downloads/) [](LICENSE) [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://pepy.tech/projects/koder)
Koder is an experimental, universal AI coding assistant designed to explore how to build an advanced terminal-based AI coding assistant. Written entirely in Python, it serves as both a functional tool and a learning playground for AI agent development.
**🎯 Project Status**: Under active vibe coding! This is a learning-focused project where we explore building AI coding agents.
## ✨ Features
- **🤖 Universal AI Support**: Works with OpenAI, Anthropic, Google, GitHub Copilot, and 100+ providers via LiteLLM with intelligent auto-detection
- **💾 Smart Context Management**: Persistent sessions with SQLite storage and automatic token-aware compression (50k token limit)
- **🔄 Real-time Streaming**: Rich Live displays with intelligent terminal cleanup for responsive user experience
- **🛠️ Comprehensive Toolset**: file operations, search, shell, task delegation and todos.
- **🔌 MCP Integration**: Model Context Protocol support with stdio, SSE, and HTTP transports for extensible tool ecosystem
- **🛡️ Enterprise Security**: SecurityGuard validation, output filtering, permission system, and input sanitization
- **🎯 Zero Configuration**: Automatic provider detection with fallback defaults
## 🛠️ Installation
### Using uv (Recommended)
```sh
uv tool install koder
```
### Using pip
```bash
pip install koder
```
## ⚡ Quick Start
Simply run Koder with your question or request:
```bash
# Configure one provider (example: OpenAI)
export OPENAI_API_KEY="your-openai-api-key"
export KODER_MODEL="gpt-4o"
# Run in interactive mode
koder
# Run with prompt
koder "create a Python function to calculate fibonacci numbers"
# Execute a single prompt in a named session
koder -s my-project "Help me implement a new feature"
# Use an explicit session flag
koder -s my-project "Your prompt here"
```
## 🤖 Configuration
### Environment Variables
Koder automatically detects your AI provider based on available environment variables. The `KODER_MODEL` environment variable controls which model to use:
```bash
# OpenAI models
export KODER_MODEL="gpt-4.1"
koder
# Claude models (via LiteLLM)
export KODER_MODEL="claude-opus-4-20250514"
export ANTHROPIC_API_KEY=your-api-key
koder
# Google Gemini models (via LiteLLM)
export KODER_MODEL="gemini/gemini-2.5-pro"
export GOOGLE_API_KEY=your-api-key
koder
# Github Copilot (via LiteLLM)
export KODER_MODEL="github_copilot/claude-sonnet-4"
koder
```
### Supported Providers
OpenAI
```bash
export OPENAI_API_KEY=your-api-key
# Optional: Use custom endpoint
export OPENAI_API_BASE=https://your-endpoint.com
# Optional: Specify model (default: gpt-4.1)
export KODER_MODEL="gpt-4o"
koder
```
Anthropic
```bash
export KODER_MODEL="claude-opus-4-20250514"
export ANTHROPIC_API_KEY=your-api-key
koder
```
Google Gemini
```bash
export KODER_MODEL="gemini/gemini-2.5-pro"
export GOOGLE_API_KEY=your-api-key
koder
```
GitHub Copilot
```bash
export KODER_MODEL="github_copilot/claude-sonnet-4"
koder
```
On first run you will see a device code in the terminal. Visit and enter the code to authenticate.
Azure OpenAI
```bash
export KODER_MODEL=azure/gpt-5
export AZURE_API_KEY="your-azure-api-key"
export ZURE_API_BASE="https://your-resource.openai.azure.com"
export AZURE_API_VERSION="2025-04-01-preview"
koder
```
Other AI providers (via LiteLLM)
[LiteLLM](https://docs.litellm.ai/docs/providers) supports 100+ providers including Anthropic, Google, Cohere, Hugging Face, and more:
```bash
# Google Vertex AI
export KODER_MODEL="vertex_ai/claude-sonnet-4@20250514"
export GOOGLE_APPLICATION_CREDENTIALS="your-sa-path.json"
export VERTEXAI_LOCATION=""
koder
# Custom OpenAI-compatible endpoints
export KODER_MODEL="openai/"
export OPENAI_API_KEY="your-key"
export OPENAI_BASE_URL="https://your-custom-endpoint.com/v1"
koder
```
## 🛠️ Development
### Setup Development Environment
```bash
# Clone the repository
git clone https://github.com/feiskyer/koder.git
cd koder
uv sync
uv run koder
```
### Code Quality
```bash
# Code formatting
black .
# Linting
ruff check --fix
# pylint
pylint koder_agent/ --disable=C,R,W --errors-only
```
## 🔒 Security
- **API Keys**: All API keys are stored in environment variables and never in code.
- **Local Storage**: Sessions are stored locally in your home directory.
- **No Telemetry**: Koder doesn't send any data besides API requests to your chosen provider.
- **Code Execution**: Shell commands require explicit user confirmation.
## 🤝 Contributing
Contributions are welcome! Here's how you can help:
1. **Fork** the repository
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
4. **Push** to the branch (`git push origin feature/amazing-feature`)
5. **Open** a Pull Request
Please read our [Contributing Guidelines](CONTRIBUTING.md) for more details.
## 🌐 Code of Conduct
This project follows a Code of Conduct based on the Contributor Covenant. Be kind and respectful. If you observe unacceptable behavior, please open an issue.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Use of third-party AI services is governed by their respective provider terms.