@happyvertical/smrt-cli
The framework developer CLI for manifests, database migrations, application operations, cookbooks, introspection, and generated resources.
What it gives you
The framework developer CLI for manifests, database migrations, application operations, cookbooks, introspection, and generated resources.
This package is one focused part of the s-m-r-t stack. Its decorated models participate in the same manifest, tenancy, persistence, and generated-interface conventions as the rest of the framework.
Operate production schema changes deliberately
db:migrate --postgres-safe orders dependencies, uses concurrent-index mode, applies lock and statement timeouts, and probes orphan foreign keys. doctor --db and db:status --parity compare the live schema. db:rollback executes only a reconstructible down migration or refuses; --mark-only changes migration bookkeeping without changing schema. db:prune supports dry-run and skip controls for retention work. SQLite type changes rebuild the table. db:migrate-qualified-names rewrites stored deprecated qualified names on request, and --empty-text-as-null converts empty text to NULL during a column change.
Which database a db command uses
Every db command resolves its database once, at startup. An explicit packages.cli.database.url from any config layer wins, so a stray shell DATABASE_URL never retargets it. DATABASE_URL comes next, with the engine from the config, DATABASE_TYPE, or the URL scheme. With neither, the command runs against an in-memory database.
Operate the application with smrt app
smrt app install, setup, start, stop, recover, doctor, open, backup, export, import, migrate, worker, dev, and build are the operations. They replace the copied operator scripts a template used to ship. Each generated package.json script is one of these one-liners. Local operations run under one operation lock, and start proves readiness against the loopback health route before it reports success.
Cookbooks and the kitchen
smrt cookbook validate checks a cookbook file or URL against the v1 schema and the recipe manifests. smrt cookbook apply creates a project from it and the start template. smrt kitchen serves the planner on localhost, where a person chats a cookbook into shape and sends it to a directory. smrt kitchen apply does the same from a plan URL.
Package UI
No UI layer to carry
This package stays focused on models, runtime behavior, or tooling. Build its interface with smrt-ui, or use a related domain package that exposes a /svelte entry point.
Intentionally headless
Package previews
No playground module yet
This package does not currently export a ./playground module. Its component names and import path remain available in the Components tab.
Intentionally not registered
Generated interface
REST
The exact route set comes from each model's @smrt({ api }) policy
and the application manifest—not from a second controller definition.
This package supports the runtime or build pipeline; it does not define a representative CRUD resource of its own.
Generated interface
MCP
AI tools are generated from the methods you explicitly include. Their inputs are validated against the same model metadata used by REST and CLI.
This package is itself infrastructure, UI, or tooling. Its capabilities are consumed by generated app MCP servers rather than exposed as a model resource.
Browser-native agent interface
WebMCP
The generated web definitions carry the same tool names, descriptions, and JSON Schema
inputs as MCP. smrt-web registers them with document.modelContext.
This package does not define a representative browser tool itself. Its models can still participate when an application exposes them through generated web collections.
Generated interface
CLI
The app CLI turns manifest resources into predictable operator commands while keeping package-specific actions close to their models.
Use this package through its documented build or runtime entry points. It does not contribute a representative generated resource command.