Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

cli-serve — Claude Code skill: what it does, how to install

Controls the OmniRoute server from the CLI. Use it to manage ports, daemon mode, recovery, the system tray, and the dashboard shortcut.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add cheaper-inference/OmniRoute --skill cli-serve -a claude-code
Open on GitHub

What cli-serve does

This skill documents the OmniRoute CLI for server lifecycle management. Use omniroute serve, omniroute stop, and omniroute restart to start, stop, or restart the server. You can set a port, prevent the browser from opening, run in daemon mode, and open the dashboard with omniroute dashboard.

The serve command includes flags for logging, automatic recovery, headless operation, and system tray integration. --tls-cert and --tls-key configure the certificate and key. Commands that connect to the server read OMNIROUTE_BASE_URL and OMNIROUTE_API_KEY, or accept --base-url and --api-key for one invocation.

The CLI requires Node.js ≥22.22.2 or ≥24. Check that requirement before setup. Without the omniroute command available, the skill cannot manage the server.

What it helps with

  • start the OmniRoute server from a terminal
  • restart the server on a chosen port
  • open the dashboard from the CLI
  • configure daemon mode and recovery behavior

Example prompts for the agent

  • Start OmniRoute in daemon mode on port `3000` without opening the browser.
  • Run `omniroute status` and explain the current server state.
  • Restart the OmniRoute server with `omniroute restart`.

How to install cli-serve

1Skills CLI (Vercel)

npx skills add cheaper-inference/OmniRoute --skill cli-serve -a claude-code

2Manually: put the files in place

~/.claude/skills/cli-serve/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cli-serve/

From the same set34

The whole set →
cli-setup cheaper-inference Helps the agent configure OmniRoute, manage autostart, apply CLI updates, and adjust session environment variables. Claude Code CX Codex Cursor +1 1,200installs omni-combos-routing cheaper-inference This skill creates and manages model routing combos with fallback chains, tests, and metrics. Use it when OmniRoute needs configurable provider routing. Claude Code CX Codex Cursor +1 1,200installs omni-inference cheaper-inference Connects OpenAI-compatible inference endpoints for chat, embeddings, audio, and images. Useful for AI agents calling OmniRoute endpoints. Claude Code CX Codex Cursor +1 1,100installs cli-providers cheaper-inference Manage OmniRoute provider connections from the CLI: inspect the catalog, test connections, rotate keys, and view metrics. Useful when provider setup is part of your terminal workflow. Claude Code CX Codex Cursor +1 1,100installs omni-auth cheaper-inference Manage API keys and sessions in OmniRoute. Authenticates requests via Bearer tokens, handles dashboard login with password or OIDC, and controls session access. Claude Code CX Codex Cursor +1 1,100installs cli-routing cheaper-inference Manage model routing combos from the command line with omniroute. Test routing strategies, inspect metrics, and configure fallback chains interactively. Claude Code CX Codex Cursor +1 1,100installs omni-mcp cheaper-inference Connects an agent to the OmniRoute MCP server for request routing, memory, cache, and audit work. Use it when those operations need to be available as MCP tools. Claude Code CX Codex Cursor +1 1,100installs omni-providers cheaper-inference Manages connections to 375 AI providers via REST API: adds keys, tests connections, syncs models. Claude Code CX Codex Cursor +1 1,100installs

Similar

senior-architect sickn33 A skill for designing and reviewing system architecture based on explicit requirements, tradeoffs and evidence. Helps you choose an approach by examining current state, alternatives and risks. Claude Code CX Codex Cursor +1 2,200installs reference-list-builder Paramchoudhary This skill structures professional reference lists and drafts briefing materials for employment background checks. Claude Code CX Codex Cursor +1 9,300installs offer-comparison-analyzer Paramchoudhary This skill compares job offers by total compensation, work conditions, career prospects, and risk. Use it when you are choosing between multiple offers. Claude Code CX Codex Cursor +1 9,300installs find-skills vercel-labs Discovers and installs agent skills from skills.sh directly inside your coding assistant. Handy when you need domain-specific workflows for a project. Claude Code CX Codex Cursor +1 4,000,000installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs grill-me Matt Pocock grill-me interviews you about a plan or design to expose gaps and sharpen decisions. Use it before implementation starts. Claude Code 1,424,476installs grill-with-docs Matt Pocock This skill interviews you about a plan or design and creates ADRs and a glossary along the way. Use it when decisions need sharper definition. Claude Code 1,219,756installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs

Questions about cli-serve

How do I install cli-serve in Claude Code?

Run npx skills add cheaper-inference/OmniRoute --skill cli-serve -a claude-code, then run npx skills add cheaper-inference/OmniRoute --skill cli-serve -a claude-code again. The skill file is available at ~/.claude/skills/cli-serve/SKILL.md.

What does cli-serve do?

It helps manage the OmniRoute server through the CLI: start, stop, and restart it, set the port, and open the dashboard.

What does cli-serve require?

The CLI requires Node.js ≥22.22.2 or ≥24. Commands that connect to the server use OMNIROUTE_BASE_URL and OMNIROUTE_API_KEY, or the --base-url and --api-key flags.

Source text

SKILL.md · MIT
---
name: cli-serve
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.
---
<!-- 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
```

For a remote server:

```bash
export OMNIROUTE_BASE_URL="https://your-server.com"
```

### Global flags

| Flag                | Description                                              |
| ------------------- | -------------------------------------------------------- |
| `--base-url <url>`  | Override server URL for this invocation                  |
| `--api-key <key>`   | Override API key for this invocation                     |
| `--output <format>` | Output format: `table` (default), `json`, `jsonl`, `csv` |
| `--json`            | Shorthand for `--output json`                            |
| `--non-interactive` | Disable prompts — for CI / shell scripts                 |
| `--no-open`         | Don't auto-open the browser on start                     |
| `--port <n>`        | Override default port 20128                              |
| `--help`, `-h`      | Show help for the current command                        |
| `--version`, `-v`   | Print the installed version                              |

### Output formats

All listing commands support `--output`:

```bash
omniroute combo list                      # human-readable table
omniroute combo list --output json        # JSON array
omniroute combo list --output jsonl       # one JSON object per line
omniroute combo list --output csv         # CSV with header row
```

### Quick start: one-shot server + provider setup

```bash
# 1. Start server
omniroute

# 2. (First run) interactive setup wizard
omniroute setup

# 3. Verify everything is healthy
omniroute doctor
```

### CLI capability skills

| Capability                         | Skill                                                                                         |
| ---------------------------------- | --------------------------------------------------------------------------------------------- |
| Backup & restore                   | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/cli-backup-sync/SKILL.md |
| Provider & key management          | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/cli-providers/SKILL.md   |
| Cloud agents (`omniroute cloud …`) | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/cli-backup-sync/SKILL.md |
| Evals & benchmarking               | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/cli-eval/SKILL.md        |

### Errors

- `Connection refused` → server not running; run `omniroute` or `omniroute serve`
- `401 Unauthorized` → wrong or missing API key
- `command not found: omniroute` → not in PATH; check `npm root -g` or re-install
- `doctor` reports SQLite incompatible → `npm rebuild better-sqlite3` in the app directory

## Admin lifecycle

Requires the `omniroute` CLI. See the install and global-flags sections above.

### Server lifecycle

```bash
omniroute                              # Start server (default port 20128)
omniroute serve                        # Explicit alias
omniroute --port 3000                  # Override port
omniroute --no-open                    # Don't auto-open browser
omniroute --mcp                        # Start as MCP server (stdio transport)

omniroute stop                         # Stop the running server
omniroute restart                      # Restart the server

omniroute dashboard                    # Open dashboard in browser
omniroute open                         # Alias for dashboard
omniroute status                       # Runtime status (uptime, requests, providers)
```

### Setup & provisioning

#### Interactive wizard

```bash
omniroute setup                        # Step-by-step interactive setup
```

#### Non-interactive (CI / Docker)

```bash
omniroute setup --non-interactive \
  --password 'admin-password' \
  --add-provider \
  --provider openai \
  --api-key 'sk-...' \
  --test-provider
```

Environment variables for non-interactive setup:

| Variable                      | Purpose                                      |
| ----------------------------- | -------------------------------------------- |
| `OMNIROUTE_SETUP_PASSWORD`    | Admin password (≥8 chars)                    |
| `OMNIROUTE_PROVIDER`          | Provider id (e.g. `openai`, `anthropic`)     |
| `OMNIROUTE_PROVIDER_NAME`     | Display name for the connection              |
| `OMNIROUTE_PROVIDER_BASE_URL` | Optional OpenAI-compatible base URL override |
| `OMNIROUTE_API_KEY`           | Provider API key                             |
| `OMNIROUTE_DEFAULT_MODEL`     | Optional default model                       |
| `DATA_DIR`                    | Override OmniRoute data directory            |

### Diagnostics

```bash
omniroute doctor                       # Full health check
omniroute doctor --json                # Machine-readable JSON
omniroute doctor --no-liveness         # Skip HTTP health probe
omniroute doctor --host 0.0.0.0        # Override liveness host
omniroute doctor --liveness-url <url>  # Full URL override
```

Checks performed: Config, Database, Storage/encryption, Port, Node runtime, Native binary (better-sqlite3), Memory, Server liveness.

Exit code is non-zero if any check fails — useful in CI:

```bash
omniroute doctor --json | jq '.checks[] | select(.status=="fail")'
```

### Backup & restore

```bash
omniroute backup                       # Snapshot config + SQLite DB to ~/.omniroute/backups/
omniroute restore                      # Restore from a previous snapshot (interactive picker)
```

### Autostart (system tray / startup)

```bash
omniroute autostart enable             # Register OmniRoute as a system startup item
omniroute autostart disable            # Remove startup registration
omniroute autostart status             # Show current autostart state
```

On Linux: creates a **systemd user service** (`~/.config/systemd/user/omniroute.service`) and enables **linger** so the service can start after reboot without a graphical login; on desktop sessions it also adds an XDG autostart entry with `--tray`. On macOS: LaunchAgent plist. On Windows: registry startup entry.

### Tunnels (public URL)

Expose a local OmniRoute instance via a secure tunnel:

```bash
omniroute tunnel list                  # List active tunnels
omniroute tunnel create cloudflare     # Start a Cloudflare Tunnel (free)
omniroute tunnel create tailscale      # Start a Tailscale funnel
omniroute tunnel create ngrok          # Start an ngrok tunnel
omniroute tunnel stop <id>             # Stop a running tunnel
```

The tunnel URL is printed and can be used as `OMNIROUTE_BASE_URL` from remote machines.

### Config & environment

```bash
omniroute config show                  # Display current effective configuration
omniroute env show                     # List all OmniRoute environment variables
omniroute env get <KEY>                # Get a single env var value
omniroute env set <KEY> <value>        # Set an env var (temporary — until restart)
```

### Recovery

```bash
omniroute reset-password               # Reset the admin password interactively
omniroute reset-encrypted-columns      # Dry-run: show encrypted credential columns
omniroute reset-encrypted-columns --force  # Null out encrypted credentials in SQLite
```

Use `reset-encrypted-columns --force` only if `STORAGE_ENCRYPTION_KEY` was lost and you need to re-enter all provider API keys.

### Logs

```bash
omniroute logs                         # Stream live request logs
omniroute logs --json                  # JSON log entries
omniroute logs --search <term>         # Filter by term
omniroute logs --follow                # Tail mode (keep streaming)
```

### Update

```bash
omniroute update                       # Check for a newer version and prompt to update
```

### Errors

- `doctor` shows `STORAGE_ENCRYPTION_KEY missing` → set the key in `.env` or run `reset-encrypted-columns --force` to wipe and re-enter credentials
- `doctor` reports native binary fail → `npm rebuild better-sqlite3` in the OmniRoute app directory
- `tunnel create cloudflare` hangs → ensure `cloudflared` is installed: `brew install cloudflare/cloudflare/cloudflared`
<!-- skill:custom-end -->

© cheaper-inference · MIT · cheaper-inference/OmniRoute

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor