Authenticate#
Skip this section on a first run in a real terminal: starting earshot with no
credentials configured opens the TUI into onboarding — pick a provider, search
and select one of its model IDs, then sign in or paste a key. That exact model is
checked with one live call before you land in your first turn. Nothing is printed or logged: the key goes straight into the same
auth.json earshot auth login writes to, 0600 and atomic. --no-onboarding
restores the old dead end for scripts and CI, and earshot -p and earshot acp
never onboard — a script has nobody to answer a prompt, so a missing credential
there still exits 3 immediately, same as always.
To set up credentials ahead of time instead, or for a provider onboarding does not ask about first:
earshot resolves credentials in a fixed order, first match wins:
- A CLI flag (
--api-key) - The provider's environment variable
~/.config/earshot/auth.json(mode0600on POSIX)- Provider-native ambient credentials — the AWS credential chain, Google ADC
For most providers, setting one environment variable is all you need:
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
export GEMINI_API_KEY=...
export OPENROUTER_API_KEY=sk-or-...Every provider and its variables: Providers.
Bedrock and Vertex use ambient credentials — if aws or gcloud already works
on your machine, earshot works too. No key to set.
Local runtimes need no credentials at all:
ollama serve # earshot discovers whatever you have pulled