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
1. Install
Section titled “1. Install”uv tool install sqlsaber2. Run the setup
Section titled “2. Run the setup”saberOn first run, SQLsaber walks you through:
- Database connection — Choose your database type and enter connection details
- Authentication — Enter your AI provider API key; credentials are stored in your OS keychain
3. Ask your first question
Section titled “3. Ask your first question”After setup completes, you’re in interactive mode. Try:
> How many VPs have become presidents via election in the 20th century?SQLsaber will:
- Discover relevant tables
- Analyze their schema
- Generate SQL
- Execute and explain results
Interactive mode commands
Section titled “Interactive mode commands”| Command | Action |
|---|---|
/clear | Clear conversation history |
/exit | Exit SQLsaber |
@tablename | Autocomplete table names |
#your note | Add to memory (e.g., #dates are UTC) |
Non-interactive mode
Section titled “Non-interactive mode”Run single queries without entering the REPL:
# Direct querysaber "How many users signed up this week?"
# Specific databasesaber -d production "Show me failed payments"
# Pipe from stdinecho "Top 10 customers by revenue" | saber
# Save outputsaber "Monthly active users" > report.mdNext steps
Section titled “Next steps”- Add memory — Teach SQLsaber about your database conventions
- Resume threads — Continue past conversations
- Configure models — Switch AI providers or models
- Database setup — SSL, connection strings, multiple databases
Troubleshooting
Section titled “Troubleshooting”| Error | Fix |
|---|---|
| ”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.