Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Reference

GasHammer provides two binaries and a set of cargo xtask commands.

Binaries

gashammer-hive

The control plane process. Runs the REST API, gRPC server, and orchestration engine.

gashammer-hive [OPTIONS]

Options:
  --config <PATH>       Path to hive.toml configuration file [default: hive.toml]
  --bind <ADDRESS>      Override bind address [default: 0.0.0.0]
  --rest-port <PORT>    Override REST API port [default: 8080]
  --grpc-port <PORT>    Override gRPC port [default: 9090]
  --data-dir <PATH>     Override data directory [default: /var/lib/gashammer]
  --log-level <LEVEL>   Log level: trace, debug, info, warn, error [default: info]
  --log-format <FMT>    Log format: json, pretty [default: json]
  --version             Print version and build info
  --help                Print help

gashammer-edge

The edge worker process. Connects to a hive and a Nitro deployment.

gashammer-edge [OPTIONS]

Options:
  --config <PATH>             Path to edge.toml configuration file [default: edge.toml]
  --name <NAME>               Edge name (overrides config)
  --hive <ADDRESS>            Hive gRPC address [default: localhost:9090]
  --sequencer-rpc <URL>       Nitro sequencer RPC endpoint
  --gateway-rpc <URL>         Nitro gateway RPC endpoint
  --feed-relay <URL>          Sequencer feed relay WebSocket URL
  --accounts <COUNT>          Number of test accounts [default: 100]
  --log-level <LEVEL>         Log level [default: info]
  --log-format <FMT>          Log format [default: json]
  --version                   Print version and build info
  --help                      Print help

xtask Commands

Run these with cargo xtask <command>:

docgen

Generate API documentation from source code.

cargo xtask docgen [OPTIONS]

Options:
  --watch                 Watch source files and regenerate on change
  --coverage              Print documentation coverage report
  --min-coverage <N>      Exit 1 if coverage is below N% (requires --coverage)
  --json                  Output coverage as JSON (requires --coverage)
  --clean                 Remove all generated API pages
  --dry-run               Show what would be generated without writing
  --crate <NAME>          Generate docs for a single crate only

REST API

The hive exposes a REST API for scenario management and run control. All responses include the X-Powered-By: GasHammer/<version> header.

Scenarios

MethodPathDescription
POST/scenariosUpload a scenario YAML
GET/scenariosList all scenarios
GET/scenarios/{name}Get a specific scenario

Runs

MethodPathDescription
POST/runsStart a new run
GET/runsList all runs
GET/runs/{id}Get run status
GET/runs/{id}/reportDownload the run report
DELETE/runs/{id}Cancel a running test

Edges

MethodPathDescription
GET/edgesList connected edges
GET/edges/{id}Get edge details

System

MethodPathDescription
GET/healthHealth check
GET/versionVersion and build info
GET/metricsPrometheus metrics