Skip to content

Commit 254887e

Browse files
authored
Merge pull request #29 from DevopsArtFactory/codex/update-readme-and-usage-guides
docs: refresh README and usage guides
2 parents 77e4205 + a4e04fd commit 254887e

3 files changed

Lines changed: 224 additions & 67 deletions

File tree

README.md

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
## Terminology
1616
- `peer`: the person or device you are sending a secret to
1717
- `share code`: the `ENDE-PUB-1:...` string used for peer onboarding
18-
- `send` / `receive`: task-oriented names for `encrypt` / `decrypt`
18+
- `encrypt` / `decrypt`: the primary commands for sending and receiving secrets
1919
- `recipient` / `sender`: lower-level trust model terms still used in advanced commands
2020

2121
## Install/build
@@ -110,73 +110,91 @@ The tutorial guides you through:
110110
5. **Decrypt** — automatically decrypts the result from step 4
111111

112112
## Quickstart
113-
1. Generate local key material:
113+
1. Generate your local key and print a share code:
114114
```bash
115-
./ende key keygen --name alice --export-public --export-dir .
116-
./ende key keygen --name bob --export-public --export-dir .
115+
./ende key keygen --name alice
117116
```
118117

119-
2. Alice shares the `share:` code from keygen output to Bob.
118+
This prints:
119+
- your recipient public key
120+
- your signing public key
121+
- your `share:` code (`ENDE-PUB-1:...`)
120122

121-
You can re-print a share code later:
123+
2. Re-print your share code any time:
122124
```bash
123125
./ende key share --name alice
124126
```
125127

126-
3. Bob adds Alice as a peer in one command:
128+
3. Set your default signer once:
127129
```bash
128-
./ende add-peer
130+
./ende key use --name alice
131+
```
132+
133+
4. Register a peer from a share code:
134+
```bash
135+
./ende register
129136
# share code (ENDE-PUB-1:...): ENDE-PUB-1:...
130137
# peer name override (optional, Enter to use the shared name):
131138
```
132139

133-
4. Run a local safety check before first real use:
140+
You can also register non-interactively:
141+
```bash
142+
./ende register --alias bob --share 'ENDE-PUB-1:...'
143+
```
144+
145+
5. Run a local safety check before first real use:
134146
```bash
135147
./ende doctor
136148
```
137149
`ende doctor` checks:
138150
- keyring file presence and permissions
139151
- default signer configuration
140-
- private key file paths and `0600` permissions
152+
- private key file paths and file permission safety
141153
- peer / trusted-signing-key registration consistency
142154

143155
To remove a registered alias later:
144156
```bash
145157
./ende unregister alice
146158
```
147159

148-
5. Send a secret securely (default: text to stdout):
160+
6. Encrypt a secret for a registered peer.
161+
162+
Default behavior:
163+
- output format: armored text
164+
- output target: stdout
165+
166+
Example:
149167
```bash
150-
echo 'TOKEN=abc123' | ./ende send -t bob
168+
echo 'TOKEN=abc123' | ./ende encrypt -t bob
151169
```
152170

153-
5-0. Encrypt from file input:
171+
Encrypt from a file:
154172
```bash
155-
./ende send -t bob -f secrets.env -o secret.txt
173+
./ende encrypt -t bob -f secrets.env -o secret.txt
156174
```
157175

158-
5-1. Save text output to file (optional):
176+
Save armored text to a file:
159177
```bash
160-
echo 'TOKEN=abc123' | ./ende send -t bob --text -o secret.txt
178+
echo 'TOKEN=abc123' | ./ende encrypt -t bob -o secret.txt
161179
```
162180

163-
5-2. Raw binary output (optional):
181+
Write raw binary instead:
164182
```bash
165-
echo 'TOKEN=abc123' | ./ende send -t bob --binary -o secret.ende
183+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --binary -o secret.ende
166184
```
167185

168-
5-3. Prompt for a secret interactively without echoing it to the terminal:
186+
Prompt for a secret interactively without echoing it:
169187
```bash
170-
./ende send -t bob --prompt -o secret.txt
188+
./ende encrypt -t bob --prompt -o secret.txt
171189
```
172190
Interactive prompt notes:
173191
- TTY input is masked so the secret is not echoed while typing.
174192
- Empty prompt input is rejected.
175193
- Non-interactive stdin/file workflows continue to work as before.
176194

177-
5-4. Review peer and output details before sending:
195+
Review peer and output details before encrypting:
178196
```bash
179-
echo 'TOKEN=abc123' | ./ende send -t bob --confirm -o secret.txt
197+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --confirm -o secret.txt
180198
```
181199
`--confirm` shows:
182200
- peer alias and short fingerprint
@@ -186,33 +204,50 @@ echo 'TOKEN=abc123' | ./ende send -t bob --confirm -o secret.txt
186204

187205
For automation, you can keep the summary behavior in scripts and skip the prompt explicitly:
188206
```bash
189-
echo 'TOKEN=abc123' | ./ende send -t bob --confirm --yes -o secret.txt
207+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --confirm --yes -o secret.txt
190208
```
191209

192-
6. Receive and decrypt:
210+
7. Verify and decrypt:
193211
```bash
194212
./ende verify -i secret.ende
195-
./ende receive -i secret.ende -o decrypted.txt
213+
./ende decrypt -i secret.ende -o decrypted.txt
196214
```
197215

198216
Text envelope input is also supported:
199217
```bash
200218
./ende verify -i secret.txt
201-
./ende receive -i secret.txt -o decrypted.txt
202-
./ende receive -i secret.txt --text-out
219+
./ende decrypt -i secret.txt -o decrypted.txt
220+
./ende decrypt -i secret.txt --text-out
203221
```
204222

205223
Safer plaintext output options:
206224
```bash
207225
# Refuse to overwrite an existing plaintext file
208-
./ende receive -i secret.ende -o decrypted.txt --no-clobber
226+
./ende decrypt -i secret.ende -o decrypted.txt --no-clobber
209227

210228
# Write plaintext to a temporary 0600 file and print the path
211-
./ende receive -i secret.ende --out-temp
229+
./ende decrypt -i secret.ende --out-temp
212230
```
213231

214232
`--out-temp` is useful when you want Ende to choose a short-lived secure file path for you.
215233

234+
## Peer Inspection
235+
236+
Show a registered recipient:
237+
```bash
238+
./ende recipient show bob
239+
```
240+
241+
Show the trusted signing key for the same alias:
242+
```bash
243+
./ende sender show bob
244+
```
245+
246+
List everything currently registered:
247+
```bash
248+
./ende key list
249+
```
250+
216251
## Health Checks
217252

218253
Use `ende doctor` to validate local trust and configuration before troubleshooting a failed encrypt/decrypt flow:
@@ -230,6 +265,8 @@ The command prints `ok`, `warn`, and `fail` results and exits non-zero when a ha
230265
- `ende k` = `ende key`
231266
- `ende rcpt` = `ende recipient`
232267
- `ende snd` = `ende sender`
268+
- `ende reg` = `ende register`
269+
- `ende unreg` = `ende unregister`
233270
- `ende key kg` = `ende key keygen`
234271
- `ende key ls` = `ende key list`
235272

@@ -256,6 +293,10 @@ This performs GitHub SSH key lookup for identity pinning (TOFU) and stores a pin
256293
See the generated options table and raw `--help` output:
257294
- [CLI_HELP.md](CLI_HELP.md)
258295

296+
| Skill | Description |
297+
|-------|-------------|
298+
| [ende-secret-share](.kiro/skills/ende-secret-share/) | ende CLI로 팀원을 peer 등록하고 시크릿을 암호화하여 클립보드로 안전하게 전달한다. |
299+
259300
## Open Source
260301
- License: [LICENSE](LICENSE)
261302
- Contributing guide: [CONTRIBUTING.md](CONTRIBUTING.md)

USAGE_EN.md

Lines changed: 77 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,33 @@ Invoke-WebRequest -Uri "https://github.com/DevopsArtFactory/ende/releases/downlo
5050
---
5151

5252
## 2. Initial Setup (One-time per user)
53-
Each developer generates their local keys.
53+
Each developer generates their own local key once.
5454

5555
```bash
5656
./ende key keygen --name <my-id>
5757
```
5858

5959
Example:
6060
```bash
61-
./ende key keygen --name alice --export-public --export-dir .
62-
./ende key keygen --name bob --export-public --export-dir .
61+
./ende key keygen --name alice
6362
```
6463

65-
`keygen` output includes a `share:` token. Copy that token to the other user.
64+
`keygen` prints:
65+
- your recipient public key
66+
- your signing public key
67+
- your `share:` code (`ENDE-PUB-1:...`)
68+
69+
You can print the share code again later:
70+
71+
```bash
72+
./ende key share --name alice
73+
```
74+
75+
Set your default signer once:
76+
77+
```bash
78+
./ende key use --name alice
79+
```
6680

6781
Generated assets:
6882
- `~/.config/ende/keyring.yaml`
@@ -73,28 +87,33 @@ Generated assets:
7387

7488
## 3. Sender (Alice) Workflow
7589

76-
### 3-1) Register recipient (Bob) public key
77-
Bob exports his recipient public key; Alice stores it as an alias.
90+
### 3-1) Register Bob from a share code
91+
Bob sends his `share:` code to Alice.
7892

7993
On Alice's side:
8094
```bash
81-
./ende key keygen --name alice
82-
# copy `share: ENDE-PUB-1:...`
95+
./ende register
96+
# share code (ENDE-PUB-1:...): ENDE-PUB-1:...
97+
# peer name override (optional, Enter to use the shared name):
8398
```
8499

85-
On Bob's side (share-first interactive onboarding):
100+
Non-interactive form:
86101
```bash
87-
./ende register
88-
# share token (ENDE-PUB-1:...): ENDE-PUB-1:...
89-
# alias override (optional, Enter to use token id):
102+
./ende register --alias bob --share 'ENDE-PUB-1:...'
103+
```
104+
105+
### 3-2) Run a local safety check
106+
```bash
107+
./ende doctor
90108
```
91109

92-
### 3-2) Encrypt + sign secret
110+
### 3-3) Encrypt + sign secret
93111
```bash
94-
echo 'TOKEN=abc123' | ./ende encrypt -t bob -o secret.ende
112+
echo 'TOKEN=abc123' | ./ende encrypt -t bob
95113
```
96114

97115
Important:
116+
- Default output is armored text to stdout.
98117
- `--sign-as` is required unless a default signer is set via `ende key use`.
99118
- `--to` can be repeated for multi-recipient delivery.
100119

@@ -103,12 +122,29 @@ Multi-recipient example:
103122
echo 'TOKEN=abc123' | ./ende encrypt -t bob -t diana -o secret.ende
104123
```
105124

106-
### 3-3) Send ciphertext file
107-
Only send `secret.ende`.
125+
Encrypt from a file:
126+
```bash
127+
./ende encrypt -t bob -f secrets.env -o secret.txt
128+
```
129+
130+
Write raw binary instead of text:
131+
```bash
132+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --binary -o secret.ende
133+
```
134+
135+
Prompt for a secret interactively:
136+
```bash
137+
./ende encrypt -t bob --prompt -o secret.txt
138+
```
139+
140+
Review peer and output details before encrypting:
141+
```bash
142+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --confirm -o secret.txt
143+
```
108144

109-
For text-only channels (messenger/email), use:
145+
For automation:
110146
```bash
111-
echo 'TOKEN=abc123' | ./ende encrypt -t bob --text -o secret.txt
147+
echo 'TOKEN=abc123' | ./ende encrypt -t bob --confirm --yes -o secret.txt
112148
```
113149

114150
---
@@ -140,6 +176,13 @@ Explicit stdout example:
140176
./ende decrypt -i secret.ende -o -
141177
```
142178

179+
Other plaintext output options:
180+
```bash
181+
./ende decrypt -i secret.ende -o decrypted.txt --no-clobber
182+
./ende decrypt -i secret.ende --out-temp
183+
./ende decrypt -i secret.txt --text-out
184+
```
185+
143186
---
144187

145188
## 5. GitHub Username Mode (Optional)
@@ -167,6 +210,7 @@ Behavior:
167210
- `ende rcpt` = `ende recipient`
168211
- `ende snd` = `ende sender`
169212
- `ende reg` = `ende register`
213+
- `ende unreg` = `ende unregister`
170214
- `ende key kg` = `ende key keygen`
171215
- `ende key ls` = `ende key list`
172216

@@ -196,7 +240,7 @@ Options:
196240
- `--file <path>`: file containing age recipient key (required)
197241

198242
### `ende key list`
199-
List local keys and recipient aliases.
243+
List local keys, recipients, and trusted senders.
200244

201245
### `ende key use`
202246
Set default signer key ID for `encrypt`.
@@ -205,6 +249,13 @@ Options:
205249
- `--name <id>`: key ID
206250
- positional arg `<id>` is also supported (`ende key use alice`)
207251

252+
### `ende key share`
253+
Print a share code for an existing local key.
254+
255+
Options:
256+
- `--name <id>`: key ID
257+
- positional arg `<id>` is also supported (`ende key share alice`)
258+
208259
---
209260

210261
## 6-2) recipient
@@ -242,6 +293,8 @@ Options:
242293
- `--text`: output ASCII-armored envelope (default `true`)
243294
- `--binary`: output raw binary envelope
244295
- `--prompt`: prompt secret input interactively
296+
- `--confirm`: show a summary and ask before encrypting
297+
- `--yes`: skip the confirmation prompt when `--confirm` is used
245298

246299
### `ende decrypt`
247300
Verify + decrypt envelope.
@@ -251,6 +304,8 @@ Options:
251304
- `-o, --out <path|->`: plaintext output (`--out -` must be explicit)
252305
- `--verify-required <bool>`: enforce signature verification (default `true`)
253306
- `--text-out`: print decrypted plaintext to stdout
307+
- `--no-clobber`: refuse to overwrite an existing plaintext file
308+
- `--out-temp`: write plaintext to a temporary `0600` file and print the path
254309

255310
### `ende verify`
256311
Verify signature without decrypting.
@@ -295,6 +350,9 @@ Options:
295350
- `--signing-public <base64>`: sender signing public key for manual one-step registration
296351
- `--force`: overwrite existing recipient/sender entries
297352

353+
### `ende unregister <alias>`
354+
Remove a registered alias and its matching trusted sender entry.
355+
298356
---
299357

300358
## 7. Security Design Considerations

0 commit comments

Comments
 (0)