Pure Gerbil port of jcode
- Scheme 99.3%
- Python 0.7%
| .gcode/themes | ||
| core | ||
| docs | ||
| eval | ||
| guardrails | ||
| mcp | ||
| misc | ||
| net | ||
| os | ||
| provider | ||
| proxy | ||
| text | ||
| tool | ||
| tools/port | ||
| ui | ||
| .gitignore | ||
| AGENTS.md | ||
| build.ss | ||
| CLAUDE.md | ||
| gcode.example.json | ||
| gerbil.pkg | ||
| main.ss | ||
| Makefile | ||
| prelude.ss | ||
| README.md | ||
gcode
gcode is a terminal AI coding agent written in Gerbil Scheme, with a native
tool loop, MCP support, LSP tools, encrypted API key storage, a termbox TUI,
verify-gated coding runs, and remote serve/connect modes.
The executable, Gerbil package namespace, project config, and runtime state
directory all use the gcode name.
Status
- Builds a native
.gerbil/bin/gcodeexecutable throughgerbil build. - Uses
gerbil-mcpfor MCP tools andgerbil-lspfor LSP tools. - Does not start
jerboa-mcpor a Jerboa LSP server. - Reads project config from
./gcode.jsonand global config from~/.gcode/config.json. - Stores sessions, encrypted keys, model caches, and other runtime state under
~/.gcode.
Quickstart
git clone https://git.cons.io/ober/gerbil-code
cd gerbil-code
make build
.gerbil/bin/gcode --version
.gerbil/bin/gcode config
For interactive use:
.gerbil/bin/gcode keys init
.gerbil/bin/gcode keys add anthropic
.gerbil/bin/gcode
.gerbil/bin/gcode --tui
.gerbil/bin/gcode -p "explain this repository"
For a local OpenAI-compatible endpoint such as MLX, start the endpoint and put
the provider settings in gcode.json; see gcode.example.json.
Build Requirements
- Gerbil Scheme available as
gerbilonPATH, or setGERBIL=/path/to/gerbil. - A C compiler and standard build tools.
gerbil-termbox, either at../gerbil-repos/gerbil-termbox,../gerbil-termbox,~/mine/gerbil-repos/gerbil-termbox, or~/mine/gerbil-termbox.- OpenSSL development libraries. On macOS,
build.ssalso checksOPENSSL_LIB_DIR,pkg-config, and Homebrewopenssl@3.
Build commands:
make build
make clean
GERBIL=/opt/gerbil/bin/gerbil make build
Documentation
| Doc | Contents |
|---|---|
| Getting started | Prerequisites, build, first run, keys. |
| Configuration | gcode.json, provider settings, permissions, agents. |
| CLI reference | Main commands, flags, slash commands, verified runs. |
| MCP and LSP | Gerbil-only MCP/LSP behavior and expected commands. |
| TUI and themes | TUI launch, theme loading, checked-in theme configs. |
| Plugins | Runtime Gerbil .ss plugin loading and tool registration. |
| Development | Repo layout, build internals, verification workflow. |
Layout
main.ss executable entry point
build.ss Gerbil build script and gcode exe target
core/ config, sessions, agent loop, guardrails, skills
provider/ LLM provider implementations and model registry
tool/ file, bash, git, web, patch, task, LSP, verified tools
mcp/ MCP stdio client
ui/ CLI, TUI, serve, relay, connect
guardrails/ rescue, validation, step enforcement, response forcing
proxy/ OpenAI-compatible guardrail proxy
eval/ deterministic scenario/ablation harness
docs/ user and contributor docs
See AGENTS.md for repository instructions for coding agents and CLAUDE.md for Claude-specific reminders.