paste stdin and clipboard to ipfs
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

ipfs-paste - paste to ipfs

Paste stuff to IPFS.

  1. ipfs add stdin (or clipboard with --paste)
  2. print + copy url to the HTTP gateway
  3. prefetch on the gateway

(note: Today, clipboard only on {OSX, Linux}. Tomorrow, cross platform).


# install from ipfs
ipfs cat QmSKVENxxkS3QGkFJDofWgcPySdCHZ3sbrU5onXAzhWZdz >/usr/local/bin/ipfs-paste
chmod +x /usr/local/bin/ipfs-paste

# install from http
curl -s >/usr/local/bin/ipfs-paste
chmod +x /usr/local/bin/ipfs-paste

Note: requires running IPFS daemon.


> ipfs-paste -h
ipfs-paste [-v] [--paste] [<name>]
publish stdin (or pasteboard) to ipfs


# stdin to ipfs
> echo hello mars | ipfs-paste

# clipboard to ipfs
> echo hello mars | pbcopy
> pbpaste
hello mars
> ipfs-paste --paste

# set a name to file
> head -c 1024 /dev/random | ipfs-paste rand-kb

# verbose
> cat ipfs-paste | ipfs-paste -v
stdin to ipfs... QmbSV3f1T5qbdfxfhSgrudRSv3YiJBxKFGthPAEDZVEhpj
constructing dir... QmYXNKmW7vyvpcTEtAUXGjJ8X9wmh1BgqmZLutFQYLhUev
copying url to clipboard... copied
preloading on the gateways... ok