Skip to content

Commit 004ef28

Browse files
committed
Fix docs: comprehensive audit against source code
- --output → --file on export command (6 files) - --secure → --plain on set command (inverted logic) - Remove nonexistent --force on set command - keep list → keep show (not a real command) - keep get --unmask → --format=raw - Fix template:add signature (no filename arg, --vault, --overwrite) - Fix IAM policy tag Environment → Env (matches actual code) - Server --host default 127.0.0.1 → localhost - Remove undocumented env vars and DEBUG=1 feature - Fix web UI routes (/export doesn't exist, add /templates) - Fix broken links to nonexistent files - Fix shell prompt format (>>> → ssm:local>) - Fix shell alias q → quit (not exit), remove list alias
1 parent 2f076e4 commit 004ef28

15 files changed

Lines changed: 166 additions & 220 deletions

File tree

docs/TROUBLESHOOTING.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ location.reload()
6868
**Debug**:
6969
```bash
7070
# Test vault access via CLI
71-
keep list --vault=aws --env=production
71+
keep show --env=production
7272

7373
# Check AWS credentials
7474
aws sts get-caller-identity
@@ -96,7 +96,7 @@ aws sts get-caller-identity
9696
**Debug**:
9797
```bash
9898
# Verify via CLI
99-
keep get MY_SECRET --vault=aws --env=prod
99+
keep get MY_SECRET --env=local
100100
```
101101

102102
#### Masked Values Won't Unmask
@@ -154,12 +154,6 @@ npm run dev
154154

155155
## Debug Mode
156156

157-
### Enable Verbose Logging
158-
```bash
159-
# Set debug environment variable
160-
DEBUG=1 keep server
161-
```
162-
163157
### Check Browser Console
164158
1. Open DevTools (F12)
165159
2. Check Console tab for errors
@@ -267,9 +261,9 @@ keep server
267261
If UI is completely broken:
268262
```bash
269263
# Use CLI instead
270-
keep list
271-
keep get SECRET_NAME
272-
keep set SECRET_NAME value
264+
keep show --env=local
265+
keep get SECRET_NAME --env=local
266+
keep set SECRET_NAME value --env=local
273267

274268
# Or use AWS CLI directly
275269
aws ssm get-parameter --name /myapp/SECRET_NAME

docs/WEB_UI.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ keep server --port=8080
1616
# Without auto-opening browser
1717
keep server --no-browser
1818

19-
# Specific network interface (default: 127.0.0.1)
19+
# Specific network interface (default: localhost)
2020
keep server --host=0.0.0.0
2121
```
2222

@@ -49,7 +49,7 @@ Compare secrets across envs and vaults:
4949
- ✗ Missing
5050
- **Inline editing** directly from diff cells
5151
- **Multi-select** for comparing specific vault/env combinations
52-
- **Export diff** to CSV for reporting
52+
- **Export** comparison data for reporting
5353

5454
### Export
5555

@@ -97,9 +97,9 @@ Manage Keep configuration:
9797
## Navigation
9898

9999
### URL Routes
100-
- `/` - Secrets table (default)
100+
- `/secrets` - Secrets table (default, `/` redirects here)
101+
- `/templates` - Template management
101102
- `/diff` - Diff matrix view
102-
- `/export` - Export interface
103103
- `/settings` - Configuration
104104

105105
### Keyboard Shortcuts
@@ -123,7 +123,7 @@ Manage Keep configuration:
123123
- All operations go directly to vault
124124

125125
### Network Security
126-
- Binds to 127.0.0.1 by default
126+
- Binds to localhost by default
127127
- No CORS headers (prevents external access)
128128
- HTTPS not required for localhost
129129
- Token validation on all API endpoints
@@ -216,13 +216,6 @@ npm run dev
216216
```bash
217217
# PHP tests
218218
composer test
219-
220-
# JavaScript tests
221-
cd src/Server/frontend
222-
npm test
223-
224-
# With coverage
225-
npm run test:coverage
226219
```
227220

228221
### Project Structure
@@ -241,10 +234,6 @@ src/Server/
241234
└── BUILD.md # Build documentation
242235
```
243236

244-
## Contributing
245-
246-
See [CONTRIBUTING.md](../CONTRIBUTING.md) for development guidelines.
247-
248237
## FAQ
249238

250239
**Q: Can I access the UI remotely?**
@@ -262,6 +251,3 @@ A: Currently uses a dark theme. Light theme support planned for future release.
262251
**Q: Can I export the UI settings?**
263252
A: Settings are stored in Keep's configuration files, not the UI. Use `keep init` to manage.
264253

265-
## Changelog
266-
267-
See [CHANGELOG.md](../CHANGELOG.md) for version history and updates.

docs/commands/SERVER.md

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Launches a local web server that provides a browser-based interface for managing
2020
- **Example**: `keep server --port=8080`
2121

2222
### `--host=<host>`
23-
- **Default**: `127.0.0.1`
23+
- **Default**: `localhost`
2424
- **Description**: Network interface to bind to
25-
- **Security**: Use `127.0.0.1` for local-only access
25+
- **Security**: Use `localhost` for local-only access
2626
- **Example**: `keep server --host=0.0.0.0` (allows network access)
2727

2828
### `--no-browser`
@@ -72,7 +72,7 @@ The server generates a unique authentication token on each startup:
7272
- Token expires when server stops
7373

7474
### Network Security
75-
- **Default binding**: `127.0.0.1` (localhost only)
75+
- **Default binding**: `localhost` (localhost only)
7676
- **No HTTPS**: Not required for localhost connections
7777
- **No CORS**: Prevents cross-origin requests
7878
- **Token validation**: All API requests require valid token
@@ -109,29 +109,6 @@ Error: Permission denied binding to port 80
109109
2. Check firewall settings
110110
3. Ensure correct port and host
111111

112-
## Environment Variables
113-
114-
### `KEEP_SERVER_PORT`
115-
Override default port:
116-
```bash
117-
export KEEP_SERVER_PORT=8080
118-
keep server
119-
```
120-
121-
### `KEEP_SERVER_HOST`
122-
Override default host:
123-
```bash
124-
export KEEP_SERVER_HOST=0.0.0.0
125-
keep server
126-
```
127-
128-
### `KEEP_NO_BROWSER`
129-
Disable browser auto-open:
130-
```bash
131-
export KEEP_NO_BROWSER=1
132-
keep server
133-
```
134-
135112
## Files
136113

137114
### Server Files
@@ -144,9 +121,9 @@ The web UI does not create or modify any local files. All data is read from and
144121

145122
## Related Commands
146123

147-
- [`keep init`](INIT.md) - Set up vaults before using UI
148-
- [`keep list`](LIST.md) - CLI alternative to view secrets
149-
- [`keep export`](EXPORT.md) - CLI alternative for exporting
124+
- `keep init` - Set up vaults before using UI
125+
- `keep show` - CLI alternative to view secrets
126+
- `keep export` - CLI alternative for exporting
150127

151128
## Notes
152129

docs/guide/aws-authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ When running on EC2, ECS, or Lambda, use IAM roles:
103103
# The AWS SDK automatically uses the instance role
104104

105105
# In your deployment script:
106-
keep export --env=production --output=.env
106+
keep export --env=production --file=.env
107107
php artisan config:cache
108108
```
109109

@@ -155,7 +155,7 @@ jobs:
155155
aws-region: us-east-1
156156

157157
- run: |
158-
vendor/bin/keep export --env=production --output=.env
158+
vendor/bin/keep export --env=production --file=.env
159159
# Deploy your application
160160
```
161161
@@ -166,7 +166,7 @@ jobs:
166166
deploy:
167167
script:
168168
# Using GitLab's AWS integration
169-
- vendor/bin/keep export --env=production --output=.env
169+
- vendor/bin/keep export --env=production --file=.env
170170
id_tokens:
171171
AWS_TOKEN:
172172
aud: https://gitlab.com

docs/guide/cli/index.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ fi
6262
keep copy --only="*" --from=template --to=$ENV
6363

6464
# Set environment-specific values
65-
keep set DATABASE_URL "postgres://db-$ENV.internal/app" --env=$ENV --force
66-
keep set API_URL "https://api-$ENV.example.com" --env=$ENV --force
65+
keep set DATABASE_URL "postgres://db-$ENV.internal/app" --env=$ENV
66+
keep set API_URL "https://api-$ENV.example.com" --env=$ENV
6767

6868
# Validate
6969
keep show --env=$ENV
@@ -76,14 +76,13 @@ keep show --env=$ENV
7676
#!/bin/bash
7777
set -euo pipefail
7878

79-
keep set API_KEY "$NEW_KEY" --env=production --force
79+
keep set API_KEY "$NEW_KEY" --env=production
8080
keep run --env=production -- npm run deploy
8181
```
8282

8383
### Use Force Flags for Automation
8484
```bash
8585
# Avoid interactive prompts in scripts
86-
keep set KEY "value" --env=production --force
8786
keep delete OLD_KEY --env=staging --force
8887
keep export --env=production --file=.env --overwrite
8988
```

docs/guide/cli/reference.md

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ Create or update secrets in vaults.
222222
|--------|------|---------|-------------|
223223
| `--env` | string | *interactive* | Target env (local, staging, production) |
224224
| `--vault` | string | *default vault* | Vault to store the secret in |
225-
| `--secure` | boolean | `true` | Whether to encrypt the secret |
226-
| `--force` | boolean | `false` | Overwrite existing secrets without confirmation |
225+
| `--plain` | boolean | `false` | Do not encrypt the value |
227226

228227
**Arguments:**
229228
- `[key]` - Secret key name (prompted if not provided)
@@ -256,8 +255,8 @@ keep set
256255
# Direct mode
257256
keep set API_KEY "abc123" --env=local
258257

259-
# Force overwrite
260-
keep set API_KEY "new-value" --env=production --force
258+
# Store as plain text (not encrypted)
259+
keep set API_KEY "new-value" --env=production --plain
261260

262261
# Specify vault
263262
keep set STRIPE_KEY "sk_live_..." --env=production --vault=secretsmanager
@@ -327,26 +326,21 @@ keep show --env=production --vault=secretsmanager --format=env
327326

328327
## `keep template:add`
329328

330-
Generate a template file from existing secrets in a environment.
329+
Generate a template file from existing secrets in an environment. The template is saved as `{env}.env` in the template directory.
331330

332331
| Option | Type | Default | Description |
333332
|--------|------|---------|-------------|
334-
| `filename` | string | *required* | Template filename to create |
335-
| `--env` | string | *required* | Environment to generate template from |
336-
| `--vault` | string | *all vaults* | Specific vault to use |
337-
| `--overwrite` | boolean | `false` | Overwrite existing template file |
333+
| `--env` | string | *interactive* | Environment to generate template from |
334+
| `--path` | string | *template directory* | Custom template directory path |
338335

339336
### Examples
340337

341338
```bash
342-
# Create template from production secrets
343-
keep template:add .env.template --env=production
339+
# Create template from production secrets (saves as production.env)
340+
keep template:add --env=production
344341

345-
# Create from specific vault
346-
keep template:add api.template --env=production --vault=ssm
347-
348-
# Overwrite existing template
349-
keep template:add config.env --env=staging --overwrite
342+
# Specify custom template directory
343+
keep template:add --env=staging --path=./config/templates
350344
```
351345

352346
## `keep template:validate`
@@ -355,7 +349,7 @@ Validate template files for syntax and placeholder resolution.
355349

356350
| Option | Type | Default | Description |
357351
|--------|------|---------|-------------|
358-
| `filename` | string | *required* | Template file to validate |
352+
| `[template]` | string | *optional* | Template file to validate (prompted if not provided) |
359353
| `--env` | string | *optional* | Environment to validate against |
360354

361355
### Examples
@@ -389,27 +383,27 @@ The interactive shell provides:
389383

390384
**Context Management:**
391385
```bash
392-
keep> env production # Switch to production env (alias: e)
393-
keep> vault ssm # Switch to ssm vault (alias: v)
394-
keep> use ssm:production # Switch both at once (alias: u)
395-
keep> context # Show current context (alias: ctx)
386+
ssm:local> env production # Switch to production env (alias: e)
387+
ssm:local> vault ssm # Switch to ssm vault (alias: v)
388+
ssm:local> use ssm:production # Switch both at once (alias: u)
389+
ssm:local> context # Show current context (alias: ctx)
396390
```
397391

398392
**Secret Operations:**
399393
```bash
400-
keep> set API_KEY value # Set a secret
401-
keep> get API_KEY # Get a secret (alias: g)
402-
keep> delete API_KEY # Delete a secret (alias: d)
403-
keep> show # List all secrets (aliases: ls, list, l)
404-
keep> copy KEY --to=prod # Copy using current context as source
394+
ssm:local> set API_KEY value # Set a secret
395+
ssm:local> get API_KEY # Get a secret (alias: g)
396+
ssm:local> delete API_KEY # Delete a secret (alias: d)
397+
ssm:local> show # List all secrets (aliases: ls, l)
398+
ssm:local> copy KEY --to=prod # Copy using current context as source
405399
```
406400

407401
**Shell Control:**
408402
```bash
409-
keep> help # Show available commands (alias: ?)
410-
keep> history # Show command history (alias: h)
411-
keep> clear # Clear screen (alias: cls)
412-
keep> exit # Exit shell (aliases: quit, q)
403+
ssm:local> help # Show available commands (alias: ?)
404+
ssm:local> history # Show command history (alias: h)
405+
ssm:local> clear # Clear screen (alias: cls)
406+
ssm:local> exit # Exit shell (aliases: quit, q)
413407
```
414408

415409
### Examples
@@ -419,12 +413,12 @@ keep> exit # Exit shell (aliases: quit, q)
419413
keep shell --env=production --vault=ssm
420414

421415
# Interactive session
422-
keep (ssm:production)> show
423-
keep (ssm:production)> env development
416+
ssm:production> show
417+
ssm:production> env development
424418
✓ Switched to env: development
425-
keep (ssm:development)> set API_KEY "dev-key"
426-
keep (ssm:development)> copy API_KEY --to=production
427-
keep (ssm:development)> exit
419+
ssm:development> set API_KEY "dev-key"
420+
ssm:development> copy API_KEY --to=production
421+
ssm:development> exit
428422
Goodbye!
429423
```
430424

docs/guide/deployment/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Templates provide:
1515

1616
```bash
1717
# Create template from existing secrets
18-
keep template:add production.env --env=production
18+
keep template:add --env=production
1919
```
2020

2121
### 2. [Runtime Secrets Injection](./runtime-injection.md)

docs/guide/deployment/templates.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,11 @@ Templates are your application's complete environment configuration - Keep handl
4242
Generate templates automatically from your vault:
4343

4444
```bash
45-
# Create template from all secrets in an env
46-
keep template:add production.env --env=production
45+
# Create template from all secrets in an env (saves as production.env)
46+
keep template:add --env=production
4747

48-
# From specific vault
49-
keep template:add api.env --env=production --vault=ssm
50-
51-
# Overwrite existing template
52-
keep template:add config.env --env=staging --overwrite
48+
# Specify custom template directory
49+
keep template:add --env=staging --path=./config/templates
5350
```
5451

5552
### Manual Creation

0 commit comments

Comments
 (0)