Template capabilities
- Ready project structure: Start with a working manifest, scripts, and source layout.
- Stack-specific setup: Choose templates by framework and runtime needs.
- Faster onboarding: Move from idea to runnable extension in minutes.
- Consistent defaults: Reduce setup drift across projects and team members.
Quick usage
<slug> with the template you want to start from.
Available templates
Choose the stack default that matches your project. Each card scaffolds a minimal, runnable extension with a workingmanifest.json.
JavaScript
TypeScript
Svelte
Vue
Preact
React
How it works
When you runcreate --template=<slug>, Extension.js fetches the selected template, scaffolds the project files, and optionally installs dependencies.
Only the javascript template ships inside the CLI, so it scaffolds offline with no network call. It is also the default when you omit --template. Every other name downloads the template catalog archive at create time.
The catalog holds 6 groups and roughly 50 templates: starters, sidebar, content scripts, new tab, toolbar action, and special folders. Run extension create --help to see every name.
A name outside the catalog fails with E_TEMPLATE_NOT_FOUND and creates nothing. A failed download is reported as a download error instead, so a network problem never reads like a typo.
Reproducible scaffolds
The template corpus is pinned to an immutable commit of the examples repository. Two scaffolds of the same template always produce the same files, and a shipped CLI never tracks a moving branch. You can point at a different corpus:EXTENSION_CREATE_TEMPLATE_REF accepts a branch, a tag, or a commit SHA. Setting it to main restores the floating branch behavior.
Scaffold from a URL
--template also accepts a GitHub URL or a ZIP URL in place of a catalog name:
More templates
Find official template sources in the examples repository: Template folder names map directly to--template=<slug>.
Best practices
- Use templates to scaffold your project quickly.
- Start with a template that matches a technology stack you already know.
- Choose the browser extension context that best fits your project requirements.
Next steps
- Learn how browser runners help you validate extension behavior.
- Learn how Extension.js handles Environment variables.

