zot

zot. Yet another coding agent harness.

Lightweight. Single binary. Written (vibe-slopped) in Go.

install
curl -fsSL https://raw.githubusercontent.com/patriceckhart/zot/main/install.sh | bash

About

zot is a minimal terminal coding agent, shipped as one static Go binary. No runtime. No Docker. No plugin system with a dedicated package manager. Just the agent loop done well. Drop it on your $PATH and go.

It talks to Anthropic and OpenAI, edits your files, runs your shell, and even answers your Telegram DMs. Bring your own API key, or log in with your Claude Pro / Max or ChatGPT Plus / Pro subscription.

Four ways to run it:

  • interactive - full TUI with streaming output, slash commands, queued messages, and an inline side-chat.
  • print - zot -p, one-shot, final assistant text to stdout. Great for shell pipelines.
  • json - zot --json, NDJSON events to stdout. Perfect for scripts and CI.
  • rpc - zot rpc, long-lived child process, NDJSON commands on stdin and events on stdout. Drop zot into apps written in any language. See the wire format.

Tools

Four built-in tools. Zero ceremony. The minimum viable toolbox for an agent that actually ships code.

  • read - read text files, or render PNG / JPG / GIF / WebP inline on modern terminals.
  • write - create or overwrite files, making parent directories as needed.
  • edit - one or more exact-match replacements in an existing file.
  • bash - run a shell command in the session cwd with merged stdout/stderr and a timeout.

Type /jail to confine every tool to the current directory. Bash refuses sudo, rm -rf /, and other obvious escape patterns. It's a guardrail against accidents, not a hard security boundary.

Extensions

zot can be extended in any language via a subprocess plus JSON-RPC protocol. Extensions can register slash commands, expose new tools to the model, and even intercept tool calls for permission gates.

Nothing installs automatically. Opt in per machine with zot ext install, or per run with zot --ext ./path while hacking on one.

zot ext install ./my-extension   # copy into $ZOT_HOME/extensions/
zot ext list                      # show what's loaded
zot ext logs my-extension -f      # tail stderr

Reference implementations live under examples/extensions/ in Go, TypeScript, and Node. Read the protocol spec.

Skills

Skills are per-folder SKILL.md files with a YAML frontmatter header. zot discovers them at startup, surfaces their names in the system prompt, and exposes a built-in skill tool the model uses to load the body on demand. The agent pulls in exactly the instructions it needs, nothing more.

Only built-in skills load by default. Pass --with-skills to also load user-installed skills from .zot/skills/, $ZOT_HOME/skills/, .claude/skills/, or .agents/skills/. Read the skill format.

Sessions

Every turn is appended to a JSONL transcript under $ZOT_HOME. Resume the last session with -c, pick one with -r, or browse them all from /sessions. Jump between past turns with /jump without editing history. Free up context without losing the thread with /compact, which summarizes the transcript into a single message and keeps the last few exchanges verbatim. zot auto-compacts when you cross 85% of the model's context window.

/session covers the heavier ops on the running transcript. export writes it to a portable .zotsession file (default ~/Downloads) so you can hand it to another machine or user; import pulls one back in as a first-class resumable session. fork branches from any past user message into a new session (parent + fork point recorded in the new meta) so you can try a different direction without polluting the original thread; tree shows every branch in this directory with parent/child indentation and lets you switch into any of them.

Side chat

Type /btw to open a side-chat overlay with the full main session as frozen context. Ask quick clarifying questions without bloating the main thread. Nothing the side chat says is appended to the transcript or persisted to the session file, so your running context window stays lean.

/btw                              # open the overlay
/btw does PUT replace the whole resource?

Tool gate

Run with --no-yolo to confirm every tool call before it runs. A dialog shows the tool name and a one-line preview of its args with four choices: yes, yes-always-this-tool-this-session, yes-always-this-session, no. Type /yolo inside the TUI to drop the gate for the rest of the session.

The flag is interactive-only. In -p, --json, and rpc modes tools still run freely so scripts and automation keep working.

System prompt override

Drop a SYSTEM.md in $ZOT_HOME to replace the built-in identity and guidelines for every run. Per-invocation, --system-prompt still wins; delete the file to revert to the default. Use --append-system-prompt (repeatable) to layer extra instructions on top without blowing the default away.

Embedding

Two ways to drive zot from another program. Both share the same event schema, so transcripts captured by one can be replayed through the other.

  • Go, in-process - import github.com/patriceckhart/zot/pkg/zotcore. One Runtime per project; Prompt(ctx, text, images) returns a channel of Event. Example in examples/sdk/.
  • Any language, out-of-process - spawn zot rpc as a subprocess and exchange NDJSON over its stdin/stdout. Reference clients for Python, Node, shell, and Go live under examples/rpc/. See the wire schema.

Telegram

Pair zot with a BotFather token and DM it from anywhere. It reads, writes, edits, and runs, same as the TUI. Photos and image attachments are forwarded to vision-capable models.

Two ways to run it. Inside a live TUI session, type /telegram (or /tg) to connect. DMs become prompts in the same session; what you type in the TUI mirrors back to Telegram as you: … with replies prefixed zot: … so the Telegram thread stays a complete record. A · tg · tag appears in the status bar while connected.

Or run a headless background daemon for a server:

zot telegram-bot setup     # paste your BotFather token
zot telegram-bot start     # detach and run in the background
zot tg logs -f             # tail the bot log

Install

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/patriceckhart/zot/main/install.sh | bash

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/patriceckhart/zot/main/install.ps1 | iex

Go:

go install github.com/patriceckhart/zot/cmd/zot@latest

Prefer prebuilt tarballs? Every release ships archives for Linux, macOS, and Windows on amd64 and arm64 (except windows/arm64) with a checksums.txt file.