The economical coding agent.
Get more done with less!
Make your AI plan last longer, lower your token bill, program locally faster. Enjoy yourself more with instant startup and a calm interface.
A coding agent that works with any OpenAI-compatible endpoint. Bring your own provider! Free-tier and local models work, and subscriptions will last much longer.
# osx/linux
curl -fsSL https://3code.capocasa.dev/install | sh
# windows
irm https://3code.capocasa.dev/install.ps1 | iex
3code
First run walks you through adding a provider (name, URL, API key, models) and verifies with a test call.
The full documentation is available
https://3code.capocasa.dev/docs
nimble install https://github.com/capocasa/3code
Requires Nim >= 2.0 and curl on PATH.
0.5.0 - Windows support, new providers, big stability push
- Windows support. MSYS2 bash is the supported shell; the bash tool, session locking, and color palette all work on Windows. Linux CI is split into amd64 and arm64; macOS gets its own fast build+publish workflow.
- New providers and models. Ollama, Eurouter, Lyceum, Regolo, and TensorX in the provider catalog, alongside MiniMax (M3, M2.7), Tencent Hunyuan (hy3 prompt family), Longcat, GLM-4.7-Flash (free z.ai MoE), and Novita. Refreshed DeepSeek, gpt-oss, Kimi, and GLM reasoning prompts and per-(provider, model) context windows.
- Stable and reliable streaming. Network-quiet hangs and truncated SSE streams now time out and retry instead of freezing forever. Empty model replies are recovered via finish_reason-aware turn handling. Bounded streaming recv makes the quiet-network timeout actually fire, including at provider-connect time, where
verifyProfilenow uses the boundedstreamhttpclient instead of the unboundedhttpclientthat could deadlock. ctrl-c cancels mid-stream, mid-tool, and during provider connect, with no leftover freeze or stale echo. The caret no longer flickers when the streaming repaint races the input thread; assistant prose and the bash tool viewport carry their inter-item gap during live streaming; and a spurious timing line no longer prints on a mid-stream interrupt. - Session resume and locking. O(1) resume via a per-cwd session index; resume replays the full session into the scrollback. Stale session locks are reclaimed automatically and locking is atomic on Windows. A prompt draft survives an unexpected shutdown.
- Terminal rendering fixes. Redraw the fat prompt on resize without stacking chrome or drifting the prompt. Single-GUI-thread ownership of the composite frame; spinner and bar-tick merged into one renderer (kills a thread leak that froze the bottom row). Tool banners, plan glyphs, and receipts now share one byte-path renderer across live streaming and session replay, with the old alternate renderers and dead plan code removed. Correct display width for CJK, emoji, and combining marks; unicode (UTF-8) input in the editor. Light/dark color mode auto-detected via OSC 11 background query, with
[settings] modeand[colors]config overrides. - Bash tool. Native timeout (no GNU
timeoutdependency, default 120s, ceiling 600s) and nativecomputeDiff(no externaldiff). The model is told its own timeout. File contents shown for write-tool display. - Robustness. Sanitize wire body so invalid UTF-8 can't brick a session; guard
computeDiffagainst binary content; exit gracefully if the working directory is deleted mid-session; no silent exit on a broken stdout mid-turn. Network quiet timeout tightened from 180s to 45s. - Packaging.
--version/3code -vreports build provenance; nightly builds carry branch+commit in the version string.
0.4.0 - error icons for failed tool calls, pin bar+prompt to bottom during scrolling, suppress raw JSON on malformed tool args
0.3.5 - $/r/w tool bullets, bright cyan receipts, bar ticks during tool execution
0.3.4 - initial docs site, -i/--interactive flag, streaming ping test
0.3.3 - icon-based tool banners, history fixes, display polish
0.3.2 - native read command, binary guard for bash, deepseek in known-good
0.3.1 - update_plan tool, gpt-oss reasoning tuning
0.3.0 - --good subcommand, ctrl-c cancel during stream, linux-arm64 builds
0.2.7 - inline receipts, gpt-oss grounding prompts
0.2.5 - token bar with cache indicator, skill autoloader, web-research trigger
0.2.1 - per-model tool dispatch, multiline input, markdown table fit
0.2.0 - initial public release
Patches welcome at github.com/capocasa/3code.
- Known-good provider/model pairs with test results
- Bug fixes with a clear reproduction case
Bug reports welcome, but make sure you give enough specific information to reproduce the issue.
MIT.
