A coding harness that loves SLMs — and works with any LLM.
Plan → atomic tasks → parallel specialists → self-critic → learn
Powered by GoLangGraph
· defaults to oMLX · plug in Ollama, OpenAI, OpenRouter, vLLM, …
LLMs are incredible. Coding with them — inside a well-adapted harness — feels like magic.
And the industry noticed. Claude Code, Antigravity, Pi, and a growing wave of specialized coding agents were all designed around frontier models: huge context windows, strong tool-calling, and enough judgment to survive messy repos.
That is fantastic… until you run out of tokens. And eventually, you will.
Then you try the same harness on an SLM — a 7B–30B local model — and the magic evaporates. The model wanders. JSON breaks. Context overflows. Reviewers hallucinate green lights.
SLMCode exists to fill those gaps — and to stay useful when you plug a bigger model back in.
It is a public baseline for reaching the same quality of outcome with small models (sometimes with longer passes and extra feedback loops) — motivated by a personal need to ship with SLMs over the summer, offline, private, and cheap.
Fork it. Break it. Point it at whatever LLM you have. Push the idea further. 🚀
curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bashSystem-wide:
curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash -s -- --systemirm https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install.ps1 | iexbrew install --formula https://raw.githubusercontent.com/UnicoLab/smlcode/main/Formula/slmcode.rbFull matrix (CMD, pin versions, uninstall): docs/INSTALL.md
slmcode version
slmcode doctor
cd your-project && slmcode init && slmcodeSLM-first defaults. Generic harness underneath.
| You have… | Try… |
|---|---|
| Apple Silicon local | provider=omlx (default) |
| Ollama | --provider ollama --model qwen2.5-coder:14b |
| LM Studio / vLLM | --provider lmstudio --endpoint http://127.0.0.1:1234/v1 |
| OpenAI / Groq / DeepSeek / Mistral | built-in presets |
| OpenRouter / corporate gateway | any name + --endpoint + API key |
slmcode run --provider ollama --model qwen2.5-coder:14b \
--endpoint http://127.0.0.1:11434 "fix the flaky test"
export SLMCODE_PROVIDER=openrouter
export SLMCODE_MODEL=anthropic/claude-3.5-sonnet
export SLMCODE_API_KEY=…
slmcode run -v "…"Deep dive: docs/PROVIDERS.md
| 🐘 Large-model habit | 🐭 SLMCode approach |
|---|---|
| Stuff the repo into chat | Incremental .slmcode/*.md memory |
| One free-form agent | Plan → atomic tasks → specialists |
| Re-scan every turn | Reuse CONTEXT/MEMORY; skip deep explore |
| Hope the model self-corrects | Reviewer ↔ corrector + multipass |
| Opaque progress | Live CLI + Studio stream |
| Burn tokens until it sticks | Early-exit streams, lean packs, speculative cancel |
- 🧭 Planning + atomic split sized for ~30B models (works for larger ones too)
- 🗂️ Coordinator + live kanban board
- 🧩 14 specialists (explorer, docs, architect, worker/deep, reviewer, corrector, tester, …)
- 🔁 Self-critic loop with auto-correct retries
- 🧠 Evolving CONTEXT / MEMORY / skills flywheel
- ⚡ Token-stream early-exit + SLM JSON repair
- 🖥️ Premium TUI + offline Studio GUI (
http://127.0.0.1:7420) - 🔐 Shell permission modes:
allow|ask|deny - 📦 Stacks —
slmcode stack apply omlx-local|deepseek|…(global + optional per-agent pins) - 🔑 Auth store —
.slmcode/auth.json+ Studio/TUI/auth(keep keys out of config) - 🔎 Model catalog —
find_models+ Studio costs / enabled models
query → skills → context → explore|reuse → [docs] [architect]
→ plan → split → coordinator → parallel execute
→ review/correct → learn → test → memory → evolve skills
cd your-project
slmcode init
# edit .slmcode/PROJECT.md
slmcode # premium TUI
slmcode run -v "add validation to the login handler"
slmcode board
slmcode studio # http://127.0.0.1:7420Useful knobs:
slmcode stack list
slmcode stack apply omlx-local # or: deepseek, openai, ollama-local, …
slmcode run --think-passes 2 --parallel 3 --retries 2 "…"
slmcode run --agent explorer "Where is auth handled?"
slmcode run --skill atomic-coding "Refactor helpers"
slmcode config set dry_run false| Command | Purpose |
|---|---|
init / doctor / config |
Workspace + provider health |
stack / agent |
Apply model stacks; inspect agent pins |
run -v |
Full pipeline + live stream |
tui / bare slmcode |
Premium interactive TUI |
chat |
Classic REPL |
board / watch |
Colored kanban |
studio |
GUI + SSE API |
update |
Refresh install (binary or source) |
TUI: /compact, /models, /mcp, /auth, /schema, /sessions, /stats, /permission, /agents, /stop, /resume.
Premium + playful site (MkDocs Material → GitHub Pages): ☀️ unicolab.github.io/smlcode
| Section | Pages |
|---|---|
| 🚀 Getting started | 📦 Install · ⏱️ Quick start · 🧠 Concepts · 🔌 Providers |
| 📘 Handbook | 🧭 Guide · 🖥️ TUI · 🦋 Skills · 🎨 Studio · 🧩 Agents · 🧪 Recipes |
| 📚 Reference | ⌨️ CLI · ⚙️ Config · ✅ Testing · ❓ FAQ |
| 🔧 Internals | 🏗️ Architecture · 🤝 Contributing |
Local preview: make docs-serve → http://127.0.0.1:8000 — bring snacks. 🍿
git clone https://github.com/UnicoLab/smlcode.git && cd smlcode
make tidy && make lint && make test
make docs-build # MkDocs strict build
make install-system # build from source onto PATHimport "github.com/UnicoLab/slmcode/pkg/harness"
h, _ := harness.New("/path/to/project")
_ = h.Init()
res, err := h.Run(ctx, "refactor pkg/auth")Public baseline on purpose. Bring better prompts, tighter gates, smarter scheduling, new specialists, and evals — especially ones that make small models more reliable.
- Fork & branch
make lint && make test- Conventional commits (
feat:,fix:,docs:, …) - Open a PR
MIT — use it, remix it, ship with it.
Made with ♥ by UnicoLab
Summer coding with SLMs should feel like a superpower, not a compromise. ☀️
