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

@fairdatasociety/fdp-cli

v0.1.0

Published

CLI tool for FDP-Storage

Downloads

4

Readme

Fair Data Protocol CLI

Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.

Table of Contents

Installation

From npm

To install globally (requires npm root --global to be writable):

npm install --global @fairdatasociety/fdp-cli

Usage

Create FDP account. The account will only be stored on your device.

fdp-cli account create ACCOUNT_NAME

Or import an account using mnemonic phrase.

fdp-cli account import "MNEMONIC_PHRASE"

Export your account in plain text.

fdp-cli account export

Export your account as a text file.

fdp-cli account export --out-file MY_FILENAME

Make your account portable between devices.

This action will upload the encrypted account to Ethereum Swarm and you will be able to use your username and password to access your account. The username will be registered in ENS. To perform this action, your wallet must be topped up with at least 0.01 token of the current network.

This action is optional and you can manage your account information without registering.

fdp-cli account register YOUR_USERNAME

Login to portable account with storing account's seed to local machine.

fdp-cli account login YOUR_USERNAME

Pods management

Create a pod.

fdp-cli pod create YOUR_POD_NAME

Delete a pod.

fdp-cli pod delete YOUR_POD_NAME

Show list of pods.

fdp-cli pod list

Directories management

Create a directory.

fdp-cli directory create "/YOUR_DIRECTORY" --pod YOUR_POD_NAME

Get list of files and directories in the root.

fdp-cli directory read "/" --pod YOUR_POD_NAME

Get list of files in subdirectory.

fdp-cli directory read "/YOUR_SUBDIR" --pod YOUR_POD_NAME

Delete a directory.

fdp-cli directory delete "/YOUR_DIRECTORY" --pod YOUR_POD_NAME

Files management

Upload a file.

fdp-cli file upload "YOUR_SOURCE_PATH" "/DESTINATION_PATH" --pod YOUR_POD_NAME

Download a file.

fdp-cli file download "/YOUR_SOURCE_PATH" "DESTINATION_PATH" --pod YOUR_POD_NAME

Delete a file.

fdp-cli file delete "/YOUR_SOURCE_PATH" --pod YOUR_POD_NAME

Development

After the project has been cloned, the dependencies must be installed. Run the following in the project folder:

npm ci

Then you need to compile the TypeScript code:

npm run compile

To make the local fdp-cli files in the dist/ directory available as a global package:

npm link

If all went well you should be able to run fdp-cli.

If npm link fails, or you don't want to install anything, then you can use node dist/index.js to run fdp-cli from the checked out directory.

System environment

With specific system environment variables you can alter the behaviour of the CLI

  • ENS_NETWORK - name of the configuration that defines blockchain RPC and smart contract addresses. Allowed values: goerli and fdp-play. Default is goerli
  • ENS_DOMAIN - domain name of the ENS. It is not necessary to define for built-in networks, but it can be helpful for custom networks
  • ENS_RPC_URL - RPC url for interacting with ENS
  • BEE_API_URL - API URL of Bee client
  • BEE_BATCH_ID - batch id for Bee client
  • BEE_DEBUG_API_URL - debug API URL of Bee client
  • FDP_CLI_CONFIG_FOLDER - full path to a configuration folder
  • FDP_CLI_CONFIG_FILE - configuration file name, defaults to config.json

Contribute

There are some ways you can make this module better:

  • Consult our open issues and take on one of them
  • Help our tests reach 100% coverage!

License

BSD-3-Clause