Pure Gerbil port of jcode
  • Scheme 99.3%
  • Python 0.7%
Find a file
2026-06-19 21:38:24 -06:00
.gcode/themes Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
core Fix gcode startup and plugin loading 2026-06-19 21:38:24 -06:00
docs Fix gcode startup and plugin loading 2026-06-19 21:38:24 -06:00
eval Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
guardrails Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
mcp Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
misc Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
net Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
os Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
provider Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
proxy Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
text Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
tool Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
tools/port Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
ui Fix gcode startup and plugin loading 2026-06-19 21:38:24 -06:00
.gitignore Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
AGENTS.md Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
build.ss Build gcode executable with Gerbil tooling 2026-06-19 20:31:51 -06:00
CLAUDE.md Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
gcode.example.json Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
gerbil.pkg Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
main.ss Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
Makefile Fix gcode startup and plugin loading 2026-06-19 21:38:24 -06:00
prelude.ss Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
README.md Fix gcode startup and plugin loading 2026-06-19 21:38:24 -06:00

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/gcode executable through gerbil build.
  • Uses gerbil-mcp for MCP tools and gerbil-lsp for LSP tools.
  • Does not start jerboa-mcp or a Jerboa LSP server.
  • Reads project config from ./gcode.json and 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 gerbil on PATH, or set GERBIL=/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.ss also checks OPENSSL_LIB_DIR, pkg-config, and Homebrew openssl@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.