Build your own coding agent CLI

The terminal app behind Claude Code and Codex: tools, edits, permissions, context and hooks.

Claude Code, OpenAI Codex CLI, Gemini CLI, Aider and OpenCode are all this program: a loop that sends the conversation to a model, runs the tools it asks for on your machine, and decides what it may do without asking.

About 780 minutes across 6 stages. Skills: Tool design, Safe file editing, Permission systems, Context management, Hooks.

The guides are part of licode Club.

Stages

  1. Load a workspace and give the model read-only tools.
  2. Search code with grep.
  3. Edit files with exact replacement and summarise changes.
  4. Ask before changing anything, and run a tiny shell.
  5. Track tokens and compact old results.
  6. Add hooks, a todo list, a nudge and a run report.