mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Document new CLI commands and API endpoints
This commit is contained in:
@@ -55,6 +55,13 @@ SeedPass now uses the `portalocker` library for cross-platform file locking. No
|
||||
- **Auto‑Lock on Inactivity:** Vault locks after a configurable timeout for additional security.
|
||||
- **Secret Mode:** Copy retrieved passwords directly to your clipboard and automatically clear it after a delay.
|
||||
- **Tagging Support:** Organize entries with optional tags and find them quickly via search.
|
||||
- **Manual Vault Export/Import:** Create encrypted backups or restore them using the CLI or API.
|
||||
- **Parent Seed Backup:** Securely save an encrypted copy of the master seed.
|
||||
- **Manual Vault Locking:** Instantly clear keys from memory when needed.
|
||||
- **Vault Statistics:** View counts for entries and other profile metrics.
|
||||
- **Change Master Password:** Rotate your encryption password at any time.
|
||||
- **Checksum Verification Utilities:** Verify or regenerate the script checksum.
|
||||
- **Relay Management:** List, add, remove or reset configured Nostr relays.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@@ -74,6 +74,7 @@ Manage the entire vault for a profile.
|
||||
| Change the master password | `vault change-password` | `seedpass vault change-password` |
|
||||
| Lock the vault | `vault lock` | `seedpass vault lock` |
|
||||
| Show profile statistics | `vault stats` | `seedpass vault stats` |
|
||||
| Reveal or back up the parent seed | `vault reveal-parent-seed` | `seedpass vault reveal-parent-seed --file backup.enc` |
|
||||
|
||||
### Nostr Commands
|
||||
|
||||
@@ -161,6 +162,7 @@ Code: 123456
|
||||
- **`seedpass vault change-password`** – Change the master password used for encryption.
|
||||
- **`seedpass vault lock`** – Clear sensitive data from memory and require reauthentication.
|
||||
- **`seedpass vault stats`** – Display statistics about the active seed profile.
|
||||
- **`seedpass vault reveal-parent-seed`** – Print the parent seed or write an encrypted backup with `--file`.
|
||||
|
||||
### `nostr` Commands
|
||||
|
||||
|
@@ -124,6 +124,105 @@ curl -X POST http://127.0.0.1:8000/api/v1/fingerprint/select \
|
||||
-d '{"fingerprint": "abc123"}'
|
||||
```
|
||||
|
||||
### Exporting the Vault
|
||||
|
||||
Download an encrypted vault backup via `POST /api/v1/vault/export`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/vault/export \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-o backup.json
|
||||
```
|
||||
|
||||
### Importing a Vault
|
||||
|
||||
Restore a backup with `POST /api/v1/vault/import`. Use `-F` to upload a file:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/vault/import \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-F file=@backup.json
|
||||
```
|
||||
|
||||
### Locking the Vault
|
||||
|
||||
Clear sensitive data from memory using `/api/v1/vault/lock`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/vault/lock \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
### Backing Up the Parent Seed
|
||||
|
||||
Trigger an encrypted seed backup with `/api/v1/vault/backup-parent-seed`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/vault/backup-parent-seed \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"path": "seed_backup.enc"}'
|
||||
```
|
||||
|
||||
### Retrieving Vault Statistics
|
||||
|
||||
Get profile stats such as entry counts with `GET /api/v1/stats`:
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer <token>" \
|
||||
http://127.0.0.1:8000/api/v1/stats
|
||||
```
|
||||
|
||||
### Changing the Master Password
|
||||
|
||||
Update the vault password via `POST /api/v1/change-password`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/change-password \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
### Verifying the Script Checksum
|
||||
|
||||
Check that the running script matches the stored checksum:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/checksum/verify \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
### Updating the Script Checksum
|
||||
|
||||
Regenerate the stored checksum using `/api/v1/checksum/update`:
|
||||
|
||||
```bash
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/checksum/update \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
### Managing Relays
|
||||
|
||||
List, add, or remove Nostr relays:
|
||||
|
||||
```bash
|
||||
# list
|
||||
curl -H "Authorization: Bearer <token>" http://127.0.0.1:8000/api/v1/relays
|
||||
|
||||
# add
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/relays \
|
||||
-H "Authorization: Bearer <token>" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"url": "wss://relay.example.com"}'
|
||||
|
||||
# remove first relay
|
||||
curl -X DELETE http://127.0.0.1:8000/api/v1/relays/1 \
|
||||
-H "Authorization: Bearer <token>"
|
||||
|
||||
# reset to defaults
|
||||
curl -X POST http://127.0.0.1:8000/api/v1/relays/reset \
|
||||
-H "Authorization: Bearer <token>"
|
||||
```
|
||||
|
||||
### Enabling CORS
|
||||
|
||||
Cross‑origin requests are disabled by default. Set `SEEDPASS_CORS_ORIGINS` to a comma‑separated list of allowed origins before starting the API:
|
||||
|
Reference in New Issue
Block a user