Reference

trove auth

Updated 1 Oct 2026

On this page

For agents

Load this page when: you need to sign in, sign out or check the account behind the trove CLI

  • Run trove auth whoami --json to check the account, plan and read usage.
  • Use trove auth login --with-token and pipe the key on stdin on machines without a browser.
  • Never print or log the API key.

trove auth stores one API key on the machine and shows which account it belongs to. The key lives in ~/.trove/config.toml as plain text, so treat the file like a password.

Quick reference

CommandWhat it does
trove auth loginSign in through the browser
trove auth login --with-tokenSign in with an API key you already have
trove auth logoutRemove the stored key
trove auth whoamiShow the account, plan and usage

trove auth login

Signs in. The default opens your browser, you approve, and the CLI stores a new key. Use --with-token on a machine without a browser. Text output only.

Usage

bash
trove auth login [--with-token]

Arguments and flags

FlagValueDefaultMeaning
--with-tokennoneoffRead an API key from stdin, or from a hidden prompt, instead of opening a browser.

Example

bash
echo "$TROVE_KEY" | trove auth login --with-token

Output

The CLI checks the key with the server before it saves anything. Text output only.

Errors

MessageFix
No API key on stdin. Did the upstream command (e.g. `echo "$TROVE_API_KEY"`) produce output?The pipe was empty. Check that the variable is set.
No terminal to paste a key into. Pipe one to `trove auth login --with-token` instead.Run the command in a terminal, or pipe the key.
API key was rejected by the server.The key is wrong or revoked. Create a new one in API keys.
Could not validate API key (transport or server error)Check the network and retry. Do not look for other credentials.
Sign-in link expiredRun trove auth login again.

trove auth logout

Removes the stored key from the machine. The key itself stays valid until you revoke it in Settings. Text output only.

Usage

bash
trove auth logout

Output

โœ“ Logged out successfully.

If no key is stored, the CLI warns Not currently logged in.

trove auth whoami

Shows the signed-in account, the plan, the library size and the reads used this month.

Usage

bash
trove auth whoami [--json]

Example

bash
trove auth whoami --json

Output

Email          [email protected]
Plan           Personal plan
Items          3 / 12
Reads (month)  7 / 30
User ID        user_id_here
json
{
  "id": "user_id_here",
  "email": "[email protected]",
  "name": "Ada Example",
  "tier": "FREE",
  "itemLimit": 12,
  "itemCount": 3,
  "monthlyReadLimit": 30,
  "monthlyReadsUsed": 7,
  "tierDisplay": "Personal",
  "trial": null
}

The limits above are an example. Your own plan sets them. monthlyReadLimit is null on Pro. When the read limit is reached, the JSON adds readLimitMessage.

Errors

MessageFix
Not authenticated. Run 'trove auth login' first.Run trove auth login.
Invalid or revoked API keyCreate a new key and sign in again.

REST equivalent: Auth API.

    trove auth | Trove