@nightowlsdev/cli
ToolingThe pluggable `owl` CLI: scaffold a Night Owls project, install adapters, and contribute their migrations, without ever running DDL.
What it does
@nightowlsdev/cli ships the single `owl` binary that bootstraps and maintains a Night Owls host. `owl init` scaffolds nightowls.config.ts + .env.example and installs the selected storage/runner/auth/model/telemetry adapters; `owl install <adapter>` adds an adapter, merges its env vars, scaffolds files, inserts its config wiring at marker comments, and contributes its migrations into the host's supabase/migrations/ as timestamped files (Night Owls never connects to your DB, you apply them with supabase db push). Each adapter plugs in via a declarative nightOwlsPlugin manifest that is matched structurally, so adapters never import the CLI (no dependency cycle), and plugins can surface their own subcommands and idempotent print-only init hooks (owl <plugin> <cmd>). By deliberate design the CLI imports zero @mastra/*, its bootstrap snapshot store comes from @nightowlsdev/storage-local's factory and it speaks MCP via the raw MCP SDK, preserving the engine wall.
Install
pnpm add @nightowlsdev/cliKey exports
- owl binary (init, install, plugins, db install, db types, mcp, <plugin> <cmd>)
- NightOwlsPlugin / Migration / PluginConfig / PluginCommand / PluginContext types
- discoverPlugins
- nodeDiscoverDeps
Usage
# Scaffold a Night Owls host and install adapters
npx owl init
# Add an adapter (merges env, scaffolds files, ejects its migrations)
npx owl install storage-supabase
# List installed plugins; generate DB types
npx owl plugins
npx owl db types