title: "CLI Reference · Nael Framework" description: "Full reference for the nl CLI including generators, diagnostics, and workspace scripts."

Reference

nl CLI

The CLI wraps Bun scripts, code generators, and project diagnostics so you can stay focused on features. Every command mirrors NestJS naming while embracing Bun-native performance.

Install once
Available through Bun, npm, or pnpm.
Global install
bun install --global @nl-framework/cli

Prefer local devDependency? Run bun add -D @nl-framework/cli inside your repo and call via bun x nl ....

Scaffold services
Choose templates + opt-in features.
GraphQL template
nl new shipping-service --template=graphql --features=auth,redis

Templates ship with sensible defaults: configuration module, structured logger, health checks, and pluggable transports. Flags control stack pieces (Redis, queues, federation gateway, Dapr sidecars).

Generate artifacts

Generators respect the current working directory and automatically register the new class inside the parent module. Use --public to export from the index barrel.

Public billing module
nl generate module billing --public

Everyday scripts

nl proxies core Bun scripts so CI stays simple. Call nl dev to boot the active service with watch mode, or add --cwd to run from any example folder.

Script shorthands
nl dev          # starts Bun dev servernl start        # production bootnl build        # emits dist/ for all packages

Command matrix

nl new
--template --features --package-manager --install
Scaffold a new service with HTTP, GraphQL, Better Auth, or worker templates.
nl generate
module|controller|resolver|provider|subscriber|cron
Add modules, controllers, resolvers, providers, schedulers, or Dapr subscribers.
nl sync
--workspace --dry-run
Sync versions across packages, apply lint rules, and re-run project references.
nl doctor
--checks --fix
Run environment diagnostics (Bun version, Dapr, BetterAuth secrets, Docker).

Diagnostics

nl doctor inspects Bun versions, ensures Postgres is reachable, validates Dapr sidecars, and confirms Better Auth secrets exist before deployment. Pass --fix to auto-create missing files.

Force checks
nl doctor --checks env,versions --fix

Need more? Wire your own health checks and register them via DoctorRegistry.register() inside your service bootstrap.

Where to go next

Review the installation matrix or learn how we build Better Auth experiences in the techniques guide.