Skip to content

Commit 2582682

Browse files
committed
Updated main.go with QOL printing of the share direct download url
1 parent 0e6ac0f commit 2582682

File tree

3 files changed

+83
-4
lines changed

3 files changed

+83
-4
lines changed

README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Zephyrus CLI is a command-line tool that transforms your GitHub repository into
2121
- 🎯 **Stateless Mode**: Use with `-u` flag to authenticate without persistent sessions
2222
- 🔄 **Interactive Shell**: REPL mode for multiple commands without re-authentication
2323
- 📤 **Secure File Sharing**: Share individual files without exposing your entire vault
24+
- Generate shareable links with unique encryption keys
25+
- Share via command-line or browser-based download page
26+
- Recipients decrypt files in their browser (zero-knowledge sharing)
27+
- Complete file metadata and history in share links
2428

2529
## Prerequisites
2630

@@ -150,8 +154,79 @@ If you haven't run `connect`, you can use any command with the `-u` flag to auth
150154

151155
You'll be prompted for your vault password. This doesn't create a persistent session.
152156

157+
## Secure File Sharing
158+
159+
Zephyrus makes it easy to securely share individual files with others without exposing your entire vault.
160+
161+
### How It Works
162+
163+
1. **Generate a Share Link**: Create a unique, encrypted share link for any file
164+
2. **Each file gets its own encryption key**: Recipients use a separate password to decrypt
165+
3. **Browser-based decryption**: Files are decrypted in the recipient's browser (zero-knowledge)
166+
4. **No vault access needed**: Recipients don't need a Zephyrus account or access to your vault
167+
168+
### Share a File
169+
170+
```bash
171+
# Enter interactive mode and share
172+
zep> share documents/report.pdf
173+
Enter Share Password (recipients will use this to decrypt): mysharepass123
174+
175+
✔ File shared successfully!
176+
Filename: report.pdf
177+
178+
Share this string with recipient:
179+
Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg==
180+
181+
Web Share Link:
182+
https://zephyrus-development.github.io/shared/#Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg==
183+
184+
Recipient can download with:
185+
zep download _ output.file --shared "Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg=="
186+
187+
Or read with:
188+
zep read _ --shared "Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg=="
189+
```
190+
191+
### Recipient Options
192+
193+
Recipients can access shared files in 3 ways:
194+
195+
1. **Web Browser** (Easiest): Click the share link and download securely in browser
196+
```
197+
https://zephyrus-development.github.io/shared/#Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg==
198+
```
199+
200+
2. **CLI Download**: Use the Zephyrus CLI to download
201+
```bash
202+
zep download _ output.pdf --shared "Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg=="
203+
```
204+
205+
3. **CLI Read**: Display file content directly (no save)
206+
```bash
207+
zep read _ --shared "Auchrio:72cTWg:mysharepass123:cmVwb3J0LnBkZg=="
208+
```
209+
210+
### Manage Shared Files
211+
212+
View all shared files and their metadata:
213+
```bash
214+
zep shared ls
215+
```
216+
217+
Get detailed info and regenerate share link:
218+
```bash
219+
zep shared info 72cTWg
220+
```
221+
222+
Revoke a share (stop allowing access):
223+
```bash
224+
zep shared rm 72cTWg
225+
```
226+
153227
## Command Reference
154228

229+
155230
### `setup` - Initialize Your Vault
156231

157232
Sets up a new Zephyrus vault by encrypting and storing your GitHub SSH key.

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ func main() {
431431
fmt.Printf("Filename: %s\n", filename)
432432
fmt.Println("\nShare this string with recipient:")
433433
fmt.Println(shareString)
434+
fmt.Println("\nWeb Share Link:")
435+
fmt.Printf(" https://zephyrus-development.github.io/shared/#%s\n", shareString)
434436
fmt.Println("\nRecipient can download with:")
435437
fmt.Printf(" zep download _ output.file --shared \"%s\"\n", shareString)
436438

@@ -563,13 +565,15 @@ func main() {
563565

564566
// Encode filename to base64 for share string
565567
encodedFilename := base64.StdEncoding.EncodeToString([]byte(entry.Name))
568+
shareString := fmt.Sprintf("%s:%s:%s:%s", session.Username, entry.Reference, entry.Password, encodedFilename)
566569

567570
fmt.Printf("\n📄 SHARED FILE INFO\n")
568571
fmt.Printf("Reference: %s\n", entry.Reference)
569572
fmt.Printf("File Name: %s\n", entry.OriginalPath)
570573
fmt.Printf("Shared At: %s\n", entry.SharedAt.Format("2006-01-02 15:04:05"))
571574
fmt.Printf("Password: %s\n", entry.Password)
572-
fmt.Printf("\nShare String: %s:%s:%s:%s\n\n", session.Username, entry.Reference, entry.Password, encodedFilename)
575+
fmt.Printf("\nShare String: %s\n", shareString)
576+
fmt.Printf("\nWeb Share Link: https://zephyrus-development.github.io/shared/#%s\n\n", shareString)
573577
},
574578
}
575579

zep.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"version": "1.2.0",
2+
"version": "1.2.1",
33
"description": "A secure, encrypted file vault backed by GitHub. Store sensitive files with end-to-end encryption.",
44
"homepage": "https://github.com/zephyrus-development/zephyrus-cli",
55
"license": "MIT",
6-
"url": "https://github.com/zephyrus-development/zephyrus-cli/releases/download/v1.2.0/zep.exe",
7-
"hash": "3dad4c18e99f1253113288fcf1c19a5187de56a708f6972b28bc061874ab763e",
6+
"url": "https://github.com/zephyrus-development/zephyrus-cli/releases/download/v1.2.1/zep.exe",
7+
"hash": "88dadd8db2836be31efc555c8586b780adf5b76565a25633e2a832745b3efdc2",
88
"bin": "zep.exe",
99
"checkver": {
1010
"url": "https://api.github.com/repos/zephyrus-development/zephyrus-cli/releases/latest",

0 commit comments

Comments
 (0)