Authentication
SQLsaber supports multiple LLM providers.
Providers
Section titled “Providers”SQLsaber supports the following LLM providers and authentication methods:
- Anthropic - API key or Claude Pro/Max subscription
- OpenAI - API key
- Google - API key
- Groq - API key
- Mistral - API key
- Cohere - API key
- Hugging Face - API key
Quick Setup
Section titled “Quick Setup”The fastest way to configure authentication:
saber auth setup
This interactive command will:
- Let you choose your AI provider
- Guide you through the authentication process
- Securely store your credentials
Anthropic
Section titled “Anthropic”SQLsaber uses Claude Sonnet 4 by default and supports two authentication methods:
Claude Pro/Max subscription (Recommended)
Section titled “Claude Pro/Max subscription (Recommended)”If you have a Claude Pro or Max subscription, you can use it with SQLsaber:
- Run the setup:
Terminal window saber auth setup - Choose “Anthropic” as your provider
- Select “Claude Pro/Max (OAuth)” as the authentication method
- Follow the browser-based OAuth flow
API Key
Section titled “API Key”- Get an API key from Anthropic Console
- Run the setup:
Terminal window saber auth setup - Choose “Anthropic” as your provider
- Select “API key” as the authentication method
- Enter your API key when prompted
Managing Authentication
Section titled “Managing Authentication”Check Authentication Status
Section titled “Check Authentication Status”See which providers are configured:
saber auth status
This shows:
- Currently configured providers
- Authentication methods (API key vs OAuth)
Reset Authentication
Section titled “Reset Authentication”To remove stored credentials for a provider:
saber auth reset
This will:
- Ask you to select which provider to reset
- Remove API keys from your OS credentials store
Multiple Providers
Section titled “Multiple Providers”You can configure multiple providers and switch between them when selecting models. Each provider’s credentials are stored securely and independently.
Environment Variables
Section titled “Environment Variables”You can also use environment variables for setting API keys.
Example:
# Anthropicexport ANTHROPIC_API_KEY="your-api-key"
# OpenAIexport OPENAI_API_KEY="your-api-key"
# Googleexport GOOGLE_API_KEY="your-api-key"
Environment variables take precedence over stored credentials.
Getting Help
Section titled “Getting Help”Check authentication status and configuration:
saber auth statussaber auth --help
What’s Next?
Section titled “What’s Next?”After setting up authentication: