diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-15 01:12:16 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-15 01:12:16 +0200 |
| commit | 382fcc5f675f9942350013780335315757c245c5 (patch) | |
| tree | a24ed8732c6d3971b071ed6af3c399d6142b79f4 /packages/meshbay-cli/src/meshbay_cli/manpage.py | |
| parent | 6f68bb6c1970e26de1f66c073ea5d7fecd21840d (diff) | |
| download | meshbay-382fcc5f675f9942350013780335315757c245c5.tar.gz | |
feat(cli): rm, and Delete in the interactive mode
rm deletes files, resolved as get resolves paths and patterns, with the
node's rule (design §5.4): the uploading account's devices, or the node's
operator account. The whole run is checked against the index first (the
entry's uploader_id, the role the join result gives this key): a file
outside the rule, or a folder, refuses it before anything is asked or sent.
Then one confirmation, or --yes. The node's challenge is checked against
what was asked before it is signed. In the interactive mode, Delete on the
right pane does the same, asked once per batch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-cli/src/meshbay_cli/manpage.py')
| -rw-r--r-- | packages/meshbay-cli/src/meshbay_cli/manpage.py | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/packages/meshbay-cli/src/meshbay_cli/manpage.py b/packages/meshbay-cli/src/meshbay_cli/manpage.py index 7ee3d33..8316fc5 100644 --- a/packages/meshbay-cli/src/meshbay_cli/manpage.py +++ b/packages/meshbay-cli/src/meshbay_cli/manpage.py @@ -35,7 +35,8 @@ EXIT_CODES = { "for the hub or the node.", errors.REFUSED: "Refused before anything was sent: a name already taken or not " "accepted by the node, a folder read-only or unavailable, leaving a " - "group you own, revoking this machine.", + "group you own, revoking this machine, deleting a file you may not " + "delete.", errors.INTERRUPTED: "Interrupted (Ctrl+C). A download resumes where it stopped " "on the next run.", } @@ -43,8 +44,8 @@ EXIT_CODES = { DESCRIPTION = r""" .B meshbay-cli is a member's view of their MeshBay groups from a terminal: sign in, join and -leave groups, list them and their folders, download and upload files, and -approve this account's other devices. +leave groups, list them and their folders, download, upload and delete files, +and approve this account's other devices. It talks to the hub only to sign in and to find a group's nodes; files go directly between this machine and the node, end-to-end encrypted, never through the hub. @@ -119,6 +120,12 @@ select an entry (several can be) copy the selection, or the entry under the cursor, to the other pane's folder; a name already there is asked about once for the whole batch .TP +.B Delete +delete the selection, or the file under the cursor, from the group; files only, +each of them yours to delete (see +.BR rm ), +asked once for the batch +.TP .B / filter by name; .B Esc @@ -211,6 +218,15 @@ the code it shows, and revokes one. Exactly one waiting device must match a code: a code that matches several, which somebody who saw it on your screen could cause, approves none. .PP +.B rm +deletes files for every member of the group. +The node allows it to the account that uploaded a file, from any of its +devices, and to the node's operator; being the group's owner on the hub counts +only when the owner's account is the operator of the node serving the group, +as it is when the owner hosts it with the desktop application. +A run that names a file this account may not delete, or a folder, is refused +before anything is asked or sent. +.PP .B browser\-access on makes this machine leave, on each node it opens a group on, a copy of its keys sealed under your passphrase, so that a browser can open the group; @@ -282,6 +298,7 @@ meshbay\-cli get 'Family/music/*.flac' meshbay\-cli put \-R ~/scans Family/documents tar c notes | meshbay\-cli put \- Family/documents/notes.tar meshbay\-cli ls \-\-json \-R / | jq '.[] | .path' +meshbay\-cli rm 'Family/documents/draft*.odt' meshbay\-cli devices approve Family@bob ZX4P\-7QRT meshbay\-cli leave \-\-yes Club@carol .EE @@ -381,7 +398,7 @@ def render() -> str: out += [".SH REMOTE PATHS", PATHS.strip(), ".SH INTERACTIVE MODE", INTERACTIVE.strip(), ".SH SESSION, DEVICES AND NODE KEYS", SESSION.strip(), - ".SH GROUPS: JOINING, LEAVING, DEVICES", MEMBERSHIP.strip(), + ".SH GROUPS: JOINING, LEAVING, DELETING, DEVICES", MEMBERSHIP.strip(), ".SH EXIT STATUS"] for code, text in sorted(EXIT_CODES.items()): out += [".TP", f".B {code}", text] |