Skip to content

Authentication

SQLsaber supports multiple LLM 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

The fastest way to configure authentication:

Terminal window
saber auth setup

This interactive command will:

  1. Let you choose your AI provider
  2. Guide you through the authentication process
  3. Securely store your credentials

SQLsaber uses Claude Sonnet 4 by default and supports two authentication methods:

If you have a Claude Pro or Max subscription, you can use it with SQLsaber:

  1. Run the setup:
    Terminal window
    saber auth setup
  2. Choose “Anthropic” as your provider
  3. Select “Claude Pro/Max (OAuth)” as the authentication method
  4. Follow the browser-based OAuth flow
  1. Get an API key from Anthropic Console
  2. Run the setup:
    Terminal window
    saber auth setup
  3. Choose “Anthropic” as your provider
  4. Select “API key” as the authentication method
  5. Enter your API key when prompted

See which providers are configured:

Terminal window
saber auth status

This shows:

  • Currently configured providers
  • Authentication methods (API key vs OAuth)

To remove stored credentials for a provider:

Terminal window
saber auth reset

This will:

  1. Ask you to select which provider to reset
  2. Remove API keys from your OS credentials store

You can configure multiple providers and switch between them when selecting models. Each provider’s credentials are stored securely and independently.

You can also use environment variables for setting API keys.

Example:

Terminal window
# Anthropic
export ANTHROPIC_API_KEY="your-api-key"
# OpenAI
export OPENAI_API_KEY="your-api-key"
# Google
export GOOGLE_API_KEY="your-api-key"

Environment variables take precedence over stored credentials.

Check authentication status and configuration:

Terminal window
saber auth status
saber auth --help

After setting up authentication:

  1. Configure your preferred models
  2. Set up database connections
  3. Start querying your data
  4. Learn about different query modes