@optimizely/ocp-cli
v1.3.2
Published
Optimizely Connect Platform command line interface
Readme
OCP CLI
Interfacing with Optimizely Connect Platform (OCP).
Installation
OCP CLI requires a recent version of nodejs as well as Yarn. We suggest installing Yarn through corepack, as described here: https://yarnpkg.com/getting-started/install
Install OCP CLI with:
yarn global add @optimizely/ocp-cli
Commands can then be executed as follows:
ocp
ocp <namespace> -hCommands
ocp dev-server
Start the local development server for OCP applications.
The @optimizely/ocp-local-env package is automatically managed by this command:
- First run: Automatically installs the package globally
- Daily check: Checks for updates once per day and auto-upgrades when available
- No manual installation required
Options:
-p, --port <port>- Port to run the server on (default: 3000)-c, --config <path>- Path to custom config file--path <path>- Path to the OCP app root directory (default: current directory)-v, --verbose- Enable verbose logging--no-open- Don't automatically open browser
Examples:
# Start server in current directory on default port
ocp dev-server start
# Start on custom port
ocp dev-server start -p 4000
# Start with specific app directory
ocp dev-server start --path /path/to/my-app
# Short version to start server
ocp dev