Crayon
An autonomous coding agent for the terminal and VS Code. It plans, edits files, runs commands and fixes its own failed builds.
- Year
- 2026
- Role
- Solo. Design, build, release
- Stack
- TypeScript, Ink, Tree-sitter, SQLite
- Ships as
crayon-clion npm, VS Code extension

The problem
Coding agents either ask about everything or run anything.
I wanted one that takes a task all the way to done, including reading the failed build and fixing it, but still stops before anything risky. It also had to work with any model, including a local one with no API key.
What I built
One agent engine, two front ends.
A ReAct loop that plans, calls tools, verifies its edits and retries on failure. It runs in a terminal UI built with Ink and in a VS Code panel, and swaps between Anthropic, OpenAI, Google, OpenRouter and local Ollama models mid-chat.
- agentThe loop, the planner, memory and the tool definitions.
- indexerTree-sitter parses the repo; symbols and dependencies go into a local SQLite index for search.
- cliTerminal UI with slash commands, file mentions, session resume and a setup wizard.
- vscodeA chat panel that shows every read, command and edit as one trace, with keep or undo per file.
Five ways to trust it
The permission mode decides what the agent may do without asking. Cycle them with Shift Tab.
| Mode | File edits | Shell commands |
|---|---|---|
ask | Asks | Asks |
auto-edit | Applies | Asks |
plan | None. Writes a plan, then offers to run it | None |
auto | Applies | Runs safe ones like tests and git diff. Asks for anything risky, chained or outside the workspace |
bypass | Applies | Runs everything |
Hard decisions
The calls that shaped it.
Auto mode still asks
Full autonomy is where agents do damage. Auto runs a short allowlist of safe commands and stops on anything chained, destructive or outside the repo, so it is the mode you can actually leave on.
Index on the machine
The code index is Tree-sitter plus SQLite inside
.crayon/. Nothing is uploaded to build it, and with Ollama the whole run works offline at zero cost.Show the trace, fold the noise
Every step is one line in a timeline. A failing command shows its output; once the same command passes, the failure folds away. Approvals sit in the chat as cards, not modal dialogs.
Audit it like an attacker
A security pass found the
repltool ran arbitrary code with no permission check, even in plan mode, and that piped runs approved everything. Both are gated now, with guards for path traversal and SSRF.
Where it is now
Published, versioned and still moving.
- 0.7.0 on npm
npm i -g crayon-cli - VS Code extensionVSIX on GitHub Releases
- 238 commitsMIT licensed
- Release pipelinePer-package CI on every PR, tag-driven npm publish with provenance