Running queries
Ask a question about your data. SQLsaber writes SQL, runs it, and explains the result.
Start interactive mode
Section titled “Start interactive mode”saberType /help for slash commands. Type @ and press Tab to complete a table name. The full list is in Commands.
Ask one question
Section titled “Ask one question”saber "How many orders were placed last week?"Use this in scripts, for a quick check, or for a one-line report.
Pipe a question
Section titled “Pipe a question”echo "Count all active customers from last week" | saber
cat query.txt | saberSelect a database
Section titled “Select a database”If a default connection exists:
saber "Show me sales data"To use a saved connection by name:
saber -d prod-db "What's our revenue this month?"To use a local file:
saber -d "./data/sales.db" "Top selling products"saber -d "./data/warehouse.duckdb" "Latest partitions"saber -d "./customers.csv" "How many customers per state?"saber -d "./orders.parquet" "What is total revenue?"To use a connection string for this run only:
saber -d "postgresql://user:pass@host:5432/db" "Count all users"Turn thinking on or off
Section titled “Turn thinking on or off”A fresh install has thinking on at medium. Raise the level for harder analysis. Turn thinking off when the question is small.
In interactive mode:
> /thinkingThinking: enabled (medium)
> /thinking high✓ Thinking: enabled (high)
> Analyze sales trends and forecast next quarter
> /thinking off✓ Thinking: disabledFor a single query:
saber --thinking "Compare performance across regions with seasonal adjustments"
saber --no-thinking "How many users do we have?"To save a default level, run saber models set and answer the thinking prompts. Check the saved values with saber models current.
Levels are off, minimal, low, medium, high, and maximum. Each level maps to a provider setting:
- Anthropic:
budget_tokensfrom 1,024 to 100,000 - OpenAI:
reasoning_effortfrom minimal to xhigh - Google:
thinking_levelfrom MINIMAL to HIGH - Groq: any non-off level enables reasoning
Start a fresh thread with context
Section titled “Start a fresh thread with context”When the conversation is long, or you want a new direction without losing what you found, run /handoff:
> /handoff optimize the monthly revenue query for better performanceSQLsaber summarizes the conversation, shows an editable draft prompt, ends the current thread, and starts a new one with that prompt.
Allow writes
Section titled “Allow writes”SQLsaber allows SELECT only unless you pass --allow-dangerous:
saber --allow-dangerous "Insert a new user with email test@example.com"
saber --allow-dangerousDangerous mode allows INSERT, UPDATE, and DELETE (UPDATE and DELETE require WHERE), plus CREATE TABLE, CREATE VIEW, CREATE INDEX, and ALTER TABLE.
It still blocks DROP, TRUNCATE, transaction control, GRANT, REVOKE, ATTACH, DETACH, and admin objects such as functions, procedures, triggers, users, roles, and databases.
The full policy is in Commands.
If the connection fails
Section titled “If the connection fails”saber db test my-databasesaber db list