cwc
is an easy-to-use command-line program for uploading & publishing your
extensions and themes to the
Chrome Web Store.
If you're looking for programmatic access to the APIs behind this, you might want to check out cwa.
You can download the latest version of the CLI for your platform from the Releases page.
If you use Deno, you can also directly compile from source and install cwc
using the command —
deno install --quiet --allow-read --allow-write --allow-net=www.googleapis.com --allow-env --name cwc https://deno.land/x/cwc@1.1.0/mod.ts
Usage: cwc
Version: 1.1.0
Description:
Upload & publish extensions and themes to the Chrome Web Store
Options:
-h, --help - Show this help.
-V, --version - Show the version number for this program.
-i, --id <id> - ID of the extension or theme on the Chrome Web Store (required)
-c, --client-id <client-id> - Google API OAuth2 client ID (required)
-s, --client-secret <client-secret> - Google API OAuth2 client secret (required)
-r, --refresh-token <refresh-token> - Google API OAuth2 refresh token (required)
Commands:
upload - Upload directory or ZIP file to Chrome Web Store
publish - Publish last upload to Chrome Web Store
Note that cwc
supports both files and directories for upload. If a directory
is provided as a source, it is automatically compressed into a ZIP file for
upload.
To debug the program or to get detailed logs, set the environment variable
DEBUG
to *
. For example, if you're a *Nix user, use the command —
DEBUG=* cwc <your options>
The app needs a few permissions –
Permission | Reason |
---|---|
--allow-read |
Read files to upload |
--allow-write |
To write temporary files when creating ZIP archive before upload |
--allow-env |
To detect the system's temporary files directory and to optionally get DEBUG options |
--allow-net=www.googleapis.com |
To upload/publish the item on the Chrome Web Store |
-
Upload and auto-publish your extension
cwc upload --file "<path-to-extension>" --id "<extension-id>" --client-id "<client-id>" --client-secret "<client-secret>" --refresh-token "<refresh-token>" --auto-publish
-
Publish the last uploaded version of your extension
cwc publish --id "<extension-id>" --client-id "<client-id>" --client-secret "<client-secret>" --refresh-token "<refresh-token>"
-
Publish the last uploaded version of your extension but only to trusted testers
cwc publish --id "<extension-id>" --client-id "<client-id>" --client-secret "<client-secret>" --refresh-token "<refresh-token>" --trusted-testers
1.Useful deno
shorthand scripts and Git hooks are set up with
velociraptor. You can view a list
of the commands using –
vr
- Create a tag.
git tag v0.0.0 -s -a -m "Release v0.0.0"
- Push the tag to Github.
git push --tags
- Find the newly created tag on the Tags page and Edit the release to include the changelog.
- Publish the release. This triggers the workflow that attaches pre-built binaries to the release as attachments 🥳
The code in this project is released under the MIT License.