Skip to content
NeuralRepo
Get Support

nrepo login / logout / whoami

Terminal window
nrepo login [--api-key]

Authenticates the CLI and writes an nrp_ key to ~/.config/neuralrepo/config.json. Without flags it runs the browser flow through GitHub; with --api-key it prompts for a key you already have. Authentication covers both flows end to end.

FlagTypeDefaultDescription
--api-keybooleanfalsePrompt for an API key instead of opening the browser.
Terminal window
# Browser login (any plan)
nrepo login
# API key login — prompts, does not take the key as an argument
nrepo login --api-key
# Same thing, non-interactive
echo "$NEURALREPO_API_KEY" | nrepo login --api-key

Both paths end with the same line, which includes your plan:

✔ Logged in as Alice (pro)
Terminal window
nrepo logout
# Logged out.

Overwrites the local config file with {}. Every other command then fails with Not logged in. Run \nrepo login` to authenticate.` until you log in again.

Terminal window
nrepo whoami [--json|--human]

Fetches the current account from GET /user/me. It is the cheapest way to check whether the CLI is authenticated at all.

FlagTypeDefaultDescription
--jsonbooleanfalseOutput as JSON.
--humanbooleanForce human-readable output. Wins over --json.
Terminal window
nrepo whoami
Alice
Email: alice@example.com
Plan: pro
ID: usr_abc123

The plan prints as the raw value — free or pro. Trial accounts report pro.

Terminal window
nrepo whoami --json
{
"id": "usr_abc123",
"email": "alice@example.com",
"display_name": "Alice",
"avatar_url": "https://avatars.githubusercontent.com/u/1?v=4",
"plan": "pro",
"settings_json": "{}",
"has_anthropic_key": true,
"has_openai_key": false,
"has_openrouter_key": false,
"active_idea_count": 137,
"is_trialing": false,
"trial_days_remaining": null,
"created_at": "2026-01-04 09:12:33",
"updated_at": "2026-07-21 18:40:02"
}

active_idea_count counts unarchived ideas, so it is the field to watch against the free plan’s 50-idea cap:

Terminal window
nrepo whoami --json | jq 'select(.plan == "free") | .active_idea_count'

is_trialing is true only while a Pro trial is running with no Stripe subscription behind it; trial_days_remaining is null otherwise.