API-key providers like OpenAI, Anthropic, and SendGrid don’t run an OAuth flow — you have one long-lived secret. Authsome captures it through a local browser form so it never appears in shell history or process listings, then stores it encrypted in your profile.Documentation Index
Fetch the complete documentation index at: https://authsome.mbajaj.me/llms.txt
Use this file to discover all available pages before exploring further.
Log in
http://127.0.0.1:7999. Paste the API key into the masked input and submit. The terminal prints Successfully logged in to openai (default).
Confirm the connection
--show-secret reveals the stored value. Use it sparingly — the safer pattern is authsome run (see below).
Multiple keys for the same provider
Use the--connection flag to keep multiple keys side by side. For example, a personal OpenAI key and a team key:
Pattern validation
Some bundled providers ship akey_pattern regex in their definition. Authsome rejects keys that fail the regex with a hint:
Use the key in an agent
Two common patterns.Through the proxy
OPENAI_API_KEY=authsome-proxy-managed in the child’s environment so the SDK initializes, then injects the real key into outbound requests to api.openai.com. The child process never sees the actual key.
As an environment variable
export prints KEY=value lines on stdout. Source the output in your shell to load the variable, or pipe it into a script that needs it.
Rotate a key
To replace the stored key with a new one:--force flag overwrites the existing connection. Pass --connection <name> to target a non-default connection.
Remove a key
authsome revoke <provider> also calls the provider’s revocation endpoint. API-key providers have no revocation endpoint, so revoke and remove are equivalent for them.
What’s next
Run agents with the proxy
Keep the key out of the agent’s environment entirely.
Custom providers
Add an API-key provider that authsome doesn’t ship.