CommuneX
Why CommuneX
CommuneX serves as an alternative library/SDK to the original Commune
Ai codebase, offering a streamlined and
user-friendly experience. It is designed for simplicity and scalable
development. To learn more visit docs
Installation with pip
Requirements: Python 3.10+
Install the communex
Python package directly with pip
:
pip install communex
Or add it to your Poetry project with:
poetry add communex
Installation with Nix
To install communex
the communex cli with Nix
nix profile install .
Features
Planned
CLI Usage
The CLI commands are structured as follows:
comx [OPTIONS] COMMAND [ARGS]
There are six top-level subcommands:
- balance: transfer, stake, unstake and showing balance operations
- key: creating, saving (AKA regenerating), listing and showing balance
operations
- module: info, list, register, serve, update
- network: block, parameters, proposals / proposing, voting operations
- subnet: info, list, update
- misc: apr, circulating supply
comx subcommand [OPTIONS] COMMAND [ARGS]...
Examples
Retrieving Balance
comx balance show 5FgfC2DY4yreEWEughz46RZYQ8oBhHVqD9fVq6gV89E6z4Ea
Creating a Key
comx key create key_name
Retrieving Key Info
comx key show key_name
comx key show key_name --show-private
Listing Keys
comx key list
List Keys With Balances
comx key balances
Retrieving Module Information
comx module info vali::calc [--balance]
Retrieving Global Parameters
comx network params
Retrieving Subnet Parameters
comx subnet list
Retrieving Circulating Supply
comx misc circulating-supply
Completions
You can enable completions for your shell by running:
comx --install-completion bash
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 enviroment-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 to relocate them outside of the key
directory.