The Shared File Management module provides commands for managing shared files, including revoking access and updating share metadata.
The Shared Management module enables vault owners to:
- View all active shares
- Get detailed information about shares
- Revoke access to shared files
- Update share information
- Manage share lifecycle
Revoke access to a shared file or remove by filename. This command supports both hash-based and name-based revocation.
Usage:
./zep shared rm <reference-or-name>Aliases: shared revoke, shared delete, shared remove
Arguments:
reference-or-name: Either:- Share reference ID (e.g.,
72cTWg) - exact match - Filename (e.g.,
report.pdf) - searches all shares - Full path (e.g.,
documents/report.pdf) - full match
- Share reference ID (e.g.,
When using a share reference:
zep> shared rm 72cTWg
✔ Revoked share: 72cTWg (report.pdf)Process:
- Look up share by ID
- Confirm revocation
- Remove from shared index
- Delete file from GitHub
- Push changes
When using a filename:
zep> shared rm report.pdfProcess:
- Search shared index by filename
- If exact match found: Revoke that share
- If multiple matches found: Show options, ask user to clarify
- If no matches found: Error message
Full vault path matches are prioritized:
zep> shared rm documents/report.pdf
✔ Found 1 match. Revoking: documents/report.pdf# Exact share ID
zep> shared rm 72cTWg
✔ Revoked share: 72cTWg# Simple filename (searches all shares)
zep> shared rm report.pdf
✔ Revoked share: report.pdf from documents/report.pdf# Full vault path
zep> shared rm documents/reports/2024/q1.pdf
✔ Revoked share: q1.pdf from documents/reports/2024/q1.pdfIf filename matches multiple shares:
zep> shared rm report.pdf
⚠️ Multiple matches found:
1. documents/reports/q1.pdf (share: 72cTWg)
2. archived/reports/q1.pdf (share: AbXkLm)
Which one? (1-2 or share ID): 1
✔ Revoked share: 72cTWgRevoke a share using its reference ID.
Function Signature:
func RevokeSharedFileByID(session *Session, shareID string) errorParameters:
session: Current vault sessionshareID: Share reference to revoke
Returns:
- Error if share not found or revocation fails
Process:
- Load shared index
- Find share by ID
- Delete file from GitHub
- Remove from index
- Save index
- Return success
Revoke share(s) by filename with fuzzy matching.
Function Signature:
func RevokeSharedFileByName(session *Session, namePattern string) errorParameters:
session: Current vault sessionnamePattern: Filename or path to match
Returns:
- Error if no matches or revocation fails
Process:
- Load shared index
- Search for matches (exact, prefix, substring)
- If one match: revoke it
- If multiple matches: prompt user
- Revoke selected share
- Return success
List all shares before revoking:
zep> shared ls
ID FILENAME CREATED
---- -------- -------
72cTWg report.pdf 2026-02-04
AbXkLm budget.xlsx 2026-02-03Get details before revoking:
zep> shared info 72cTWg
Share ID: 72cTWg
Filename: report.pdf
Vault Path: documents/reports/q1.pdf
Created: 2026-02-04 15:30:00
Access Count: 0zep> shared ls
ID FILENAME
---- --------
72cTWg report.pdf
zep> shared rm 72cTWg
✔ Revoked share: 72cTWg
zep> shared ls
(no entries)zep> shared rm invalid123
❌ Share not found: invalid123zep> shared rm nonexistent.pdf
❌ No shares found matching: nonexistent.pdfzep> shared rm report.pdf
⚠️ Multiple matches found for "report.pdf"
Use full path or share ID for clarity- Share is removed from shared index
- File deleted from GitHub (share pointer)
- Recipients can no longer access
- Shared file content remains encrypted on GitHub (original file)
- Revocation only removes the share pointer, not the file
- Re-sharing same file creates new share ID
Share a file, revoke after review period:
# Initial share
zep> share documents/proposal.pdf
(share link sent to reviewer)
# After review, revoke
zep> shared rm proposal.pdf
✔ Revoked accessRevoke shares when permissions change:
# Employee leaving company
zep> shared rm confidential.pdf
✔ Revoked shareRevoke and re-share with different password:
zep> shared rm budget.xlsx
zep> share financial/budget.xlsx
Enter new share password...Revoke old shares when file is updated:
zep> shared rm documents/policy.pdf
zep> upload policy.pdf documents/policy.pdf
zep> share documents/policy.pdf- Revocation is immediate
- All recipients lose access when revoked
- No way to recover a revoked share link
- Consider before revoking active shares
- Revoked shares cannot be unrevoked
- No undo operation
- Keep records of who accessed what
- Can re-share same file with new ID
- Old share links become invalid
- New share requires new password
- Reference ID lookup: O(1) - instant
- Filename lookup: O(n) - linear search of shares
- Usually negligible (typical vault has <100 shares)
- Depends on file size
- Network dependent (GitHub push)
- Usually completes in seconds
- Shared Files Overview - Creating shares
- Shared Search Module - Finding shares
- Shared Index Module - Index structure
- Share Command Reference