Skip to content

[MVP] Auto-detect API keys from common locations #255

@mikejmorgan-ai

Description

@mikejmorgan-ai

Zero Config API Keys

Automatically find API keys without user setting env vars:

$ cortex install nginx

🔑 Found Anthropic API key in ~/.config/anthropic
📦 Installing nginx...

Check Locations (in order)

  1. Environment: ANTHROPIC_API_KEY, OPENAI_API_KEY
  2. ~/.cortex/.env
  3. ~/.config/anthropic (Claude CLI location)
  4. ~/.config/openai
  5. .env in current directory

Requirements

  • Check all locations on startup
  • Cache found key location
  • Prompt to save if entered manually
  • Show which provider being used

Fallback

If no key found:

No API key found. Enter your Anthropic or OpenAI key:
> sk-ant-...
Save to ~/.cortex/.env? [Y/n]

Bounty: $15 now (+$15 match after funding)

Total: $30 when we close our funding round.

Metadata

Metadata

Labels

MVPKiller feature sprintenhancementNew feature or requestgood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions