Skip to main content
The fastest path uses local connectors: no server, no network. Pick either SQLite or DuckDB.
canonic setup walkthrough on the rental example
See the Rental guide for the full walkthrough behind this recording.
Don’t have a database handy? The Guides section ships 5 ready-to-run sample projects (dbt Jaffle Shop, e-commerce, rental, SaaS analytics, Dutch railway), a good way to try the wizard before pointing it at your own data.
Point at a local .db file:
canonic setup
# Point at a .db file when prompted
If your source needs a password (Postgres) or your LLM provider needs an API key, set the corresponding environment variable before running canonic setup: canonic never stores secrets in canonic.yaml directly, only a credentials_ref like env:WAREHOUSE_PASSWORD pointing at it:
export WAREHOUSE_PASSWORD=...      # for a Postgres/Redshift connection
export ANTHROPIC_API_KEY=...       # or OPENAI_API_KEY / CANONIC_LLM_API_KEY, if configuring an LLM
See Configuring an LLM and canonic connection for the full credential reference formats (env:, keyring:, file:).

What the wizard does

1

Name your project

Give your canonic project a name.
2

Connect a source

SQLite/DuckDB file, or Postgres if you have a server.
3

Configure an LLM (optional)

Skippable: the core works without one. See Configuring an LLM.
4

Bootstrap

canonic introspects the schema and drafts your semantics.
5

First answer

The wizard runs a real query against your data and shows the result, plus how fresh it is and which definition it used.

Ask your own questions

You now have a working context layer committed to your repo:
canonic query --metrics revenue --dimensions order_date
canonic query --metrics revenue --filter "status=paid"
For a query with more filters or joins than is comfortable inline, write a SemanticQuery JSON file and pass it with -f instead; see canonic query for the full flag reference.
canonic knowledge search is not implemented yet; see CLI Reference: knowledge for its current status.

Review what canonic drafted

It’s all an ordinary git diff:
canonic review
canonic status        # always tells you the best next step

Out of the box vs. a bit more effort

Works immediately, zero modeling:
  • Connect a database (SQLite or Postgres) and canonic introspects the live schema.
  • It auto-drafts semantics: typed columns, primary-key grains, foreign-key joins, and additive measures (sums, counts).
  • The setup wizard ends by answering a real question from your data, so you see the payoff in minutes.
  • Connect your agent over MCP and start asking.
A bit more manual effort (when you need it):
  • Canonical bindings: when two sources define “revenue” differently, you pick the authoritative one. canonic surfaces the ambiguity; you resolve it once.
  • Knowledge prose: the business “why” behind a definition; canonic drafts it, you refine it.
  • Guardrails & contracts: mandatory filters, required dimensions, final-vs-provisional rules. Added when a number needs protecting.
  • Non-additive metrics: ratios, averages, distinct counts, balances. Declared as composable definitions so they stay correct at any grain.
  • More sources: dbt / Metabase / Notion / web pages, layered on as context evidence. The connector contract is extensible, so a Confluence, Jira, or other wiki/knowledge-base connector can be added the same way.
The design principle throughout: canonic proposes, you approve. It never silently edits your context: every change is a reviewable diff.