npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chainsafe/files-cli

v0.0.12

Published

A cli to download, decrypt and save locally any file uploaded to ChainSafe Files.

Downloads

40

Readme

Files-cli

A cli tool to download and decrypt any file uploaded using ChainSafe Files

ChainSafe Files is a cloud platform that lets you upload files to IPFS and Filecoin. The files you upload are encrypted. This tool demonstrates the fact that given enough knowledge about your files, you can actually retrieve them without needing to log in to the ChainSafe Files platform. All you need is the content identifier of your file (cid) and the decryption key. When connected to Files user interface, the key is printed in the console of your browser.

How to use it

Currently, the only available command is get.

Required arguments:

  • --cid: IPFS content identifier of the file to get. This is available in the "info" menu for each file stored on Files.
  • --output: Full local path where the file will be saved once downloaded and decrypted, for example ./my-image.jpg
  • --key: Decryption key from ChainSafe Files. This is available in the "info" menu from each file stored on Files.

Optionnal arguments:

  • --gateway: IPFS gateway to get the file from. Default: "https://ipfs.io/ipfs/"

Running it using npx

# Make sure it works and prints the help
npx @chainsafe/files-cli --help

# Use the "get" command with the cid and key you want
npx @chainsafe/files-cli get --cid QmfVd...ZAk --output "./my-image.jpg" --key UUc...td8=

Installing it globally with yarn

# Install the binary
yarn global add @chainsafe/files-cli

# Make sure it works and prints the help
files-cli --help

Installing it globally with npm

# Install the binary
npm install -g @chainsafe/files-cli

# Make sure it works and prints the help
files-cli --help

How to build it from the sources

We're using yarn here but it works with npm as well.

git clone https://github.com/ChainSafe/files-cli.git
cd files-cli 
yarn build

# run the command starting with node lib/index.js e.g
node lib/index.js --version
node lib/index.js --help
node lib/index.js get --cid QmfVd...ZAk --output "./my-image.jpg" --key UUc...td8=

Type Documentation

See https://chainsafe.github.io/files-cli

Development

# clone this repository then
cd files-cli 
yarn build:lib:watch