Configuration
Configure the CLI using environment variables. API keys are required for most commands beyond
the free scan.
Environment Variables
Set these in your shell profile (~/.bashrc, ~/.zshrc) or a .env file:
| Variable | Description | Required | Default |
|---|---|---|---|
| OPENROUTER_API_KEY | OpenRouter API key for AI classification (recommended, cheapest) | For classification | — |
| ANTHROPIC_API_KEY | Anthropic API key for direct Claude access | Alternative to OpenRouter | — |
| OPENAI_API_KEY | OpenAI API key for embeddings and semantic search | For embeddings | — |
| GOOGLE_MAPS_API_KEY | Google Maps API key for geocoding locations | For geocoding | — |
| CLASSIFIER_MODEL | AI model to use for classification | Optional | gemini-2.5-flash |
| HOME_COUNTRY | Default home country for geocoding bias | Optional | — |
| TIMEZONE | Default timezone for date parsing | Optional | — |
| CHAT_TO_MAP_CACHE_DIR | Custom cache directory location | Optional | ~/.cache/chat-to-map |
Quick Setup
Add your API keys to your shell profile:
# Add to ~/.zshrc or ~/.bashrc
export OPENROUTER_API_KEY="sk-or-..."
export GOOGLE_MAPS_API_KEY="AIza..."
# Optional: for embeddings
export OPENAI_API_KEY="sk-..."AI Model Selection
The CLASSIFIER_MODEL environment variable controls which AI model is used for
classification. The model ID determines which provider and API key is required:
| Model ID | Provider | API Model | Required Key | Notes |
|---|---|---|---|---|
| gemini-2.5-flash | OpenRouter | google/gemini-2.5-flash | OPENROUTER_API_KEY | Cheapest |
| haiku-4.5 | Anthropic | claude-haiku-4-5 | ANTHROPIC_API_KEY | Fast |
| haiku-4.5-or | OpenRouter | anthropic/claude-3-5-haiku-latest | OPENROUTER_API_KEY | Fast |
| gpt-5-mini | OpenAI | gpt-5-mini | OPENAI_API_KEY | Balanced |
Example: Use Claude directly instead of OpenRouter:
export CLASSIFIER_MODEL="haiku-4.5"Cache Directory
By default, the CLI caches results in ~/.cache/chat-to-map/. You can customize
this:
# Via environment variable
export CHAT_TO_MAP_CACHE_DIR="/custom/path"
# Or per-command
chat-to-map analyze chat.zip --cache-dir /tmp/cacheTo skip caching entirely and regenerate all results:
chat-to-map analyze chat.zip --no-cacheHome Country & Timezone
These settings help with geocoding bias (preferring locations in your country) and date parsing. They're auto-detected by default but can be overridden:
# Via environment variables
export HOME_COUNTRY="New Zealand"
export TIMEZONE="Pacific/Auckland"
# Or per-command
chat-to-map analyze chat.zip -c "United States" --timezone "America/New_York"Getting API Keys
OpenRouter (Recommended)
OpenRouter provides access to multiple AI models with a single API key and often lower prices.
- Sign up at openrouter.ai
- Add credits to your account
- Copy your API key from the dashboard
Google Maps
Required for geocoding locations to coordinates.
- Go to the Google Cloud Console
- Create a project or select an existing one
- Enable the "Geocoding API"
- Create an API key and restrict it to the Geocoding API
OpenAI (Optional)
Only needed if you want to use embeddings for semantic search (improves candidate detection).
- Sign up at platform.openai.com
- Add credits to your account
- Create an API key in the dashboard