Pure Gerbil port of jcode
  • Scheme 99.5%
  • Python 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-17 01:00:05 -06:00
.gcode/themes Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
core Harden gcode local Gerbil repair loops 2026-07-17 01:00:05 -06:00
docs Implement isolated Gerbil web search and test coverage 2026-07-16 15:52:16 -06:00
eval Port recent gcode features from jerboa-code 2026-07-16 12:55:30 -06:00
guardrails Port recent gcode features from jerboa-code 2026-07-16 12:55:30 -06:00
mcp Restore Gerbil diagnostics and verified workflow parity 2026-07-16 15:29: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 Implement isolated Gerbil web search and test coverage 2026-07-16 15:52:16 -06:00
provider Harden gcode local Gerbil repair loops 2026-07-17 01:00:05 -06:00
proxy Document parity features and tighten security audit 2026-07-16 13:36:17 -06:00
test Harden gcode local Gerbil repair loops 2026-07-17 01:00:05 -06:00
text Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
tool Harden external tool sandbox isolation 2026-07-16 15:58:25 -06:00
tools/port Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
ui Implement isolated Gerbil web search and test coverage 2026-07-16 15:52:16 -06:00
.gitignore Port comprehensive behavioral tests to Gerbil 2026-07-16 15:01:38 -06:00
AGENTS.md Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
build.ss Complete verified and descriptor path parity 2026-07-16 14:07:41 -06:00
CLAUDE.md Rename jcode namespace to gcode 2026-06-19 21:13:41 -06:00
gcode.example.json Document configurable Gerbil MCP and LSP 2026-07-16 14:30:48 -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 Implement isolated Gerbil web search and test coverage 2026-07-16 15:52:16 -06:00
prelude.ss Restore Gerbil diagnostics and verified workflow parity 2026-07-16 15:29:41 -06:00
README.md Implement isolated Gerbil web search and test coverage 2026-07-16 15:52:16 -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 test
make install
make clean
GERBIL=/opt/gerbil/bin/gerbil make build

make install installs the native executable to ~/.local/bin/gcode by default. Override PREFIX or BINDIR for another user-writable location.

Running gcode without a command or prompt launches the full TUI. Use gcode --no-tui only when the minimal line-mode REPL is desired.

make test builds the native executable, runs the focused Gerbil unit/security regressions, exercises the isolated web-search worker and HTML parser, and runs the comprehensive 1,280-case Jerboa-parity behavioral suite. Use make test-providers separately for real provider round trips; it skips providers without configured credentials and is excluded from make test because it uses network access and API quota.

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, image, 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.