From 917662b598f2edcce910ee257878cb0344a125a8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 11:13:01 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20Scribe:=20Document=20meshguard?= =?UTF-8?q?=20connect=20CLI=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `meshguard connect` command enables direct peer connection via token exchange (bypassing seed nodes) and performs a coordinated UDP hole punch. This command is implemented in `src/main.zig` but was missing from the CLI reference documentation. This commit adds the missing `meshguard connect` command documentation to `docs/reference/cli.md` to truthfully reflect the codebase implementation. Co-authored-by: igorls <4753812+igorls@users.noreply.github.com> --- docs/reference/cli.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 750324c..fd16d5e 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -53,6 +53,30 @@ meshguard trust [--name ] --- +## `meshguard connect` + +Direct peer connection via token exchange (no seed needed). + +```bash +meshguard connect --generate [--in ] +meshguard connect --join +``` + +| Flag | Description | +| ------------ | ----------------------------------------------- | +| `--generate` | Initiator flag, generates an `mg://` token | +| `--join` | Joiner flag, accepts an `mg://` token | +| `--in` | Punch delay in minutes (default: 1 minute) | + +**Flow**: + +1. Initiator runs `--generate`, shares `mg://` token with peer +2. Peer runs `--join `, shares response token back +3. Initiator pastes response token +4. Both sides punch simultaneously (NTP-synced) + +--- + ## `meshguard revoke` Remove a peer from your authorized keys.