Querion logo
Querion.
Read-only
data analyst
Strictly read-only - runs on the Claude Code CLI

Ask your data in plain English.

Querion is a read-only data analyst. Point it at your Postgres database and any read-only API, and it answers business questions like a senior analyst: the number, the insight, the exact query, and a chart. No API key. It plugs into any platform, and it talks back in your chat apps.

read-only everywhere Postgres + any API charts + SQL Slack + WhatsApp ready
querion - ask
you ~
Glossary
01

What Querion does

Most teams have the data but not the analyst time. Dashboards answer the questions you planned for; everything else becomes a ticket. Querion turns the long tail of "can someone just pull..." into a chat message, while staying safe enough to point at production.

1 - Ask
Plain-English question in chat or the CLI
->
2 - Plan
Querion plans read-only steps
->
3 - Read
Postgres SELECTs + API GETs
->
4 - Answer
Insight, table, chart, and the query
Multi-source

One answer, many sources

It joins history in Postgres with live truth from your APIs in a single answer, picking the right source per question.

Covenant

Read-only by contract

SELECT and WITH only, GET only with a per-source allowlist, and a firewall that refuses any request to change data.

Transparent

Number plus the query

Every figure comes with the exact query and a short glossary of what it means, so you can trust it and reuse it.

No keys

Runs on Claude Code CLI

No API key to manage. Querion uses your locally authenticated Claude Code CLI as its brain, with Opus recommended.

02

Integrate any platform

If a platform has an API, Querion can read it. You do not write code. You give Querion three things, and it pulls the data and structures it into the answer for you.

querion.yaml - add one block per platform
sources:
  # Stripe, your billing, your 3PL, your CRM... any read API
  - name: stripe
    base_url: https://api.stripe.com
    auth_header: "Authorization: Bearer ${STRIPE_KEY}"
    safe_get:                # only these read paths are allowed
      - ^/v1/charges
      - ^/v1/customers
      - ^/v1/invoices
    docs: docs/sources/stripe.md

Now a single question can span Postgres and Stripe together. Querion fetches from each source, reconciles them, and returns one structured answer with the table, the chart, and the query behind it. Repeat the block for every platform you run.

Why the allowlist

A GET is not always read-only

Some real APIs expose state-changing operations over GET. The per-source safe_get list means Querion can only ever reach the read paths you name. This is a default, not an afterthought.

03

Bring it to your chat

Querion lives where your team already talks. A thin bridge forwards a message to Querion and posts the answer back, so the same analyst works in any instant-messaging app: Slack, WhatsApp, Microsoft Teams, Discord, or your own.

Messaging app
Slack / WhatsApp / Teams / Discord
->
Bridge
Socket Mode or a webhook handler
->
Querion
Read-only analyst loop
->
Reply
Answer + chart, in the thread
Slack - Socket Mode
@Querion repeat customers this week vs last
Repeat customers: 44 this week, up from 38 (+15.8%). Chart attached, query on request.
WhatsApp - Cloud API
net sales last 30 days?
GBP 312,480 net sales, last 30 days. Glossary: gross minus discounts and returns.
Any app - your bridge
top 5 products this quarter
Here are the top 5 by revenue, with units and the SQL.

The bridge is small: it receives a message, calls Querion, and replies. Daily per-user limits, a write-request firewall, and read-only sources travel with Querion, so opening it to a channel stays safe.

04

Set it up

From zero to asking questions in a few minutes. You need Python 3.9+, a Postgres database, and the Claude Code CLI logged in once on the host.

Install

Clone the repo and install with the web UI, charts, and dotenv extras.

shell
git clone https://github.com/anishfyi/querion.git
cd querion
pip install -e ".[all]"

Log in to the Claude Code CLI

Querion uses your local Claude Code session as its brain, so there is no API key. Run it once to authenticate.

shell
claude   # log in once (browser / your plan)

Configure

Copy the examples, then set your company name, database DSN, and any API sources.

shell
cp querion.example.yaml querion.yaml
cp .env.example .env
# edit .env with your read-only Postgres DSN + API keys

Create a read-only database role

Your strongest guarantee. Querion enforces read-only on top, but the role is the real backstop.

sql
CREATE ROLE querion_ro LOGIN PASSWORD 'choose-a-strong-one';
GRANT CONNECT ON DATABASE yourdb TO querion_ro;
GRANT USAGE ON SCHEMA public TO querion_ro;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO querion_ro;
ALTER ROLE querion_ro SET default_transaction_read_only = on;

Check, ask, serve

Validate the config and dependencies, ask a question in the terminal, or launch the web UI.

shell
querion check                          # config + DB + CLI
querion ask "orders and GMV last 7 days"
querion serve                          # web UI on :8000

Full configuration reference, the API-source format, and the architecture are in the repo. Start from the README.

05

Read-only, by construction

"It never writes" is true by design, with defense in depth. The only thing Querion ever produces is the answer.

Layer 1

Read-only role

A dedicated Postgres role with SELECT-only grants. Your strongest guarantee, and you own it.

Layer 2

SELECT / WITH only

A single statement, validated, with a write and DDL keyword denylist that also catches data-modifying CTEs.

Layer 3

GET only, allowlisted

HTTP egress is GET only, with a positive per-source allowlist for APIs that expose writes over GET.

Layer 4

Write-request firewall

If a user asks Querion to change data, the request is refused before it reaches any executor.

06

Smarter with Trove

Querion is far sharper when it knows your domain: what "active customer" means, which table is the source of truth, how your metrics are defined. Pair it with Trove, a companion that builds and maintains a file-based semantic layer as you work and reloads it every session. Enable it in the config and Querion folds that layer into its knowledge, so every answer speaks your business language.

Explore Trove