open-index/open-npm huggingface dataset:
npm package: @optimizely/ocp-cli
Description: Optimizely Connect Platform command line interface
Author: Optimizely, Inc.
Latest version: 1.4.3
Deprecated: OCP CLI v1.x is deprecated. Migrate to v2: https://docs.developers.optimizely.com/optimizely-connect-platform/docs/ocp-cli-v2-migration

# 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> -h
```

## Commands

### `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:**
```bash
# 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
```
npm package: @optimizely/ocp-cli-v2
Description: Optimizely Connect Platform command line interface
Author: Optimizely, Inc.
Latest version: 2.0.3

# 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> -h
```

## Commands

### PR Lane Support

To route CLI requests to a PR lane deployment of the backend, set the `OCP_PR_LANE` environment variable:

```bash
OCP_PR_LANE=OCP-1831 ocp app prepare
```

Use `OCP_DEBUG=1` to see the lane header in request/response logs:

```bash
OCP_DEBUG=1 OCP_PR_LANE=OCP-1831 ocp app prepare
```

### `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:**
```bash
# 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
```