Torus CLI
The Torus CLI serves as an official SDK for the network, offering a streamlined and user-friendly experience. It is designed for simplicity and scalable development. To learn more visit docs
Contents
Installation with pip
Requirements: Python 3.10+
Install the torus Python package directly with pip:
pip install torusdk
Or add it to your Poetry project with:
poetry add torusdk
Installation with Nix
To install torus the torus cli with Nix
nix profile install .
Features
The torus offers a variety of features for token management and agent interaction:
- Commands for managing keys, tokens, and agents
- Key management including creation and listing
- Token operations such as transferring and staking
- Agent management for registration, curation and updates
- Participation in governance processes
CLI Usage
The CLI commands are structured as follows:
torus [OPTIONS] COMMAND [ARGS]
There are six top-level subcommands:
- balance: Manage token balances and staking.
- key: Handle key creation and management.
- agent: Manage information and operations related to agents.
- network: Interact with network operations like block and proposal management.
- misc: Access miscellaneous information such as APR and circulating supply.
torus subcommand [OPTIONS] COMMAND [ARGS]...
Examples
Retrieving Balance
# Show staked, free and total balance.
torus balance show 5FgfC2DY4yreEWEughz46RZYQ8oBhHVqD9fVq6gV89E6z4Ea
Creating a Key
torus key create <key_name>
Retrieving Key Info
torus key show <key_name>
# Add the `--show-private` flag to show sensitive fields like private key.
torus key show <key_name> --show-private
Listing Keys
# Lists the names and addresses of keys stored on disk.
torus key list
List Keys With Balances
# Lists keys stored on disk with their balance (free, staked and total).
torus key balances
Retrieving Agent Information
# Note that the agent has to be registered on the network.
torus agent info vali::calc [--balance]
Retrieving Global Parameters
torus network params
Retrieving Circulating Supply
# Gets all tokens then were ever emitted minus burned tokens.
torus misc circulating-supply
Acquiring Tokens from a Testnet Faucet
# This command will send 15 TOR to the key-name address.
# This command is only available on testnet.
torus --testnet balance run-faucet <key-name>
Completions
You can enable completions for your shell by running:
# On bash
torus --install-completion bash
# On zsh
torus --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 [CLI 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
Metadata
Release files for torusdk 0.2.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| torusdk-0.2.4.3.tar.gz | 57.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| torusdk-0.2.4.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.9 kB
Release files / torusdk-0.2.4.3.tar.gz
| Download URL | torusdk-0.2.4.3.tar.gz |
|---|---|
| Size | 57.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
37bd34c9cfca70e4aa50af11aa1c7803f83f608a361ddc35603859982c616342
|
|
BLAKE2b-256 checksum How to use checksums |
8abe6fe28a76f67722ba5b3717d8bbc848c130f125936daddf6f7b6028792e23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.8 Linux/6.6.65-1-MANJARO
|
Release files / torusdk-0.2.4.3-py3-none-any.whl
| Download URL | torusdk-0.2.4.3-py3-none-any.whl |
|---|---|
| Size | 66.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9faed8bbdc10c265ae12304581f8b1c40d4cdcc665a1c55ae38f10a970f07ef4
|
|
BLAKE2b-256 checksum How to use checksums |
a7f9b266a7681a522abece1de2495989fe8c96ace5ff64a54c57ffbb9128ca38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.4 CPython/3.12.8 Linux/6.6.65-1-MANJARO
|