OriginRouter CLI: overview and install
OriginRouter CLI is the open-source execution and control layer that runs on a developer's device. It provides a unified local entry point for Claude Code and Codex. Services, routes, providers, remote control, and approval policies are enabled after installation when needed.
Follow the steps here to install the CLI and common local runtime components. Continue with Quickstart for first sign-in, Cloud routes, and workspace operation; provider and remote capabilities are documented in their respective guides.
The CLI is the local execution boundary: agents, commands, tools, and workspace access run on the target device. For App connections, remote control, or model providers, also read How App and CLI fit together and Data and execution boundaries.
The CLI is currently pre-1.0. Read the release notes for the target version before upgrading; preview releases may include migration requirements.
Requirements
- Node.js 22 or newer. The official Node.js installer includes npm; the OriginRouter installer verifies
nodeandnpmindependently. - On systems without Node.js or with an outdated version, the install script installs Node.js 22 LTS automatically: system package managers (apt, dnf/yum, apk) when root or passwordless sudo is available, otherwise nvm into the user's home directory with no sudo at all. On other systems, install Node.js 22 or newer from nodejs.org before running the install command. See Troubleshooting when automatic installation fails.
- Network access to the npm registry, GitHub Releases, and the official Claude Code and Codex download services; configure npm and terminal proxy settings according to your organization's policy when required.
- Local Proxy uses an isolated Python runtime managed by OriginRouter; a system Python installation is not required.
- Sign-in, a Cloud account, and provider credentials are not prerequisites for installing the CLI; configure them in later workflows.
Install the CLI
The installer is the recommended installation path. Direct npm iation remains available when the CLI version must be managed explicitly.
Choose an installation source
curl -fsSL https://originrouter.com/install.sh | bash
irm https://originrouter.com/install.ps1 | iex
Verify the installation
All installation methods provide the full originrouter executable and the equivalent short alias or. First verify the command entry point:
originrouter --version
or --help
The installer has already completed initialization and verification. After a direct npm iation, run the originrouter setup command shown in that installation option to prepare the local runtime environment.
To recheck the installation state, run:
originrouter setup --verify
If the shell reports that the command is missing, verify that npm's global bin directory is on PATH, then reopen the terminal. Do not mix a global npm iation with an old npm link checkout.
For setup options, the background service, Local Proxy, and Shell completion, see Service and runtime setup, Local Proxy, and Shell completion.
Initialization flow
originrouter setup prepares the complete local runtime after the CLI is installed, including agent runtimes, the background service, Local Proxy, and its dependencies. The flow verifies the installation when complete.
When you use the installer, initialization runs as part of the installation flow. After a direct npm iation, run originrouter setup in the terminal to begin initialization.
The initialization flow checks Claude Code and Codex, adds any runtime components required by the device, and prepares managed Python, Local Proxy, and the background service. It verifies the installation when complete.
Claude Code and Codex are downloaded from claude.ai and chatgpt.com, both of which restrict access from some regions and data-center IP ranges (HTTP 403). If the download fails on a cloud server or restricted network, configure a proxy for the terminal and run setup again, or install them manually and continue. See Troubleshooting.
Common options
originrouter setup --yes
Skip interactive confirmations in automation environments.
originrouter setup --dry-run
Show detection results and the execution plan without changing the local environment.
originrouter setup --no-proxy
Skip Local Proxy and its managed Python runtime when using only OriginRouter Cloud or remote devices.
originrouter setup --verify
Verify Claude Code, Codex, managed Python, Local Proxy, and background-service status without installing components.
Shell completion
Interactive setup asks whether to install completion for the current shell. After an automated installation, you can install it separately with:
originrouter completion install
Background service
The initialization flow installs and starts a current-user background service and configures it to start when the user signs in. For independent service management, see Service and daemon.
Retry and repair
setup rechecks actual files, versions, and service state on every run. If a step is interrupted, rerun the same command; completed steps are skipped and missing or incomplete components are installed or repaired.
Continue with Quickstart to sign in and configure Cloud routes; use Models and routing for a private API or enterprise gateway.
Next steps
- Quickstart: complete first sign-in, a Cloud workspace, and the first Agent run.
- Agent Workspace: learn the daily workspace workflow.
- Models and routing: configure a private API, enterprise gateway, or local model.
- Remote access: control a workspace from the App or another device.
- Command reference: look up complete syntax, options, and exit status.