Show HN: Pu.sh – a full coding-agent harness in 400 lines of shell
TL;DR Highlight
A coding-agent harness in under 50KB using only sh, curl, awk and an API key.
Who Should Read
Backend or DevOps developers who want to dissect a minimal coding agent to see how it works
Core Mechanics
- Zero dependencies
- It needs only sh, curl, awk and an API key, with no npm, pip, docker or node.
- It is under 50KB.
- Two-line install
- Download pu.sh with curl, chmod +x it, then run ./pu.sh.
- It is MIT licensed.
- Headline pitch is a 400-line shell harness
- A harness is the runtime that gives an LLM tools and runs the agent loop.
- The page links to github, compaction and docs.
Community Reactions
- Criticism that the code is unreadable
- One commenter said minifying to hit 400 lines was a turn-off.
- They wanted readable source with an honest line count.
- Requests for a readable version
- Someone asked for the initial 6KB version.
- Another wanted a heavily commented version to learn from.
- Built something similar
- One commenter built their own in a few hours with one file, node only, under 1k LOC, ollama support and a read-only toggle.
- Suggested evaluation criterion
- One comment said the key is how well the harness records and replays tool calls and failures.
How to Apply
- Download and run it in 30 minutes
- Fetch pu.sh with curl in a container or temp directory.
- Read the script first to see which commands it calls.
- Identify the minimal agent structure
- Compare it with your own agent and list the essential parts: model call, tool execution, context compaction.
- Log tool calls to a file
- In your own harness, record tool calls and failures so you can replay them.
Try It
# Paste into a terminal in an isolated environment (container or temp dir). Use your own API key
curl -sL pu.dev/pu.sh -o pu.sh && chmod +x pu.sh
less pu.sh # read it before running
./pu.shTerminology
Related Papers
The Agent SDK
Cursor released Agent SDK, letting you define agents in code and deploy them with one command.
Here be monsters: What do you still need to know when agents do the work?
Owning agent-written code depends on fundamentals, breadth, and diving deep just in time.
AI promised less work. I've never worked more
Running agents in parallel brought my GitHub activity back to full-time engineer levels, and I'm exhausted.
Show HN: Corgi, a helpful {agent, terminal} multiplexer
A tmux-like terminal tool that shows the status of all your AI agents at a glance
Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?
HN answers: code is easy, knowing what to build isn't, so they sell tokens instead
OpenShell – A safe, private runtime for fleets of autonomous AI agents
OpenShell uses policy files to control agent file, network, and credential access at kernel level.
Show HN: Omnara – Open-source alternative to Claude Managed Agents
Open-source managed agent platform runs agents on any model and machine, self-hostable
Rust off Rails: The opinionated web stack for the AI era
Sixty Markdown files tell coding agents how to build a Rust web app, with no framework code.