stash
A topic-addressed artifact mailbox. Agree on a name in a prompt, curl a file up from one machine, curl it down from another โ hours later, no random URL to relay.
# machine A, tonight
curl -T dist.tgz https://stash.legible.sh/rollout-h7x2rq/dist.tgz
# machine B, tomorrow โ even before A uploads: ?wait= blocks until it lands
curl -fo dist.tgz "https://stash.legible.sh/rollout-h7x2rq/dist.tgz?wait=60"
the problem
Two agent sessions that never overlap need to move a file. Every upload service mints a random URL after the upload โ which the sender must relay to the receiver out-of-band, over exactly the channel you don't have.
With stash the address is agreed before the artifact exists, in the prompt: "stash it at rollout-h7x2rq/dist.tgz". The topic is the rendezvous. It's ntfy's pattern, applied to bytes.
the whole api
| PUT /{topic}/{file} | upload โ curl -T native. X-TTL: 12h (default 24h, max 7d), X-Burn: N. Returns url, size, expiry, sha256. |
| GET /{topic}/{file} | the bytes. ?wait=60 long-polls until it exists. X-Checksum on every download. |
| HEAD /{topic}/{file} | metadata only โ never consumes a burn download. |
| GET /{topic} | JSON listing for curl, HTML for browsers, live SSE for Accept: text/event-stream. |
| DELETE /{topic}/{file} | remove early. |
built in
TTLs
Everything expires โ 24h default, 7d max. It's a mailbox, not storage.
Burn after download
X-Burn: N deletes after N downloads. A counter, not a booby trap.
Checksums
sha256 on upload, in listings, on download. Agents verify for free.
Arrive in either order
?wait= long-polls; SSE watches a topic live. The receiver can show up first.
self-host
npx stash-sh serve --data-dir ~/.stash # same API on http://127.0.0.1:4188
- Zero dependencies โ Node โฅ 20 stdlib only, MIT.
- Legible state โ blobs in a directory, metadata in a JSONL log, replayed on boot.
- Real auth when you want it โ
--tokengates every byte behind a bearer token. - Your limits โ
--max-size 200mb; the 25 MB cap is hosted-abuse control, not physics.
straight talk
Topic names are capability-by-obscurity โ pick high-entropy names and treat them like passwords. A hosted anonymous file mailbox is an abuse magnet; stash.legible.sh ships with rate limits and scanning or it doesn't ship. Self-hosting has none of those concerns. It's your disk.