Templates
You can create new extensions based on existing templates. Just pass a --template
flag and use one of the options below.
npx extension create my-extension --template=<template>
Template Flag | Description | Demo |
---|---|---|
--template=new |
Includes a new tab page override (default). | Demo |
--template=init |
Includes a single manifest.json file. | Demo |
--template=content |
Includes a content_script. | Demo |
--template=react |
Includes a new tab override using React and Tailwind.css. | Demo |
--template=typescript |
Includes a new tab override using TypeScript. | Demo |
--template=react-typescript |
Includes a content_script using React, TypeScript, and Tailwind.css. | Demo |
--template=chatgpt |
Includes a sidebar_panel using React, Tailwind.css, DaisyUI, and a ChatGPT integration. | Demo |
--template=new
The default template includes a new tab page override, built with HTML, CSS, and JavaScript.
Usage
npx extension create <your-extension-name>
--template=init
For fast prototypes, includes just a single manifest.json file.
npx extension create <your-extension-name> --template=init
--template=content
Similar to the default template, except for the HTML part, which we inherit from the current tab. Uses JavaScript and CSS as a content_script.
npx extension create <your-extension-name> --template=content
--template=tailwind
Great for new projects using Tailwind. Includes a new tab override using React and Tailwind.css.
npx extension create <your-extension-name> --template=tailwind
--template=react
Great for new projects using JSX without TypeScript. Includes a new tab override using React and sakura.css.
npx extension create <your-extension-name> --template=react
--template=typescript
Similar to the default template, includes a new tab page override, built with HTML, CSS, and TypeScript.
npx extension create <your-extension-name> --template=typescript
--template=react-typescript
Great for bootstrapping extensions with a rich UI experience. Includes a content_script using React, TypeScript and Tailwind.css.
npx extension create <your-extension-name> --template=react-typescript
--template=chatgpt
The most complete template available. Fully integrated with the ChatGPT API. Includes a sidebar_panel
using React, Tailwind.css, and the official OpenAI Node API library.
npx extension create <your-extension-name> --template=chatgpt
Next Steps
- Understand Browser Runners and how they help you visualize your extension.
- Learn how
Extension
handles Environment Variables.
🧩 Extension • create cross-browser extensions with no build configuration.