Skip to content

Repository files navigation

SLMCode

⚡ SLMCode

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, …

UnicoLab docs CI release go license platform


🌅 The pitch

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. 🚀


📦 Install in one line

macOS / Linux / WSL

curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash

System-wide:

curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash -s -- --system

Windows (PowerShell)

irm https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install.ps1 | iex

Homebrew

brew install --formula https://raw.githubusercontent.com/UnicoLab/smlcode/main/Formula/slmcode.rb

Full matrix (CMD, pin versions, uninstall): docs/INSTALL.md

slmcode version
slmcode doctor
cd your-project && slmcode init && slmcode

🔌 Any LLM, really

SLM-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


🎯 Why this loop exists

🐘 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

✨ Highlights

  • 🧭 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
  • 📦 Stacksslmcode stack apply omlx-local|deepseek|… (global + optional per-agent pins)
  • 🔑 Auth store.slmcode/auth.json + Studio/TUI /auth (keep keys out of config)
  • 🔎 Model catalogfind_models + Studio costs / enabled models

🧬 Pipeline

query → skills → context → explore|reuse → [docs] [architect]
      → plan → split → coordinator → parallel execute
      → review/correct → learn → test → memory → evolve skills

🚀 Quick start

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:7420

Useful 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

⌨️ CLI cheat sheet

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.


📚 Docs

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-servehttp://127.0.0.1:8000 — bring snacks. 🍿


🧪 Develop

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 PATH
import "github.com/UnicoLab/slmcode/pkg/harness"

h, _ := harness.New("/path/to/project")
_ = h.Init()
res, err := h.Run(ctx, "refactor pkg/auth")

🤝 Contributing

Public baseline on purpose. Bring better prompts, tighter gates, smarter scheduling, new specialists, and evals — especially ones that make small models more reliable.

  1. Fork & branch
  2. make lint && make test
  3. Conventional commits (feat:, fix:, docs:, …)
  4. Open a PR

📜 License

MIT — use it, remix it, ship with it.


Made with ♥ by UnicoLab
Summer coding with SLMs should feel like a superpower, not a compromise. ☀️

About

Small but powerful coding harness optimized for SLMs

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages