nerve CLI

The nerve CLI provides two commands for schema management and live stream debugging.

Installation

Bash
cargo install nerve-cli

nerve register

Register a FlatBuffers schema file: validate, compute the SchemaId, and generate Rust bindings.

Bash
# Register a schema and generate Rust code
nerve register schemas/fleet_gps_v2.fbs

# Specify output directory
nerve register schemas/fleet_gps_v2.fbs -o src/generated

What it does:

  • 1. Validates — checks the file exists and contains table or struct keywords
  • 2. Computes SchemaId — first 4 bytes of SHA-256 of the file content, printed as hex
  • 3. Runs flatc — generates Rust bindings via flatc --rust -o <output> <schema> (requires flatc on $PATH)
  • 4. Creates output dir — if it doesn't exist (default: src/generated)

nerve tap

Live stream debugging — connect to a Tetrapus server and print decoded messages for a topic.

Bash
# Tap alerts on default endpoint
nerve tap -t alerts.critical

# Tap with custom endpoint
nerve tap -t telemetry.fleet -e 10.0.0.5:4433

Useful for verifying that SDK sources are publishing correctly, checking message format, and monitoring throughput on specific topics.

Error Reference

ErrorCauseFix
SchemaNotFoundFile path doesn't existCheck path and working directory
InvalidSchemaNo table or struct keywordVerify it's a valid FlatBuffers .fbs file
FlatcNotFoundflatc not on $PATHInstall FlatBuffers compiler: apt install flatbuffers-compiler
FlatcFailedflatc returned an errorCheck schema syntax with flatc --no-gen-all schema.fbs

Questions?

Reach out for help with integration, deployment, or custom domain codecs.