create-extenkit
v1.0.7
Published
๐งฉ ExtenKit CLI โ Build modular browser extensions with zero config.
Maintainers
Readme
๐งน ExtenKit
A lightweight, build-free JavaScript framework for creating cross-browser extensions โ with a single command.
๐ What is ExtenKit?
ExtenKit is a minimal, modular framework and CLI for building browser extensions using vanilla JavaScript + HTML โ no bundlers, no React, no Webpack.
It runs instantly in your browserโs extension environment and generates all files for you.
It works seamlessly with:
- โ Chrome, Edge, Brave (Manifest V3)
- ๐ฆ Firefox (Manifest V2 fallback)
- ๐ Any browser supporting the WebExtensions API
โจ Features
- ๐ง One-command scaffolding:
npx create-extenkit my-extension - โก Zero build step โ just edit HTML/JS directly
- ๐ง Reactive component system (ExtenKit Core)
- ๐ฎ Persistent store with Chrome Storage & local fallback
- ๐งฉ Flag-based generation for options pages, background scripts, and custom templates
- ๐ฆ Firefox Manifest V2 support out of the box
- ๐พ๏ธ Includes a default icon and fully working popup
๐งฎ Installation
1๏ธโฃ Create your extension
npx create-extenkit my-extension2๏ธโฃ Load into Chrome
- Open chrome://extensions/
- Enable Developer mode
- Click Load unpacked
- Select your new folder
- Done ๐
3๏ธโฃ Load into Firefox
npx create-extenkit my-extension --manifest-v2Then open about:debugging#/runtime/this-firefox, click Load Temporary Add-on, and choose the generated folder.
โ๏ธ CLI Flags
| Flag | Description |
| ------------------- | ---------------------------------------------------------- |
| --with-options | Adds an options.html page automatically |
| --with-background | Adds a background service worker |
| --manifest-v2 | Generates a Firefox-compatible manifest |
| --blank | Generates a minimal scaffold (no popup UI) |
| --template=<name> | Uses a custom template from /templates/templates/<name>/ |
๐งฉ Example Usage
# Basic popup extension (MV3)
npx create-extenkit my-extension
# Firefox-friendly version
npx create-extenkit my-extension --manifest-v2
# With background + options
npx create-extenkit my-extension --with-background --with-options
# Minimal blank template
npx create-extenkit minimal --blank๐ Folder Structure
my-extension/
โโโ manifest.json
โโโ popup.html
โโโ popup.js
โโโ icon.ico
โโโ assets/
โ โโโ icon.png
โ โโโ styles.css
โโโ modules/
โ โโโ home/
โ โ โโโ index.js
โ โโโ about/
โ โ โโโ index.js
โ โโโ options/
โ โ โโโ ...
โ โโโ background/
โ โโโ ...
โโโ extenkit/
โ โโโ component.js
โ โโโ mount.js
โ โโโ store.js
โ โโโ index.js
โโโ package.json๐ง ExtenKit Core
Each generated project contains an /extenkit folder โ the lightweight reactive runtime that powers your UI.
| File | Purpose | | ---------------- | ---------------------------------------------------- | | component.js | Define reactive components with templates & bindings | | mount.js | Mount and unmount components safely | | store.js | Persistent, reactive global state | | index.js | Entry point re-exporting all core helpers |
๐ก Example Component
import { createComponent, mount } from "./extenkit/index.js";
const Counter = createComponent({
name: "Counter",
state: { count: 0 },
template: (s) => `
<div class="counter">
<h3>Count: <span data-bind="count"></span></h3>
<button data-click="inc">+</button>
</div>
`,
methods: {
inc() {
this.state.count++;
},
},
});
mount(Counter, document.body);๐ฆฏ Roadmap
- [ ]
extenkit-routerโ hash-based navigation - [ ]
extenkit-uiโ built-in UI components - [ ] Advanced templates (
modern,dashboard,chat) - [ ] Plugin support for MV3 scripting APIs
- [ ] Publish
@extenkit/coreas a standalone npm module
๐งโ๐ป Development Setup (for contributors)
# 1. Clone repo
git clone https://github.com/exagonsoft/extenkit.git
cd extenkit/cli
# 2. Link locally
npm link
# 3. Test
npx create-extenkit demo-extension
# 4. Publish
npm login
npm publish --access public๐ License
MIT ยฉ 2025 โ Built with โค๏ธ by the ExtenKit Team (ExagonSoft)
๐ฆฏ Why ExtenKit?
Because extension development should be instant:
No bundlers. No frameworks. No waiting โ just HTML, JS, and your br
