npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anuragsingh12/create-chrome-extension

v1.0.2

Published

NPX CLI tool for generating Chrome extension boilerplate with React/Vue support

Downloads

23

Readme

Create Chrome Extension

🚀 A powerful NPX CLI tool for generating Chrome extension boilerplate code with modern frameworks and build tools.

Features

  • Multiple Frameworks: Support for React and Vue.js
  • Language Options: JavaScript and TypeScript variants
  • Extension Types: Popup, Content Script, Background Script, or Full Extension
  • Modern Tooling: Vite-based build system with hot reload
  • Manifest V3: Latest Chrome Extension API support
  • Interactive CLI: User-friendly prompts for configuration
  • Best Practices: Organized project structure and code patterns

Quick Start

Create a new Chrome extension in seconds:

npx create-chrome-extension my-extension

Or with specific options:

npx create-chrome-extension my-extension --framework react --language typescript --template popup

Usage

Interactive Mode

Simply run the command and follow the prompts:

npx create-chrome-extension

The CLI will ask you to configure:

  • Extension name and description
  • Framework (React/Vue.js)
  • Language (JavaScript/TypeScript)
  • Extension type (popup/content/background/full)
  • Required permissions
  • Author information

Command Line Options

npx create-chrome-extension [project-name] [options]

Options:
  -f, --framework <framework>   Frontend framework (react, vue)
  -l, --language <language>     Programming language (javascript, typescript)
  -t, --template <template>     Extension template (popup, content, background, full)
  --skip-install               Skip npm install
  -h, --help                   Display help for command

Extension Types

Popup Extension

  • Browser action with popup interface
  • Perfect for quick actions and settings
  • Includes modern UI with storage integration

Content Script Extension

  • Runs on web pages
  • Modify page content and behavior
  • Includes floating UI example

Background Extension

  • Service worker for background tasks
  • Handle events and manage extension state
  • Context menu integration

Full Extension

  • Combines all extension types
  • Complete Chrome extension solution
  • Maximum functionality

Generated Project Structure

my-extension/
├── public/
│   ├── manifest.json       # Extension manifest
│   └── icons/             # Extension icons
├── src/
│   ├── popup/             # Popup UI components
│   │   ├── App.jsx        # Main popup component
│   │   ├── popup.jsx      # Popup entry point
│   │   └── popup.css      # Popup styles
│   ├── content/           # Content scripts
│   │   └── content.js     # Content script logic
│   ├── background/        # Background scripts
│   │   └── background.js  # Service worker
│   └── shared/            # Shared utilities
├── dist/                  # Built extension (generated)
├── vite.config.js         # Build configuration
├── package.json           # Dependencies and scripts
└── README.md              # Project documentation

Development Workflow

After creating your extension:

  1. Install dependencies (if not done automatically):

    npm install
  2. Start development server:

    npm run dev
  3. Load extension in Chrome:

    • Open chrome://extensions
    • Enable "Developer mode"
    • Click "Load unpacked"
    • Select the dist folder
  4. Build for production:

    npm run build
  5. Test with web-ext:

    npm run web-ext

Framework Support

React

  • JavaScript: Complete React setup with modern hooks
  • TypeScript: Fully typed React components with Chrome APIs
  • Features: Hot reload, modern build pipeline, optimized for extensions

Vue.js

  • JavaScript: Vue 3 composition API setup
  • TypeScript: Type-safe Vue components with Chrome API types
  • Features: Single file components, reactive state management

Chrome Extension APIs

Generated extensions include examples for:

  • Storage API: Persistent data storage
  • Tabs API: Tab management and information
  • Scripting API: Dynamic script injection
  • Runtime API: Extension messaging
  • Action API: Browser action management
  • Context Menus: Right-click menu integration

Build System

Vite Configuration

  • Hot Reload: Instant updates during development
  • Code Splitting: Optimized bundle sizes
  • Modern JavaScript: Latest ES features support
  • TypeScript: Full type checking and compilation

Extension Packaging

  • Manifest V3: Latest Chrome extension format
  • Permissions: Minimal required permissions
  • Icons: Provided icon templates
  • CSP Compliance: Content Security Policy ready

Testing

Run the test suite:

npm test

Generate coverage report:

npm run test:coverage

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.

Development Setup

  1. Clone the repository
  2. Install dependencies: npm install
  3. Run tests: npm test
  4. Test CLI locally: npm run dev

License

MIT License - see LICENSE file for details.

Support

Roadmap

  • [ ] Additional framework support (Svelte, Angular)
  • [ ] Web extension support (Firefox, Edge)
  • [ ] Advanced templates (options page, devtools)
  • [ ] Extension store publishing helpers
  • [ ] GitHub Actions workflows
  • [ ] Extension testing utilities

Happy extension building! 🎉