Skip to main content

schemabrain inspect

Renders the contents of the local store without touching the source database or making any LLM calls. Two modes:
  1. Summary (no argument) — entity / metric / join counts, sources, store size.
  2. Drill-down (name positional) — full body of one named resource, regardless of whether it’s an entity, metric, or canonical join.
# Summary
schemabrain inspect --store-path ./schemabrain.db

# Drill-down (resolves across all three namespaces)
schemabrain inspect users
For namespaced drill-down (when a name collides across namespaces), use schemabrain metrics show — it resolves only against the metrics namespace.

Flags

Argument / FlagDefaultPurpose
name (positional, optional)(summary mode)Resource name to drill into. Omit for a summary of the whole store.
--source URL(none)Source URL. Optional — omit to operate across every source in the store. Required only when the store carries resources from multiple sources AND you’re drilling by name.
--url-env VARNAME(none)Env var holding the source URL. Mutually exclusive with --source.
--store-path PATH./schemabrain.dbPath to the local SQLite store.

What you can see

In summary mode:
  • Source connections indexed.
  • Counts of tables, columns, entities, metrics, canonical joins.
  • Trust signals (origin, inference_method, validation_state) aggregated across resources.
  • Store path and rough size.
In drill-down mode:
  • The full resource body (the same content export would emit as YAML).
  • Trust signals — including ones diff deliberately excludes from comparison.
  • Cross-references (an entity shows which metrics anchor on it; a metric shows the entity it anchors on).

Examples

Quick store summary

schemabrain inspect

Drill into one entity

schemabrain inspect users

Disambiguate a name collision across sources

schemabrain inspect users --url-env DATABASE_URL

Inspect with multiple sources in one store

schemabrain inspect --source "postgresql+psycopg://prod-cluster/db1"
# Lists summary across only the prod-cluster source

When to use which

QuestionCommand
What’s in my store? (no source side effects)schemabrain inspect
What does this specific metric compile to?schemabrain metrics show <name>
Is the store in sync with the live source schema?schemabrain check
Is the store in sync with an on-disk YAML tree?schemabrain diff
Is my host wiring healthy?schemabrain doctor

schemabrain entities list

Plain list of confirmed entities.

schemabrain metrics show

Drill into one metric specifically.

schemabrain doctor

Health-check wiring as well as store state.

schemabrain check

Detect source-schema drift.