Warning: This project is in alpha 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.
Command line interface tool for manage Bee node and utilize its functionalities
The goal of this project is to handle most of the Swarm operations through CLI at some point in the future. For currently supported operations, see Commands section.
swarm-cli
can perform commands:
- upload # upload files (even directories) to Swarm network by passing the file's path
- identity # manage keys (which can be compatible with Ethereum V3 keystore standard) that you can use mostly for signing chunks
for more info execute swarm-cli --help
after installation.
The configuration file is placed in a hidden folder named swarm-cli. In case of Unix-based systems this config path will be: $HOME/.swarm-cli On Windows systems: $HOME\AppData\swarm-cli
The configuration file is saved with 600 file permission.
On first run, this configuration will be generated with default values, that you are able to change on your demand under the before mentioned path.
It is possible to set value of particular parameters in different ways.
The assignment priority of how option gets its value in question is the following:
- passed CLI option value (with e.g.
--option-example-1
) - env variable for that option in form of either
OPTION_EXAMPLE_1
orSWARM_CLI_OPTION_EXAMPLE_1
(if it is available) - CLI configuration value of that option (if it is available)
- option's default fallback value (or it is required to define by #1)
With specific system environment variables you can alter the behaviour of the CLI
BEE_API_URL
- API URL of Bee clientSWARM_CLI_CONFIG_FOLDER
- full path to a configuration folder
$ npm install -g @ethersphere/swarm-cli
Install project dependencies with
$ npm i
In order to compile NodeJS code run
$ npm run compile
and you can try out the swarm-cli
CLI after run command
$ npm link
in your project folder.
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!