diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 750324c..baa82af 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -95,6 +95,82 @@ meshguard up [options] --- +## `meshguard connect` + +Direct peer connection via token exchange (no seed node needed). Performs a coordinated UDP hole punch. + +```bash +meshguard connect --generate [--in ] +meshguard connect --join +``` + +| Flag | Description | +| ---- | ----------- | +| `--generate` | Run as initiator. Generates a token to share with the peer. | +| `--in ` | Wait time before coordinated punch (default: 1). | +| `--join` | Run as joiner. Accepts an `mg://` token. | + +--- + +## `meshguard org-keygen` + +Generate a new Ed25519 organization keypair. + +```bash +meshguard org-keygen +``` + +**Output files** (in `$MESHGUARD_CONFIG_DIR`, default `~/.config/meshguard/org/`): + +- `org.key` — secret key +- `org.pub` — public key + +Generates an org keypair and derives the deterministic mesh domain (e.g., `a1b2c3.mesh`). + +--- + +## `meshguard org-sign` + +Sign a node's public key with the org private key, producing a `NodeCertificate`. + +```bash +meshguard org-sign --name