A radically extensible coding agent for the modern Lisp hacker.
$ curl -fsSL kli.kleisli.io | sh
kli runs inside its own live SBCL image. The boot kernel knows only how to install, switch, and roll back protocols. The extension system is itself a protocol installed on that kernel, and every contribution carries a retractor, so retraction drains exactly what it added. Extensions all the way down.
Specialize the running program.
A :method contribution adds a method to any generic in the live image, and retraction is remove-method. You change the program's own behavior and roll it back.
Rewrite without restarting, keep the state.
Behavior lives in CLOS cells over pandoric closures. A hot patch swaps the code and keeps the closed-over state, so the editor keeps its buffer and the transcript its scrollback. It runs behind a condition-system fault barrier, so a hot-patched function that throws degrades instead of killing the session.
Switch the whole world, safely.
A protocol switch validates, smoke-tests, swaps, and rolls back on any error.
If that makes you want to open src/kernel.lisp, kli is for you.
Each prompt feeds into the renderer and the agent's edit renders live.
Render my edits as diffs. A method is installed on the renderer so the edit kind renders as a diff, live, with no reload.
Now number them. The render behavior is hot-patched and the scrollback survives the swap.
Undo that. The method is retracted, the diff rendering it added drains away, the numbering stays, the scrollback intact.
Render the install. The agent edits the site's own advance control, rendering the install command in place of the button.