Show HN: Pu.sh – a full coding-agent harness in 400 lines of shell

Published: (April 30, 2026 at 04:55 PM EDT)
2 min read
Source: Hacker News

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

  1. 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.
  2. 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)
0 views
Back to Blog

Related posts

Read more »

When Networking Doesn't Work

My Windows 11 → Tyan SMDC IPMI Troubleshooting Story _Last week I spent far too much time trying to get my Windows 11 machine to talk to an antique Tyan SMDC S...