$ npm install -g chrome-webstore-manager
- Prepare the client ID and client secret to use Chrome Web Store API according to https://developer.chrome.com/webstore/using_webstore_api#beforeyoubegin
- You can get access token via this commands.
$ chrome-webstore-manager token --client_id [YOUR_CLIENT_ID] --client_secret [YOUR_CLIENT_SECRET]
- After a while, open your browser then accept Google OAuth.
- You can pass
access_token
to command.- You can set command"s optional value
-t
or--token
- You can set
access_token
as environment value namedWEBSTORE_TOKEN
- If you use it on *CI, it is useful
export WEBSTORE_TOKEN=[YOUR_ACCESS_TOKEN]
- If you use it on *CI, it is useful
- You can set command"s optional value
token
- Lifetime is short
- It requires new token per request and you should authorize via browser.
refrash_token
- Lifetime is very long
- You should set it if it works with CI.
- You get new access token with
$ chrome-webstore-manager refresh_token --client_id [YOUR_CLIENT_ID] --client_secret [YOUR_CLIENT_SECRET] --refresh_token [YOUR_REFRESH_TOKEN]
- You can use environment variable
WEBSTORE_REFRESH_TOKEN
instead ofrefresh_token
- You can use environment variable
Usage Example
$ WEBSTORE_TOKEN=$(chrome-webstore-manager refresh_token ...) chrome-webstore-manager update ITEM_ID extension.zip
$ chrome-webstore-manager insert /path/to/your_extension.zip
- caution: it requires
zip
NOTcrx
- caution: it requires
- return value: chrome-web-store-item-id
Only this command, your items is under draft. So you should publish item. I write about it on below.
$ chrome-webstore-manager publish ITEM_ID
ITEM_ID
: chrome-web-store-item-id
$ chrome-webstore-manager update ITEM_ID /path/to/your_extension.zip
ITEM_ID
: chrome-web-store-item-id