Astro
Scaffold an Astro application with strict TypeScript checking and an explicit static or server-rendered deployment target.
Why Use This Command?
- Combines Astro's strict configuration with Nova's Astro TSConfig preset so framework types and project rules start aligned.
- Supports static output, a standalone Node.js server, or Cloudflare Workers without mixing incompatible adapter settings.
- Pins Astro's ESM cookie runtime directly so a mixed-framework monorepo cannot hoist an older CommonJS version into Astro's prerender build.
- Separates Astro source, Node-based configuration, and Vitest type-checking so one tool's declarations do not leak into another build.
- Can package static output or the Node.js server as a reviewed Docker image.
- Supports both a new monorepo and an additional app workspace through the same command.
Requirements
- Node.js runtime — Use any Node.js LTS release.
- Empty directory or monorepo root — Nova auto-detects whether to create a project or add a workspace.
Usage
Options
| Flag | Description |
|---|---|
-d, --dry-run | Run without writing any files. |
--name <name> | Project slug when creating a new monorepo; omit at an existing root. |
--non-interactive | Use flags and defaults without opening prompts. |
--workspace-name <name> | Workspace directory name. |
--output <dir> | Output directory. |
--rendering <static|server> | Rendering mode; defaults to static. |
--adapter <node|cloudflare> | Server adapter when --rendering server is selected; defaults to node. |
--docker-image | Add Docker packaging for static output or the Node.js server. |
Output Files
| File | Description |
|---|---|
astro.config.mjs | Astro project configuration. |
eslint.config.mts | Ordered Nova presets and the complete Nova custom-rule collection. |
src/pages/index.astro | Starter page using the generated workspace title. |
tests/project.test.ts | Starter Vitest workspace test. |
tsconfig.astro.json | Astro source contract with essentials, strict, browser, and Astro layers. |
tsconfig.config.json | Node.js contract for configuration files. |
tsconfig.tests.json | Isolated Vitest test contract. |
vitest.config.mts | Test discovery scoped to this workspace. |
package.json | Astro dependencies and Nova-managed workspace scripts. |
When --docker-image is enabled, Nova also writes .dockerignore, Dockerfile, and compose.yml. Static sites use an unprivileged NGINX image; Node.js server rendering uses Astro's standalone server output. Cloudflare server rendering cannot be combined with --docker-image because Cloudflare owns that runtime.
Astro does not enable MDX by default, so this scaffold does not pretend .mdx files are buildable. If you add Astro's MDX integration, also add langMdx to the ESLint config; Nova's MDX language preset composes with the Astro framework layer.
Non-Interactive Mode
Agents and automation can provide every answer as flags:
# Static site with defaults
nova scaffold app astro --non-interactive --name my-site --workspace-name web --output ./my-site
# Node.js server in Docker
nova scaffold app astro --non-interactive --workspace-name server --output ./apps/server --rendering server --adapter node --docker-image
# Cloudflare server-rendered site
nova scaffold app astro --non-interactive --workspace-name edge --output ./apps/edge --rendering server --adapter cloudflare
Registration
Nova registers the workspace with the app role and trackable policy. Its package name follows {projectSlug}-app-{workspaceName}.