Pu.sh: 400-Line Shell Script Coding-Agent Harness from HN

✍️ OpenClawRadar📅 Published: April 30, 2026🔗 Source
Pu.sh: 400-Line Shell Script Coding-Agent Harness from HN
Ad

Pu.sh is a full coding-agent harness written in ~400 lines of shell script, designed for maximum portability. It requires only sh, curl, and awk — no npm, pip, Docker, or other dependencies. The project is inspired by Pi (pi.dev) and uses the same 7-tool surface and exact-text edit model.

Key Features

  • Supported models: Anthropic (Claude) and OpenAI
  • 7 built-in tools: bash, read, write, edit, grep, find, ls
  • REPL mode for interactive use
  • Auto-compaction of conversation context
  • Checkpoint/resume capabilities
  • Pipe mode for scripting
  • 90 no-API tests to verify functionality without external calls

Notably missing: TUI, streaming, image support, OAuth, Windows compatibility — and, as the author puts it, "dignity."

Ad

Code and Philosophy

The author admits they cannot read most of the awk code, which was written by Pi/Claude/Codex. The reasoning loop handles JSON parsing and tool calls across turns using awk. The agent loop itself is tiny — most of the complexity in real agent CLIs comes from DX and hardening. The project is released under a self-imposed rule: no new dependencies and under 500 LOC.

Setup

curl -sL pu.dev/pu.sh -o pu.sh && chmod +x pu.sh
./pu.sh

All you need is curl, awk, and an API key. The author encourages readers to build their own harness adapted to their needs.

📖 Read the full source: HN AI Agents

Ad

👀 See Also