Skip to main content

Base

Scaffold a base monorepo project with workspaces configuration, ready for adding framework workspaces. This command is optional: use it when you want the project root now but do not want to choose an app or documentation framework yet.

What you want nowCommand to start withResult
Only an empty Nova monorepo rootnova scaffold starter baseRoot, apps/, and packages/
A root and the first app togethernova scaffold app <framework>Root plus the app workspace
A root and documentation togethernova scaffold docs docusaurusRoot plus the docs workspace
A root and a package togethernova scaffold package <type>Root plus the package workspace

You do not need to run starter base before a direct app, docs, or package command.

Why Use This Command?

  1. Creates the root package.json with workspaces configured for apps/* and packages/* so you can add workspaces immediately.
  2. Creates standard dev, prod, check, build, deploy, and clean scripts. Each one runs nova utility run-workspaces, which runs the root's own name:* steps first and then every workspace's name script in dependency order.
  3. Pins the npm and Node.js toolchain used by current Nova projects and records explicit install-script decisions used by the built-in scaffolds.
  4. Generates a baseline nova.config.json with the project name, current starting year, nodejs project platform, and Example Company legal-name placeholder so recipes, utilities, and identity-aware workspaces have valid input from the start.
  5. Registers the root environment namespace and generates .env plus .env.sample with Nova's Node.js and logging defaults.
  6. Generates Nova's canonical root .gitignore for secrets, dependencies, build output, editor metadata, and supported platform tooling.
  7. Installs @cbnventures/nova as a dependency so its CLI, presets, and runtime toolkit remain available to generated workspaces.
  8. Adds root Vitest coverage for dotenv formatting and the private monorepo coordinator contract, backed by Nova's shared test setup.

Requirements

  • Node.js runtime — Use any Node.js LTS release.
  • Start outside a project — Run the command where Nova cannot find a package.json. The selected output may already contain unrelated files, but Nova refuses to replace package.json or nova.config.json.

Usage

Options

FlagDescription
-d, --dry-runRun without writing any files.
--installInstall dependencies after scaffolding; this is the default.
--no-installSkip dependency installation.
--name <name>Project name.
--non-interactiveRequire every answer as a flag and do not open prompts.
--output <dir>Output directory.

Output Structure

text
{project-slug}/
├── apps/
├── packages/
├── tests/
│   ├── dotenv.test.ts
│   ├── project.test.ts
│   └── setup.ts
├── .env
├── .env.sample
├── .gitignore
├── eslint.config.mts
├── nova.config.json
├── package.json
├── tsconfig.config.json
├── tsconfig.tests.json
└── vitest.config.mts

How It Works

Interactive Wizard

When run without flags, the command collects the project details before writing anything:

  1. Project name — Enter a slug for your monorepo (e.g. my-app).

Nova creates the project in ./{project-name} by default, displays the complete plan, and asks for one confirmation. A new project never writes directly into the current directory. Dependencies install after the files are ready unless you pass --no-install. Project-level generators remain separate commands that you can run after configuring nova.config.json.

Non-Interactive Mode

Agents and automation should add --non-interactive and provide --name. --output is optional and defaults to ./{project-name}. Nova validates the complete plan before writing and installs dependencies unless the command includes --no-install.

Safety Checks

Before creating any file, Nova validates the project slug and checks every root path it owns, including .gitignore, package.json, and nova.config.json. If any target file already exists, the command stops and lists the conflict. --dry-run performs the same validation and reports the exact root path without writing.

Next Steps

After scaffolding, enter the new monorepo and add as many workspaces as the project needs. Each scaffold command detects the existing workspace root, creates only the requested workspace, adds it to the same nova.config.json, and merges its required runtimes and deployment targets into project.platforms. Running another scaffold command later preserves the workspaces and platforms that are already registered.

For example, these commands add a Docusaurus documentation site and a Cloudflare Workers serverless tool to one project:

You can mix any supported app, docs, package, and tool scaffolds this way. Run each command from the monorepo root, not from inside an existing workspace.

Once the workspaces are in place, run generators for additional project-level files like .editorconfig, LICENSE, and README.md. The root .gitignore is already generated by the scaffold.