bittensor-cli


Namebittensor-cli JSON
Version 9.8.1 PyPI version JSON
download
home_pageNone
SummaryBittensor CLI
upload_time2025-07-09 01:09:25
maintainerNone
docs_urlNone
authorbittensor.com
requires_python<3.14,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# Bittensor CLI <!-- omit in toc -->
[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 
[![PyPI version](https://badge.fury.io/py/bittensor_cli.svg)](https://badge.fury.io/py/bittensor_cli)

---

## Internet-scale Neural Networks <!-- omit in toc -->

[SDK](https://github.com/opentensor/bittensor/tree/master) • [Wallet](https://github.com/opentensor/btwallet) • [Research](https://bittensor.com/whitepaper)

</div>

- [Documentation](#documentation)
- [Install on macOS and Linux](#install-on-macos-and-linux)
  - [Install from source](#install-from-source)
- [Install on Windows](#install-on-windows)
- [Verify the installation](#verify-the-installation)
- [Configuration](#configuration)
  - [Example config file](#example-config-file)
- [License](#license)

---

The Bittensor CLI, `btcli`, is a powerful command line tool for the Bittensor platform. You can use it on any macOS, Linux or WSL terminal to manage all common operations like creating a wallet, registering a subnet or a neuron, delegating your TAO, viewing Senate proposals and voting for them, and much more. Help information can be invoked for every command and option with `--help` option.

![btcli screenshot](./assets/btcli-screenshot.png)

---

## Documentation

Installation steps are described below. For a full documentation on how to use `btcli`, see the [Bittensor CLI section](https://docs.bittensor.com/btcli) on the developer documentation site.

---

## Install on macOS and Linux

You can install `btcli` on your local machine directly from source, PyPI, or Homebrew. **Make sure you verify your installation after you install**:


### Install from [PyPI](https://pypi.org/project/bittensor/)

Run 
```
pip install -U bittensor-cli
```

Alternatively, if you prefer to use [uv](https://pypi.org/project/uv/):
```
uv pip install bittensor-cli
```

### Install from [Homebrew](https://formulae.brew.sh/formula/btcli#default)

```shell
brew install btcli
```

### Install from source

1. Create and activate a virtual environment.

```bash
python3 -m venv btcli_venv
source btcli_venv/bin/activate
```

2. Clone the Bittensor CLI repo.

```bash
git clone https://github.com/opentensor/btcli.git
```

3. `cd` into `btcli` directory.

```bash
cd btcli
```

4.  Install


```bash
pip3 install .
```

### Also install bittensor (SDK)

If you prefer to install the btcli alongside the bittensor SDK, you can do this in a single command with

```
pip install -U bittensor[cli]
```

---

## Install on Windows

To install and run Bittensor SDK on Windows you must install [**WSL 2** (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/about) on Windows and select [Ubuntu Linux distribution](https://github.com/ubuntu/WSL/blob/main/docs/guides/install-ubuntu-wsl2.md). 

After you installed the above, follow the same installation steps described above in [Install on macOS and Linux](#install-on-macos-and-linux).

**ALERT**: **Limited support on Windows for Bittensor operations**
While wallet transactions like delegating, transfer, registering, staking can be performed on a Windows machine using WSL 2, the subnet mining and subnet validating operations are not recommended and are not supported on Windows machines.

---

## Verify the installation

```bash
btcli --version
```

The above command will show you the version of the `btcli` you just installed.

---

## Configuration

You can set the commonly used values, such as your hotkey and coldkey names, the default chain URL or the network name you use, and more, in `config.yml`. You can override these values by explicitly passing them in the command line for any `btcli` command.

### Example config file

The default location of the config file is: `~/.bittensor/config.yml`. An example of a `config.yml` is shown below:

```yaml
chain: ws://127.0.0.1:9945
network: local
no_cache: False
wallet_hotkey: hotkey-user1
wallet_name: coldkey-user1
wallet_path: ~/.bittensor/wallets
metagraph_cols:
  ACTIVE: true
  AXON: true
  COLDKEY: true
  CONSENSUS: true
  DIVIDENDS: true
  EMISSION: true
  HOTKEY: true
  INCENTIVE: true
  RANK: true
  STAKE: true
  TRUST: true
  UID: true
  UPDATED: true
  VAL: true
  VTRUST: true
```

**For more help:**

```bash
btcli config --help
```

---

## License
The MIT License (MIT)
Copyright © 2024 The Opentensor Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bittensor-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.14,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "bittensor.com",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fb/34/94e03af3242ac7e8322d8460c552d1efc07e743a9a3cb01fd7f7266ea248/bittensor_cli-9.8.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n# Bittensor CLI <!-- omit in toc -->\n[![Discord Chat](https://img.shields.io/discord/308323056592486420.svg)](https://discord.gg/bittensor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n[![PyPI version](https://badge.fury.io/py/bittensor_cli.svg)](https://badge.fury.io/py/bittensor_cli)\n\n---\n\n## Internet-scale Neural Networks <!-- omit in toc -->\n\n[SDK](https://github.com/opentensor/bittensor/tree/master) \u2022 [Wallet](https://github.com/opentensor/btwallet) \u2022 [Research](https://bittensor.com/whitepaper)\n\n</div>\n\n- [Documentation](#documentation)\n- [Install on macOS and Linux](#install-on-macos-and-linux)\n  - [Install from source](#install-from-source)\n- [Install on Windows](#install-on-windows)\n- [Verify the installation](#verify-the-installation)\n- [Configuration](#configuration)\n  - [Example config file](#example-config-file)\n- [License](#license)\n\n---\n\nThe Bittensor CLI, `btcli`, is a powerful command line tool for the Bittensor platform. You can use it on any macOS, Linux or WSL terminal to manage all common operations like creating a wallet, registering a subnet or a neuron, delegating your TAO, viewing Senate proposals and voting for them, and much more. Help information can be invoked for every command and option with `--help` option.\n\n![btcli screenshot](./assets/btcli-screenshot.png)\n\n---\n\n## Documentation\n\nInstallation steps are described below. For a full documentation on how to use `btcli`, see the [Bittensor CLI section](https://docs.bittensor.com/btcli) on the developer documentation site.\n\n---\n\n## Install on macOS and Linux\n\nYou can install `btcli` on your local machine directly from source, PyPI, or Homebrew. **Make sure you verify your installation after you install**:\n\n\n### Install from [PyPI](https://pypi.org/project/bittensor/)\n\nRun \n```\npip install -U bittensor-cli\n```\n\nAlternatively, if you prefer to use [uv](https://pypi.org/project/uv/):\n```\nuv pip install bittensor-cli\n```\n\n### Install from [Homebrew](https://formulae.brew.sh/formula/btcli#default)\n\n```shell\nbrew install btcli\n```\n\n### Install from source\n\n1. Create and activate a virtual environment.\n\n```bash\npython3 -m venv btcli_venv\nsource btcli_venv/bin/activate\n```\n\n2. Clone the Bittensor CLI repo.\n\n```bash\ngit clone https://github.com/opentensor/btcli.git\n```\n\n3. `cd` into `btcli` directory.\n\n```bash\ncd btcli\n```\n\n4.  Install\n\n\n```bash\npip3 install .\n```\n\n### Also install bittensor (SDK)\n\nIf you prefer to install the btcli alongside the bittensor SDK, you can do this in a single command with\n\n```\npip install -U bittensor[cli]\n```\n\n---\n\n## Install on Windows\n\nTo install and run Bittensor SDK on Windows you must install [**WSL 2** (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/about) on Windows and select [Ubuntu Linux distribution](https://github.com/ubuntu/WSL/blob/main/docs/guides/install-ubuntu-wsl2.md). \n\nAfter you installed the above, follow the same installation steps described above in [Install on macOS and Linux](#install-on-macos-and-linux).\n\n**ALERT**: **Limited support on Windows for Bittensor operations**\nWhile wallet transactions like delegating, transfer, registering, staking can be performed on a Windows machine using WSL 2, the subnet mining and subnet validating operations are not recommended and are not supported on Windows machines.\n\n---\n\n## Verify the installation\n\n```bash\nbtcli --version\n```\n\nThe above command will show you the version of the `btcli` you just installed.\n\n---\n\n## Configuration\n\nYou can set the commonly used values, such as your hotkey and coldkey names, the default chain URL or the network name you use, and more, in `config.yml`. You can override these values by explicitly passing them in the command line for any `btcli` command.\n\n### Example config file\n\nThe default location of the config file is: `~/.bittensor/config.yml`. An example of a `config.yml` is shown below:\n\n```yaml\nchain: ws://127.0.0.1:9945\nnetwork: local\nno_cache: False\nwallet_hotkey: hotkey-user1\nwallet_name: coldkey-user1\nwallet_path: ~/.bittensor/wallets\nmetagraph_cols:\n  ACTIVE: true\n  AXON: true\n  COLDKEY: true\n  CONSENSUS: true\n  DIVIDENDS: true\n  EMISSION: true\n  HOTKEY: true\n  INCENTIVE: true\n  RANK: true\n  STAKE: true\n  TRUST: true\n  UID: true\n  UPDATED: true\n  VAL: true\n  VTRUST: true\n```\n\n**For more help:**\n\n```bash\nbtcli config --help\n```\n\n---\n\n## License\nThe MIT License (MIT)\nCopyright \u00a9 2024 The Opentensor Foundation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Bittensor CLI",
    "version": "9.8.1",
    "project_urls": {
        "Repository": "https://github.com/opentensor/btcli",
        "homepage": "https://github.com/opentensor/btcli"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d9feb1de9f3acf4bbb74556f0cbdb0876a404adf1ece3f6129e698afa502f4a0",
                "md5": "ea6a9afd4a694bc2dbddb8f22215e39f",
                "sha256": "57603e2f505beb042acf39c1215e9e49cf678f8f33785ca8268d67868320768f"
            },
            "downloads": -1,
            "filename": "bittensor_cli-9.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea6a9afd4a694bc2dbddb8f22215e39f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.14,>=3.9",
            "size": 240757,
            "upload_time": "2025-07-09T01:09:23",
            "upload_time_iso_8601": "2025-07-09T01:09:23.826542Z",
            "url": "https://files.pythonhosted.org/packages/d9/fe/b1de9f3acf4bbb74556f0cbdb0876a404adf1ece3f6129e698afa502f4a0/bittensor_cli-9.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fb3494e03af3242ac7e8322d8460c552d1efc07e743a9a3cb01fd7f7266ea248",
                "md5": "babb991be0a1b3ffa656e4e7504a884a",
                "sha256": "75c46e8794c01f52993704c06467ee8359b86bfe383caa7ca47957cc85c777e6"
            },
            "downloads": -1,
            "filename": "bittensor_cli-9.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "babb991be0a1b3ffa656e4e7504a884a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.14,>=3.9",
            "size": 222354,
            "upload_time": "2025-07-09T01:09:25",
            "upload_time_iso_8601": "2025-07-09T01:09:25.940854Z",
            "url": "https://files.pythonhosted.org/packages/fb/34/94e03af3242ac7e8322d8460c552d1efc07e743a9a3cb01fd7f7266ea248/bittensor_cli-9.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 01:09:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "opentensor",
    "github_project": "btcli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bittensor-cli"
}
        
Elapsed time: 0.99349s