- Scheme 92.3%
- Shell 2.3%
- Rust 2%
- Kotlin 1.4%
- C 1%
- Other 1%
| .jerboa | ||
| android | ||
| docs | ||
| eval/local-model | ||
| scripts | ||
| src/jcode | ||
| support | ||
| test | ||
| themes | ||
| tools | ||
| vendor-overrides | ||
| .build.yml | ||
| .gitignore | ||
| .jerbuild | ||
| .jerbuild.freebsd-amd64 | ||
| .jerbuild.linux-amd64 | ||
| .jerbuild.linux-arm64 | ||
| AGENTS.md | ||
| build-jcode-cross.ss | ||
| build-jcode-freebsd-cross.ss | ||
| build-jcode-musl.sh | ||
| build-jcode-musl.ss | ||
| CLAUDE.md | ||
| cleanup.md | ||
| jcode-better.md | ||
| jerboa.pkg | ||
| jpkg.lock | ||
| jpkg.policy.sexp | ||
| jpkg.sexp | ||
| LICENSE | ||
| linux-check.ss | ||
| main-binary.ss | ||
| main.ss | ||
| Makefile | ||
| README.md | ||
| repl-reader.ss | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
| vendor-lock.env | ||
jerboa-code
A portable AI coding agent written in Jerboa Scheme.
jcode is a terminal coding agent — think opencode / aider / Claude Code — that
compiles to a standalone binary without a Node or Python runtime. It talks to 14
LLM providers (cloud and local), drives your editor through a real tool loop,
and ships a reliability layer that makes even small self-hosted models call
tools dependably.
┌────────────────────────────────────────────────────────────────┐
│ jcode BUILD · sonnet │
│ │
│ › add a --json flag to the status command │
│ │
│ ● read src/cli.ss │
│ ● edit src/cli.ss (+12 −1) │
│ ● bash make test 411 passed, 0 failed │
│ │
│ Done — `--json` emits the status block as a JSON object. │
└────────────────────────────────────────────────────────────────┘
Why it exists
- Portable. One standalone binary. Runs on macOS, Linux, FreeBSD, and Android (via Termux). No Node, no Python, no ecosystem.
- Provider-agnostic. Anthropic, OpenAI, Google, OpenRouter, DeepSeek, xAI,
Groq, Mistral, Together, Cerebras, Perplexity — plus local Ollama and
MLX. Switch with
/modelmid-session. - Reliable on small models. A native port of forge plus ATLAS-style verify-and-repair wraps every call: prose-to-tool rescue, step enforcement, verify-gate, and best-of-k. Always on, every provider.
- Delegation built in. Named sub-agent roles for the
tasktool — read-onlydelegate, docs-scopeddoc-explorer, gatedimplementer(BLUEPRINT → approve → EXECUTE) — with enforced write scopes, per-agent model routing viajcode.json, and plan-lifecycle skills (create-plan/resume-plan/generate-handover). See docs/agents.md. - A real TUI. termbox-based panels, markdown + syntax highlighting, live diffs, themes, a sidebar with token / cost / GPU stats.
Quickstart
You need a C compiler and Rust/Cargo. make build and make binary use a
local Jerboa toolchain when present, otherwise they fetch the configured
release bundle into .jerboa/bin. See
docs/getting-started.md for the full setup.
git clone https://git.sr.ht/~lisp/jerboa-code && cd jerboa-code
make build # compile src/ → lib/
make binary # produce the standalone ./jcode
./jcode keys add anthropic # store an API key (encrypted)
./jcode # interactive REPL
./jcode --tui # full terminal UI
./jcode -p "explain this repo" # one-shot prompt
Documentation
| Doc | What's in it |
|---|---|
| Getting started | Prerequisites, building on every platform, configuration, keys, first run. |
| CLI reference | Every subcommand, flag, slash command, and environment variable. |
| Architecture | The agent loop, module map, and how a turn flows through the guardrails. |
| Providers & models | The 14 providers, model registry, per-model sampling, and hardware tiers. |
| Tools | The agent's toolbox (file, bash, web, git, patch, task, MCP) and the safety model. |
| Named agents & plans | Sub-agent roles with enforced write scopes, per-agent models, gated execution, and the plan-lifecycle skills. |
| Verify-gated runs | jcode verified, cookbook-guided local-model runs, MCP tools, write scopes, JSON status, and troubleshooting. |
| TUI | Layout, keybindings, themes, and the rendering features. |
| Forge & ATLAS reliability | Guardrails, workflows, verify-gate, best-of-k, the proxy, and the eval harness. |
| Remote & Android | serve / relay / connect and the thin-client architecture. |
| Threat model | Assets, trust boundaries, controls, and residual risks for production use. |
| Credential handling | API key sources, storage, logging, tracing, and release checks. |
| FFI boundary | Native components, ownership rules, generated artifacts, and audit procedure. |
| Release evidence | SBOM, reproducibility, binary smoke, and release-bundle contents. |
See docs/ for the full index.
Build targets
make build · test · audit · sbom · reproducibility-report ·
release-evidence · run · run-tui · binary · install · linux ·
linux-amd64 · linux-arm64 · freebsd · android.
Run make help for the complete list.
Layout
main.ss entry point
src/jcode/
core/ agent loop, config, sessions, guardrails plumbing, ATLAS
provider/ the 14 LLM providers + per-model sampling
tool/ file, bash, web, git, patch, task, repomap, lsp
guardrails/ rescue, validator, step-enforcer, respond, error budget
proxy/ OpenAI-compatible guardrail proxy
eval/ deterministic ablation harness
ui/ cli, tui-*, serve/relay/connect
mcp/ MCP client
Source is Jerboa .ss, compiled by jerbuild to Chez .sls under lib/.
See AGENTS.md for the language reference and CLAUDE.md
for contributor conventions.