Skip to main content

Synopsis

# Runner commands
cowboy runner get --address <address>
cowboy runner list
cowboy runner register [--private-key <path>] [--stake <cby>] [--nonce <n>]

# Job commands
cowboy job get --job-id <hex>
cowboy job status --job-id <hex>
cowboy job runners --job-id <hex>
cowboy job results --job-id <hex>
cowboy job verified --job-id <hex>
cowboy job submit --job-spec <path> [--private-key <path>] [--nonce <n>]

Runner Subcommands

cowboy runner get

Query information about a registered runner. Behavior:
  1. Query the RPC endpoint for runner details at the given address.
  2. Print runner metadata (address, stake, status, rate card).
Flags:
FlagDefaultDescription
--addressRequiredRunner address (hex)
Example:
$ cowboy runner get --address 0x5e6F...A7B8
Runner: 0x5e6F...A7B8
  Stake: 50000 CBY
  Status: active

cowboy runner list

List all active runners on the chain. Behavior:
  1. Query the RPC endpoint for all registered runners.
  2. Print a summary of each runner.
Example:
$ cowboy runner list
0x5e6F...A7B8  Stake: 50000 CBY  Status: active
0x9c0D...E1F2  Stake: 50000 CBY  Status: active

cowboy runner register

Register a new runner node on the chain. Behavior:
  1. Load the private key using key auto-discovery.
  2. Build a runner registration transaction with the specified stake amount.
  3. Stake amount is specified in CBY (converted internally: stake * 10^9).
  4. Includes a default rate card for job pricing.
  5. Sign and submit the transaction.
Flags:
FlagDefaultDescription
--private-keyAuto-discoveredPath to private key file
--stake50000Stake amount in CBY
--nonce0 (auto-fetch)Transaction nonce
Example:
$ cowboy runner register --stake 50000
Transaction: 0xabc123...
Runner registered: 0x5e6F...A7B8
  Stake: 50000 CBY

Job Subcommands

cowboy job get

Retrieve a job specification by ID. Behavior:
  1. Query the RPC endpoint for the job spec with the given ID.
  2. Print the job details (type, parameters, requester).
Flags:
FlagDefaultDescription
--job-idRequiredJob ID (hex)
Example:
$ cowboy job get --job-id 0xjob123...
Job: 0xjob123...
  Type: llm_inference
  Requester: 0x7a3B...F92E
  Status: assigned

cowboy job status

Query the current status of a job. Flags:
FlagDefaultDescription
--job-idRequiredJob ID (hex)
Example:
$ cowboy job status --job-id 0xjob123...
Status: completed

cowboy job runners

List the runners assigned to a job. Flags:
FlagDefaultDescription
--job-idRequiredJob ID (hex)
Example:
$ cowboy job runners --job-id 0xjob123...
0x5e6F...A7B8  Status: completed
0x9c0D...E1F2  Status: completed
0xaB3C...D4E5  Status: pending

cowboy job results

Retrieve all results submitted by runners for a job. Flags:
FlagDefaultDescription
--job-idRequiredJob ID (hex)
Example:
$ cowboy job results --job-id 0xjob123...
Runner 0x5e6F...A7B8: {"answer": "42"}
Runner 0x9c0D...E1F2: {"answer": "42"}

cowboy job verified

Retrieve the verified (consensus) result for a job. Flags:
FlagDefaultDescription
--job-idRequiredJob ID (hex)
Example:
$ cowboy job verified --job-id 0xjob123...
Verified result: {"answer": "42"}
  Consensus: 2/3 runners agreed

cowboy job submit

Submit a new off-chain compute job. Behavior:
  1. Load the private key using key auto-discovery.
  2. Read the job specification from a CBOR file.
  3. Build and sign a job submission transaction.
  4. Submit to the chain.
Flags:
FlagDefaultDescription
--job-specRequiredPath to CBOR job specification file
--private-keyAuto-discoveredPath to private key file
--nonce0 (auto-fetch)Transaction nonce
Example:
$ cowboy job submit --job-spec job.cbor
Transaction: 0xabc123...
Job ID: 0xjob456...

Edge Cases

  • Runner registration requires sufficient CBY balance for the stake.
  • Job submission requires the job spec to be valid CBOR format.
  • Read-only commands (get, list, status, runners, results, verified) do not require a private key.