{% extends "base.html" %} {% import "partials/icons.html" as icons %} {% block title %}Brewlog · Admin{% endblock %} {% block head %} {% endblock %} {% block content %}

Admin

Manage your passkeys, API tokens, and data.

Passkeys

Passkeys let you sign in securely without a password.

{% for passkey in passkeys %}
{{ icons::key("h-4 w-4 text-accent shrink-0") }}
{{ passkey.name }} Added {{ passkey.created_at }} · {% if let Some(last_used) = passkey.last_used_at %}Last used {{ last_used }}{% else %}Never used{% endif %}
{% if passkeys.len() > 1 %} {% endif %}
{% endfor %}
{% if passkeys.len() <= 1 %}

Add another passkey before removing your only one.

{% endif %}

API Tokens

Use tokens to authenticate the CLI or REST API.

{% if tokens.is_empty() %}

No active tokens.

{% else %}
{% for token in tokens %}
{{ icons::terminal("h-4 w-4 text-accent shrink-0") }}
{{ token.name }} Created {{ token.created_at }} · {% if let Some(last_used) = token.last_used_at %}Last used {{ last_used }}{% else %}Never used{% endif %}
{% endfor %}
{% endif %}

Data

Export all coffee data as JSON, restore from a previous backup, or reset to start fresh.

{{ icons::arrow_down_tray("h-4 w-4") }} New Backup
{% if let Some(usage) = ai_usage %}

AI Usage

Total Cost {{ usage.cost }}
API Calls {{ usage.calls }}
Total Tokens {{ usage.tokens }}
{% endif %}

Sign Out

Sign out on this device.

{% endblock %}