Development Environment
This topic describes how to install, test, and upgrade the Optimizely Connect Platform (OCP) CLI.
Development, management and publishing of an OCP app is performed via the OCP CLI.
Important
The CLI is currently in closed beta.
Install Required Libraries
1. Install Node.js
While other versions of node may work for development, using the same version of node as your running app will make development more consistent with the runtime.
To install Node.js, follow the instructions on Node.js.org.
2. Install Yarn
If you do not have Yarn, you can install Yarn for package management by executing the following command:
curl -o- -L https://yarnpkg.com/install.sh | bash
If you are still having problems, refer to the Yarn documentation.
3. Install CLI
Important
The CLI is currently only available for MacOS/Unix systems that are running node 8 or later.
To gain access to the OCP npm repository, add the following to your ~/.npmrc
file:
@zaius:registry=http://npm-registry.prod.zaius/
Example:
echo "@zaius:registry=http://npm-registry.prod.zaius/" >> ~/.npmrc
Then you can install the OCP CLI command with:
yarn global add @zaius/zaius-cli
4. Test CLI installation
$ zaius -h
@zaius/zaius-cli 0.4.1
Usage: zaius <command>
Namespaces: (`help <namespace>` for additional help)
app
config
directory
Upgrade CLI
Keep up with the latest version of the CLI as we are actively updating it:
yarn global upgrade @zaius/[email protected]
Usage
Due to frequent updates to the CLI, you can find the most current reference of available functionality by including -h
/ --help
at the end of your command:
zaius <namespace> -h
zaius <namespace> --help
An example of the command in use:
$ zaius app init -h
@zaius/zaius-cli 0.4.1
Usage: zaius app init [<id>]
Parameters:
id [optional] The app id / directory to create
Updated 4 days ago