Show HN: Pu.sh – a full coding-agent harness in 400 lines of shell
Source: Hacker News
Overview
I originally was just messing with pi‑autoresearch, giving it a sample task to build the most portable coding agent. The first cut was 6 KB of shell—great for one‑shots, unusable interactively—but it actually worked.
Development Journey
- Constraints: No new dependencies and under 500 lines of code (LOC). The goal was true portability using only
sh,curl,awk, and system primitives. - Challenges: Implemented some genuinely disgusting tricks in
awk, including JSON parsing and the OpenAI response loop with reasoning items carried across turns. - Current Size: ~400 lines.
Features In‑Box
- LLM Providers: Anthropic, OpenAI
- Tools (7):
bash,read,write,edit,grep,find,ls - Capabilities: REPL, auto‑compaction, checkpoint/resume, pipe mode, 90 no‑API tests
Features Not Included
- TUI, streaming, images, OAuth, Windows support, and “dignity”.
Honest Disclosures
- Prompt & Architecture: I stole/modified the system prompt and architecture. Pi/Claude/Codex wrote the
awk. I cannot read most of this code. This wouldn’t have been possible for me a year ago. - Inspiration: Heavily inspired by Pi (pi.dev)—same 7‑tool surface, same exact‑text edit model. Credit where it’s due; Pi is awesome and you should probably use it.
Additional Thoughts
The agent loop itself is tiny. Almost everything else in a “real” agent CLI is developer experience (DX) and hardening. You can probably build your own harness exactly how you like it. Mario Zechner’s AI Engineer talk on taking back control of your tools nudged me here.
The name is because it’s a .sh file. The other thing it sounds like is, regrettably, also accurate.
References
- Comments URL: (Points: 30, Comments: 14)