Skip to main content

CLI for TrajectoryRL, Bittensor subnet 11 — agent-friendly access to live validator, miner, and evaluation data.

Project description

trajrl

CLI for the TrajectoryRL subnet (Bittensor SN11). Query live validator, miner, and evaluation data from the terminal.

Designed for AI agents (Claude Code, Cursor) and humans alike — outputs JSON when piped, Rich tables when interactive.

Install

pip install trajrl

Commands

trajrl status                          # Network health overview
trajrl validators                      # List all validators
trajrl scores <validator_hotkey>       # Per-miner scores from a validator
trajrl scores --uid <uid>              # Query by validator UID instead
trajrl miner <hotkey>                  # Miner detail + diagnostics
trajrl miner --uid <uid>               # Query by miner UID instead
trajrl pack <hotkey> <pack_hash>       # Pack evaluation detail
trajrl submissions [--failed]          # Recent pack submissions
trajrl eval-history <validator>        # List eval cycle IDs for a validator
trajrl eval-history <v> --from <date>  # Filter by date range
trajrl cycle-log <validator>           # Download and display a cycle log
trajrl cycle-log <v> --format summary  # Show parsed summary tables
trajrl logs [--type cycle|miner]       # Eval log archives
trajrl --version                       # Show CLI version

Global Options

Every command accepts:

Option Description
--json / -j Force JSON output (auto-enabled when stdout is piped)
--base-url URL Override API base (default: https://trajrl.com, env: TRAJRL_BASE_URL)
--version / -v Show CLI version and exit

New in v0.2.0

  • UID support: Query validators and miners by UID instead of hotkey

    trajrl miner --uid 65      # Instead of full hotkey
    trajrl scores --uid 221    # Query validator by UID
    
  • Date filtering: Filter eval history by date range

    trajrl eval-history 5Cd6h... --from 2026-03-25 --to 2026-03-26
    
  • Cycle log summary: Parse cycle logs into structured tables

    trajrl cycle-log 5Cd6h... --format summary
    

    Shows: eval metrics, winner info, top qualified miners in tables instead of raw text

  • Version command: Check your CLI version

    trajrl --version
    

Usage Examples

Quick network check

trajrl status
╭──────────────────── Network Status ────────────────────╮
│   Validators: 7 total, 7 active (seen <1h)             │
│   LLM Models: zhipu/glm-5 (3), chutes/GLM-5-TEE (3)    │
│   Latest Eval: 7h ago                                  │
│   Submissions: 65 passed, 35 failed (last batch)       │
╰────────────────────────────────────────────────────────╯

List validators

trajrl validators
 Hotkey         UID  Version  LLM Model              Last Eval   Last Seen
 5Cd6h…sn11     29  0.2.7    chutes/zai-org/GLM-5…   7h ago      2m ago
 5EcgNd…797f   221  0.2.7    zhipu/glm-5             10h ago     6m ago
 ...

Inspect a miner

By hotkey:

trajrl miner 5HMgR6LnNqUAtaKRwa6bLF4Vy4KBf7TaxCLehyff9mWPhSHt

Or by UID (v0.2.0+):

trajrl miner --uid 65

Shows rank, qualification status, cost, scenario breakdown, per-validator reports, recent submissions, and ban records.

View failed submissions

trajrl submissions --failed

Investigate a validator's eval cycle

First, list recent eval cycles for a validator:

trajrl eval-history 5Cd6h...
            Eval IDs (5) — 5Cd6h…sn11
 Eval ID            Validator    Block  Logs  Created
 20260325_060012    5Cd6h…sn11  421890    12  3h ago
 20260324_060008    5Cd6h…sn11  421530    11  1d ago
 20260323_060015    5Cd6h…sn11  421170    13  2d ago
 ...

Then fetch the full cycle log for a specific eval:

trajrl cycle-log 5Cd6h... --eval-id 20260325_060012

Or just grab the latest one:

trajrl cycle-log 5Cd6h...

The cycle log contains the complete eval cycle output: metagraph sync, miner enumeration, per-miner eval timing, WEIGHT RESULTS, and set_weights status.

Note: Eval IDs are defined by each validator independently (typically a timestamp like 20260325_060012). They are not globally unique — the same eval ID from different validators refers to different evaluation cycles. Always pair an eval ID with a specific validator hotkey.

Filter eval logs

trajrl logs --type cycle --limit 5
trajrl logs --validator 5Cd6h... --type miner
trajrl logs --eval-id 20260324_000340

JSON output for agents

Pipe to any tool — JSON is automatic:

trajrl validators | jq '.validators[].hotkey'
trajrl scores 5Cd6h... --json | python3 -c "
  import sys, json
  d = json.load(sys.stdin)
  for e in d['entries'][:5]:
      print(f\"{e['minerHotkey'][:12]}  qual={e['qualified']}  cost={e['costUsd']}\")
"

Force JSON in an interactive terminal:

trajrl miner 5HMgR6... --json

API Reference

All data comes from the TrajectoryRL Public API — read-only, no authentication required.

Endpoint CLI Command
GET /api/validators trajrl validators
GET /api/scores/by-validator?validator= trajrl scores <hotkey>
GET /api/miners/:hotkey trajrl miner <hotkey>
GET /api/miners/:hotkey/packs/:hash trajrl pack <hotkey> <hash>
GET /api/submissions trajrl submissions
GET /api/eval-logs trajrl logs
GET /api/eval-logs?log_type=cycle trajrl eval-history <hotkey>
GET /api/eval-logs + GCS download trajrl cycle-log <hotkey>

Development

git clone <repo> && cd trajrl
pip install -e .
trajrl --help

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

trajrl-0.2.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

trajrl-0.2.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file trajrl-0.2.0.tar.gz.

File metadata

  • Download URL: trajrl-0.2.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for trajrl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e3b47997aa88ecb98236d4da8dabd036c59b0241fe34a6b7eabf19c7bf27df7
MD5 64300a12877cb62e50b206d78b1f138e
BLAKE2b-256 269f063dd82c7e4e9a54045f8ae46602a60cf882753a9204c76d452342d0c8bf

See more details on using hashes here.

File details

Details for the file trajrl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: trajrl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for trajrl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 175452df2d1edd541b7e735032036ddc9392eadc6e49fa2114fb38f21aaab470
MD5 de9134491500e556b3c61194ded2f68f
BLAKE2b-256 a853b715988394e5f3726495214b0704649b2465f61a68491f73123a357d4698

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