/APIs & SDKs/Setup and context/bootstrap

Neon CLI command: bootstrap

Scaffold a new project from a Neon starter template

The bootstrap command scaffolds a new application from a Neon starter template. By default it runs interactively: it prompts you to pick a template, scaffolds it into the target directory, then offers the usual setup steps (install dependencies, initialize git, install agent tooling, and link the directory to a Neon project). Requires neon 2.25.0 or later; check your version with neon --version.

Usage

neon bootstrap [directory] [options]

The directory argument is optional. Use . to scaffold into the current directory, or leave it out and bootstrap prompts you for one. The target directory must be empty unless you pass --force.

Options

OptionDescriptionTypeDefaultRequired
--agent, -aCoding agent to install into (repeatable). Forwarded to plugins, or to skills and mcp. Skips agent selection. Values listed belowarrayNo
--agent-setupAfter scaffolding, install the Neon plugin or skills and MCP. Use --no-agent-setup to skipbooleantrueNo
--default, -yQuick start: scaffold the default template (or --template), then install, git, agent tooling (project folders, else the host CLI agent; if none, pass --agent or omit --default in a terminal), and link --yes. Skips those pickers; link --yes still asks for a project unless one is already linkedbooleanfalseNo
--forceScaffold into the target directory even if it is not empty (colliding files are overwritten).booleanfalseNo
--gitInitialize a git repository after scaffolding. In interactive mode this is offered as a prompt; use --no-git to skip without being asked.booleantrueNo
--installInstall dependencies after scaffolding. In interactive mode this is offered as a prompt; use --no-install to skip without being asked.booleantrueNo
--linkRun neon link after scaffolding. Templates with neon.ts link after install so env pull works; otherwise link runs before install. In interactive mode this is offered as a prompt; use --no-link to skip without being asked.booleantrueNo
--list-templates, --list, --lsList available templates and exit. --output json and --output yaml print a machine-readable catalog.booleanfalseNo
--templateTemplate to use (skips the interactive picker). Run with --list-templates to see available templates.stringNo

Run with --list-templates to see the available templates (add --output json for a machine-readable catalog), and pass one with --template to skip the interactive picker.

The post-scaffold steps all default to on. In interactive mode, bootstrap asks about each one; pass the negated flag to skip it without being asked:

  • --install / --no-install: install dependencies.
  • --git / --no-git: initialize a git repository.
  • --agent-setup / --no-agent-setup: install agent tooling, either the Neon plugin, or agent skills and the MCP server. Pass --agent (alias -a, repeatable) to name the agents and skip the picker, for example neon bootstrap my-app --agent cursor.
  • --link / --no-link: run neon link in the scaffolded directory.

Use --default (alias -y) for a quick start: it scaffolds the default template (or the one you pass with --template), then runs dependency install, git init, agent tooling, and neon link --yes without prompting. link --yes still asks which project to use unless the directory is already linked.

Examples

Create ./my-app from an interactively chosen template:

neon bootstrap my-app

Scaffold a specific template into the current directory:

neon bootstrap . --template hono

Quick start: scaffold the default template and run setup without prompting:

neon bootstrap my-app --default

List the template catalog as JSON, for scripting or driving bootstrap from an agent. Each entry's id is what you pass to --template:

neon bootstrap --list-templates --output json

The command prints an array of template objects, each shaped like:

{
  "id": "hono",
  "title": "REST API",
  "description": "A Hono REST API on Neon Functions, backed by Lakebase Postgres via Drizzle.",
  "services": ["Postgres", "Functions"]
}
Was this page helpful?
Edit on GitHub

On this page

Copy neon init command