logoalt Hacker News

Just-bash: Bash for Agents

104 pointsby toshyesterday at 1:16 PM64 commentsview on HN

Comments

huntaubyesterday at 3:18 PM

We just released a driver that allows users of just-bash to attach a full Archil file system, synced to S3. This would let you run just-bash in an enrivonment where you don't have a full VM and get high-performance access to data that's in your S3 bucket already to do like greps or edits.

Check it out here: https://www.npmjs.com/package/@archildata/just-bash

IceWreckyesterday at 3:18 PM

At this point why not make the agents use a restricted subset of python, typescript or lua or something.

Bash has been unchanged for decades but its not a very nice language.

I know pydantic has been experimenting with https://github.com/pydantic/monty (restricted python) and I think Cloudflare and co were experimenting with giving typescript to agents.

show 14 replies
agartneryesterday at 10:40 PM

If anyone is looking to make a similar thing in go I suggest https://pkg.go.dev/mvdan.cc/sh/v3/interp

I've been using it to make my own sandbox that is much more configurable than the default claude code sandbox: https://github.com/gartnera/lite-sandbox

rbbydotdevyesterday at 9:33 PM

It’s cool to see this project and others pop up. Virtualizing os primitives like bash and even file systems

You can interface around the nodejs files system interface and have access to some nice tools, like git isomorphic for instance. Then obviously everything couples nicely with agents.

Something I did in my markdown editor project: https://github.com/rbbydotdev/opal

Have half a mind to release a browser kit which unifies the file tree explorer and virtual file apis and libs in the browser

throwaway13337yesterday at 6:07 PM

The unix commandline tools being the most efficient way to use an LLM has been a surprise.

I wonder the reason.

Maybe 'do one thing well'? The piping? The fact that the tools have been around so long so there are so many examples in the training data? Simplicity? All of it?

The success of this project depends on the answer.

Even so, I suspect that something like this will be a far too leaky abstraction.

But Vercel must try because they see the writing on the wall.

No one needs expensive cloud platforms anymore.

show 3 replies
jeffchuberyesterday at 4:25 PM

last weekend I vibe-coded a project called `openfs` that plugs into just-bash

https://github.com/jeffchuber/just-bash-openfs

it puts a bash interface in front of s3, filesystem (real and in-memory), postgres, and chroma.

still very much alpha - but curious what people think about it.

see an example app here: https://github.com/jeffchuber/openfs-incident-app

show 2 replies
CuriouslyCyesterday at 6:25 PM

Trying to secure the sandbox the harness is running in seems like the hard way to do things. It's not a bad idea, but I think it'd be easier to focus on isolating the sandbox and securing resources the harness sandbox accesses, since true security requires that anyhow.

jpitzyesterday at 3:16 PM

Just curious: why wouldn't you attack this with a jail?

show 2 replies
indigodaddytoday at 12:29 AM

Not sure why I would ever want to use this over bash in a sandboxed VM.

RobertLongyesterday at 3:32 PM

This ends up reading files into node.js and then running a command like grep but implemented in JS. I love the concept but isn’t this incredibly slow compared to native cli tools? Building everything in JS on top of just readFile and writeFile interfaces seems pretty limited in what you can do for performance.

show 2 replies
_pdp_yesterday at 3:47 PM

Interesting concept but I think the issue is to make the tools compatible with the official tools otherwise you will get odd behaviour. I think it is useful for very specific scenarios where you want to control the environment with a subset of tools only while benefiting from some form of scripts.

0xDEFACEDtoday at 12:41 AM

chmod with extra steps

Lercyesterday at 3:22 PM

I have been playing around with something like this.

I'm not going for compatibility, but something that is a bit hackable. Deliberately not having /lib /share and /etc to avoid confusion that it might be posix

On neocoties for proof of static hosting

https://lerc.neocities.org

show 1 reply
gaigalasyesterday at 3:01 PM

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

That's a lot of incompatibilities.

LLMs like to use the shell because it's stable and virtually unchanged for decades.

It doesn't need to worry much about versions or whether something is supported or not, it can just assume it is.

Re-implementing bash is a herculean effort. I wish good luck.

show 3 replies
MidasToolsyesterday at 6:05 PM

[flagged]

show 1 reply
SignalStackDevyesterday at 6:01 PM

[dead]

raphaelmolly8yesterday at 5:02 PM

[dead]

sentrayesterday at 4:31 PM

[dead]

dostickyesterday at 4:13 PM

Why couldn’t they name it `agent-bash` then? What’s with all the “just-this”, “super-that” naming? Like developer lost the last remaining brain cells developing it, and when it’s came to name it, used the first meaningless word that came up. After all you’re limiting discovery with name like that.

show 1 reply