A small terminal coding agent: stdlib-only Python core, minimal context overhead.
Requires Python 3.11+ and curl or git.
curl -fsSL https://raw.githubusercontent.com/codemonkeying/lean-coder/main/install.sh | bashAndroid / Termux:
pkg install -y python curl && curl -fsSL https://raw.githubusercontent.com/codemonkeying/lean-coder/main/install.sh | bashOptions: --with-ollama --pull (local Ollama on Linux), --dry-run. The installer adds
~/.local/bin to PATH in your shell rc if it isn't there. Update with lean_coder --update
or /update.
Uninstall: ~/lean-coder/uninstall.sh (or ./uninstall.sh in a clone) lists what it will
remove and asks first. By default that includes ~/.config/leancoder - settings, sessions and
auth tokens; pass --keep-config to keep them. install.sh --uninstall does the same with
--keep-config.
From a clone:
git clone https://github.com/codemonkeying/lean-coder
cd lean-coder && python3 lean_coder.pylean_coder # start in the current project
lean_coder --host http://HOST:11434 # remote OllamaInside: /provider picks a backend, /model a model, /leash sets what the agent may
do (read only, edit, or edit and run commands), /approve sets which actions ask you first,
/connect works on a remote box over SSH, /help lists everything. Config lives in
~/.config/leancoder/config.toml.
Providers: Ollama, llama.cpp and MLX (local), plus OpenAI, Anthropic API, Gemini, Groq, OpenRouter, Kilo and OVH (API key). Add your own with a small plugin file.
- Lean-tools: optional tools (web fetch, SSH, view, ...) you switch on with
/tools; each one adds its schema to the prompt only when enabled. - MCP: connect external tool servers that speak the Model Context Protocol.
- Workers: the agent can start background sub-agents for side tasks and coordinate them on a task board.
Tokens the tool definitions add to every request (the test suite enforces these limits):
| Surface | Max tokens |
|---|---|
| Always-on (core tools) | 2500 |
| Every bundled lean-tool enabled | 6500 |
- doc/COMMANDS.md - slash-command contract and leash tiers
- doc/LEAN_TOOLS.md - writing lean-tools
- doc/PROVIDER_API.md - writing model providers
- doc/MCP.md - MCP servers
- doc/WORKERS.md - background workers and task boards
- CONTRIBUTING.md - test gates
Copyright (c) 2026 codemonkeying. All rights reserved.
No licence is granted to use, copy, modify or distribute this software. Releases up to and including 0.10.103 were published under MIT, and 0.10.104 to 0.10.124 under Apache-2.0; copies of those releases keep those licences.
