Terminal coding agent · written in Go
Plan on the best.
Run on the rest.
Larik is one terminal agent for every model. Your strongest model plans and reviews, cheap or local models do the reading and editing, and shell commands run in an OS sandbox by default.
curl -fsSL https://larik.vinensiuswibowo.com/install.sh | sh
Works with
- Anthropic
- OpenAI
- Gemini
- Ollama
- LM Studio
- OpenRouter
- Groq
- DeepSeek
- xAI
- Mistral
- +4 more
One task. Three models. Four cents.
Real session · ~/code/api
✻ larik v0.25.0 · ~/code/api · seatbelt sandbox
/ commands · ? shortcuts · alt+p model · shift+tab mode
› fix the failing auth tests and tell me what broke
✻ Thought for 6s · ctrl+o to show
● todos(0/3 done)
● task › explore(find where session tokens are validated)
└ gemini/gemini-3.8-flash · 9 tool calls · $0.002
● read(internal/auth/token.go)
read 184 lines
● edit(internal/auth/token.go)
- if exp.Before(now) {
+ if !exp.After(now) {
● bash(go test ./internal/auth/...)
ok api/internal/auth 0.41s
A token expiring this very second still counted as
valid. exp == now is now expired; all 23 tests pass.
sonnet-5default 18% context · $0.04
01 / Model routing
Pay frontier prices
only for the thinking.
| Role | Model | Cost |
|---|---|---|
| main · plan | anthropic/claude-sonnet-5 | $0.031 |
| explore | gemini/gemini-3.8-flash | $0.002 |
| worker | ollama/qwen3-coder | free |
| main · review | anthropic/claude-sonnet-5 | $0.007 |
| Session total | $0.040 | |
A budget that holds.
Warn at 80%, stop before the request that would cross the cap. Local and plan models count as free.
Fallbacks that don't waste a turn.
Rate limited? Larik moves to the next model before any output starts. Small models get a leash: worktrees, turn caps, loop detection.
/routing → Balanced · Cheapest · Local and plan first
02 / Execution
Tool calls or scripts.
Chosen per model.
A model can write a short script that calls your tools. Reading forty files to count something costs the context one summary, not forty results.
// run_code: tests per package, top five
const hits = tools.grep({ pattern: "^func Test" })
const perPkg = {}
for (const line of hits.split("\n")) {
const pkg = dir(line.split(":")[0])
perPkg[pkg] = (perPkg[pkg] || 0) + 1
}
top(perPkg, 5)in: hundreds of matchesback to context: 5 rows
toolsOne call per stepThe classic loop. Every result lands in context.hybridThe model picksScripts for loops and filtering, direct calls for the rest.codeScripts onlySame permissions, hooks and/undofor every call a script makes. No writes, no network, 256 MB cap.- Set per model with
/execution· measure withlarik bench --execution
03 / Safety
Read. Edit. Verify.
In a sandbox, by default.
OS sandbox, on by default.
Seatbelt on macOS, bubblewrap on Linux: write only to the project, no network but localhost, no way to rewrite git hooks. Sandboxed commands don't need to ask.
Claude Code–compatible.
Your existing hooks, Agent Skills, custom commands, subagent definitions, CLAUDE.md and .mcp.json work unchanged. Bring your setup; switch models.
Built in,
not bolted on.
12 capabilities
Subagents in git worktrees
Parallel subagents with fresh contexts, each on its own branch for the main agent to review and merge.
02Branch, rewind, undo
/fork a conversation, /rewind to before any prompt, /undo the last turn's file changes.
MCP, with approval
stdio, HTTP or SSE servers with OAuth sign-in. Servers from shared project files wait for your approval.
04Tools on demand
With dozens of MCP tools connected, the model searches for the one it needs instead of carrying every definition.
05Language servers
Diagnostics after every edit, so the model sees the type error it just introduced.
06Web fetch and search
Pages as clean Markdown, with domain rules and cross-host redirects reported rather than followed.
07Browser control
A real headless Chrome in a terminal pane you can click and type in. Sign-ins persist.
08Permissions you control
Five modes on shift+tab. Allow and deny rules with globs; deny always wins.
Auto mode
A model approves routine steps. Pushes, deletes, secrets and sudo still ask, with the reason.
Plan, then approve
In plan mode the model reads, then puts its plan to you. Longer work runs from a checklist.
11Reviews and a GitHub Action
/review and /security-review report findings with file, line and fix.
Memory
Preferences, corrections and project decisions kept as short notes and recalled in later sessions.
Bring any model.
Keep your setup.
curl -fsSL https://larik.vinensiuswibowo.com/install.sh | sh
macOS · Linux · Windows — or download a binary