A CLI tool to pack, upload, and publish Chrome extensions to the Chrome Web Store — all from your terminal.
# Run (global install)
exr release dist/
# Or run with npx (local install)
npx exr release dist/
pack— Zip your extension source directory into a versioned archiveupload— Upload the zip to the Chrome Web Store via APIpublish— Publish the uploaded extension (supports staged rollout)release— Run pack → upload → publish in a single commandstatus— Inspect the live status of your extension on the storecancel— Cancel the review of a pending extension submission in the marketplace.version- Synchronize and bump extension version in manifest.json and package.json- Built-in env file support — powered by dotenvx (bundled, no separate install needed)
- Node.js >= 18
# Install globally
npm install -g @yhotamos/extension-release-cli
# Or install locally (dev dependency)
npm install --save-dev @yhotamos/extension-release-cliYou need OAuth2 credentials to authenticate with the Chrome Web Store API.
- Go to Google Cloud Console and create a project.
- Enable the Chrome Web Store API.
- Create OAuth 2.0 credentials (Desktop app type) and note your
CLIENT_IDandCLIENT_SECRET. - Obtain a
REFRESH_TOKENusing the OAuth2 playground or the Google auth flow.- Scopes required:
https://www.googleapis.com/auth/chromewebstore
- Scopes required:
PUBLISHER_ID— Your publisher ID, found in the Chrome Web Store Developer Dashboard URL.EXTENSION_ID— The ID of your extension, found on the extension's dashboard page.
Create a .env file in your project root:
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret
REFRESH_TOKEN=your_refresh_token
PUBLISHER_ID=your_publisher_id
EXTENSION_ID=your_extension_idYou can also use .env.local (takes precedence over .env), or environment-specific files like .env.production passed via --env:
exr release dist/ --env .env.productionTip
Since dotenvx is built in, you can encrypt your env files. This keeps plain-text secrets out of your repository and reduces the risk of AI coding agents (e.g., Claude Code or OpenAI Codex) accidentally reading your plain .env files.
npx dotenvx encrypt -f .env.productionThis rewrites the file with encrypted values and generates a .env.keys file with the decryption key. The CLI reads .env.keys automatically. Add .env.keys to .gitignore and store the key in your CI secrets.
# 1. Create your .env file (first time only)
# See the Setup section above for required variables
# 2. Build your extension
npm run build
# 3. Release in one command (.env is loaded automatically)
exr release dist/
# 4. Check the store status afterwards
exr statusOr step by step:
exr pack dist/
exr upload releases/my-extension-1.0.0.zip
exr publishyhotta240 https://github.com/yhotta240