@typed-sql/cli
v2.1.0
Published
Config-driven typed-sql generation, checking, verification, and migration compatibility CLI.
Downloads
1,039
Readme
@typed-sql/cli
The stable, config-driven command line interface for typed-sql. It generates deterministic database snapshots, checks inferred queries through TypeScript, detects schema drift, emits deterministic query manifests, verifies compiler evidence through optional native database metadata, captures redacted structured query plans, reviews explicit plan budgets, and analyzes migrations against compiled query contracts.
pnpm add -D @typed-sql/cli [email protected]Install a grammar and its application-owned driver, then create typed-sql.config.ts.
pnpm exec typed-sql generate
pnpm exec typed-sql doctor
pnpm exec typed-sql check --file src/query.ts --project tsconfig.json
pnpm exec typed-sql drift
pnpm exec typed-sql manifest
pnpm exec typed-sql verify --live
pnpm exec typed-sql verify
pnpm exec typed-sql explain --compare artifacts/plans.json
pnpm exec typed-sql compat --before before.schema.json --after after.schema.json --before-manifest before.queries.json --after-manifest after.queries.jsonUse --config path/to/typed-sql.config.ts to bypass config discovery. Run
pnpm exec typed-sql --help for command options.
typed-sql doctor checks the exact Node.js and TypeScript boundary, grammar and schema identities,
redacted server evidence, installed language-server/bridge metadata, and editor protocol window.
Use --json for automation and --protocol <version> to check a specific client. The report emits
hashes and setting names, never setting values, schema expressions, source text, or absolute paths.
The CLI contains no PostgreSQL, MySQL, pg, or mysql2 dependency. It loads the installed grammar
and schema provider through the application config. Read
Configuration and
Schema snapshots, and
Query manifests.
Live verification documents
native safety, cached proofs, and CI behavior.
Query plan governance
documents structured evidence, transient parameter samples, budgets, and optimizer uncertainty.
Migration compatibility
documents deterministic reports, rolling deployments, and migration-runner integration.
MIT © typed-sql contributors
