Interact with blockchains and smart contracts using the command line
Project description
Interact with blockchains and smart contracts using the command line.
Build on web3client, the Swiss-army knife of the blockchain.
Install
pip3 install -U web3cli
Examples
-
List all supported networks (blockchains):
web3 network list
-
Get the network that is currently active
web3 network get
Settings
Settings are read from the configuration file ~/.web3cli/config/web3cli.yaml
, or from environment variables. (The symbol ~
refers to the home folder of your user.)
See the example configuration file for a list of available settings.
Environment variables
All settings can be overridden via environment variables.
For example, the settings web3cli.default_network
can be overridden by setting the env variable WEB3CLI_DEFAULT_NETWORK
:
WEB3CLI_DEFAULT_NETWORK=avalanche web3 network get
output> avalanche
Folder-specific settings
To have settings that apply only to the current folder, create a web3cli.yaml
file in that folder.
Settings specified in web3cli.yaml
will override those in your home folder.
Environment variables will still get the precedence.
Contribute ❤️
Pull requests are welcome!
- Install and configure PDM:
curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
- Install dependencies:
pdm install
- To run the CLI against your changes:
pdm web3client
- To run tests:
pdm test
TODO
- Autocomplete
- Allow to add networks
- Command structure
- Chech ETH balance
- Interactive vs non-interactive mode
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.