Easily share files peer-to-peer with hyperdrive from code or command line.
$ hypershare --file foo.txt,bar.txt $ hypershare --link fb2a7568e70b281fd08baa13a574c256485f9f7
const Hypershare =const hs =// share a filehs// download fileshs
$ npm i -g hypershare
hypershare --file <files>
Takes a comma-separated list of file paths to share.
hypershare --link <hash>
hyperdrive link and downloads it to a
downloads folder in the
current working directory.
hs = new Hypershare([db])
Returns a new instance, where
db is an optional
p = hs.share(files)
Takes a single file path (
String) or an array of file paths and creates a
hyperdrive archive from them and returns a promise that will give the
archive's link, with what others can download the files.
p = hs.download(link, destination)
Downloads the archive specified by
link and writes the files to
Returns a promise that runs after the download.