frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://pu.dev/
32•nahimn•1h ago
I originally was just messing with pi-autoresearch. Gave it a sample task to build the most portable coding agent.

First cut was 6 KB of shell. Great for one-shots, unusable interactively. I was shocked it actually worked.

Started building up -- adding features — but with a self-imposed rule: no new dependencies, and sub 500 LOC. This thing had to be truly portable. Just sh, curl, awk. System primitives only.

Which means I did some genuinely disgusting things in awk, including JSON parsing and the OpenAI Responses tool loop with reasoning items carried across turns.

It's now ~400 lines. In the box: Anthropic + OpenAI, 7 tools (bash, read, write, edit, grep, find, ls), REPL, auto-compaction, checkpoint/resume, pipe mode, 90 no-API tests. Not in the box: TUI, streaming, images, OAuth, Windows, dignity.

Two honest things:

1. I stole/modified the system prompt and the architecture. Pi/Claude/Codex wrote the awk. I cannot read most of this code. This wasn't possible for me a year ago.

2. Heavily inspired by Pi (pi.dev) — same 7-tool surface, same exact-text edit model. Credit where it's due. Pi is awesome -- you should probably use them.

The agent loop itself is tiny. Almost everything else in a "real" agent CLI is 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.

Comments

petcat•1h ago
your 500 LOC requirement has made this thing completely and unnecessarily inscrutable and unreadable.

Pass.

esafak•30m ago
No kidding https://github.com/NahimNasser/pu/blob/main/pu.sh
hkt•1h ago
I love it. I think I'm going to have fun with this and possibly learn a bit, too. I'm pondering a container based dev environment at the moment and might throw it in with busybox and see how far I get :)
ricardobeat•1h ago
Really like the looks of it, but minifying the code to achieve the “400 lines” marketing gimmick is a huge turn-off.

It’s also a security nightmare, and ensures it remains 100% vibe coded. Would rather have a readable source with an honest line count.

sudb•1h ago
I think it's fine that it's minified, code-golf style, but yes I agree that this would be much more convincing and useful with an unminified source.
cachius•24m ago
Isn’t unwrapping and commenting just one prompt away?
StableAlkyne•19m ago
Assuming the agent doesn't forget or misinterpret anything.

It would be much better to just have a deterministic minification script.

petcat•59m ago
I'm not even sure why it stopped at 500 line limit. If it's just a shell script then why not make it one line?
StableAlkyne•20m ago
Agreed. It would be one thing if it was a regular bash project that got minified via a script or something, since at least you could tell what it's doing.

This is just spaghetti. Maybe it's spaghetti that runs, but code of this quality does not engender confidence.

flog•37m ago
I'd love to learn how to build something like this, but unfortunately the code is unreadable.

If author could write a heavily commented version that would be amazing.

Imustaskforhelp•35m ago
Interested in something like this if the code can be more readable, it would be interesting to see it in languages like lua etc. too in future.
kkovacs•26m ago
I love this. This is the grown-up brother of my one-liner bash+python at

https://github.com/kkovacs/kkrc/blob/ecff1f65d5ccfa24d5f6695...

:)

tecoholic•18m ago
Kudos. I set on this exact journey a couple of days back and Pi is what I started reading for inspiration as well. I really can't stand the text boxes and the animations of the mainstream harnesses.
cachius•17m ago
Does it work in just-bash?

https://github.com/vercel-labs/just-bash/blob/main/packages/...

Rivian allows you to disable all internet connectivity

https://rivian.com/support/article/can-i-disable-all-data-collection-from-my-vehicle
272•Cider9986•2h ago•112 comments

LinkedIn scans for 6,278 extensions and encrypts the results into every request

https://404privacy.com/blog/linkedin-is-scanning-your-browser-extensions-this-is-how-they-use-the...
243•un-nf•2h ago•91 comments

How Mark Klein told the EFF about Room 641A [book excerpt]

https://thereader.mitpress.mit.edu/the-whistleblower-who-uncovered-the-nsas-big-brother-machine/
368•the-mitr•5h ago•103 comments

Shai-Hulud Themed Malware Found in the PyTorch Lightning AI Training Library

https://semgrep.dev/blog/2026/malicious-dependency-in-pytorch-lightning-used-for-ai-training/
289•j12y•6h ago•91 comments

Opus 4.7 knows the real Kelsey

https://www.theargumentmag.com/p/i-can-never-talk-to-an-ai-anonymously
41•ilamont•1d ago•11 comments

I built a Game Boy emulator in F#

https://nickkossolapov.github.io/fame-boy/building-a-game-boy-emulator-in-fsharp/
162•elvis70•5h ago•41 comments

Claude Code refuses requests or charges extra if your commits mention "OpenClaw"

https://twitter.com/theo/status/2049645973350363168
834•elmean•8h ago•482 comments

How an oil refinery works

https://www.construction-physics.com/p/how-an-oil-refinery-works
284•chmaynard•8h ago•79 comments

Belgium stops decommissioning nuclear power plants

https://dpa-international.com/general-news/urn:newsml:dpa.com:20090101:260430-930-14717/
704•mpweiher•10h ago•642 comments

CopyFail was not disclosed to Gentoo developer

https://www.openwall.com/lists/oss-security/2026/04/30/10
299•ori_b•5h ago•223 comments

New mechanical panoramic film camera from Jeff Bridges

https://wideluxx.com
31•armadsen•2d ago•8 comments

Reverse Engineering SimTower

https://phulin.me/blog/simtower
67•patrickhulin•2d ago•10 comments

You can beat the binary search

https://lemire.me/blog/2026/04/27/you-can-beat-the-binary-search/
217•vok•3d ago•105 comments

Durable queues, streams, pub/sub, and a cron scheduler – inside your SQLite file

https://honker.dev/
152•ferriswil•7h ago•47 comments

Full-Text Search with DuckDB

https://peterdohertys.website/blog-posts/full-text-search-w-duckdb.html
59•ethagnawl•4h ago•14 comments

Apple reports second quarter results

https://www.apple.com/newsroom/2026/04/apple-reports-second-quarter-results/
69•mfiguiere•2h ago•46 comments

The upsell game – Vercel upselling tactics revealed

https://theupsellgame.com/
49•bartoindahouse•2h ago•5 comments

Mozilla's opposition to Chrome's Prompt API

https://github.com/mozilla/standards-positions/issues/1213#issuecomment-4347988313
553•jaffathecake•14h ago•205 comments

Compositing and Blending – Exploring the math and intuition behind blend modes

https://nik.digital/posts/compositing-blending
6•OuterVale•1d ago•0 comments

Does Postgres Scale?

https://www.dbos.dev/blog/benchmarking-workflow-execution-scalability-on-postgres
54•KraftyOne•3h ago•24 comments

The Church Rock Uranium Mill Spill

https://en.wikipedia.org/wiki/Church_Rock_uranium_mill_spill
35•Sir_Twist•2d ago•4 comments

Follow-up to Carrot disclosure: Forgejo

https://dustri.org/b/follow-up-to-carrot-disclosure-forgejo.html
26•homebrewer•3h ago•5 comments

American Dads Became the Parents Their Fathers Never Were

https://www.derekthompson.org/p/why-do-richer-dads-spend-more-time
68•ozozozd•6h ago•39 comments

SimpleX Channels, SimpleX Network Consortium and Community Crowdfunding

https://simplex.chat/blog/20260430-simplex-channels-v6-5-consortium-crowdfunding-freedom-of-speec...
9•pmw•1h ago•1 comments

I aggregated 28 US Government auction sites into one search

https://bidprowl.com
217•scarsam•10h ago•64 comments

Recovering files from beyond the grave using PhotoRec

https://lost-number.bearblog.dev/recovering-files-from-beyond-the-grave-using-photorec/
40•speckx•4h ago•6 comments

10Gb/s Ethernet: what I did to get it working in my home

https://www.gilesthomas.com/2026/04/10g-ethernet-what-i-did
116•gpjt•1d ago•84 comments

Spain's parliament will act against massive IP blockages by LaLiga

https://www.democrata.es/en/politics/congress-and-senate/congress-will-act-against-massive-ip-blo...
364•akyuu•7h ago•162 comments

A 1960s art school experiment that redefined creativity

https://thereader.mitpress.mit.edu/the-1960s-art-school-experiment-that-redefined-creativity/
73•pseudolus•7h ago•22 comments

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

https://pu.dev/
32•nahimn•1h ago•14 comments