-
Notifications
You must be signed in to change notification settings - Fork 0
📖 Scribe: Document missing CLI commands in reference #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -36,13 +36,14 @@ meshguard export > my-node.pub | |||||||||||||||||||||||
| Add a peer's public key to your authorized keys. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||
| meshguard trust <key-or-path> [--name <name>] | ||||||||||||||||||||||||
| meshguard trust <key-or-path> [--name <name>] [--org] | ||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| | Argument | Description | | ||||||||||||||||||||||||
| | --------------- | ------------------------------------------------------ | | ||||||||||||||||||||||||
| | `<key-or-path>` | Base64 public key string _or_ path to a `.pub` file | | ||||||||||||||||||||||||
| | `--name` | Human-readable name (default: auto-generated from key) | | ||||||||||||||||||||||||
| | `--org` | Trust an organization's public key | | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| **Validation**: | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
@@ -117,6 +118,77 @@ meshguard status | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ## `meshguard connect` | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Direct peer connection via token exchange (bypassing seed nodes) and performs a coordinated UDP hole punch. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||||
| meshguard connect --generate [--in <minutes>] | ||||||||||||||||||||||||
| meshguard connect --join <mg://token> | ||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| | Flag | Description | | ||||||||||||||||||||||||
| | ------------ | ----------------------------------------------- | | ||||||||||||||||||||||||
| | `--generate` | Generate a token to share with the peer | | ||||||||||||||||||||||||
| | `--join` | Join a connection using the peer's token | | ||||||||||||||||||||||||
| | `--in` | Punch delay in minutes (default: 1 minute) | | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
||||||||||||||||||||||||
| **Side effects & security** | |
| - On successful connection, the peer's public key is automatically added to your `authorized_keys`. Only use `connect` with tokens from peers you trust to grant ongoing access. | |
| - The discovered/punched endpoint is saved into your config as a persistent seed. This means the peer may be used for future bootstrap and reconnection until you remove or edit that seed entry. |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meshguard org-keygen exits with an error if an org keypair already exists. It would be helpful to mention this “refuses to overwrite existing keys” behavior (and what users should do if they need to rotate/regenerate keys), since the command is not safely re-runnable.
| **Safety**: Refuses to overwrite existing organization keys; if `org.key` / `org.pub` already exist, the command exits with an error. To rotate or regenerate the organization keypair, back up or remove the existing files in `$MESHGUARD_CONFIG_DIR/org/` and then rerun `meshguard org-keygen`. |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meshguard org-sign accepts either a base64 public key string or a path to a .pub file (it uses the same key-or-path validation as trust). The docs currently imply only a file input (<node.pub>); consider updating the argument name/description to reflect the accepted forms.
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meshguard org-vouch also accepts either a base64 public key string or a path to a .pub file (via the shared key-or-path validator). The docs currently state only a file argument; consider updating the argument description to match the implementation.
| | Argument | Description | | |
| | ------------ | ----------------------------------------------- | | |
| | `<node.pub>` | Node's public key file | | |
| | Argument | Description | | |
| | ------------ | --------------------------------------------------------------- | | |
| | `<node.pub>` | Node's public key (path to `.pub` file or base64-encoded key) | |
Copilot
AI
Mar 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meshguard upgrade is implemented in a Linux/systemd-centric way (uses curl, systemctl, and installs to /usr/local/bin/meshguard, typically requiring sudo). The docs currently read as generally applicable; consider documenting OS/prerequisite/permission requirements (and/or limitations) to prevent confusion on non-Linux or non-systemd setups.
| This command is implemented for Linux environments where `systemd` is available. It: | |
| - uses tools such as `curl` and `systemctl` | |
| - installs or replaces the binary at `/usr/local/bin/meshguard` | |
| - typically requires `sudo` or equivalent privileges to succeed | |
| On non-Linux or non-systemd systems, or where you do not have sufficient permissions, | |
| this command may not work as expected; use your platform's installation/upgrade | |
| method instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
meshguard trustdocs list--nameas “auto-generated from key”, but when--orgis used the implementation defaults the org name to a derived domain (and--namebecomes an org alias override). Consider clarifying--namebehavior for--orgvs peer trust so users don’t assume the same naming rules apply.