Skip to content

Extension CLI

is a command-line build tool for developing chromium browser extensions fast and in a standardized way. It provides a systematic way to organize, build, test and document extension projects.


Features

🖥️   Javascript Bundling
       Compiles, bundles and minifies javascript files (supports ES6, ES2021 syntax)

🎨   CSS Bundling
       Compiles, bundles, and minifies CSS and SASS files

💄   Linting
       lint JavaScript using ESLint

📦   ZIP Generation
       Generates a .zip file for uploading to extension marketplaces

📝   Document Source Code
       Generates source code documentation using JSDoc

⚗️   Unit Testing
       Sets up a unit testing environment with mocha, chai, sinon-chrome and js-dom

⚔️   Cross-Browser Compatibility
       develop extensions for Chrome, Edge, Firefox, Opera and Brave.


Extension CLI is made and maintained free and voluntarily by open source contributors behind several popular extensions. If you find it helpful, please share, star, or contribute to its development.


Star   Fork   Issue   Watch


Getting Started

Note: Using this CLI assumes you have Node.js installed (or install it here).

Create a new extension project:

1
npx extension-cli

Add CLI to an existing project:

1
npm install extension-cli

More detailed getting started guide here →

Command Reference

Command Description
xt-build Run builds; env flags: -e prod or -e dev
xt-test Run unit tests
xt-docs Generate docs
xt-clean Remove generated files
xt-sync Update project config files to latest versions supplied by this CLI

More detailed command instructions and configuration options here →