aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-cli/src/meshbay_cli/__main__.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-15 00:56:04 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-15 00:56:04 +0200
commit6f68bb6c1970e26de1f66c073ea5d7fecd21840d (patch)
tree859c74db5819f1d49046e71a53e12afe5eb4193a /packages/meshbay-cli/src/meshbay_cli/__main__.py
parent16d92c96bde3a65fc54a93b4662df30cafc831e4 (diff)
downloadmeshbay-6f68bb6c1970e26de1f66c073ea5d7fecd21840d.tar.gz
feat(cli): invitations, join, decline, leave, devices, browser access
join accepts an invitation or redeems a link pasted as sent, then has the node admit a key pair made here, with the invitation's code (a link's code goes only to the node it names; one for a node that is away is kept for the next connection). decline, leave and devices revoke ask first, and refuse without --yes where there is no terminal. devices approve countersigns the one waiting request a code matches, none when several do. browser-access is the application's setting, kept per machine and never enabled from the hub's mirror: on leaves a copy sealed under M on each node, off withdraws it, unset touches nothing. A key pair made for a first contact is now kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-cli/src/meshbay_cli/__main__.py')
-rw-r--r--packages/meshbay-cli/src/meshbay_cli/__main__.py26
1 files changed, 21 insertions, 5 deletions
diff --git a/packages/meshbay-cli/src/meshbay_cli/__main__.py b/packages/meshbay-cli/src/meshbay_cli/__main__.py
index 2b0b349..91e523a 100644
--- a/packages/meshbay-cli/src/meshbay_cli/__main__.py
+++ b/packages/meshbay-cli/src/meshbay_cli/__main__.py
@@ -11,12 +11,28 @@ import os
import sys
from . import __version__
-from .commands import get, groups, login, logout, ls, put, trust
+from .commands import (
+ browser_access,
+ decline,
+ devices,
+ get,
+ groups,
+ invitations,
+ join,
+ leave,
+ login,
+ logout,
+ ls,
+ put,
+ trust,
+)
from .commands.context import Context
from .errors import INTERRUPTED, USAGE, CliError
-ACTIONS = {"login": login, "logout": logout, "groups": groups, "ls": ls, "get": get,
- "put": put, "trust": trust}
+ACTIONS = {"login": login, "logout": logout, "groups": groups, "invitations": invitations,
+ "join": join, "decline": decline, "leave": leave, "ls": ls, "get": get,
+ "put": put, "devices": devices, "trust": trust,
+ "browser-access": browser_access}
class _Parser(argparse.ArgumentParser):
@@ -49,8 +65,8 @@ def build_parser() -> argparse.ArgumentParser:
"""Global options are accepted before the action and after it."""
p = _Parser(
prog="meshbay-cli",
- description="A member's MeshBay files, from a terminal. Run with no argument "
- "for the interactive mode.")
+ description="A member's MeshBay groups and files, from a terminal. Run with no "
+ "argument for the interactive mode.")
_global_options(p, None)
p.add_argument("--version", action="version", version=f"meshbay-cli {__version__}")
# SUPPRESS: an option the action's own parser did not see must not