Querion / Get started
Quickstart
Go from a fresh clone to your first Querion answer: create a read-only role, configure, check, ask, and serve the web UI.
On this page
This assumes you completed Installation and are logged in to the Claude Code command-line interface (CLI).
1. Create a read-only database role
Querion applies its own checks, but the database role is the strongest guarantee: Postgres refuses a write from a role that has no write privileges, whatever text reaches it. Connecting data sources has the Structured Query Language (SQL) to create one.
2. Configure
cp querion.example.yaml querion.yaml
cp .env.example .env
Edit .env and set QUERION_DATABASE_DSN to a connection string for the read-only role. Then edit querion.yaml. The example file includes a sample application programming interface (API) source that points at api.example.com; remove it until you have a real one. A minimal querion.yaml:
company: "Acme Inc"
model: opus
database:
dsn: ${QUERION_DATABASE_DSN}
sources: []
limits:
daily_per_user: 50
Every key is described in the configuration reference.
3. Check
querion check
With the minimal config and a working setup, the output looks like this:
company : Acme Inc
model : opus
claude CLI : found
database : ok (read-only)
sources : none
trove semantic : disabled
daily per user : 50
The database line comes from running SELECT 1. It proves the connection string works. It does not prove the role is read-only. The claude CLI line proves the binary exists, not that it is logged in.
4. Ask
querion ask "how many orders were placed in the last 7 days?"
The command prints Querion is thinking (opus)..., then one line per step with the directives that ran (sql, source:NAME or chart), then the answer:
Querion is thinking (opus)...
step 1: sql
<the answer: a headline, a compact table and the query in a sql block>
Each step is one model call followed by the reads it asked for. If the model can answer without reading data, no step lines are printed.
5. Serve the web UI
querion serve
The web user interface (UI) is at http://127.0.0.1:8000. It shows each step as it runs, draws charts, and lists the exact SQL behind the answer under “Show SQL”. The default host is 127.0.0.1, so only this machine can reach it. Read CLI and web API before exposing it.
Optional: add an API source
Add a block under sources: and a Markdown file that describes the read endpoints. Connecting data sources walks through it.
If something fails
Troubleshooting lists the messages each step can print, with causes and fixes.