Skip to content

Getting Started

Goal: Go from zero to running your first natural language database query.

Time: ~3 minutes

Prerequisites:

  • A database (PostgreSQL, MySQL, SQLite, or DuckDB)
  • An API key from Anthropic, OpenAI, Google, or Groq
Terminal window
uv tool install sqlsaber
Terminal window
saber

On first run, SQLsaber walks you through:

  1. Database connection — Choose your database type and enter connection details
  2. Authentication — Enter your AI provider API key; credentials are stored in your OS keychain

After setup completes, you’re in interactive mode. Try:

> How many VPs have become presidents via election in the 20th century?

SQLsaber will:

  1. Discover relevant tables
  2. Analyze their schema
  3. Generate SQL
  4. Execute and explain results
CommandAction
/clearClear conversation history
/exitExit SQLsaber
@tablenameAutocomplete table names
#your noteAdd to memory (e.g., #dates are UTC)

Run single queries without entering the REPL:

Terminal window
# Direct query
saber "How many users signed up this week?"
# Specific database
saber -d production "Show me failed payments"
# Pipe from stdin
echo "Top 10 customers by revenue" | saber
# Save output
saber "Monthly active users" > report.md
ErrorFix
”No database connections configured”Run saber db add mydb
”Authentication not configured”Run saber auth setup
”Database connection failed”Run saber db test mydb to diagnose

For command reference, see saber --help or the full documentation.