Skip to content

Authentication

SQLsaber supports multiple LLM providers.

SQLsaber supports the following LLM providers:

  • Anthropic - API key
  • 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. Prompt you for an API key (or use an existing environment variable)
  3. Securely store your credentials

SQLsaber uses Claude Sonnet 4 by default.

  1. Get an API key from Anthropic Console
  2. Run the setup:
    Terminal window
    saber auth setup
  3. Choose “Anthropic” as your provider
  4. Enter your API key when prompted

See which providers are configured:

Terminal window
saber auth status

This shows:

  • Configured providers
  • Whether a provider is configured via environment variable or keychain

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 the stored API key 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