Skip to content
ContractSpec
Start here

Package manual · apps

·CLI, authoring and agent tooling

app.cli-databases

Multi-database command-line workflows for ContractSpec workspaces.

appsappv5.0.4stableservernode
@lssm-tech/app.cli-databases
bun add @lssm-tech/app.cli-databases
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

CLI orchestrator for multi-database workflows. Coordinates operations across multiple database profiles defined in a project.

What It Does

  • Lightweight CLI with no workspace bundle dependencies.
  • Uses minimist for argument parsing, execa for subprocess execution.
  • Delegates per-database work to cli-database.
  • Related ContractSpec packages include @lssm-tech/tool.tsdown, @lssm-tech/tool.typescript.

Running Locally

From packages/apps/cli-databases:

  • bun run dev
  • bun run build

Usage

bash
npx databases --help
# or
bunx databases --help

Architecture

  • Lightweight CLI with no workspace bundle dependencies.
  • Uses minimist for argument parsing, execa for subprocess execution.
  • Delegates per-database work to cli-database.
  • src/cli.ts is the CLI entrypoint.
  • src/index.ts is the root public barrel and package entrypoint.

Public Entry Points

  • Binary databases points to dist/cli.js.
  • Export . resolves through ./dist/index.mjs.
  • Export ./cli resolves through ./dist/cli.mjs.
  • Export ./profile resolves through ./dist/profile.mjs.
  • Export ./* resolves through ./*.

Local Commands

  • bun run dev — bun run build --watch
  • bun run build — tsdown
  • bun run lint — bun run lint:fix
  • bun 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 --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rm -rf dist
  • bun run test — standalone host test: spawns src/cli.ts against a fixture profile with recording prisma/database stubs on PATH (fan-out, fail-fast, profile and usage errors)

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.

Notes

  • Keep this as a thin orchestrator — business logic belongs in cli-database.
  • Do not change CLI argument signatures without updating docs and CI scripts.

Relationships

THIS PACKAGEapp.cli-databases5 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

3 declarations

Declared capabilities

This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.

Scripts

  • cleanrm -rf dist
  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildbun ../../../scripts/tsdown.mjs
  • devbun run build --watch
  • lintbun run lint:fix
  • lint:fixnode ../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../scripts/biome.cjs check .
  • testbun test