Install

The CLI is invoked as optitech, and optitechctl is an alias for optitech. The Homebrew formula is named optitechctl, so install commands use that name even though you run the CLI as optitech.

Install with Homebrew

brew install optitechctl

Install via npm

npm i -g optitech

Requires Node.js 20.19.0 or higher.

Install with bun

bun install -g optitech

macOS binary

Download the binary. No installation required.

curl -sL https://github.com/optitechdatabase/optitech-pkgs/releases/latest/download/optitechctl-macos-x64 -o optitech

Run the CLI from the download directory:

optitech <command> [options]

Use the OptiTech CLI without installing

You can run the OptiTech CLI without installing it using npx or the bun equivalent, bunx:

# npx
npx optitech <command>

# bunx
bunx optitech <command>

Upgrade

Upgrade using the method that matches how you installed the CLI. To check for the latest version, see the OptiTech CLI Releases page. To check your installed version, run:

optitech --version

Node.js 20.19.0 is required to upgrade

The current CLI requires Node.js 20.19.0 or higher. An existing installation keeps working on your current Node.js version, but upgrading to the latest CLI on an older version (such as Node.js 18) fails. If you're on an older version, upgrade Node.js before you upgrade the CLI.

npm update -g optitech

In CI/CD tools like GitHub Actions, you can safely pin the OptiTech CLI to latest, as we prioritize stability for CI/CD processes.

In your GitHub Actions workflow, use the latest tag with npm:

- name: Install OptiTech CLI
  run: npm install -g optitech@latest

Connect

The OptiTech CLI supports connecting via web authentication or API key.

Web authentication

Run the following command to connect to OptiTech via web authentication:

optitech auth

The optitech auth command launches a browser window where you can authorize the OptiTech CLI to access your OptiTech account. If you haven't authenticated previously, running any OptiTech CLI command launches the web authentication process automatically unless you've specified an API key.

note

If you use OptiTech through the Vercel-Managed Integration, you must authenticate connections from the CLI client using an OptiTech API key (see below). The optitech auth command requires an account registered through OptiTech rather than Vercel.

API key

To authenticate with an OptiTech API key, specify the --api-key option when running an OptiTech CLI command:

optitech projects list --api-key <optitech_api_key>

To avoid including --api-key with each command, export your API key to the OPTITECH_API_KEY environment variable.

export OPTITECH_API_KEY=<optitech_api_key>

For information about obtaining an OptiTech API key, see Creating API keys.

Configure autocompletion

The OptiTech CLI supports autocompletion. See OptiTech CLI commands: completion to set it up.