Skip to content

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.

Terminal window
snippbot auth create-user # Create/reset the daemon user
snippbot auth change-password # Change the user password
snippbot auth status # Show user + active API keys
snippbot auth create-key # Generate an API key
snippbot auth list-keys # List API keys
snippbot auth revoke-key <id> # Revoke an API key
snippbot auth regenerate-key <id> # Revoke + recreate with same name

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.

Terminal window
snippbot auth create-user
snippbot auth create-user --username admin --force
OptionDescription
--usernameUsername (min 3 chars). Prompted if omitted.
--passwordPassword (min 8 chars). Prompted hidden + confirmed.
--forceOverride an existing account (deletes the old account)

Change the user password. Requires the current password for verification. All active sessions are revoked on success.

Terminal window
snippbot auth change-password

Both --current-password and --new-password are prompted hidden; the new password is confirmed.


Show the user account (if any) and all active API keys.

Terminal window
snippbot auth status

Sample 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 │
└──────────┴────────────┴──────────────┴─────────────┘

Generate a new API key.

Terminal window
snippbot auth create-key --name "my-script"
snippbot auth create-key # Prompts for name

List API keys. Revoked keys are hidden unless --all is passed.

Terminal window
snippbot auth list-keys # Active only
snippbot auth list-keys --all # Include revoked

Revoke a key by ID. The key stops working immediately; its ID stays in the database for audit.

Terminal window
snippbot auth revoke-key abc123
snippbot auth revoke-key abc123 --yes # Skip confirmation

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.

Terminal window
snippbot auth regenerate-key abc123 --yes

  • secrets — encrypted vault for third-party API keys (Anthropic, OpenAI, etc.)
  • API Reference — using API keys against the daemon’s REST surface