@lssm-tech/app.cli-databaseapp.cli-database
Command-line database tooling for ContractSpec-managed schemas and operations.
@lssm-tech/app.cli-databaseSource, release and verification context
Source snapshot bcc79fcc · Declared package version 6.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
See where this package fits.
Follow a declared connection, inspect an import, then open the source guide when you need the detail.
Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.
@lssm-tech/app.cli-database
Website: https://contractspec.io
CLI tool for contract-source-first Drizzle/PostgreSQL database management: generate, migrate, seed, and schema operations.
What It Does
- Uses
@lssm-tech/lib.schemafor schema definitions. - Generates Drizzle/PostgreSQL artifacts from portable ContractSpec database entities.
- Commands dispatched via minimist argument parsing.
- Related ContractSpec packages include
@lssm-tech/lib.schema,@lssm-tech/tool.tsdown,@lssm-tech/tool.typescript.
Running Locally
From packages/apps/cli-database:
bun run devbun run build
Usage
npx database --help
# or
bunx database --helpArchitecture
- Uses
@lssm-tech/lib.schemafor schema definitions. - Generates Drizzle/PostgreSQL artifacts from portable ContractSpec database entities.
- Commands dispatched via minimist argument parsing.
src/cli.tsis the CLI entrypoint.src/index.tsis the root public barrel and package entrypoint.
Public Entry Points
- Binary
databasepoints todist/cli.js. - Export
.resolves through./dist/index.mjs. - Export
./cliresolves through./dist/cli.mjs. - Export
./commands/checkresolves through./dist/commands/check.mjs. - Export
./commands/generateresolves through./dist/commands/generate.mjs. - Export
./commands/importresolves through./dist/commands/import.mjs. - Export
./commands/migrateresolves through./dist/commands/migrate.mjs. - Export
./commands/schema-composeresolves through./dist/commands/schema-compose.mjs. - Export
./commands/schema-generateresolves through./dist/commands/schema-generate.mjs. - Export
./commands/seedresolves through./dist/commands/seed.mjs. - Export
./lib/configresolves through./dist/lib/config.mjs. - The package publishes 12 total export subpaths; keep docs aligned with
package.json.
Database Workflow Boundary
Prisma support is retired for supported workflows. Broad root workflows such as lint:fix, typecheck, and release checks must not run Prisma implicitly; use the explicit Drizzle/PostgreSQL packages/apps/cli-database commands below when a database schema workflow is required.
Local Commands
bun run dev— bun run build --watchbun run build— tsdownbun run lint— bun run lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rm -rf distbun run test— standalone host test: spawnssrc/cli.tsin a throwaway project (schema generate/compose, check, Drizzle config, dry-run and refused migrations, status, seed) with no databasebun run dbs:generate— database generate --dry-runbun run dbs:migrate— database migrate:dev --dry-runbun run dbs:deploy— database migrate:deploy --dry-runbun run dbs:status— database migrate:statusbun run dbs:seed— database seed
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
Notes
- Do not change CLI argument signatures without updating docs and CI scripts.
- Drizzle/PostgreSQL artifact generation is contract-source-first — test migrations carefully.
Declared capabilities.
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Imports and export paths.
14 entriesThese are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.
14 imports
@lssm-tech/app.cli-database/blueprint@lssm-tech/app.cli-database/cli@lssm-tech/app.cli-database/commands/check@lssm-tech/app.cli-database/commands/generate@lssm-tech/app.cli-database/commands/import@lssm-tech/app.cli-database/commands/migrate@lssm-tech/app.cli-database/commands/schema-compose@lssm-tech/app.cli-database/commands/schema-generate@lssm-tech/app.cli-database/commands/seed@lssm-tech/app.cli-database/lib/client@lssm-tech/app.cli-database/lib/config@lssm-tech/app.cli-database/lib/schema-config@lssm-tech/app.cli-database/*No export paths match this search.
Dependencies and related packages.
Runtime dependencies 6
- @lssm-tech/lib.contracts-spec
- workspace:^
- @lssm-tech/lib.schema
- workspace:^
- drizzle-kit
- catalog:data
- drizzle-orm
- catalog:data
- execa
- ^10.0.1
- minimist
- ^1.2.8
Development dependencies 4
- @lssm-tech/tool.tsdown
- workspace:*
- @lssm-tech/tool.typescript
- workspace:*
- @types/minimist
- ^1.2.5
- tsdown
- catalog:build
Package scripts.
Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.
rm -rf distbun publish --tolerate-republish --ignore-scripts --verbosebun publish:pkg --tag canarybun ../../../scripts/tsdown.mjsbun run build --watchbun run lint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .node ../../../scripts/biome.cjs check .database generate --dry-rundatabase migrate:dev --dry-rundatabase migrate:deploy --dry-rundatabase migrate:statusdatabase seed --dry-rundatabase schema:generatedatabase schema:composebun test