A CLI used to create a NextZen handler workspace.
The handler-workspace CLI can be installed via npm:
npm install -g @zenginehq/handler-workspace-cli@latest
You can check the version installed with:
handler-workspace --version
You can display it's usage with:
handler-workspace --help
which would yield:
handler-workspace <command>
Commands:
handler-workspace create <folder> Create a new handler workspace
[aliases: g, gen]
Options:
--help Show help [boolean]
--version Show version [boolean]
So to initialize a new handlers workspace, use:
cd ~/parent_folder
handler-workspace create handlers
which would prompt for your portal URL:
? Enter portal URL (including subdomain) › https://your-subdomain.portals.wizehive.app
and then prompt for OAuth client Id:
? Enter your OAuth API client Id ›
and then prompt for OAuth client secret:
? Enter your OAuth API client secret ›
which would create the following:
~/parent_folder/handlers
README.md
decision/
dist/
eslint.config.mjs
event/
http/
jest.config.js
package.json
score/
tsconfig.json
workspace.json
Run npm install to prepare the workspace:
cd ~/parent_folder/handlers
npm install
Install @zenginehq/handler-cli for generating and managing individual handlers within the workspace.