Skip to main content
create scaffolds files, configuration, and starter scripts for the selected template and optionally installs dependencies. For a file-by-file tour of the generated tree, see What create generates.

When to use create

  • Start a new extension from scratch.
  • Spin up multiple proof-of-concept ideas quickly.
  • Standardize onboarding for your teammates with consistent template defaults.

Create command capabilities

Usage

Using Yarn? The yarn dlx command requires Yarn 2 or later. Yarn 1 does not include dlx and fails with a “Command not found” error. On Yarn 1, use the npm tab (npx) instead.

Arguments and flags

When you want the default TypeScript starter, omit --template entirely. Add --template=<slug> only for another stack from the official examples. --template also accepts a GitHub URL or a ZIP URL, so you can scaffold from any repository. The catalog holds 53 templates in 6 groups: starters, sidebar, content scripts, new tab, toolbar action, and special folders. Run extension create --help for the full list. The default typescript template downloads the catalog archive like every other name. Only the javascript template ships inside the CLI. When you omit --template and the download fails, create falls back to that bundled javascript template and says so, naming the network error, so an offline machine still gets a project. An explicit --template that fails to download fails loudly instead. A scaffold has one package manager. A starter’s packageManager pin (or a pnpm-workspace.yaml it ships) decides it, otherwise the manager that invoked create does. The packageManager field written to package.json, the --install run, and the printed next steps all name that same manager.

Template corpus pinning

Catalog downloads are pinned to one immutable commit of the examples repository. Two scaffolds of the same version therefore produce the same bytes. Two environment variables override the pin:
  • EXTENSION_CREATE_TEMPLATE_REF points at another ref. Set it to main to restore floating behavior.
  • EXTENSION_CREATE_TEMPLATE_URL points at another archive URL entirely.
Each scaffold writes a .extension-create.json provenance file into the project. It records the create version, the template, and the source, plus the resolved ref when the template came from the catalog archive, so template drift stays auditable. The bundled javascript starter records "source": "bundled" and no ref.

Machine output with --output json

--output json prints one schema-1 envelope on stdout and routes scaffold progress lines to stderr:
  • A successful run prints a status: "created" frame. Its value carries projectPath, projectName, template, and depsInstalled.
  • Failures print ok: false with an error.code: E_TEMPLATE_NOT_FOUND for an unknown catalog name, E_NETWORK for a failed download, E_DESTINATION_NOT_EMPTY or E_DESTINATION_NOT_WRITABLE for destination problems.

Shared global options

Also supports Global flags.

Example commands

Available templates

For the full, continuously updated list of templates, browse the examples repository.

JavaScript

Minimal bundled starter. Use when you want a clean baseline or are offline.

TypeScript (default)

Typed sidebar starter with tsconfig.json preconfigured.

React

React UI wired for content scripts and popup views.

Vue

Vue UI with single-file component (SFC) support baked in.

Best practices

  • Start from a template that matches your UI/runtime needs to reduce setup drift.
  • Keep the first run small, then add extra tooling after verifying baseline command flow.