Skip to content

Latest commit

 

History

History
164 lines (114 loc) · 3.63 KB

File metadata and controls

164 lines (114 loc) · 3.63 KB
title Setup Torus CLI
description Learn how to setup the torus CLI.

import { Tabs, TabItem, Aside } from "@astrojs/starlight/components";

Installation

<TabItem label="Using PIP">
    <Aside >
        **Requirements:** [Python 3.10+](https://www.python.org/), [PIP](https://pip.pypa.io/en/stable/installation/)
    </Aside>

    To install the **`torus`** python package using `pip`, run:

    ```sh
    pip install torusdk
    ```

    Alternatively, to add **`torus`** to your poetry project, use:

    ```sh
    poetry add torusdk
    ```
</TabItem>
<TabItem label="Using Nix">
    To install the **`torus`** CLI with Nix, execute:

    ```sh
    git clone https://github.com/renlabs-dev/torus-cli
    cd torus-cli
    nix profile install .
    ```
</TabItem>

Features

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 torus CLI is structured as follows:

torus [OPTIONS] COMMAND [ARGS]

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.
  • proposal: Interactions with network proposals
  • curator: Curator actions
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

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 torus cli Discord channel.

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