CLI commands

FleetDVK is a single binary with several subcommands. Run fleetdvk --help at any time to see the full list.

fleetdvk init

Launches an interactive terminal UI to scaffold a new project. You will be prompted to choose:

  • Project name
  • Database (Supabase, PostgreSQL, MySQL, SQLite)
  • Framework (Express, Fastify, Hono)
  • Auth strategy (JWT, Session, API Key, None)
  • Language (TypeScript, JavaScript)

After confirming, FleetDVK creates a directory with a main.dvk starter file and runs the initial generation.

$ fleetdvk init

◆ FleetDVK  v0.1.0

  ✔ Project name    my-api
  ✔ Database        supabase
  ✔ Framework       express
  ✔ Auth            jwt
  ✔ Language        typescript

  ✓ Project scaffolded in ./my-api

fleetdvk generate

Reads all .dvk files in the current directory, parses them, and generates a complete TypeScript backend.

$ fleetdvk generate
$ fleetdvk gen              # alias
$ fleetdvk generate -o out  # custom output directory

Flags

FlagDefaultDescription
-o, --output"generated"Output directory for the generated code

The generator produces the following files:

  • package.json — dependencies based on your framework choice
  • tsconfig.json — strict TypeScript configuration
  • .env — environment variables template
  • src/index.ts — server entry point with middleware
  • src/config/database.ts — database client setup
  • src/middleware/auth.ts — authentication middleware
  • src/models/*.ts — one file per model with interfaces and Zod schemas
  • src/routes/*.ts — one file per route group with handlers

fleetdvk dev

Starts watch mode. FleetDVK monitors all .dvk files in the current directory and regenerates the backend on every file save.

$ fleetdvk dev
$ fleetdvk dev -o out  # custom output directory

The watcher polls at 500ms intervals. When a change is detected, the full generation pipeline runs — parse, validate, generate. Output includes a timestamp and success/error status.

  👁  Watching for .dvk file changes...
  Press Ctrl+C to stop

  ↻  Change detected at 14:32:05
  ✓  Regenerated successfully

fleetdvk install

Installs one or more npm packages into the generated project. Updates package.json and runs the package manager.

$ fleetdvk install zod express
$ fleetdvk install -D @types/express  # dev dependency
$ fleetdvk add zod                    # alias
$ fleetdvk i zod                      # alias

Flags

FlagDescription
-D, --devInstall as a devDependency

fleetdvk remove

Removes one or more packages from package.json and re-runs the package manager.

$ fleetdvk remove zod
$ fleetdvk rm zod         # alias
$ fleetdvk uninstall zod  # alias

fleetdvk list

Displays all dependencies and devDependencies from package.json.

$ fleetdvk list
$ fleetdvk ls     # alias

Global flags

FlagDescription
-h, --helpShow help for any command
-v, --versionPrint the FleetDVK version