CLI Reference¶
Genesis Mesh installs a single primary command:
genesis-mesh --help
The command is intentionally persona-oriented instead of file-oriented. Operator commands manage the Network Authority and admin actions, node commands join and inspect the mesh, and developer commands run local verification workflows.
Compatibility entry points such as python -m genesis_mesh.cli and
python -m genesis_mesh.node still exist for direct module execution, but
documentation and day-to-day workflows should prefer genesis-mesh.
Operator Commands¶
genesis-mesh init¶
Creates local demo keys, an unsigned genesis file, a signed genesis file, and a CLI config file.
genesis-mesh init
Useful options:
Option |
Description |
|---|---|
|
Config path to write. Defaults to |
|
Directory for generated local artifacts. Defaults to |
|
Network name embedded in genesis. |
|
Network version embedded in genesis. |
|
Network Authority endpoint written to config. |
|
Optional peer bootstrap anchor in |
|
Replace an existing config and generated local artifacts. |
init is suitable for local development and demos. Production key generation
should happen through an explicit key-management ceremony.
genesis-mesh na start¶
Starts a local Network Authority from config.
genesis-mesh na start
Useful options:
Option |
Description |
|---|---|
|
Config path to read. |
|
Override configured bind host. |
|
Override configured bind port. |
|
Override SQLite database path. |
This command uses Flask’s local server and is intended for development. Use the container entry point and Gunicorn for production-style deployments.
If genesis-mesh dev down was run earlier, recreate local config first with
genesis-mesh init; dev down removes genesis-mesh.toml and .genesis-mesh/.
genesis-mesh admin invite¶
Creates a single-use invite token through the operator-authenticated admin API.
genesis-mesh admin invite --role anchor
The command prints only the token ID, so shells can capture it:
INVITE_TOKEN=$(genesis-mesh admin invite --role anchor)
Useful options:
Option |
Description |
|---|---|
|
Config path to read. |
|
Network Authority endpoint override. |
|
Role to assign. Can be repeated. |
|
Maximum certificate validity allowed by the invite. |
|
Invite token lifetime. |
genesis-mesh admin revoke¶
Revokes a certificate through the operator-authenticated admin API.
genesis-mesh admin revoke <cert-id> --reason key_compromise
Useful reasons are key_compromise, cessation_of_operation, superseded,
and unspecified.
Node Operator Commands¶
genesis-mesh join¶
Enrolls this machine as a node and persists local node config.
genesis-mesh join --na http://127.0.0.1:8443 --token "$INVITE_TOKEN"
Useful options:
Option |
Description |
|---|---|
|
Config path to read and update. |
|
Network Authority endpoint. |
|
Single-use invite token. Required only when no valid local certificate exists. |
|
Requested local role. The NA still assigns roles from the invite. |
|
Requested certificate validity. |
|
Start the peer runtime after enrollment. |
|
Peer runtime bind host. |
|
Peer runtime bind port; |
join fetches the genesis block if needed, generates or reuses the local node
key, requests a join certificate, fetches policy, saves the certificate and
policy, and updates the CLI config. If a valid local certificate already exists,
join reuses it instead of spending another invite token. This lets
genesis-mesh join --na <url> --persistent start the runtime after a previous
enrollment.
genesis-mesh status¶
Shows Network Authority health and local node certificate status from config.
genesis-mesh status
status is shared by operators and node operators. It detects available config
and prints the relevant Network Authority and node view.
Developer Commands¶
genesis-mesh dev up¶
Runs the local in-process smoke workflow:
genesis-mesh dev up
The smoke workflow starts a local Network Authority in process, creates operator-authenticated invite tokens, enrolls nodes, fetches policy, and validates node status.
genesis-mesh dev down¶
Removes local artifacts created by genesis-mesh init in the current working
directory:
genesis-mesh dev down
Stop genesis-mesh na start and persistent node runtimes first. On Windows,
SQLite database files remain locked while the Network Authority process is
running, and dev down will report that cleanly instead of removing a live DB.
Low-Level Compatibility Commands¶
The low-level key and genesis subcommands remain available:
genesis-mesh keygen root --output keys/root --key-id rs-2025-q1
genesis-mesh keygen network-authority --output keys/na --key-id na-2025-q1
genesis-mesh keygen node --output keys/node --key-id node-1
genesis-mesh genesis create \
--network-name "USG" \
--network-version "v0.1" \
--root-key keys/root.pub \
--na-key keys/na.pub \
--na-valid-days 90 \
--output genesis.json
genesis-mesh genesis sign \
--genesis genesis.json \
--root-private-key keys/root.key \
--key-id rs-2025-q1 \
--output genesis.signed.json
genesis-mesh genesis verify --genesis genesis.signed.json
genesis-mesh info --genesis genesis.signed.json