CLI
How to Install
Run the command just install-cli:
just install-cli
This will install the CLI binary to your Go bin directory (typically ~/go/bin/). Make sure this directory is in your PATH.
How to Use
The CLI tool is accessed via the targon-cli command. On first run, it will prompt you to create a configuration file with your hotkey phrase.
targon-cli [command] [flags]
Quick Start
-
Install the CLI:
just install-cli -
First-time setup (creates config file):
targon-cli
# This will prompt for hotkey phrase and create ~/.config/.targon.json
Commands
targon-cli attest
Command for validators instead of miners. Manually attest a miner or IP address for GPU verification.
Usage:
targon-cli attest [flags]
Flags:
--ip string- Specific IP address for off-chain testing--uid int- Specific UID to grab GPU info for
Examples:
# Attest a specific UID
targon-cli attest --uid 123
# Attest a specific IP address
targon-cli attest --ip http://192.168.1.100:8080
targon-cli config
Update configuration settings.
Usage:
targon-cli config [flags]
Flags:
--miner.hotkey-phrase string- Miner Hotkey phrase to update to--validator.hotkey-phrase string- Validator Hotkey phrase to update to
Examples:
# Update hotkey phrase
targon-cli config --hotkey-phrase "your-hotkey-phrase-here"
targon-cli get
Fetch data from MongoDB or the blockchain and display it in various formats.
Usage:
targon-cli get [command]
Subcommands:
targon-cli get errors
Get attestation errors for a specific UID.
Usage:
targon-cli get errors [flags]
Flags:
--uid int- Specific UID to grab GPU info for
Examples:
targon-cli get errors --uid 123
Configuration
The CLI tool uses a JSON configuration file located at ~/.config/.targon.json. This file stores your hotkey phrase and other settings.
Configuration file structure:
{
"HOTKEY_PHRASE": "your-hotkey-phrase-here"
}