CLI Tasks & Snippets
The deno tasks and VS Code snippets that power your Thunder workflow.
Thunder exposes a set of deno task commands for development, production, and code generation, plus a collection of VS Code snippets that scaffold common files instantly.
Available Tasks
deno task dev # Development server with hot reload
deno task start # Production server
deno task check # Format and lint
deno task generate:openapi # Generate an OpenAPI spec
deno task generate:sdk # Generate a TypeScript SDK
deno task generate:app # Generate a dashboard app in the public folder| Task | Description |
|---|---|
dev | Starts the development server with hot reload. |
start | Starts the production server. |
check | Formats and lints the project. |
generate:openapi | Generates an OpenAPI specification from your registered route shapes. |
generate:sdk | Generates a fully typed TypeScript SDK for your API. |
generate:app | Generates a dashboard app into the public folder, based on the thunder-ui boilerplate. |
Both generate:openapi and generate:sdk rely on the shape() validators you register in your route handlers. The more accurately you define $params, $query, $body, and $return, the richer your generated spec and SDK will be. See Routes.
Plugin Tasks
deno task add:plugin -n org/plugin-name [--setup[=env,...]] # Install (optionally run setup)
deno task setup:plugin -n org/plugin-name [--envs=env,...] # Run a plugin's setup lifecycle (indexes/seeds/migrations)
deno task update:plugin -n org/plugin-name # Update an installed plugin
deno task remove:plugin -n org/plugin-name [--clean[=env,...]] # Remove (optionally run cleanup lifecycle)| Task | Description |
|---|---|
add:plugin | Installs a plugin from GitHub. Add --setup (optionally =development,production) to also run its setup lifecycle. |
setup:plugin | Runs an installed plugin's setup lifecycle (indexes, seeding, migrations). Use --envs to target environments non-interactively. |
update:plugin | Updates an installed plugin to its latest version. |
remove:plugin | Removes a plugin. Add --clean (optionally =development,production) to also run its cleanup lifecycle. |
Installing a plugin does not run its setup automatically - run --setup or setup:plugin explicitly. See the Plugins page for the full lifecycle model.
VS Code Snippets
Thunder provides VS Code snippets for faster development. Type the prefix and press Tab:
| Snippet | Scaffolds |
|---|---|
router | A new router file |
req | A route handler with validation |
model | A database schema / model |
crud | A complete CRUD operation |
There is also a req-static snippet for scaffolding a static file handler. See Serving Static Files.