Skip to content

ethswarm-tools/stash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stash

Sync a folder to Swarm and pull it back anywhere. push uploads a folder and points a feed at it, so the printed handle is a stable address that always resolves to your latest push — a tiny content-addressed drive.

Built entirely on the scout library (swarm-scout).

Published on crates.io as swarm-stash; the binary is stash.

Install

cargo install swarm-stash      # provides the `stash` command

Usage

stash keygen                                          # make a drive identity (save the key)
stash push <folder> --key <hex> -t <topic> --stamp <batch>   # -> a stash handle
stash ls   <handle>                                  # list files
stash pull <handle> <out-dir>                         # restore the folder
  • Push uploads every file, records a path → reference index (index.json), and points a feed (--key owner + --topic) at it. Re-pushing under the same key+topic updates what the same handle serves.
  • Pull / ls read from --gateway / $BEE_GATEWAY — no node needed.
  • Uploads go to --node / $BEE_NODE (defaults to --gateway) and need --stamp / $BEE_STAMP (a usable postage batch). $STASH_KEY can hold the feed key.

How it works

A stash is just three scout primitives composed: each file is uploaded (/bytes), a JSON index maps paths to those references, and a feed makes the index mutable behind one stable handle. Nothing stash-specific lives on Swarm — you could read the index and files with scout directly.

Status

push / pull / ls / keygen, verified end-to-end against a live Bee node (2.7.2), including the mutable-handle round-trip.

License

MIT


📖 Part of the scout toolkit (scout · stash · perch · keep).

About

Sync a folder to Swarm and pull it back anywhere — a feed-backed drive, built on scout

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages