## Introduce In the old version, you need to open the browser, download the `suites/modules` provided by the `Cabloy Store`, and then extract them to the project directory. Today, you can `install`, `update`, or `publish` suites/modules directly from the command line ## Open Auth Token The `Cli command` will directly access the remote API of Cabloy Store to install, update or publish. Therefore, it is necessary to provide an open auth token to authenticate the user identity `Open Auth token` is a combination of `Client ID` and `Client Secret`, which can be obtained in the following way: 1. Open CabloyJS management website: 2. Register a new user (If need). The system will automatically assign a group of tokens to the newly registered user for install, update or publish respectively 3. Open Page: `Mine`->`Settings`->`Open Auth`,You can see the specific information of tokens ## How to use ### - Install/Update Operate as follows: ``` bash # install/update some specific suites/modules $ npm run cli :store:sync test-suite1 test-module1 # install/update all suites/modules $ npm run cli :store:sync ``` * For specific suites/modules, the first execution means `install`, and the second execution means `update` * The first time execute the `sync` command, you will be prompted to enter the `Client ID` and `Client Secret` ### - Install Core Modules freely Because the built-in core modules of CabloyJS are installed in the directory `node_modules`, if you want to browser the source codes of any core module, you can install it into the project directory: `{project}/src/suite-vendor` or `{project}/src/module-vendor` ``` bash # install base module: a-base-sync $ npm run cli :store:sync a-base-sync # install cms module: a-cms $ npm run cli :store:sync a-cms # install NodeJS-Workflow-Engine module: a-flow $ npm run cli :store:sync a-flow ``` * To browser more core modules, refer to: [Cabloy Store](https://store.cabloy.com/) * The core modules are free, but you still need to generate a free purchase record on Cabloy Store, so that you can download and install it on the command line ### - Publish Operate as follows: ``` bash # publish some specific suites/modules $ npm run cli :store:publish test-suite2 test-module2 # publish all suites/modules $ npm run cli :store:publish ``` * Before publishing, you need to open CabloyJS management website, to create a new suite/module record * When publishing, it will automatically compare whether the content has changed, and automatically change the version number * The first time execute the `publish` command, you will be prompted to enter the `Client ID` and `Client Secret`