Getting Started
Welcome to SQLsaber! This guide will walk you through setting up SQLsaber and running your first query.
Before you begin, make sure you have:
- Installed SQLsaber
- Access to a database (PostgreSQL, MySQL, SQLite, or DuckDB)
- An API key from a supported AI provider (Anthropic, OpenAI, Google, etc.)
Quick Setup
Section titled “Quick Setup”1. Launch the Onboarding Flow
Section titled “1. Launch the Onboarding Flow”Run SQLsaber with no arguments to start the guided setup:
saberOn your first run, SQLsaber walks you through two guided steps:
-
Database connection: Choose the database type and provide connection details.
-
Authentication: Sign in to your preferred AI provider and pick a model. We recommend Sonnet 4.5, 4 or GPT-5.
sqlsaberwill store your API key securely using your OS credential store.
When both steps succeed you’ll see a confirmation screen, and SQLsaber immediately opens an interactive session.
2. Ask Your First Question
Section titled “2. Ask Your First Question”Once onboarding completes, you’re already in interactive mode. Try asking a question:
> How many VPs have become presidents via election in 20th century?SQLsaber will:
- Analyze your database schema
- Generate appropriate SQL
- Execute the query
- Present the results and analysis
Interactive Mode
Section titled “Interactive Mode”In interactive mode, you have access to several helpful features:
-
Slash Commands
/clear- Clear the conversation history/exitor/quit- Exit SQLsaber
-
Table Name Autocomplete
- Type
@followed by a table name to get autocomplete suggestions:
- Type
Non-Interactive Mode
Section titled “Non-Interactive Mode”You can also run single queries without entering interactive mode:
# Direct querysaber "How many users are there?"
# Using a specific databasesaber -d my-database "Show me the latest orders"
# Reading from stdinecho "Count all products by category" | saber
# Send output to a filesaber "Show me the latest orders" > latest_orders.mdNext Steps
Section titled “Next Steps”Now that you have SQLsaber running, explore these features:
- Set up memory - Add context about your database for better results
- Manage conversation threads - Resume your conversations
- Configure different models - Try different AI models
- Advanced database setup - Configure SSL, connection strings, and more
Getting Help
Section titled “Getting Help”- Use
saber --helpto see all available commands - Check the command reference for detailed documentation
- Visit our GitHub repository for issues and contributions
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”“No database connections configured”
saber db list # Check configured databasessaber db add my-db # Add a new database“Authentication not configured”
saber auth status # Check auth statussaber auth setup # Set up authentication“Database connection failed”
saber db test my-database # Test the connectionFor more troubleshooting help, see our installation guide.