Skip to main content

Torus network official CLI

Project description

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

License: MIT Discord Chat PyPI version

Installation with pip

Requirements: Python 3.10+

Install the torus-cli Python package directly with pip:

pip install torus

Or add it to your Poetry project with:

poetry add torus

Installation with Nix

To install torus the torus cli with Nix

nix profile install .

Features

The torus-cli 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-cli [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-cli subcommand [OPTIONS] COMMAND [ARGS]...

Examples

Retrieving Balance

# Show staked, free and total balance.
torus-cli balance show 5FgfC2DY4yreEWEughz46RZYQ8oBhHVqD9fVq6gV89E6z4Ea

Creating a Key

torus-cli key create key_name

Retrieving Key Info

torus-cli key show key_name

# Add the `--show-private` flag to show sensitive fields like private key.
torus-cli key show key_name --show-private

Listing Keys

# Lists the names and addresses of keys stored on disk.
torus-cli key list

List Keys With Balances

# Lists keys stored on disk with their balance (free, staked and total).
torus-cli key balances

Retrieving Agent Information

# Note that the agent has to be registered on the network.
torus-cli agent info vali::calc [--balance]

Retrieving Global Parameters

torus-cli network params

Retrieving Circulating Supply

# Gets all tokens then were ever emitted minus burned tokens.
torus-cli misc circulating-supply

Completions

You can enable completions for your shell by running:

# On bash
torus-cli --install-completion bash
# On zsh
torus-cli --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


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torusdk-0.2.3.tar.gz (54.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torusdk-0.2.3-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

File details

Details for the file torusdk-0.2.3.tar.gz.

File metadata

  • Download URL: torusdk-0.2.3.tar.gz
  • Upload date:
  • Size: 54.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.47-1-MANJARO

File hashes

Hashes for torusdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9b9484b63d9b9eb48df86cdaeb4fb021edec383a94ef0d86edeb9e4d0b1df9bf
MD5 11cb007cb922667e53e0799c02b5fa9f
BLAKE2b-256 f65907e06f00e10582f3385c58c321611e03cfcac43dd9058e11255fb8c264bb

See more details on using hashes here.

File details

Details for the file torusdk-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: torusdk-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 61.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.6.47-1-MANJARO

File hashes

Hashes for torusdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b6b92f8800f91c6f76f8187fcdcee04eb5d44954e3f3d3aa4ae952ccaa0757
MD5 cb1c9d1ded8da3fe1740e3d62884bc63
BLAKE2b-256 0bcb5afbee100180aac08eeab1c8d2ef68295ec78e7fbe9bef3700116f91fcc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page