SmallCode CLI
SmallCode is a coding agent for local 8B–35B models that budgets context, splits work into steps and edits by patches.
- 2,023 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The agent edits files and runs commands in the project; with escalation enabled, code fragments go to a cloud provider.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/smallcodeDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The agent edits files and runs commands in the project; with escalation enabled, code fragments go to a cloud provider.
This is third-party code. Review the repository files before installing.
What it does
SmallCode runs in a project directory as a terminal interface and works with a local model through any OpenAI-compatible endpoint: LM Studio, Ollama, llama.cpp. Context is budgeted and summarized, a forgiving parser handles tool calls, and the plan lives in a TODO file executed step by step. Edits use search-and-replace patches rather than full-file rewrites. It ships 18 tools, a code graph, session memory and an optional index of GitHub repositories for finding examples. The model and endpoint are set in `.env` or `smallcode.toml`.
Who it is for. Developers running a coding agent on their own hardware who want code to stay off the cloud.
Good fit when
- The code is closed and queries to cloud models are forbidden.
- A laptop runs an 8B Qwen model and a typical agent gets lost by the second step.
- A multi-file task is split into steps in a TODO file.
- A terminal agent is needed that falls back to a stronger model through a key on failure.
Not a fit when
- You use a model above 35B or a cloud one; the authors point to tools built for strong models.
- The model is 4B or smaller; the authors note it loses context between turns.
- You need an IDE plugin rather than a terminal.
Example request
Investigate the failing payment module tests, write a plan in the TODO file and fix the code with patches, running tests after each step.Limitations
The author recommends 8B–35B models; weaker ones struggle with tool chains. It needs Node.js 18+, plus Python 3 and Git for the index. `better-sqlite3` builds natively, and without it memory falls back to JSON. Enabled cloud escalation sends code fragments to the chosen provider. Last commit in August 2026.
How to disable. Remove the package with `npm uninstall -g smallcode` and the `~/.smallcode` directory if you used the prebuilt archives. Delete `.env`, `smallcode.toml` and `.smallcode/` in the project by hand.
FAQ
Which models fit?
Local 8B–35B models through any OpenAI-compatible endpoint. The authors warn that 4B and smaller models lose context.
How can it be run without installing?
With `npx smallcode` in the project directory. Prebuilt archives for Windows, macOS and Linux with bundled Node.js also exist.
Does code go to the cloud?
Only when escalation is enabled. By default everything goes to the local server, and Anthropic, OpenAI, OpenRouter or DeepSeek keys enable a cloud fallback on hard failure.
What if the screen misbehaves?
Run `smallcode --classic`, a readline interface instead of the fullscreen one. If the terminal stays in raw mode, run `reset`.
How is the examples index built?
With `npm run rag:index` from the repository directory or `smallcode-rag-index --preset broad` after install. Python 3 and Git are required.
Discussion
No questions or reviews yet.
Related
CLI toolsA coding agent tuned for small local models, with a minimal system prompt, a planning mode and background sub-agents for research
Local coding agent with a terminal UI: it plans, drafts several candidates, tests them in a sandbox and repairs, so compact open models can handle code
A teaching terminal coding agent in Python, built as a "nanoGPT for agents": read it, take it apart and fork it
Self-hosted AI coding agent with a web interface: project map, decision memory, local models via Ollama and permission modes
An MCP server that hands bounded tasks to a local model or a cheap cloud API, while Claude stays the architect and saves tokens
A terminal coding agent in one Rust binary that reads code, edits files and runs tests with any model of your choice.
Comparison with similar tools
Cards that share the main search query, and how they differ.
README in short
The README compares SmallCode with agents for strong models on context, tool calling, planning and privacy. Install, tiered model setup, architecture and the GitHub examples index follow.