AI-powered coding assistant optimized for local LLMs
Project description
PocketCoder
AI coding agent that runs with any LLM — local or cloud.
Stop paying $20/month for cloud AI coding tools. PocketCoder works with free local models like Qwen, Llama, or DeepSeek running on your own machine via Ollama. Or connect to OpenAI/Claude if you prefer.
Why PocketCoder?
Most AI coding assistants are locked to expensive cloud APIs. PocketCoder is different:
- Run locally for free — Use Ollama with open-source models (7B-14B work great)
- Session memory — Agent remembers what you're working on across requests
- Project awareness — RepoMap shows your codebase structure to the LLM
- Multi-step tasks — TODO tracking, automatic planning, checkpoint progress
- Any LLM provider — Ollama, OpenAI, Anthropic, vLLM, LM Studio, or any OpenAI-compatible API
Installation
pip install pocketcoder
Quick Start
# Start in your project directory
pocketcoder
# First run opens setup wizard to configure your LLM
With Ollama (free, local)
# Install Ollama: https://ollama.com
ollama pull qwen2.5-coder:7b
pocketcoder
With OpenAI
export OPENAI_API_KEY="sk-..."
pocketcoder --provider openai --model gpt-4o
How It Works
PocketCoder is a coding agent, not a chatbot. When you give it a task:
- Understands context — Reads your files, understands project structure
- Plans the work — Breaks complex tasks into steps
- Executes tools — Reads files, writes code, runs commands
- Validates results — Checks its own work before marking done
> add authentication to the API
[TODO] Read existing API structure
[TODO] Create auth middleware
[TODO] Add login/logout endpoints
[TODO] Update existing routes
Reading api/routes.py...
Creating api/auth.py...
Done: Added JWT authentication with login/logout endpoints
Commands
| Command | Description |
|---|---|
/help |
Show available commands |
/model |
Switch LLM model |
/add <file> |
Add file to context |
/drop <file> |
Remove file from context |
/files |
List files in context |
/undo |
Undo last file change |
/clear |
Clear conversation history |
/quit |
Exit |
Supported Providers
| Provider | Type | Setup |
|---|---|---|
| Ollama | Local | ollama serve then ollama pull model |
| OpenAI | Cloud | Set OPENAI_API_KEY |
| Anthropic | Cloud | Set ANTHROPIC_API_KEY |
| vLLM | Local/Cloud | Any OpenAI-compatible endpoint |
| LM Studio | Local | Run server, point to localhost |
Configuration
Config stored in ~/.pocketcoder/config.yaml:
provider:
type: ollama
base_url: http://localhost:11434
default_model: qwen2.5-coder:7b
thinking:
mode: smart # smart | always | never
show_reasoning: true # show agent's thinking process
Recommended Models
For local use with 16GB+ RAM:
| Model | Size | Speed | Quality |
|---|---|---|---|
| qwen2.5-coder:7b | 4.7GB | Fast | Good |
| qwen2.5-coder:14b | 9GB | Medium | Better |
| deepseek-coder:6.7b | 4GB | Fast | Good |
| codellama:13b | 7GB | Medium | Good |
Project Structure
PocketCoder stores session data in .pocketcoder/ directory (like .git/):
.pocketcoder/
project_context.json # Current session state
episodes.jsonl # Conversation history
memory.json # Long-term facts
Development
git clone https://github.com/Chashchin-Dmitry/pocketcoder.git
cd pocketcoder
pip install -e ".[dev]"
pytest
Support the Project
If PocketCoder saves you money on AI subscriptions, consider supporting development:
| Network | Address |
|---|---|
| ETH / USDT (ERC-20) | 0xdF5e04d590d44603FDAdDb9f311b9dF7E5dE797c |
| BTC | bc1q3q25vw4jm8v4xe2g6uezq35q2uyn5jt6e00mj9 |
| USDT (TRC-20) | TQj3X5nFQWqPEmRUWNFPjkaRUUFLxmCdok |
| SOL | 5s5uP66VmnLMSApjq8ro639tXvSp59XEwQittzxF64mF |
License
MIT License
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 pocketcoder-1.0.1.tar.gz.
File metadata
- Download URL: pocketcoder-1.0.1.tar.gz
- Upload date:
- Size: 162.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f78bd8723fa35d0092f99bbd2ffc4b4fb1e5e9eea31b8f159af05106d2a0dc06
|
|
| MD5 |
12cf50c96694e7dcee8aeb1db915514b
|
|
| BLAKE2b-256 |
cc1c08cb42d1cd91794f01a03890d5dd649e322faa6431ee7277ce60d9f6d34d
|
File details
Details for the file pocketcoder-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pocketcoder-1.0.1-py3-none-any.whl
- Upload date:
- Size: 181.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82e6afc6cb54f3c657cda474a0d0bbef90e3c240a20587cb2242255462479e7b
|
|
| MD5 |
6a690becb3a8df5ef098f6b3787cabe3
|
|
| BLAKE2b-256 |
a254ac6d0b2489052e8e71ecfeddcd1d248b252c98b99944dcccab4f48063466
|