OPTINROUTER / DEVELOPER DOCS

CLI reference

Install the public access CLI today; review the proposed workspace commands separately.

Contract preview · Production API access is closed. All /v1 endpoints currently return 401.Install CLI
01

Install and login

Node.js 22 or later is required. Install the published versioned package from this website. The public CLI opens the access flow, which remains closed. Do not enter private project data or production provider secrets into a preview demo.

sh
npm install -g https://optinrouter.ai/downloads/optinrouter-cli-0.3.1.tgz
optinrouter --version
optinrouter login
02

Available commands

Version 0.1.0 supports login, signup, status and version. Login and signup open the closed access pages; no credentials are issued. Status reads OPTINROUTER_API_KEY and reports the current access state. It does not route inference, capture sessions, start an MCP server, publish policy or register providers.

CommandCurrent behavior
optinrouter loginOpen closed login flow
optinrouter signupOpen closed signup flow
optinrouter statusCheck access with configured environment key
optinrouter --versionPrint installed CLI version
03

Planned workspace commands

The following commands are proposed interface names only and are not implemented in 0.1.0. policies validate, routes explain, actions simulate, traces get and usage list should use the same versioned contracts and tenant scopes as REST. A future local validation mode must never fetch remote schemas, execute graph tools or infer permissions from text. Buyer offer-preview and provider certification-preview are also proposed, effect-free commands mapped to their preview REST scopes.

text
# Proposed only — not implemented in CLI 0.1.0
optinrouter policies validate policy.json
optinrouter routes explain --policy pol_engineering@3
optinrouter actions simulate graph.json --fixture review
optinrouter traces get trace_example
optinrouter usage list --region eu --outcome blocked
optinrouter buyer offer-preview --dataset ds_example --use evaluation --region eu
optinrouter provider certification-preview --endpoint ep_example --profile managed
04

Configuration and release gates

Future commands need explicit workspace selection, immutable policy/grammar/graph references, scoped credentials, bounded input files, deterministic error codes and redacted output. Publishing, activation, registration, purchase, canary rollout and delivery require separate authenticated write authority. A transport error or absent evidence must not fall back to an unconstrained route. Production CLI and MCP interoperability require certification alongside the gateway.

Contracts & examples

Download the preview, validate its shape locally and review the capability limits before planning an integration.

OpenAPI preview

OptinRouter AI guide

Product and developer guidance.

A good place to start

What would you
like to know?

Ask about public APIs, policies, grammars, context actions or the product. This guide uses approved information and can’t reveal private details or take actions.

Recent messages stay in this page’s memory. Reload or reset to clear them here.