Agentic coding assistant for Ollama - Claude Code alternative
Project description
OllamaCoder 🦙💻
An agentic coding assistant for Ollama - like Claude Code, but running locally!
OllamaCoder transforms your local Ollama models into a powerful autonomous coding agent with tool use, multi-step task execution, and project-aware context.
✨ Features
- 🤖 Agentic Architecture: Autonomous multi-step task execution with planning, execution, and verification
- 🔧 Full Tool System: bash, file operations, git, code search, web search, and more
- 💭 Think Tool: Structured reasoning for complex problems (like extended thinking)
- 📝 Multi-Edit: Batch file edits in a single operation
- 🔄 Autonomous Mode: Let the AI work through complex tasks independently
- ⚙️ Hierarchical Config: User and project-level settings with OLLAMA.md context files
- 🌐 Remote Ollama: Connect to remote Ollama servers via OLLAMA_HOST
- 💾 Persistent History: Conversation history saved across sessions
- 🎨 Rich Output: Beautiful terminal output with syntax highlighting (optional)
📦 Install
From PyPI:
```bash pip install ollama-coder ```
For enhanced terminal output (recommended):
```bash pip install ollama-coder rich ```
For local development:
```bash git clone https://github.com/lalomorales22/ollama-coder.git cd ollama-coder pip install -e . ```
🚀 Quick Start
```bash
Start interactive mode
ollama-coder
Start with autonomous mode enabled
ollama-coder --auto
Run a single command (headless mode)
ollama-coder -p "fix the bug in app.py"
Use a specific model
ollama-coder --model codellama:13b
Work in a specific directory
ollama-coder --dir /path/to/project ```
🛠️ Available Tools
| Tool | Description |
|---|---|
| `think` | Structured reasoning for complex problems |
| `bash` | Execute shell commands |
| `read_file` | Read file contents with optional line ranges |
| `write_file` | Create or overwrite files |
| `edit_file` | Make surgical edits using find/replace |
| `multi_edit` | Batch multiple edits in one operation |
| `list_directory` | Explore project structure |
| `search_code` | Search for patterns using grep/ripgrep |
| `git` | Version control operations |
| `web_search` | Search the web (when configured) |
⌨️ Commands
| Command | Description |
|---|---|
| `/auto` | Toggle autonomous mode |
| `/model` | Show or set the active model |
| `/models` | List installed Ollama models |
| `/host` | Show or set the Ollama host |
| `/config` | Show current configuration |
| `/clear` | Clear conversation history |
| `/help` | Show available commands |
| `/quit` | Exit OllamaCoder |
⚙️ Configuration
User config: `~/.ollamacode/settings.json`
```json { "model": "llama3.3:latest", "max_iterations": 25, "max_tool_rounds": 8, "temperature": 0.7, "ollama": { "host": "http://127.0.0.1:11434", "timeout_sec": 60 }, "web_search": { "enabled": false, "provider": "custom", "endpoint": "", "api_key": "" } } ```
Project Context
Create `OLLAMA.md` files to provide project-specific context:
- `~/.ollamacode/OLLAMA.md` - User-level context (applies to all projects)
- `.ollamacode/OLLAMA.md` - Project-level context (in your project root)
🔌 Remote Ollama
Connect to remote Ollama servers:
```bash
Via environment variable
export OLLAMA_HOST=http://your-server:11434 ollama-coder
Or use the /host command
ollama-coder
/host http://your-server:11434 ```
📋 Requirements
- Python 3.9+
- Ollama server running locally or accessible remotely
- Optional: `rich` package for enhanced terminal output
🔄 Comparison with Claude Code
| Feature | OllamaCoder | Claude Code |
|---|---|---|
| Local/Private | ✅ | ❌ |
| Free | ✅ | ❌ |
| Tool Use | ✅ | ✅ |
| Autonomous Mode | ✅ | ✅ |
| Thinking Tool | ✅ | ✅ |
| Multi-Edit | ✅ | ✅ |
| Web Search | ✅ | ✅ |
| Project Context | ✅ | ✅ |
| Image Analysis | ❌ | ✅ |
| MCP Support | 🔜 | ✅ |
📝 License
MIT
🔗 Links
- GitHub: https://github.com/lalomorales22/ollama-coder
- PyPI: https://pypi.org/project/ollama-coder/
- Ollama: https://ollama.ai/
📤 Publishing
Version bumping and publishing is automated via GitHub Actions. Just:
- Bump version in `pyproject.toml` and `ollama_coder/init.py`
- Commit and push
- Create and push a tag: ```bash git tag v0.1.3 git push origin v0.1.3 ```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ollama_coder-0.1.3.tar.gz.
File metadata
- Download URL: ollama_coder-0.1.3.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56af83d3ca384f88c1b9e76a26e03ceaf33d28770df3010ee5875c804e6cada0
|
|
| MD5 |
144ce5a0074648a7c12806f869aa75aa
|
|
| BLAKE2b-256 |
3cd0b130d929a5937514ddff330db17c08181514b8e16167843c3891fd0f9e87
|
Provenance
The following attestation bundles were made for ollama_coder-0.1.3.tar.gz:
Publisher:
publish.yml on lalomorales22/ollama-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ollama_coder-0.1.3.tar.gz -
Subject digest:
56af83d3ca384f88c1b9e76a26e03ceaf33d28770df3010ee5875c804e6cada0 - Sigstore transparency entry: 789864762
- Sigstore integration time:
-
Permalink:
lalomorales22/ollama-code@0049ec744b3bdbf1d846290720458dae9a848005 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/lalomorales22
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0049ec744b3bdbf1d846290720458dae9a848005 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ollama_coder-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ollama_coder-0.1.3-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6300d33e7bb82d8fe1e11151cfdb81dbe573a0c5001c8924e8e3a1068f1e9098
|
|
| MD5 |
8f5a2a5dc1ca7dd015b9a6c0fe70fa07
|
|
| BLAKE2b-256 |
ad6ebfa936d8f577e111ca733ec7cb0a9912f908881a698428d62e269cff0cc3
|
Provenance
The following attestation bundles were made for ollama_coder-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on lalomorales22/ollama-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ollama_coder-0.1.3-py3-none-any.whl -
Subject digest:
6300d33e7bb82d8fe1e11151cfdb81dbe573a0c5001c8924e8e3a1068f1e9098 - Sigstore transparency entry: 789864764
- Sigstore integration time:
-
Permalink:
lalomorales22/ollama-code@0049ec744b3bdbf1d846290720458dae9a848005 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/lalomorales22
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0049ec744b3bdbf1d846290720458dae9a848005 -
Trigger Event:
push
-
Statement type: