Skip to main content

OllamaCoder 🦙💻

OllamaCoder Screenshot

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
  • 📡 Streaming Responses: Real-time token streaming for better UX
  • 🖼️ Vision/Image Support: Analyze images with multimodal models
  • 📊 Context Management: Automatic conversation summarization to stay within context limits
  • ⚙️ 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)

📦 Installation

Via Homebrew (macOS) - Recommended

brew tap lalomorales22/ollama-coder
brew install ollama-coder

Via PyPI

pip install ollama-coder

For enhanced terminal output with streaming (recommended):

pip install ollama-coder[rich]
# or
pip install ollama-coder rich

From Source

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
/image Attach image: /image <path> <message>
/context Show context usage stats
`/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, "streaming": true, "vision": { "enabled": true, "max_image_size": 4194304 }, "context_management": { "enabled": true, "summarize_threshold": 0.75, "keep_recent_messages": 10 }, "ollama": { "host": "http://127.0.0.1:11434", "timeout_sec": 300 }, "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 ✅ ✅
Streaming ✅ ✅
Image Analysis ✅ ✅
Context Management ✅ ✅
Web Search ✅ ✅
Project Context ✅ ✅
MCP Support 🔜 ✅

📝 License

MIT

🔗 Links

📤 Publishing

Version bumping and publishing is automated via GitHub Actions. Just:

  1. Bump version in `pyproject.toml` and `ollama_coder/init.py`
  2. Commit and push
  3. Create and push a tag: ```bash git tag v0.1.3 git push origin v0.1.3 ```

Metadata

Release files for ollama-coder 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ollama-coder 0.2.3
File Size Uploaded
ollama_coder-0.2.3.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ollama-coder 0.2.3
File Interpreter ABI Platform
ollama_coder-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 48.3 kB

Release files / ollama_coder-0.2.3.tar.gz

Download URL ollama_coder-0.2.3.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dc394520dd25f0faf507750b0ee7219fcd444055a3ff9f3c24786b4b8eedb62d
BLAKE2b-256 checksum
How to use checksums
3d4016e52ae18fb1c0a631a79a972275f8e77ecd986ae39ce8e08af584004d79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Release files / ollama_coder-0.2.3-py3-none-any.whl

Download URL ollama_coder-0.2.3-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
709f877f87dd15e3e8099fa06f3e2184f5f360a94e8b6b3ed7a751a5c56bcb54
BLAKE2b-256 checksum
How to use checksums
cc81beb3e2d85898b28b487413877cb8ce1f68e471776b23a0aeff8add79a85f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page