Create Commune
Installation
Using pip
Requirements:
To install the communex Python package using pip, run:
pip install communex
Alternatively, to add communex to your Poetry project, use:
poetry add communex
Using Nix
To install the communex CLI with Nix, execute:
nix profile install .
Features
CommuneX offers a variety of features for token management and module interaction:
Commands for managing keys, tokens, and modules
Key management including creation and listing
Token operations such as transferring and staking
Module management for registration and updates
Client-server interactions for module management
Participation in governance processes
CLI Usage
The communex CLI is structured as follows:
comx [OPTIONS] COMMAND [ARGS]
Top-Level Subcommands
balance : Manage token balances and staking.
key : Handle key creation and management.
module : Manage information and operations related to modules.
network : Interact with network operations like block and proposal management.
subnet : Manage subnet information and updates.
misc : Access miscellaneous information such as APR and circulating supply.
comx subcommand [OPTIONS] COMMAND [ARGS]...
Examples
Retrieving Balance
# Show staked, free and total balance.
comx balance show 5FgfC2DY4yreEWEughz46RZYQ8oBhHVqD9fVq6gV89E6z4Ea
Creating a Key
comx key create key_name
Retrieving Key Info
comx key show key_name
# Add the `--show-private` flag to show sensitive fields like private key.
comx key show key_name --show-private
Listing Keys
# Lists the names and addresses of keys stored on disk.
comx key list
List Keys With Balances
# Lists keys stored on disk with their balance (free, staked and total).
comx key balances
Retrieving Module Information
# Note that the module has to be registered on the network.
comx module info vali::calc [--balance]
Retrieving Global Parameters
comx network params
Retrieving Subnet Parameters
comx subnet list
Retrieving Circulating Supply
# Gets all tokens then were ever emitted minus burned tokens.
comx misc circulating-supply
Completions
You can enable completions for your shell by running:
# On bash
comx --install-completion bash
# On zsh
comx --install-completion zsh
Contributing
Bug reports and pull requests and other forms of contribution are welcomed and
encouraged! :)
To report a bug or request a feature, please open an issue on GitHub .
If you have any questions, feel free to ask on the CommuneX Discord channel or
post on our GitHub discussions page .
To contribute to the codebase, using Poetry you can install the development dependencies with:
poetry install --with dev
it can require some environment-specific binaries to be installed
Commune compatibility
Yes, CommuneX is compatible with the commune library/CLI. However, there are
important considerations to note. CommuneX verifies the integrity of your
keys, which means that mixing certain types of keys is not permissible.
Specifically, if you possess node keys or other similar types that are not
designed to receive tokens, you will need to relocate them outside of the key
directory.