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/
47•nahimn•2h 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•2h ago
your 500 LOC requirement has made this thing completely and unnecessarily inscrutable and unreadable.

Pass.

esafak•1h ago
No kidding https://github.com/NahimNasser/pu/blob/main/pu.sh
hkt•2h 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•2h 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•2h 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•1h ago
Isn’t unwrapping and commenting just one prompt away?
StableAlkyne•1h ago
Assuming the agent doesn't forget or misinterpret anything.

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

petcat•2h 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•1h 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•1h 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•1h 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•1h 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•1h 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•1h ago
Does it work in just-bash?

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

mjuarez•37m ago
Could you post the initial 6KB version? I'd love to have a version that I can actually read and understand. I don't care if it's 2K LOC.
0gs•37m ago
why the LOC limit? just because?

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

https://pu.dev/
47•nahimn•2h ago•16 comments

Show HN: Code on the Go, an IDE for Android with On-Device Debugging (GPLv3)

https://www.appdevforall.org/
4•hal-eisen•1h ago•1 comments

Show HN: TRiP – a complete transformer engine in C built from scratch just by me

https://github.com/carlovalenti/TRiP
30•carlovalenti•6h ago•6 comments

Show HN: Coding-Flashcards – Learn Rust, SQLite, or Godot from First Principles

https://github.com/ad-si/Coding-Flashcards
8•adius•6h ago•0 comments

Show HN: FusionCore: ROS 2 sensor fusion that outperforms robot_localization

https://github.com/manankharwar/fusioncore
10•kharwarm•2d ago•2 comments

Show HN: Create screen recordings with annotations in Chrome, no uploads

https://framepin.com/
3•ipselon•3h ago•0 comments

Show HN: Free no-signup site auditor – secrets, subdomain takeover, CVEs

https://theionproject.com/ionprobe/
3•TheIOn-Project•3h ago•1 comments

Show HN: A new benchmark for testing LLMs for deterministic outputs

https://interfaze.ai/blog/introducing-structured-output-benchmark
58•khurdula•1d ago•24 comments

Show HN: Exploding Hamsters

https://explodinghamsters.com
6•pompomsheep•4h ago•1 comments

Show HN: Rocky – Rust SQL engine with branches, replay, column lineage

https://github.com/rocky-data/rocky
119•hugocorreia90•2d ago•48 comments

Show HN: Throwaway – open-source disposable email checker and API

https://github.com/sslboard/throwaway
10•weddpros•13h ago•7 comments

Show HN: Copy-fail-C – portable C port of CVE-2026-31431, with a checker

https://github.com/tgies/copy-fail-c
2•tgies•6h ago•0 comments

Show HN: Drive any macOS app in the background without stealing the cursor

https://github.com/trycua/cua
184•frabonacci•2d ago•40 comments

Show HN: Phase Router – capacity-aware routing for MoE

https://github.com/TSltd/phase_router_rs
3•TSltd•7h ago•0 comments

Show HN: "Be horse." – a diffusion language model on an M2 Air

https://boesch.dev/posts/simple-dlm/
7•encrux•10h ago•1 comments

Show HN: Rip.so – a graveyard for dead internet things

https://rip.so
179•bozdemir•1d ago•114 comments

Show HN: A programming language where the only token is the word "vibe"

https://wevibe.fyi
6•bonchicbongenre•7h ago•1 comments

Show HN: Live Sun and Moon Dashboard with NASA Footage

https://www.lumara-space.app/
217•beeswaxpat•2d ago•65 comments

Show HN: Hexlock – Replace PII in text with fake data that has the same format

https://github.com/ttarvis/hexlock
5•lemaudit•8h ago•0 comments

Show HN: Flocklist, minimalist graph-based task tracker

https://flocklist.app/?onboarding=true
5•ilqr_jb•8h ago•1 comments

Show HN: Auto-Architecture: Karpathy's Loop, pointed at a CPU

https://github.com/FeSens/auto-arch-tournament/blob/main/docs/auto-arch-tournament-blog-post.md
236•fesens•2d ago•75 comments

Show HN: Qumulator – quantum circuit simulator, 1000 qubits, no GPU

https://github.com/qumulator/qumulator-sdk
13•nnoorbakhsh•3d ago•4 comments

Show HN: Modeleon – Python DSL that compiles to live Excel formulas

https://github.com/modeleonai/modeleon
5•adilkhanovkz•9h ago•0 comments

Show HN: An attempt to grow a mind – building software with an inner life

https://www.momentbymoment.app/
12•shahabebrahimi•1d ago•15 comments

Show HN: Adblock-rust Manager – Firefox extension to enable the Brave ad blocker

https://github.com/electricant/adblock-rust-manager
92•electricant•1d ago•44 comments

Show HN: Pollen – distributed WASM runtime, no control plane, single binary

https://github.com/sambigeara/pollen
11•sambigeara•10h ago•3 comments

Show HN: Does Big Government Kill Growth? The Armey Curve Tested (151 Countries)

https://julienreszka.github.io/economic-simulator/armey-curve.html
2•julienreszka•10h ago•0 comments

Show HN: Agent that refuses to run commands without human approval

https://github.com/few-sh/fewshell
10•hexer303•21h ago•2 comments

Show HN: My retired dad and I made a daily, somewhat difficult, quiz

https://kviss.eu/
35•steinvakt2•1d ago•18 comments

Show HN: NVIM config that I use with my agents

https://github.com/NishantJoshi00/nvim-config
5•cat-whisperer•11h ago•0 comments