> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcanonic.app/llms.txt
> Use this file to discover all available pages before exploring further.

# canonic ingest

> Reconcile configured sources into reviewable context diffs.

`canonic ingest` runs the four-stage ingestion pipeline: introspect each configured connection into normalized evidence, draft proposals, reconcile them against the accepted files, validate the proposed state, and emit reviewable diffs plus a reconciliation report.

```bash theme={null}
canonic ingest
canonic ingest --bootstrap
canonic ingest --dry-run
canonic ingest --connection warehouse --strict
```

Propose-only by default. It writes the audit trail and refreshes `last_validated_at` on unchanged files, but never edits committed semantics in place.

Alongside connector evidence, `canonic ingest` also gathers E11 outcome evidence from `.canonic/events.jsonl`: bindings with a recurring, gate-crossing pattern of `wrong_definition` outcomes get flagged as contradictions the same way any other conflicting evidence would. See [Feedback loop (E11)](/concepts/ingestion-and-reconciliation#feedback-loop-e11).

| Flag                    | Description                                                                         |
| ----------------------- | ----------------------------------------------------------------------------------- |
| `--bootstrap`           | Fast initial path for a fresh connection: introspect and draft that one connection. |
| `--dry-run`             | Print proposed diffs and write nothing.                                             |
| `--connection`          | Limit the run to a single connection id.                                            |
| `--headless`            | Force headless mode (also auto-detected via `CI=true`).                             |
| `--strict`              | Fail the run (exit `14`) if any contradiction is flagged.                           |
| `--open-pr` / `--no-pr` | Force or suppress the auto-PR (defaults to on in headless mode).                    |

## Headless mode

Headless mode (explicit `--headless`, or auto-detected when `CI=true`) pins the deterministic builder, opens an auto-PR carrying the diffs and any contradiction notes, and gates the run on the canonical exit codes: the safe, repeatable path for scheduled ingest in CI.

## After a run

Review what was drafted with [`canonic review`](/cli-reference/review-apply), or batch-apply with [`canonic apply`](/cli-reference/review-apply).

## `canonic ingest add-tables`

A connection's `params.tables`/`params.schemas` filters (set during `canonic setup`) narrow discovery at the introspection level, so a plain `canonic ingest` never sees tables outside that filter, no matter how often it runs. `add-tables` widens the scope: it re-introspects the connection unfiltered, drops any table already curated under `semantics/` for that connection, and opens the same interactive schema/table picker used in `canonic setup` over what's left.

```bash theme={null}
canonic ingest add-tables
canonic ingest add-tables --connection warehouse
canonic ingest add-tables --connection warehouse --dry-run
```

| Flag                  | Description                                                                                       |
| --------------------- | ------------------------------------------------------------------------------------------------- |
| `--connection` / `-c` | Connection id to widen (default: the only one configured, but required if there's more than one). |
| `--dry-run`           | Print proposed diffs and write nothing.                                                           |

If the connection already had a `tables` filter, the picked tables are merged into it and persisted back to `canonic.yaml`. If the connection was unfiltered (all tables visible), nothing is persisted: the picked tables only scope this one run, so future ingests keep auto-discovering new tables. Either way, curated tables are never touched: the ingest that follows the picker is a normal propose-only run, so newly picked tables land as `ADD` proposals for [`canonic review`](/cli-reference/review-apply).
