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
tableorstructkeywords - 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>(requiresflatcon $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
| Error | Cause | Fix |
|---|---|---|
| SchemaNotFound | File path doesn't exist | Check path and working directory |
| InvalidSchema | No table or struct keyword | Verify it's a valid FlatBuffers .fbs file |
| FlatcNotFound | flatc not on $PATH | Install FlatBuffers compiler: apt install flatbuffers-compiler |
| FlatcFailed | flatc returned an error | Check schema syntax with flatc --no-gen-all schema.fbs |
Questions?
Reach out for help with integration, deployment, or custom domain codecs.