Add totp codes command and endpoint

This commit is contained in:
thePR0M3TH3AN
2025-07-09 17:21:35 -04:00
parent 50a1ceeaea
commit ecc1086d47
8 changed files with 65 additions and 0 deletions

View File

@@ -14,6 +14,12 @@ $ seedpass entry get "email"
Code: 123456
```
To show all stored TOTP codes with their countdown timers, run:
```bash
$ seedpass entry totp-codes
```
## CLI and API Reference
See [advanced_cli.md](advanced_cli.md) for a list of command examples. Detailed information about the REST API is available in [api_reference.md](api_reference.md). When starting the API, set `SEEDPASS_CORS_ORIGINS` if you need to allow requests from specific web origins.

View File

@@ -61,6 +61,7 @@ Manage individual entries within a vault.
| Archive an entry | `entry archive` | `seedpass entry archive 1` |
| Unarchive an entry | `entry unarchive` | `seedpass entry unarchive 1` |
| Export all TOTP secrets | `entry export-totp` | `seedpass entry export-totp --file totp.json` |
| Show all TOTP codes | `entry totp-codes` | `seedpass entry totp-codes` |
### Vault Commands
@@ -141,6 +142,7 @@ Run or stop the local HTTP API.
- **`seedpass entry archive <id>`** Mark an entry as archived so it is hidden from normal lists.
- **`seedpass entry unarchive <id>`** Restore an archived entry.
- **`seedpass entry export-totp --file <path>`** Export all stored TOTP secrets to a JSON file.
- **`seedpass entry totp-codes`** Display all current TOTP codes with remaining time.
Example retrieving a TOTP code:

View File

@@ -28,6 +28,7 @@ Keep this token secret. Every request must include it in the `Authorization` hea
- `DELETE /api/v1/fingerprint/{fp}` Remove a fingerprint.
- `POST /api/v1/fingerprint/select` Switch the active fingerprint.
- `GET /api/v1/totp/export` Export all TOTP entries as JSON.
- `GET /api/v1/totp` Return current TOTP codes and remaining time.
- `GET /api/v1/nostr/pubkey` Fetch the Nostr public key for the active seed.
- `POST /api/v1/checksum/verify` Verify the checksum of the running script.
- `POST /api/v1/checksum/update` Update the stored script checksum.