Git Product home page Git Product logo

chrome-webstore-manager's Introduction

chrome-webstore-manager

INSTALL

$ npm install -g chrome-webstore-manager

HOW TO USE

Get access token

  • 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.

Set your access_token

  • 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 named WEBSTORE_TOKEN
      • If you use it on *CI, it is useful export WEBSTORE_TOKEN=[YOUR_ACCESS_TOKEN]

โš ๏ธ token vs refresh_token

  • 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.

Get access token using refresh token

  • 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 of refresh_token

Usage Example

$ WEBSTORE_TOKEN=$(chrome-webstore-manager refresh_token ...) chrome-webstore-manager update ITEM_ID extension.zip

Create new item

  • $ chrome-webstore-manager insert /path/to/your_extension.zip
    • caution: it requires zip NOT crx
  • 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.

Publish item

  • $ chrome-webstore-manager publish ITEM_ID
    • ITEM_ID: chrome-web-store-item-id

Update item

  • $ chrome-webstore-manager update ITEM_ID /path/to/your_extension.zip
    • ITEM_ID: chrome-web-store-item-id

chrome-webstore-manager's People

Contributors

markdreyer avatar matthewbauer avatar pastak avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.