Git Product home page Git Product logo

files-cli's Introduction

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.

Requirement

How to use Files-cli

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:

Running Files 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 Files-cli globally with yarn

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

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

Installing Files-cli 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 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

files-cli's People

Contributors

tbaut avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.