auth
Manage the local daemon’s authentication: a single user account (for the Web UI) and any number of API keys (for programmatic access). These commands work offline against ~/.snippbot/auth.db, so they function even when the daemon is not running.
Overview
Section titled “Overview”snippbot auth create-user # Create/reset the daemon usersnippbot auth change-password # Change the user passwordsnippbot auth status # Show user + active API keyssnippbot auth create-key # Generate an API keysnippbot auth list-keys # List API keyssnippbot auth revoke-key <id> # Revoke an API keysnippbot auth regenerate-key <id> # Revoke + recreate with same namesnippbot auth create-user
Section titled “snippbot auth create-user”Create the daemon user account. The local daemon follows a single-user model; re-creating requires --force and deletes the prior account along with all its API keys.
snippbot auth create-usersnippbot auth create-user --username admin --force| Option | Description |
|---|---|
--username | Username (min 3 chars). Prompted if omitted. |
--password | Password (min 8 chars). Prompted hidden + confirmed. |
--force | Override an existing account (deletes the old account) |
snippbot auth change-password
Section titled “snippbot auth change-password”Change the user password. Requires the current password for verification. All active sessions are revoked on success.
snippbot auth change-passwordBoth --current-password and --new-password are prompted hidden; the new password is confirmed.
snippbot auth status
Section titled “snippbot auth status”Show the user account (if any) and all active API keys.
snippbot auth statusSample output:
User: admin Created: 2026-04-10T12:34:56 Last login: 2026-04-15T09:12:03
API Keys: 2 active┌──────────┬────────────┬──────────────┬─────────────┐│ Name │ Prefix │ Created │ Last Used │├──────────┼────────────┼──────────────┼─────────────┤│ my-ci │ sk-snpb- │ 2026-04-11 │ 2026-04-15 ││ backup │ sk-snpb- │ 2026-04-12 │ never │└──────────┴────────────┴──────────────┴─────────────┘snippbot auth create-key
Section titled “snippbot auth create-key”Generate a new API key.
snippbot auth create-key --name "my-script"snippbot auth create-key # Prompts for namesnippbot auth list-keys
Section titled “snippbot auth list-keys”List API keys. Revoked keys are hidden unless --all is passed.
snippbot auth list-keys # Active onlysnippbot auth list-keys --all # Include revokedsnippbot auth revoke-key
Section titled “snippbot auth revoke-key”Revoke a key by ID. The key stops working immediately; its ID stays in the database for audit.
snippbot auth revoke-key abc123snippbot auth revoke-key abc123 --yes # Skip confirmationsnippbot auth regenerate-key
Section titled “snippbot auth regenerate-key”Atomically revoke the old key and create a new one with the same human-readable name. The old key stops working; the new key is shown once.
snippbot auth regenerate-key abc123 --yesRelated
Section titled “Related”- secrets — encrypted vault for third-party API keys (Anthropic, OpenAI, etc.)
- API Reference — using API keys against the daemon’s REST surface