π§ͺ Recipes¶
Copy-paste workflows that survive contact with reality. Less theory. More βpaste this and winβ. π
Recipe: first green run π’¶
curl -fsSL https://raw.githubusercontent.com/UnicoLab/smlcode/main/scripts/install-remote.sh | bash
omlx start # or configure Ollama β see Providers
mkdir -p /tmp/slm-demo && cd /tmp/slm-demo
printf 'package main\n\nfunc Hello() string { return "hi" }\n' > hello.go
slmcode init
slmcode run -v "Add a short Go doc comment to Hello(). Tiny change only."
cat hello.go
Recipe: safe edits on a real repo π‘οΈ¶
cd ~/code/my-app
slmcode init
slmcode config set permission review
slmcode run -v "Add input validation to the login handler"
slmcode apply # when the staged patches look sane
slmcode diff
slmcode commit -m "slmcode: validate login input"
Recipe: βwhere is X?β without writing code π¶
slmcode run --agent explorer --dry-run "Where is authentication handled?"
# or
slmcode run --agent docs "Summarize the public HTTP API surface"
Maps without mayhem. Excellent for onboarding days and panic Mondays.
Recipe: slow SLM survival kit π’β‘οΈπ¶
slmcode config set think_passes 2
slmcode config set retries 2
slmcode config set max_context_kb 16
slmcode config set parallel 1
slmcode run -v "β¦"
If it wanders: tighten AGENTS.md, pin atomic-coding, force explore once.
Recipe: hybrid brains 𧬶
Local worker, sharper reviewer β budget diplomacy at its finest.
slmcode tui
# then:
/agent edit worker provider=ollama model=qwen2.5-coder:14b endpoint=http://127.0.0.1:11434
/agent edit reviewer provider=openai model=gpt-4o-mini endpoint=https://api.openai.com/v1
Or edit YAML under .slmcode/agents/.
Recipe: resume after lunch (or panic Ctrl+C) π₯ͺ¶
Your checkpoint remembers. Your sandwich does not. Prioritize accordingly.
Recipe: OpenRouter weekend π¶
export SLMCODE_PROVIDER=openrouter
export SLMCODE_ENDPOINT=https://openrouter.ai/api/v1
export SLMCODE_API_KEY=sk-or-β¦
export SLMCODE_MODEL=anthropic/claude-3.5-sonnet
slmcode doctor
slmcode run -v "Refactor the retry helper and add tests"
Recipe: Studio + TUI dual wield π₯¶
Edit CONTEXT in Studio; watch the board in the terminal. Feel powerful. Use responsibly.
Recipe: teach house style once π ¶
# AGENTS.md
- Prefer table-driven tests
- No drive-by refactors
- Match existing naming; don't invent parallel worlds
slmcode skills new house-style --agents worker,reviewer,corrector
slmcode run --skill house-style "β¦"
π
Bonus tip: vague skills make vague agents. βBe carefulβ is not a skill. βNever rewrite unrelated filesβ is a skill.
βοΈ Made with β₯ by UnicoLab