# Server Control CLI

Starts, stops and restarts the OmniRoute server, including daemon mode and port settings.

- Repository: https://github.com/cheaper-inference/OmniRoute (83611 stars)
- Category: DevOps
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add cheaper-inference/OmniRoute --skill cli-serve -g -a claude-code -y`
Codex: `npx skills add cheaper-inference/OmniRoute --skill cli-serve -g -a codex -y`
Cursor: `npx skills add cheaper-inference/OmniRoute --skill cli-serve -g -a cursor -y`
Gemini CLI: `npx skills add cheaper-inference/OmniRoute --skill cli-serve -g -a gemini-cli -y`

## Description

Start, stop, and restart the OmniRoute server from the CLI. Manage daemon mode, port configuration, auto-recovery, system tray integration, and the dashboard open shortcut.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->

## Overview

Start, stop, and restart the OmniRoute server from the CLI. Manage daemon mode, port configuration, auto-recovery, system tray integration, and the dashboard open shortcut.

## Quick install

```bash
npm install -g omniroute   # or: npx omniroute
omniroute --version
```

## Subcommands

### `dashboard`

**Flags:**

- `--url`
- `--port <port>`
- `--tui`

**Example:**

```bash
omniroute dashboard
```

### `restart`

**Flags:**

- `--port <port>`

**Example:**

```bash
omniroute restart
```

### `serve`

**Flags:**

- `--port <port>`
- `--no-open`
- `--daemon`
- `--log`
- `--no-recovery`
- `--max-restarts <n>`
- `--headless`
- `--tray`
- `--no-tray`
- `--ready-timeout <ms>`
- `--tls-cert <path>`
- `--tls-key <path>`

**Example:**

```bash
omniroute serve
```

### `stop`

**Flags:**

- `--port <port>`

**Example:**

```bash
omniroute stop
```

<!-- skill:custom-start -->
<!-- Aggregated from: omniroute-cli (setup + index), omniroute-cli-admin (lifecycle/setup/backup/tunnel) -->

## Setup

The `omniroute` binary ships with the OmniRoute server. It is both the server launcher and a full management CLI with 250+ commands across 39 groups.

### Install

```bash
npm install -g omniroute          # npm registry
# or: use the binary bundled with the desktop app
```

Requires Node.js ≥22.22.2 or ≥24.

Verify:

```bash
omniroute --version   # prints installed version
omniroute --help      # full command tree
```

### Connection

Every CLI command that talks to the server reads two values:

| Source   | Variable / Flag                      |
| -------- | ------------------------------------ |
| Base URL | `OMNIROUTE_BASE_URL` or `--base-url` |
| API key  | `OMNIROUTE_API_KEY` or `--api-key`   |

Default base URL: `http://localhost:20128`

```bash
export OMNIROUTE_BASE_URL="http://localhost:20128"
export OMNIROUTE_API_KEY="sk-..."          # from Dashboard → API Manager
```

The rest: https://github.com/cheaper-inference/OmniRoute/blob/HEAD/skills/cli-serve/SKILL.md
