CLI quickstart
After installing the CLI and preparing the local runtime, use OriginRouter Cloud to sign in, initialize routes, and select an agent entry point. Follow Overview and install first to install the CLI, agent runtimes, background service, and Local Proxy.
Before you begin
Confirm that you have completed the CLI installation and originrouter setup from Overview and install, then run the steps below.
1. Initialize Cloud routes
originrouter login
originrouter agent setup --cloud
originrouter doctor
Initialization complete
setup prepares the local runtime. Next, sign in and select a Cloud model.
Sign in
Run login to complete browser authorization.
Initialize Cloud routes
Run agent setup --cloud to write account-available Cloud routes for Claude and Codex.
Verify
Run doctor last. Its sign-in check is meaningful for the Cloud path only after the previous steps.
2. Launch Claude Code or Codex
Choose an agent tool
originrouter claude
Capabilities and security boundaries
originrouter claude and originrouter codex preserve the native terminal workflow while adding unified Cloud, local, and remote routing, session control, approvals, and cross-device follow-up for Claude Code and Codex. Commands and tools still execute on the target CLI device; the App and account service do not replace that device by running local commands in the cloud.
Local direct, LAN direct, and account-relay control channels between the App and CLI use end-to-end encryption. The server does not hold device private keys, but it still processes delivery metadata such as device, message type, time, and size. Task content sent to Cloud or another model provider is processed under that provider's terms and data policy; E2EE for device control does not change the provider-data boundary. See Data and execution boundaries, Connection modes, and App devices and security.
The Claude Code and Codex entries preserve their native terminal experiences while OriginRouter manages routing, session control, and approvals. They are equivalent entry points at the mainstream-tool level.
To preserve an official Claude Code or Codex subscription, sign-in state, environment, and project configuration, use native-configuration mode:
originrouter claude --native-config
Use Codex native-configuration mode:
originrouter codex --native-config
This mode bypasses OriginRouter routes and does not require OriginRouter sign-in while retaining supported session discovery, message control, and approval capabilities. A failed account check in doctor does not affect native-agent use when the CLI is signed out. See Control and approval modes for the complete option set.
3. Use the Agent Workspace for multi-agent collaboration
Running originrouter directly opens the OriginRouter Agent Workspace. This entry uses workspace, Session, Run, and collaboration-mode concepts for objectives that require coordination, task assignment, or multi-agent review; it is not equivalent to the Claude Code or Codex entries.
originrouter
You can also submit an objective directly or select a multi-agent collaboration mode:
originrouter "Investigate the login timeout and add regression coverage"
Select Claude's build-review collaboration mode:
originrouter -c claude --mode build-review "Implement the change and have another agent review it independently"
Before using the Workspace for the first time, read Agent Workspace and Multi-agent collaboration for Session, Run, mode, and resume operations.
4. Extend when needed
- Connect your own API, enterprise gateway, or local model: see Models and routing, starting with “Optional: local provider.”
- Control a workspace from the App or another device: see Remote access. Complete the Cloud path above first, then authorize only the models and directories you intend to share.
These capabilities extend the control surface and are not prerequisites for the first successful run.