create-extension-factory
v1.0.3
Published
CLI tool to create Extension Factory projects
Maintainers
Readme
create-extension-factory
CLI tool to quickly scaffold a new browser extension project with Extension Factory.
Usage
With npx (recommended)
npx create-extension-factory my-extensionWith npm
npm create extension-factory my-extensionWith pnpm
pnpm create extension-factory my-extensionWith yarn
yarn create extension-factory my-extensionInteractive Mode
If you don't provide a project name, the CLI will prompt you for:
- Project name
- Description
- Author
- Package manager (npm/pnpm/yarn)
- Whether to install dependencies
Options
create-extension-factory [project-name] [options]Options
-t, --template <template>- Template to use (default:react)-h, --help- Display help-V, --version- Display version
Templates
Currently available templates:
- react - React + TypeScript + Extension.js
What's Included
The generated project includes:
- ✨ Extension.js setup for browser extension development
- ⚛️ React + TypeScript
- 🔐 Subscription management (Lemon Squeezy + 爱发电)
- 🌍 i18n support with react-i18next
- 🎨 Pre-configured UI components from @extension-factory/ui-core
- 📦 Business logic from @extension-factory/business-core
- 🚀 Ready-to-use popup and options pages
Project Structure
my-extension/
├── src/
│ ├── popup.tsx # Popup page
│ ├── options.tsx # Options page
│ ├── background.ts # Background service worker
│ ├── config/
│ │ └── subscription.ts # Subscription configuration
│ └── i18n.ts # i18n setup
├── public/
│ ├── popup.html
│ └── options.html
├── extension.config.js # Extension.js configuration
├── package.json
└── tsconfig.jsonNext Steps
After creating your project:
cd my-extension
# Start development mode
npm run dev
# Build for production
npm run build
# Load the extension in Chrome
npm startConfiguration
Edit src/config/subscription.ts to configure:
- Feature flags for each subscription tier
- Usage quotas
- Payment provider credentials (Lemon Squeezy, 爱发电)
Learn More
License
MIT
