Compare commits

..

4 Commits

Author SHA1 Message Date
adevwithpurpose
d7d418889d test(executors): regenerate ExecutorRegistry golden snapshots after release sync
release/v3.8.50 sunset mimocode and added cloudflare-playground + jina-search
since this PR's snapshots were captured; refresh the golden fixtures to match.
2026-08-18 12:05:19 -03:00
Markus Hartung
0310e49a99 Merge remote-tracking branch 'origin/release/v3.8.50' into refactor/executor-registry 2026-08-18 12:01:59 -03:00
Xiangzhe
9ced57bc08 refactor(sse): route executor lookup through ExecutorRegistry (R0.3)
Adds open-sse/executors/registry.ts (Map-based registry mirroring
translator/registry.ts): the built-in table in executors/index.ts stays
declarative, every entry is registered at module load, and
getExecutor()/hasSpecializedExecutor() resolve through the registry.
DefaultExecutor fallback, its memoization, and the cloud-agent (#6699) /
search-provider (#10274) guards are unchanged.

Also fixes a latent lookup leak: the old object-literal lookup treated
Object.prototype names (constructor, toString, ...) as specialized
executors; the Map registry resolves them to the DefaultExecutor
fallback like any unknown provider.

Parity proof: executor-map golden (137 entries, byte-identical
before/after), check:known-symbols green, 1018 tests across the 65
executor test files green. Docs: OPEN_SSE_ARCHITECTURE factory section
corrected (it claimed generation from providerRegistry).

Refs #3501
2026-08-18 00:36:21 -03:00
Xiangzhe
a459dfd221 test(sse): golden characterization of the executor map before the R0.3 registry refactor
Freezes the 137-entry provider-id → executor mapping (class, provider
identity, backing PROVIDERS config), the no-shared-instances invariant,
and the getExecutor() dispatch rules (memoized DefaultExecutor fallback,
cloud-agent guard #6699, search-provider guard #10274) as stable JSON
snapshots. The upcoming ExecutorRegistry must keep both snapshots
byte-identical.
2026-08-18 00:16:46 -03:00
282 changed files with 11586 additions and 41262 deletions

View File

@@ -128,11 +128,6 @@ PORT=20128
# Optional: set the public origin *with* the same path so OAuth and display URLs
# stay consistent without relying on window.location.origin alone:
# NEXT_PUBLIC_BASE_URL=https://host/omniroute
#
# Explicit path probed by the container health check. Unset, the probe derives it
# from OMNIROUTE_BASE_PATH; setting it opts back into the deep monitoring endpoint.
# Used by: scripts/dev/healthcheck.mjs
# OMNIROUTE_HEALTHCHECK_PATH=/api/monitoring/health
# Opt-in iframe embedding of the OmniRoute HTML pages (issue #10273). Off by default:
# every route ships `frame-ancestors 'none'` + `X-Frame-Options: DENY`, which is why the
@@ -262,11 +257,6 @@ OMNIROUTE_USE_TURBOPACK=1
# so a missing/corrupt cache never breaks tab-completion.
# OMNIROUTE_DEBUG_COMPLETION=1
# Set to 1 to print per-request timing diagnostics from the CLI quota commands
# to stderr (`[omniroute] GET <path> completed in Nms`).
# Used by: bin/cli/commands/quota.mjs
# OMNIROUTE_DEBUG=1
# Docker production port mappings (docker-compose.prod.yml only).
# These set the HOST-side published ports. Container ports use PORT/API_PORT.
# PROD_DASHBOARD_PORT=20130
@@ -771,25 +761,11 @@ NEXT_PUBLIC_ENABLE_SOCKS5_PROXY=true
# CLI_CURSOR_BIN=agent
# CLI_CLINE_BIN=cline
# CLI_CONTINUE_BIN=cn
# CLI_QODER_BIN=qodercli
# CLI_QODER_BIN=qoder
# CLI_QWEN_BIN=qwen
# CLI_AIDER_BIN=aider
# CLI_GOOSE_BIN=goose
# CLI_GEMINI_BIN=gemini
# CLI_KILO_BIN=kilocode
# CLI_OPENCODE_BIN=opencode
# CLI_HERMES_BIN=hermes
# CLI_FORGE_BIN=forge
# CLI_JCODE_BIN=jcode
# CLI_DEEPSEEK_TUI_BIN=deepseek-tui
# CLI_CODEWHALE_BIN=codewhale
# CLI_SMELT_BIN=smelt
# CLI_PI_BIN=pi
# CLI_CRUSH_BIN=crush
# CLI_OMP_BIN=omp
# CLI_LETTA_BIN=letta
# Windsurf has no default binary — set this to enable binary detection for it.
# CLI_WINDSURF_BIN=windsurf
# CLI_AUGGIE_BIN=auggie
# AUGGIE_BIN=auggie
@@ -2841,14 +2817,18 @@ QUOTA_STORE_DRIVER=sqlite
# Minimum spacing between submissions and the extra pause after every third success.
# ADOBE_FIREFLY_MIN_SUBMIT_GAP_MS=12000
# ADOBE_FIREFLY_BATCH_EXTRA_GAP_MS=15000
# Browser used by Adobe Firefly renewal. True headless is debug-only: Adobe
# colligo normally rejects risk tokens minted without a headed browser.
# Used by: open-sse/services/adobeFireflyBrowserLogin.ts
# Chrome CDP runtime used by Adobe Firefly renewal. True headless is debug-only:
# Adobe colligo normally rejects risk tokens minted without a headed browser.
# ADOBE_FIREFLY_CHROME_CDP_PORT=9334
# ADOBE_FIREFLY_CHROME_VISIBLE=0
# ADOBE_FIREFLY_CHROME_HEADED=0 # Legacy alias for ADOBE_FIREFLY_CHROME_VISIBLE=1
# ADOBE_FIREFLY_CHROME_HEADLESS=0
# The CDP-attached Chrome runtime (adobeFireflyChromeRuntime.ts) was removed in
# #9255 along with its knobs — ADOBE_FIREFLY_CHROME_CDP_PORT, _VISIBLE, _HEADED,
# _PING, _FORCE_RESTART, ADOBE_FIREFLY_LOGIN_WAIT_MS and _FORTER_WAIT_MS are read
# nowhere and have no effect.
# ADOBE_FIREFLY_CHROME_FORCE_RESTART=0
# ADOBE_FIREFLY_CHROME_PING=auto
# ADOBE_FIREFLY_LOGIN_WAIT_MS=0
# ADOBE_FIREFLY_FORTER_WAIT_MS=45000
# Optional absolute Chrome executable; auto-detected when unset.
# CHROME_PATH=
# Telegram Mini App bridge. The update endpoint remains disabled while the bot
# token is unset. Used by: src/lib/telegram/* and src/app/api/telegram/update/route.ts.

View File

@@ -46,7 +46,7 @@ Repository map and Reference Documentation sections below.
## Project at a Glance
**OmniRoute** — unified AI proxy/router. One endpoint, 341 LLM providers, auto-fallback.
**OmniRoute** — unified AI proxy/router. One endpoint, 340 LLM providers, auto-fallback.
| Layer | Location | Purpose |
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -56,7 +56,7 @@ Repository map and Reference Documentation sections below.
| Translators | `open-sse/translator/` | Format conversion (OpenAI↔Claude↔Gemini) |
| Transformer | `open-sse/transformer/` | Responses API ↔ Chat Completions |
| Services | `open-sse/services/` | Combo routing, rate limits, caching, etc |
| Database | `src/lib/db/` | SQLite domain modules (154 migrations) |
| Database | `src/lib/db/` | SQLite domain modules (153 migrations) |
| Domain/Policy | `src/domain/` | Policy engine, cost rules, fallback logic |
| MCP Server | `open-sse/mcp-server/` | 109 tools (44 canonical + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules), 3 transports (stdio / SSE / Streamable HTTP), 33 scopes |
| A2A Server | `src/lib/a2a/` | JSON-RPC 2.0 agent protocol |

View File

@@ -167,7 +167,6 @@ _Living section — regenerated 2026-08-12 from all cycle commits (cycle open `e
### 🐛 Bug Fixes
- **fusion**: fusion combos now apply the same vision-compatibility filter as every other combo strategy — a panel member or judge whose vision support cannot be confirmed is excluded from an image-bearing request instead of silently receiving it (port from upstream decolua/9router#3378)
- **providers**: honor `PATCH /api/providers/[id]` so `omniroute providers rotate` stops 405ing (the OpenAPI spec and CLI already use PATCH) (PR #10366)
- **executors**: fix internal timeout misclassified as client disconnect (499) for 7 niche executors — pass TimeoutError reason to controller.abort() (#8197 side-finding)
- test(combo): guard auto/best-free never leaks the combo name as a model (#7754)

View File

@@ -47,21 +47,6 @@ rewrite it to the `_tasks/…` equivalent before writing:
Commit those artifacts inside the `_tasks/` repo (`git -C _tasks …`), never in the main repo.
## Scratch / temporary files — use `_artifacts/`, not `/tmp`
This project overrides the harness's default session scratchpad (`/tmp/claude-*/…`). Write
temporary/working files — exports, generated zips, one-off intermediate outputs, anything you'd
otherwise put in `/tmp` — to `/home/diegosouzapw/dev/proxys/OmniRoute/_artifacts/` instead.
- `_artifacts/` is a root `_*` path: already gitignored (`AGENTS.md` → "Root `_*` paths"), lives
on disk only, never tracked.
- Reason: keeping scratch output inside the project (vs `/tmp`) makes it trivial for the operator
to find and delete everything temporary in one place, instead of hunting across ephemeral
session-specific `/tmp` directories that vanish or accumulate untracked.
- Do **not** confuse this with `_tasks/` (Hard Rule #23, its own private git repo for durable
plans/specs/research/hand-offs) — `_artifacts/` is for disposable working files only, nothing
here needs to survive or be versioned.
## Base-green before opening PRs
Before cutting a branch or opening a PR, run the base-green check (`AGENTS.md` → Git Workflow →

View File

@@ -7,7 +7,7 @@
# 🚀 OmniRoute — The Free AI Gateway
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 341 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 1595% tokens (~89% avg) — never hit limits. 341 AI providers · 90+ free tiers · ~1.51B free tokens/mo · 19 routing strategies · $0 to start."/>
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 340 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 1595% tokens (~89% avg) — never hit limits. 340 AI providers · 90+ free tiers · ~1.51B free tokens/mo · 19 routing strategies · $0 to start."/>
</div>
@@ -63,7 +63,7 @@
| | v3.8.49 | **v3.8.50** | `v3.8.51+` |
| ------------------------- | :-----: | :---------: | :---------: |
| 🌐 Providers | 290 | **341** | more queued |
| 🌐 Providers | 290 | **340** | more queued |
| 🧠 Documented models | 1185 | **1202** | — |
| 🖼️ Modality Bridge | — | 🆕 vision | video |
| 📡 Radar free catalog | — | 🆕 opt-in | — |
@@ -101,7 +101,7 @@
<tr>
<td align="right"><b>⚙️ Features</b></td>
<td align="center"><a href="#-combos--the-flagship">🎯 Combos</a></td>
<td align="center"><a href="#-341-ai-providers--90-free">🌐 Providers</a></td>
<td align="center"><a href="#-340-ai-providers--90-free">🌐 Providers</a></td>
<td align="center"><a href="#-full-cli--a2a--mcp">🔌 CLI &amp; MCP</a></td>
</tr>
<tr>
@@ -210,7 +210,7 @@ curl http://localhost:20128/v1/chat/completions \
</div>
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint. 341 providers. Never stop building — OmniRoute picks the cheapest one that works. Six pillars: Never hit limits (auto-fallback across 341 providers in milliseconds, zero downtime) · Save up to 95% tokens (RTK + Caveman stacked compression cuts 1595%, ~89% avg on tool-heavy sessions) · $0 to start (90+ free tiers, 56 free forever — no card needed) · Every tool works (33 coding agents through one config) · One endpoint (OpenAI ↔ Claude ↔ Gemini ↔ Responses API at /v1) · Production-grade (circuit breakers, TLS stealth, MCP 109 tools, A2A, memory, guardrails, evals — 25,000+ tests)."/>
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint. 340 providers. Never stop building — OmniRoute picks the cheapest one that works. Six pillars: Never hit limits (auto-fallback across 340 providers in milliseconds, zero downtime) · Save up to 95% tokens (RTK + Caveman stacked compression cuts 1595%, ~89% avg on tool-heavy sessions) · $0 to start (90+ free tiers, 56 free forever — no card needed) · Every tool works (33 coding agents through one config) · One endpoint (OpenAI ↔ Claude ↔ Gemini ↔ Responses API at /v1) · Production-grade (circuit breakers, TLS stealth, MCP 109 tools, A2A, memory, guardrails, evals — 25,000+ tests)."/>
<br/>
<br/>
@@ -461,7 +461,7 @@ All **19** strategies — mix & match per combo step:
</div>
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — comparison table vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 341 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, built-in MCP server with 109 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA, 43 i18n UI locales, 100% MIT self-hosted. OmniRoute is the only one with the full set; competitors show a mix of checks, partials and crosses. Verified from each project&apos;s docs."/>
<img src="./docs/diagrams/comparison-table.svg" width="100%" alt="What sets OmniRoute apart — comparison table vs 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute: 340 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, built-in MCP server with 109 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA, 43 i18n UI locales, 100% MIT self-hosted. OmniRoute is the only one with the full set; competitors show a mix of checks, partials and crosses. Verified from each project&apos;s docs."/>
<sub>📊 Full methodology &amp; per-feature detail vs 9router, OpenRouter, CLIProxyAPI &amp; LiteLLM → [`docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md`](docs/comparison/OMNIROUTE_VS_ALTERNATIVES.md)</sub>
@@ -557,9 +557,9 @@ the current catalog at **[radar.omniroute.online/planos](https://radar.omniroute
- **🧠 Memory you control** — off by default, opt-in int8 vector quantization + typed decay, per-request `x-omniroute-no-memory`. → [Memory](docs/frameworks/MEMORY.md)
- **🛡️ Security** — prompt-injection guard on every LLM route (red-team suite), opt-in credential-masking guardrail (redacts leaked API keys/secrets in both directions), free DuckDuckGo last-resort web search, and an optional OIDC login gate for the dashboard (password login always stays available). → [Guardrails](docs/security/GUARDRAILS.md)
- **🖼️ New endpoints** — `/v1/ocr` (Mistral OCR) and `/v1/audio/translations` (Whisper-style) round out the media surface. → [API Reference](docs/reference/API_REFERENCE.md)
- **🎨 Image / video / audio generation** — one API for media: xAI Grok Imagine & Novita AI video, ComfyUI, Freepik, Adobe Firefly, Microsoft Designer, Segmind, EdgeTTS. → [API Reference](docs/reference/API_REFERENCE.md)
- **🎨 Image / video / audio generation** — one API for media: xAI Grok Imagine & Novita AI video, ComfyUI, Freepik, Adobe Firefly, Microsoft Designer, Google Imagen, Segmind, EdgeTTS. → [API Reference](docs/reference/API_REFERENCE.md)
- **🌍 Deployment & ops** — reverse-proxy `basePath`, browser-language auto-detect, per-key device tracking, root-less MITM trust, zh-TW localization. → [Environment](docs/reference/ENVIRONMENT.md)
- **🤝 More providers & agents** — Cursor Cloud Agent, Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **341-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
- **🤝 More providers & agents** — Cursor Cloud Agent, Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **340-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
- **📡 Routing transparency** — every response carries an `X-OmniRoute-Decision` header naming the strategy/provider/latency that served it, a new `cache-optimized` combo strategy + Auto-Combo `cacheAffinity` factor route repeat requests back to the connection holding the cached prefix, and a read-only `/v1/auto-combo/{channel}/candidates` endpoint exposes an `auto/*` channel's live candidate pool. → [Auto-Combo](docs/routing/AUTO-COMBO.md)
- **⚡ Local performance & infra** — one-click local Redis, Cloudflare Workers / Deno Deploy relay deployers, Bifrost & Mux as supervised embedded services. → [Embedded Services](docs/frameworks/EMBEDDED-SERVICES.md)
@@ -642,11 +642,11 @@ of your shell history. → [CLI Integrations](docs/guides/CLI-INTEGRATIONS.md)
<div align="center">
## 🌐 341 AI Providers — 90+ Free
## 🌐 340 AI Providers — 90+ Free
</div>
> The most complete catalog of any open-source router: **341 providers**, **90+ with a free tier**, **56 free forever**.
> The most complete catalog of any open-source router: **340 providers**, **90+ with a free tier**, **56 free forever**.
<div align="center">
@@ -877,7 +877,7 @@ Engines run in pipeline order; each is independently toggleable and configurable
<tr><td align="center" nowrap>9</td><td align="left" nowrap><b>Aggressive</b></td><td align="left">Summarization + progressive aging of old turns</td></tr>
<tr><td align="center" nowrap>10</td><td align="left" nowrap><b>LLMLingua-2</b></td><td align="left">ML semantic pruning via MobileBERT ONNX — code-safe, async</td></tr>
<tr><td align="center" nowrap>11</td><td align="left" nowrap><b>Ultra</b></td><td align="left">Heuristic token pruning with an optional small-model (SLM) tier</td></tr>
<tr><td align="center" nowrap>12</td><td align="left" nowrap><b>OmniGlyph</b></td><td align="left">Experimental context-as-image encoding for measured Claude Fable 5 on the direct Anthropic wire; GPT 5.6 transformers remain fail-closed pending provider receipts. Four compression profiles (aggressive default, balanced, coding-safe, passthrough) (most aggressive; opt-in)</td></tr>
<tr><td align="center" nowrap>12</td><td align="left" nowrap><b>OmniGlyph</b></td><td align="left">Experimental context-as-image encoding routed to Claude Fable 5 (most aggressive; opt-in)</td></tr>
</table>
Code blocks, URLs and structured data are **always preserved** byte-perfect. **One-click presets** combine the engines:
@@ -1172,7 +1172,7 @@ Métricas de validação: 1002 vídeos rastreados · 7,069,190 visualizações c
<tr><td nowrap><b>Runtime</b></td><td>Node.js 22.x / 24.x LTS — <code>&gt;=22.22.2 &lt;23 || &gt;=24.0.0 &lt;27</code></td></tr>
<tr><td nowrap><b>Language</b></td><td>TypeScript 6.0 — <b>100% TypeScript</b> across <code>src/</code> and <code>open-sse/</code> (zero <code>any</code> in core since v2.0)</td></tr>
<tr><td nowrap><b>Framework</b></td><td>Next.js 16 + React 19 + Tailwind CSS 4</td></tr>
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 120 domain modules, 154 migrations</td></tr>
<tr><td nowrap><b>Database</b></td><td>better-sqlite3 (SQLite, WAL journaling) + LowDB (JSON legacy) — 120 domain modules, 153 migrations</td></tr>
<tr><td nowrap><b>Memory</b></td><td>SQLite FTS5 full-text + int8-quantized vector embeddings, typed decay</td></tr>
<tr><td nowrap><b>Schemas</b></td><td>Zod 4 — MCP tool I/O validation + API contracts</td></tr>
<tr><td nowrap><b>Protocols</b></td><td>MCP (stdio / HTTP / SSE) + A2A v0.3 (JSON-RPC 2.0 + SSE)</td></tr>

View File

@@ -1 +0,0 @@
- **docs(guides):** OmniRoute now serves VS Code's **native Copilot Chat model picker** through the [OmniCopilot](https://github.com/diegosouzapw/OmniCopilot) extension ([Marketplace](https://marketplace.visualstudio.com/items?itemName=diegosouzapw.omnicopilot) · [Open VSX](https://open-vsx.org/extension/diegosouzapw/omnicopilot) — Cursor, Windsurf, VSCodium, Theia…) — no Copilot subscription needed since VS Code 1.122. New [`docs/guides/VSCODE-COPILOT.md`](docs/guides/VSCODE-COPILOT.md) covers setup, how the picker collapses the `dual`-prefix catalog via `GET /v1/models?prefix=alias`, and the **build-time** `DASHBOARD_ALLOW_EMBED=vscode` flag that renders the dashboard in an editor tab ([#10697](https://github.com/diegosouzapw/OmniRoute/pull/10697))

View File

@@ -19,36 +19,8 @@ OmniRoute compression is built around engine contracts. A mode can run one engin
| `aggressive` | Caveman + history/tool summarizers | Long chat sessions |
| `ultra` | Caveman + pruning helpers | Context-limit recovery |
| `rtk` | RTK | Terminal, shell, build, test, and git output |
| `omniglyph` | OmniGlyph | Context-as-image on the native provider wire |
| `stacked` | Pipeline, default `rtk -> caveman` | Mixed tool logs and prose, max savings |
### OmniGlyph compression profiles
The `omniglyph` engine (package `omniglyph`, 1.4.0+) accepts a named semantic profile, set
globally through `omniglyph.profile` in the compression settings or per step through the
stacked pipeline's step config:
| Profile | Boundary |
| -------------- | --------------------------------------------------------------------------- |
| `aggressive` | Default. The policy the published receipts measured — images system, tool docs and dense history |
| `balanced` | Keeps live state native, protects the last 8 turns, collapses older closed history |
| `coding-safe` | Keeps authority, tool schemas and live tool output native, protects the last 12 turns |
| `passthrough` | Routes without transforming; the engine is skipped |
The profile is a **ceiling, not a floor**: `mergeCompressionProfileOptions` in the package
refuses to let a caller override reopen a lossy lane the profile closed, so a per-step
`preserveSystemPrompt: false` cannot re-enable system compression under `coding-safe`.
Measured on this codebase: `coding-safe` and `balanced` raise `minCompressChars` to its
maximum and keep system, tool schemas and tool results native, so a session that has not
accumulated history yet stops at `below_min_chars` and the engine transforms nothing. That
is why the default is `aggressive` rather than the safest profile.
The package resolves its own model scope and profile from its environment configuration.
OmniRoute never delegates the decision: the adapter pins the model gate to the package's
most restrictive scope, so host environment settings can only narrow the allowlist, never
widen it past OmniRoute's measured receipts.
## Engine Registry
The registry lives in `open-sse/services/compression/engines/registry.ts`. Engines expose a shared

View File

@@ -1,4 +1,4 @@
<svg viewBox="0 0 1200 350" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Animated terminal demoing the OmniRoute CLI: omniroute providers list (341 providers registered, anthropic, codex, glm, kimi shown active), omniroute combo list (always-on priority, cost-saver, fusion-panel, context-relay) and omniroute health (healthy, 18412 requests in 24h, p95 412ms, circuit breakers 24 closed, 1 half-open, 0 open), cycling over the 80+ command surface: providers, oauth, keys, combo, nodes, models, cache, compression, cost, usage, quota, health, resilience, telemetry, logs, audit, mcp, a2a, cloud, memory, skills, eval, doctor, repl, tunnel, backup, sync, webhooks, policy, pricing, translator, simulate and more.">
<svg viewBox="0 0 1200 350" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Animated terminal demoing the OmniRoute CLI: omniroute providers list (340 providers registered, anthropic, codex, glm, kimi shown active), omniroute combo list (always-on priority, cost-saver, fusion-panel, context-relay) and omniroute health (healthy, 18412 requests in 24h, p95 412ms, circuit breakers 24 closed, 1 half-open, 0 open), cycling over the 80+ command surface: providers, oauth, keys, combo, nodes, models, cache, compression, cost, usage, quota, health, resilience, telemetry, logs, audit, mcp, a2a, cloud, memory, skills, eval, doctor, repl, tunnel, backup, sync, webhooks, policy, pricing, translator, simulate and more.">
<desc>Compact animated terminal cycling three real OmniRoute CLI commands with a typewriter effect and a scrolling subcommand ticker; the first frame shows the completed providers-list screen.</desc>
<defs><clipPath id="tickerClip"><rect x="12" y="304" width="1176" height="40"/></clipPath><clipPath id="tw0"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;31;61;92;122;153;184;214;245;245" keyTimes="0;0.012;0.018;0.024;0.030;0.036;0.042;0.048;0.054;1" dur="18s" repeatCount="indefinite"/></rect></clipPath><clipPath id="tw1"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;26;51;76;102;128;153;178;204;204" keyTimes="0;0.345;0.351;0.357;0.363;0.369;0.375;0.381;0.387;1" dur="18s" repeatCount="indefinite"/></rect></clipPath><clipPath id="tw2"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;20;41;61;82;102;122;143;163;163" keyTimes="0;0.678;0.684;0.690;0.696;0.702;0.708;0.714;0.720;1" dur="18s" repeatCount="indefinite"/></rect></clipPath></defs>
<rect width="1200" height="350" fill="#0d1117"/>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,4 +1,4 @@
<svg viewBox="0 0 1200 780" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Comparison table: OmniRoute versus 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute is the only one with the full set: 341 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, a built-in MCP server with 109 tools, A2A protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, desktop/Termux/PWA, 43 UI locales and 100% MIT self-hosted. 9router has free providers, RTK compression and translation but no MCP, A2A, memory, guardrails, cloud agents or stealth. OpenRouter is a hosted SaaS with 400+ models, guardrails and a hosted MCP but is not self-hosted and lacks A2A, memory, cloud agents and stealth. CLIProxyAPI is a light OAuth proxy with two routing strategies. LiteLLM has 100+ providers, A2A and extensive guardrails but no memory, compression, free tier, stealth or cloud agents.">
<svg viewBox="0 0 1200 780" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Comparison table: OmniRoute versus 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute is the only one with the full set: 340 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, a built-in MCP server with 109 tools, A2A protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, desktop/Termux/PWA, 43 UI locales and 100% MIT self-hosted. 9router has free providers, RTK compression and translation but no MCP, A2A, memory, guardrails, cloud agents or stealth. OpenRouter is a hosted SaaS with 400+ models, guardrails and a hosted MCP but is not self-hosted and lacks A2A, memory, cloud agents and stealth. CLIProxyAPI is a light OAuth proxy with two routing strategies. LiteLLM has 100+ providers, A2A and extensive guardrails but no memory, compression, free tier, stealth or cloud agents.">
<desc>Static-header comparison table where each capability row fades in top to bottom; the OmniRoute column is highlighted and shows a check or a leading value in every row, while competitors show a mix of checks, partials and crosses.</desc>
<defs>
<pattern id="gC" width="32" height="32" patternUnits="userSpaceOnUse"><path d="M 32 0 L 0 0 0 32" fill="none" stroke="#ffffff" stroke-opacity="0.05" stroke-width="1"/></pattern>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -1,4 +1,4 @@
<svg viewBox="0 0 1200 540" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The OmniRoute promise: one endpoint, 341 providers — never stop building, OmniRoute picks the cheapest one that works. Six pillars. Never hit limits: auto-fallback across 341 providers in milliseconds, quota out means the next provider takes over with zero downtime. Save up to 95 percent of tokens: RTK plus Caveman stacked compression cuts 15 to 95 percent of eligible tokens, about 89 percent average on tool-heavy sessions. Zero dollars to start: 90+ providers with a free tier, 56 free forever — Qoder, Pollinations, Cloudflare, SiliconFlow — no card needed. Every tool works: 33 coding agents including Claude Code, Codex, Cursor, Cline, Copilot and Antigravity through one config. One endpoint: OpenAI, Claude, Gemini and Responses API translation — point any tool at /v1 and it just works. Production-grade: circuit breakers, TLS stealth, MCP with 109 tools, A2A, memory, guardrails, evals — 25,000+ tests.">
<svg viewBox="0 0 1200 540" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The OmniRoute promise: one endpoint, 340 providers — never stop building, OmniRoute picks the cheapest one that works. Six pillars. Never hit limits: auto-fallback across 340 providers in milliseconds, quota out means the next provider takes over with zero downtime. Save up to 95 percent of tokens: RTK plus Caveman stacked compression cuts 15 to 95 percent of eligible tokens, about 89 percent average on tool-heavy sessions. Zero dollars to start: 90+ providers with a free tier, 56 free forever — Qoder, Pollinations, Cloudflare, SiliconFlow — no card needed. Every tool works: 33 coding agents including Claude Code, Codex, Cursor, Cline, Copilot and Antigravity through one config. One endpoint: OpenAI, Claude, Gemini and Responses API translation — point any tool at /v1 and it just works. Production-grade: circuit breakers, TLS stealth, MCP with 109 tools, A2A, memory, guardrails, evals — 25,000+ tests.">
<desc>Animated promise card: six pillar tiles fade in in reading order, then a soft colored border highlight sweeps from tile to tile in a continuous cycle.</desc>
<defs>
<pattern id="gridPaperP" width="32" height="32" patternUnits="userSpaceOnUse">
@@ -21,7 +21,7 @@
<line x1="150" y1="53" x2="1160" y2="53" stroke="#232b38" stroke-width="1.5"/>
</g>
<g>
<text x="40" y="100" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="23" font-weight="600" fill="#c9d1d9">One endpoint. <tspan fill="#a78bfa" font-weight="800">341 providers.</tspan> Never stop building — OmniRoute picks <tspan fill="#7ee787" font-weight="700">the cheapest one that works</tspan>.</text>
<text x="40" y="100" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="23" font-weight="600" fill="#c9d1d9">One endpoint. <tspan fill="#a78bfa" font-weight="800">340 providers.</tspan> Never stop building — OmniRoute picks <tspan fill="#7ee787" font-weight="700">the cheapest one that works</tspan>.</text>
</g>
<g font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif">
@@ -38,7 +38,7 @@
<line x1="3.9" y1="3.9" x2="18.1" y2="18.1"/>
</g>
<text x="102" y="170" font-size="18" font-weight="800" fill="#74b9ff">Never hit limits</text>
<text x="66" y="204" font-size="13.5" fill="#a1a1aa">Auto-fallback across 341 providers in</text>
<text x="66" y="204" font-size="13.5" fill="#a1a1aa">Auto-fallback across 340 providers in</text>
<text x="66" y="226" font-size="13.5" fill="#a1a1aa">milliseconds. Quota out? The next provider</text>
<text x="66" y="248" font-size="13.5" fill="#a1a1aa">takes over — zero downtime.</text>
</g>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,4 +1,4 @@
<svg viewBox="0 0 1200 548" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="OmniRoute hero: Never stop coding. Every AI tool to 341 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot and Antigravity into free Claude, GPT and Gemini with auto-fallback. RTK + Caveman stacked compression saves 15 to 95 percent of tokens — about 89 percent average on tool-heavy sessions — so you never hit limits. Stats: 341 AI providers, 90+ free tiers, about 1.51B free tokens per month, 15 to 95 percent token savings, 19 routing strategies, zero dollars to start.">
<svg viewBox="0 0 1200 548" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="OmniRoute hero: Never stop coding. Every AI tool to 340 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot and Antigravity into free Claude, GPT and Gemini with auto-fallback. RTK + Caveman stacked compression saves 15 to 95 percent of tokens — about 89 percent average on tool-heavy sessions — so you never hit limits. Stats: 340 AI providers, 90+ free tiers, about 1.51B free tokens per month, 15 to 95 percent token savings, 19 routing strategies, zero dollars to start.">
<desc>Animated hero card: a pulse travels the divider line and a compression bar demo repeatedly shrinks a prompt by up to 95 percent; all headline content is static and readable on the first frame.</desc>
<defs>
<pattern id="gridPaperH" width="32" height="32" patternUnits="userSpaceOnUse">
@@ -28,7 +28,7 @@
<text x="48" y="138" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="60" font-weight="800" fill="#e9edf3">Never stop coding<tspan fill="#a855f7">.</tspan></text>
<!-- subheadline -->
<text x="48" y="184" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="25" font-weight="600" fill="#c9d1d9">Every AI tool → <tspan fill="#a78bfa" font-weight="800">341 providers</tspan><tspan fill="#7ee787" font-weight="800">90+ free</tspan> — through one endpoint.</text>
<text x="48" y="184" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="25" font-weight="600" fill="#c9d1d9">Every AI tool → <tspan fill="#a78bfa" font-weight="800">340 providers</tspan><tspan fill="#7ee787" font-weight="800">90+ free</tspan> — through one endpoint.</text>
<!-- plug line -->
<text x="48" y="222" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="16.5" fill="#a1a1aa">Claude Code · Codex · Cursor · Cline · Copilot · Antigravity&#160;&#160;&#160;&#160;<tspan fill="#7ee787" font-weight="700">FREE</tspan> Claude / GPT / Gemini · auto-fallback</text>

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@@ -140,8 +140,6 @@ omniroute launch-codex --model auto
You can do this manually via `codex` and command line parameters to specify endpoint and api key, but with the above command, OmniRoute takes care of everything for you.
The same one-command launch works for other CLIs via the generic launcher — `omniroute run <target>` supports `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen`, and `gemini` (see [CLI Integrations](../guides/CLI-INTEGRATIONS.md)).
3. The CLI should be sending requests to OmniRoute now.
### Confirm your tool is routing to OmniRoute

View File

@@ -1,7 +1,7 @@
---
title: "CLI Integrations — point any coding CLI at OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
version: 3.8.40
lastUpdated: 2026-06-28
---
# CLI Integrations
@@ -14,15 +14,9 @@ OmniRoute (local or remote) and writes the tool's own config file on **your**
machine. The API key is referenced by an environment variable wherever the tool
supports it. Commands that persist a tool-local environment file are noted below.
There is also a generic launcher — `omniroute run <target>` — that spawns
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` or `gemini` with the
right env injected, without writing any config at all. Targets and their
aliases come from the canonical manifest `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), and `omniroute completion` offers the
same manifest-derived target words. The legacy per-tool launchers —
`omniroute launch` (Claude Code) and `omniroute launch-codex` (Codex) — remain
available.
There are also two launchers`omniroute launch` (Claude Code) and
`omniroute launch-codex` (Codex) — that spawn the CLI with the right env injected,
without writing any config at all.
Provider onboarding is available from the same local/remote context. The
API-first commands below keep management authentication separate from provider
@@ -93,21 +87,8 @@ Notes on flags (verified in the command source):
model auto-discovery: Cline, Kilo, Roo, Goose, Qwen, Aider. Those tools
also accept `--yes` for non-interactive runs (which then requires `--model`).
`setup-opencode` takes `--model` to set the default top-level model.
- `--model <id>` on `omniroute run` follows the manifest's per-target wiring
(`bin/cli/cli-manifest.mjs`): **aider** receives `--model openai/<id>` and
**opencode** `--model omniroute/<id>` (the prefix is added only when the id
does not already carry it); **qwen** and **gemini** receive the id verbatim;
**claude** gets it via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, and
**codex** via `-c model_providers.omniroute.*` args. **Qwen is the only run
target that hard-requires `--model`** — `omniroute run qwen` without it exits
`2` with an explicit error.
- `--port <port>` — local OmniRoute port (default `20128`, ignored when `--remote`
is set). Present on all `setup-*` and both launchers.
- `omniroute run` exit codes: the child CLI's own exit code is propagated
verbatim; `2` = invalid arguments (unsupported target, missing required
`--model`, container guard); `127` = the target binary is not in `PATH`;
`130`/`143`/`129` when the launch is ended by `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = other runtime launch failure.
- The two launchers (`launch`, `launch-codex`) accept `--profile <name>` to select
a profile written by `setup-claude` / `setup-codex`, plus pass-through args for
the underlying `claude` / `codex` binary.
@@ -270,11 +251,6 @@ Gemini surface (`/v1beta`). `omniroute run gemini` wires that automatically:
- a **temporary isolated `GEMINI_CLI_HOME`** whose `.gemini/settings.json`
selects `gemini-api-key` auth, so a stored Google OAuth session (Code Assist)
never overrides the OmniRoute-directed launch — removed after exit;
- **env hygiene**: the child env is scrubbed of `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` and `GOOGLE_GENAI_USE_GCA` (which would redirect
auth to Vertex/Code Assist), and `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` is
set as a belt-and-suspenders fallback — the other `run` targets get the same
treatment for their own conflicting variables;
- `--model <id>` injection from `--provider`/`--model`.
```bash

View File

@@ -1,7 +1,7 @@
---
title: "Codex CLI — Configuration with OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
version: 3.8.49
lastUpdated: 2026-08-01
---
# Codex CLI — Configuration with OmniRoute
@@ -319,17 +319,6 @@ omniroute launch-codex --remote http://100.x.x.x:20128/v1 --api-key sk-xxx
omniroute launch-codex --profile glm52 -- --yolo "fix this bug"
```
Codex is also a target of the two generic manifest-driven entry points
(`bin/cli/cli-manifest.mjs`):
```bash
# Interactive model picker → writes ~/.codex/<name>.config.toml (TOML, env_key)
omniroute configure codex
# Launch codex with the omniroute provider injected via -c flags (no config written)
omniroute run codex
```
---
## New Codex CLI features (v0.138v0.141)

View File

@@ -1,7 +1,7 @@
---
title: "Remote Mode — Drive a remote OmniRoute from your laptop"
version: 3.8.50
lastUpdated: 2026-08-18
version: 3.8.40
lastUpdated: 2026-06-28
---
# Remote Mode

View File

@@ -1,7 +1,7 @@
---
title: "📖 Setup Guide — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
version: 3.8.40
lastUpdated: 2026-06-28
---
# 📖 Setup Guide — OmniRoute
@@ -186,11 +186,9 @@ omniroute setup-qwen # ~/.qwen/settings.json + ~/.qwen/.env
```
Each accepts `--remote <url> --api-key <key>` to configure a local tool against a
**remote** OmniRoute, plus `--dry-run` to preview. To launch a CLI with the right
env injected and no config written at all, use the generic launcher
`omniroute run <target>` (claude, codex, aider, goose, opencode, qwen, gemini);
the legacy per-tool launchers `omniroute launch` (Claude Code) and
`omniroute launch-codex` (Codex) remain available.
**remote** OmniRoute, plus `--dry-run` to preview. The launchers
`omniroute launch` (Claude Code) and `omniroute launch-codex` (Codex) spawn the CLI
with the right env injected, writing no config at all.
For the full table (what each command writes, every flag, local vs remote, base-URL
`/v1` conventions), see **[CLI Integrations](./CLI-INTEGRATIONS.md)**.

View File

@@ -91,32 +91,18 @@ extension.
## Dashboard inside a VS Code tab
`omnicopilot.dashboardOpen: "editor"` renders the OmniRoute dashboard in an editor tab via the
Simple Browser instead of an external browser. Embedding is **opt-in on the server** through
`DASHBOARD_ALLOW_EMBED=vscode`, which serves the HTML pages with
`frame-ancestors 'self' vscode-webview:` instead of the default `frame-ancestors 'none'` +
`X-Frame-Options: DENY`. The API surface (`/api`, `/v1`, `/v1beta`, `/a2a`, `/healthz`) keeps the
strict headers either way.
> ⚠️ **It is a build-time flag, not a runtime one.** Next.js compiles `headers()` into the route
> manifest, so `next.config.mjs` reads the variable while the bundle is built
> (`next.config.mjs` → `resolveDashboardEmbedMode`, `scripts/build/dashboardEmbed.mjs`).
> Exporting it in front of an already-built server changes nothing — the headers are baked.
Simple Browser instead of an external browser. Embedding is **opt-in on the server**: start
OmniRoute with
```bash
# the variable has to be present on the BUILD command
DASHBOARD_ALLOW_EMBED=vscode npm run build # or npm run build:release
npm start
DASHBOARD_ALLOW_EMBED=vscode omniroute
```
| How you installed | Can you enable embedding? |
| --- | --- |
| From source | ✅ set the variable on the build command, as above |
| `npm install -g omniroute` | ❌ the published package ships a prebuilt bundle — build from source instead |
| Docker image | ❌ the official image has no build arg for it — build your own from the `Dockerfile` with the variable set |
Without an embed-enabled build the page refuses to frame, the extension detects that from the
response headers and falls back to the external browser — nothing breaks, and it says so once.
See [`ENVIRONMENT.md`](../reference/ENVIRONMENT.md) and issue
which serves the HTML pages with `frame-ancestors 'self' vscode-webview:` instead of the default
`frame-ancestors 'none'` + `X-Frame-Options: DENY`. The API surface (`/api`, `/v1`, `/v1beta`,
`/a2a`, `/healthz`) keeps the strict headers either way. Without the variable the page refuses to
frame and the extension falls back to the external browser — nothing breaks. See
[`ENVIRONMENT.md`](../reference/ENVIRONMENT.md) and issue
[#10273](https://github.com/diegosouzapw/OmniRoute/issues/10273).
---
@@ -139,7 +125,7 @@ Kilo and Roo — the same configs described in
| Every model appears twice | You are on an OmniCopilot older than 1.0.1 — update. The extension now requests `?prefix=alias`. |
| An image/audio model used to be listed and is gone | Intentional since 1.0.1 — it could never answer a chat request. |
| Panel missing from the Activity Bar | VS Code moves extra view containers into the **"…"** overflow at the bottom of the Activity Bar, and a container hidden via right-click stays hidden. Right-click the Activity Bar → tick **OmniRoute**, or open it with `OmniRoute: Manage Connection`. |
| Dashboard opens in the browser despite `editor` mode | The server was not **built** with `DASHBOARD_ALLOW_EMBED=vscode` (see above) — setting it at startup on a prebuilt install does nothing. The fallback is deliberate. |
| Dashboard opens in the browser despite `editor` mode | The server is not started with `DASHBOARD_ALLOW_EMBED=vscode` (see above). The fallback is deliberate. |
| Models list is stale after changing providers | `OmniRoute: Refresh Models`, or the ↻ link in the panel. |
---

View File

@@ -1,298 +0,0 @@
# CLI-INTEGRATIONS (العربية)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "تكاملات CLI — توجيه أي CLI برمجي إلى OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# تكاملات CLI
تقدم OmniRoute مجموعة من أوامر `setup-*` التي تقوم بتكوين CLI برمجي (Codex، Claude Code، OpenCode، Cline، …) لاستخدام OmniRoute كخلفية لها — بحيث يتواصل الأداة مع **نقطة نهاية واحدة** وOmniRoute تقوم بتوجيه الطلب إلى المزود الصحيح مع التراجع التلقائي. كل أمر يقرأ كتالوج النموذج **الحالي** من OmniRoute قيد التشغيل (محلي أو بعيد) ويكتب ملف التكوين الخاص بالأداة على **جهازك**. يتم الإشارة إلى مفتاح API بواسطة متغير بيئي حيثما تدعمه الأداة. يتم ملاحظة الأوامر التي تحتفظ بملف بيئة محلي للأداة أدناه.
هناك أيضًا مشغل عام — `omniroute run <target>` — الذي يقوم بتشغيل `claude`، `codex`، `aider`، `goose`، `opencode`، `qwen` أو `gemini` مع البيئة الصحيحة المدخلة، دون كتابة أي تكوين على الإطلاق. تأتي الأهداف وألقابها من البيان القياسي `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`، `codex-cli|openai-codex|openai`، `goose-cli`،
`open-code`، `qwen-code`، `gemini-cli`)، و`omniroute completion` تقدم نفس الكلمات المستمدة من البيان. لا تزال المشغلات القديمة لكل أداة —
`omniroute launch` (Claude Code) و`omniroute launch-codex` (Codex) — متاحة.
تتوفر عملية الانضمام للمزود من نفس السياق المحلي/البعيد. تحافظ الأوامر التي تركز على API أدناه على مصادقة الإدارة منفصلة عن بيانات اعتماد المزود ولا تطبع أبدًا بيانات اعتماد في الإخراج المنظم:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
للسكربتات، يفضل استخدام `--credential-stdin` أو `--credential-env`؛ يتم الاحتفاظ بـ `--credential` للاستخدام المحلي المنضبط. يتطلب `providers remove` `--yes` على محطة غير تفاعلية، وتكرم جميع الأوامر الخمسة السياق النشط أو الخيارات العالمية `--base-url`/`--api-key`.
لإعداد القاعدة المكتوب يدويًا لمرة واحدة لأغنى تكاملين، انظر إلى الغوص العميق لكل أداة:
- [تكوين Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [تكوين Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [الوضع البعيد](./REMOTE-MODE.md) — تشغيل OmniRoute بعيد (VPS / Tailnet) من جهاز الكمبيوتر المحمول الخاص بك
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ملحق OmniCopilot؛ يمكنه أيضًا تشغيل هذه الأوامر `setup-*` لك من داخل المحرر
---
## جدول رئيسي
كل أمر يكرم **السياق النشط** (المحدد بواسطة `omniroute connect`، انظر
[الوضع البعيد](./REMOTE-MODE.md)) أو العلامات الصريحة `--remote <url> --api-key <key>`.
"محلي مقابل بعيد" أدناه يعني: بدون علامات، يستهدف `http://localhost:20128`؛ مع `--remote` (أو سياق بعيد نشط) يقوم بجلب الكتالوج من ذلك
الخادم ويكتب التكوين محليًا.
| الأمر | الأداة | ما يكتبه | العلامات الرئيسية | محلي مقابل بعيد |
| -------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — ملف تعريف واحد لكل نموذج نص متوافق (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | كلاهما |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — ملف تعريف واحد لكل نموذج متطابق (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | كلاهما |
| `omniroute setup-opencode` | OpenCode (متوافق مع openai) | `~/.config/opencode/opencode.json` — مزود `omniroute` مع كل نموذج كتالوج (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | كلاهما |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (وضع CLI) + يطبع إعدادات ملحق VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | كلاهما |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + يدمج `kilocode.*` في `settings.json` لـ VS Code إذا كان موجودًا | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | كلاهما |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — نماذج `provider: openai`، المفتاح عبر `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | كلاهما |
| `omniroute setup-cursor` | Cursor | لا شيء — يطبع الخطوات داخل التطبيق (تكوين Cursor غير شفاف SQLite) | `--remote` `--api-key` `--only` `--port` | كلاهما |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (مستند الاستيراد) + يحدد `roo-cline.autoImportSettingsPath` إذا كان هناك `settings.json` لـ VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | كلاهما |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — مزود `openai-compat`، المفتاح عبر `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | كلاهما |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + يطبع وصفة البيئة | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | كلاهما |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + يطبع وصفة البيئة | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | كلاهما |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — مصفوفة V4 `modelProviders.openai` + `OMNIROUTE_API_KEY` في `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | كلاهما |
| `omniroute run <target>` | تشغيل وقت التشغيل (عام) | لا شيء — تشغيل `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` مع البيئة الصحيحة والمعلمات؛ تستخدم Qwen وGemini منزلًا معزولًا مؤقتًا | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | كلاهما |
| `omniroute launch` | Claude Code | لا شيء — يقوم بتشغيل `claude` مع `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` المدخلة | `--remote` `--api-key` `--token` `--profile` `--port` | كلاهما |
| `omniroute launch-codex` | OpenAI Codex CLI | لا شيء — يقوم بتشغيل `codex` مع مزود `omniroute` المدخل عبر علامات `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | كلاهما |
ملاحظات حول العلامات (تم التحقق منها في مصدر الأمر):
- `--remote <url>` — جلب الكتالوج من OmniRoute بعيد (يتجاوز `--port`
والسياق النشط). `--api-key <key>` يوفر بيانات الاعتماد لذلك
الخادم (يكون الافتراضي هو متغير البيئة `OMNIROUTE_API_KEY`، أو رمز السياق النشط).
- `--only <patterns>` — أجزاء فرعية مفصولة بفواصل؛ احتفظ فقط بمعرفات النماذج التي تتطابق
(على سبيل المثال `--only glm,kimi`). متاحة على `setup-codex`، `setup-claude`,
`setup-opencode`، `setup-continue`، `setup-cursor`، `setup-crush`.
- `--dry-run` — طباعة بالضبط ما سيتم كتابته دون لمس
نظام الملفات. متاحة على كل أمر `setup-*` **باستثناء** `setup-cursor`
(الذي لا يكتب ملفًا أبدًا).
- `--model <id>` — مطلوب (أو يتم اختياره تفاعليًا) للأدوات التي لا تمتلك
اكتشاف نموذج تلقائي: Cline، Kilo، Roo، Goose، Qwen، Aider. تقبل تلك الأدوات أيضًا `--yes` للتشغيلات غير التفاعلية (التي تتطلب بعد ذلك `--model`).
يأخذ `setup-opencode` `--model` لتعيين النموذج الافتراضي على المستوى الأعلى.
- `--model <id>` على `omniroute run` يتبع توصيل البيان لكل هدف
(`bin/cli/cli-manifest.mjs`): **aider** يتلقى `--model openai/<id>` و
**opencode** `--model omniroute/<id>` (يتم إضافة البادئة فقط عندما لا يحمل المعرف
ذلك بالفعل)؛ **qwen** و **gemini** يتلقيان المعرف كما هو؛
**claude** يحصل عليه عبر `ANTHROPIC_MODEL`، **goose** عبر `GOOSE_MODEL`، و
**codex** عبر `-c model_providers.omniroute.*` args. **Qwen هو الهدف الوحيد الذي يتطلب بشدة `--model`**`omniroute run qwen` بدونه يخرج
`2` مع خطأ صريح.
- `--port <port>` — منفذ OmniRoute المحلي (الافتراضي `20128`، يتم تجاهله عند تعيين `--remote`).
موجود على جميع `setup-*` وكلا المشغلين.
- رموز الخروج لـ `omniroute run`: يتم تمرير رمز الخروج الخاص بـ CLI الفرعي
كما هو؛ `2` = معلمات غير صالحة (هدف غير مدعوم، نموذج مطلوب مفقود، حارس حاوية)؛ `127` = الثنائي المستهدف ليس في `PATH`؛
`130`/`143`/`129` عندما يتم إنهاء التشغيل بواسطة `SIGINT`/`SIGTERM`/`SIGHUP`؛
`1` = فشل آخر في تشغيل الوقت.
- تقبل المشغلان (`launch`، `launch-codex`) `--profile <name>` لاختيار
ملف تعريف مكتوب بواسطة `setup-claude` / `setup-codex`، بالإضافة إلى تمرير المعلمات للأمر
الثانوي `claude` / `codex` الثنائي.
المحدد التفاعلي مشترك أيضًا بواسطة وصفات الإعداد:
```bash
# اختر من كتالوج النموذج المحلي أو البعيد النشط وقم بتكوين الهدف.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` حاليًا يفوض إلى الوصفات المختبرة لـ `codex`، `claude`,
`opencode`، `qwen`، `aider`، `goose`، `cline`، `continue`، و `kilo`. تبقى إدخالات الكتالوج الخاصة بـ IDE فقط،
MITM، والدليل فقط تدفقات `setup-*`/يدوية واضحة وليست مقدمة كأهداف قابلة للتشغيل.
> `setup-opencode` هو تكامل OpenCode **متوافق مع openai** خفيف الوزن.
> هناك أيضًا تكامل ملحق أغنى — `omniroute setup opencode` — الذي
> يقوم بتثبيت `@omniroute/opencode-plugin`. إنهما أمران مختلفان؛ الجدول
> أعلاه يوثق `setup-opencode`.
---
## الاستخدام المحلي
مع تشغيل OmniRoute على `localhost:20128`، فقط قم بتشغيل أمر الإعداد لأداتك. يتم جلب الكتالوج من الخادم المحلي.
```bash
# Codex: كتابة ملف تعريف لكل نموذج متطابق في ~/.codex/
omniroute setup-codex
codex --profile glm52 # استخدم ملف تعريف تم إنشاؤه
# Claude Code: كتابة ملفات تعريف لكل نموذج، ثم إطلاق واحد
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: كتابة مزود متوافق مع openai مع جميع نماذج الكتالوج
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # يتم الإشارة إليه عبر {env:OMNIROUTE_API_KEY}، أبداً على القرص
opencode -m omniroute/glm/glm-5.2 "..."
# الأدوات التي لا تحتوي على اكتشاف تلقائي تحتاج إلى نموذج صريح:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# معاينة دون كتابة أي شيء:
omniroute setup-continue --dry-run
```
إطلاق دون كتابة أي تكوين على الإطلاق (حقن البيئة فقط):
```bash
omniroute launch # Claude Code → OmniRoute المحلي
omniroute launch-codex # Codex CLI → OmniRoute المحلي
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# مسار الأمر الصريح: تمرير أي شيء يأتي بعد --
omniroute run claude -- --print-system-prompt "راجع هذا الفرق"
```
---
## الاستخدام عن بُعد
وجه أي أمر إعداد إلى OmniRoute عن بُعد مع `--remote` + `--api-key`. يتم جلب الكتالوج من البعيد؛ يتم كتابة التكوين على جهازك المحلي.
```bash
# OpenCode ضد VPS عن بُعد، احتفظ فقط بنماذج glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # قم بتصدير OMNIROUTE_API_KEY أولاً
# ملفات تعريف Codex من كتالوج بعيد
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# إطلاق CLI مباشرة ضد البعيد
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
بدلاً من تمرير `--remote`/`--api-key` في كل مرة، قم بتسجيل الدخول مرة واحدة ودع **السياق النشط** يزودهم تلقائيًا:
```bash
omniroute connect 192.168.0.15 # يصدر رمزًا محدد النطاق، يخزن السياق
omniroute setup-codex # ← الآن يستخدم الكتالوج البعيد
omniroute setup-opencode # ← نفس الشيء
omniroute launch # ← Claude Code ضد البعيد
```
راجع [وضع البعد](./REMOTE-MODE.md) للسياقات، النطاقات، وإدارة الرموز.
---
## اتفاقيات عنوان URL الأساسي (التي تريد الأدوات `/v1`)
يكشف OmniRoute عن واجهة OpenAI عند `/v1`، وواجهة Anthropic عند الجذر، وواجهة Gemini الأصلية عند `/v1beta`. كل تكامل موصول بالشكل الذي تتوقعه أداته (تم التحقق منه في مصدر الأمر):
| التكامل | عنوان URL الأساسي المكتوب | `/v1`؟ |
| -------------------------------------------------------------------------- | ------------------------- | ---------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | الجذر | لا — Cline يضيف `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | الجذر | لا — Goose يضيف المسار |
| `setup-aider` (`OPENAI_API_BASE`) | الجذر | لا — LiteLLM يضيف `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | مع `/v1` | نعم |
| `setup-claude` (`ANTHROPIC_BASE_URL``launch` | الجذر | لا — Claude Code يضيف `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | مع `/v1` | نعم |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | مع `/v1` | نعم |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | الجذر | لا — SDK يضيف `/v1beta/models/…` |
---
## الحفاظ على التبعيات الأصلية عند التحديث: `--include=optional`
عند التحديث باستخدام `omniroute update` (بعد التأكيد، أو مع `--apply`)، يقوم OmniRoute بتشغيل التثبيت مع `--include=optional` مضمن:
```bash
npm install -g omniroute@latest --include=optional
```
هذا **ليس** علمًا تمرره إلى `omniroute update` — يتم تطبيقه دائمًا بواسطة
المحدث. يضمن أن `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, مجموعة LLMLingua SLM) تبقى بعد التحديث حتى لو كانت إعدادات npm لديك
تحتوي على `omit=optional`، مما قد يؤدي إلى إسقاط برنامج تشغيل SQLite الأصلي
وربط نظام التشغيل بشكل صامت. لمعاينة الأمر الدقيق دون تطبيقه:
```bash
omniroute update --dry-run
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
أعلام أخرى لـ `omniroute update` (تم التحقق منها في المصدر): `--check` (خروج 1 إذا كانت
قديمة)، `--apply` (تثبيت دون مطالبة)، `--changelog`، `--no-backup`،
`--yes`.
---
## Google Gemini CLI عبر `omniroute run gemini`
تم التحقق من العقد مقابل `@google/gemini-cli` 0.50.0: تلتزم واجهة سطر الأوامر
`GOOGLE_GEMINI_BASE_URL` وتصدر `POST /v1beta/models/<model>:generateContent`
`:streamGenerateContent?alt=sse`) ضدها — بالضبط واجهة OmniRoute الأصلية
Gemini (`/v1beta`). يقوم `omniroute run gemini` بتوصيل ذلك تلقائيًا:
- `GOOGLE_GEMINI_BASE_URL` → عنوان URL الأساسي النشط لـ OmniRoute (الجذر، بدون `/v1`
- `GEMINI_API_KEY` → بيانات اعتماد OmniRoute المحلولة (خيار/بيئة/سياق)؛
- **مؤقت معزول `GEMINI_CLI_HOME`** الذي يختار `gemini-api-key` في ملف `.gemini/settings.json`
بحيث لا تتجاوز جلسة Google OAuth المخزنة (Code Assist)
إطلاق OmniRoute الموجه — يتم إزالته بعد الخروج؛
- **نظافة البيئة**: يتم تنظيف البيئة الفرعية من `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` و `GOOGLE_GENAI_USE_GCA` (التي قد تعيد توجيه
المصادقة إلى Vertex/Code Assist)، ويتم تعيين `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
كاحتياطي — تتلقى الأهداف الأخرى لـ `run` نفس المعاملة لمتغيراتها المتضاربة؛
- حقن `--model <id>` من `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
لا يزال تطبيق حارس ثقة مساحة العمل في وضع الرأس الخالي — مرر
`--skip-trust` (أو ثق بالدليل تفاعليًا) بنفسك؛ لا يتجاوز المشغل ذلك عمدًا. هذا المشغل
متميز عن **تسجيل ACP** (`src/lib/acp/registry.ts`, `gemini --acp`)، الذي يبقى
تكامل بروتوكول الوكيل لـ `/dashboard/acp-agents`.
---
## تنظيف الدخان الحقيقي (اختياري)
تجري اختبارات الانحدار لخطة الإطلاق الحتمية في CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). للتحقق من الثنائيات الحقيقية ضد خادم
OmniRoute حقيقي، يوجد هيكل اختياري في
`tests/integration/upstream-cli-smoke.int.test.ts`. لا يتم تشغيله تلقائيًا
(كل اختبار فرعي يتخطى ما لم يكن `RUN_CLI_SMOKE=1`)، يمرر بيانات الاعتماد عبر متغير البيئة
NAME (وليس بالقيمة)، يحجب السلاسل على شكل مفتاح من أي مخرجات مسجلة، يتخطى
الأهداف التي لم يتم تثبيت ثنائياتها، ويصنف الفشل كـ
مصادقة / مصدر / تكوين بدلاً من قيمة منطقية بسيطة:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
اختياري: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` يقيّد التنظيف؛
`OMNIROUTE_SMOKE_TIMEOUT_MS` يتجاوز مهلة 120 ثانية لكل هدف.
---
## انظر أيضًا
- [تكوين كود كلود](./CLAUDE-CODE-CONFIGURATION.md) — الدليل الأعمق لكود كلود
- [تكوين واجهة سطر الأوامر لكودكس](./CODEX-CLI-CONFIGURATION.md) — الإعداد الأساسي لمرة واحدة `[model_providers.omniroute]`
- [الوضع البعيد](./REMOTE-MODE.md) — السياقات، رموز الوصول المحدودة، تشغيل خادم بعيد
- [مرجع أدوات سطر الأوامر](../reference/CLI-TOOLS.md) — الكتالوج الكامل للأدوات المدعومة + صفحات لوحة التحكم
- [دليل الإعداد](./SETUP_GUIDE.md) — طرق التثبيت والتوجيه عند التشغيل الأول

View File

@@ -1,325 +1,86 @@
# CLI-TOOLS (العربية)
# CLI Tools Setup Guide — OmniRoute (العربية)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "أدوات CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# أدوات CLI — OmniRoute
آخر تحديث: 2026-08-18
يتكامل OmniRoute مع ثلاث فئات من أدوات CLI موزعة عبر ثلاث صفحات لوحة معلومات مخصصة:
| الصفحة | المسار | المفهوم | العدد |
| ------------- | ----------------------- | ------------------------------------------------------------------------- | ---------- |
| **كود CLI** | `/dashboard/cli-code` | أدوات البرمجة التي تشير إلى OmniRoute (العميل → CLI → OmniRoute → المزود) | 26 |
| **وكلاء CLI** | `/dashboard/cli-agents` | وكلاء مستقلون تشير إلى OmniRoute (نفس التدفق، نطاق أوسع) | 8 |
| **وكلاء ACP** | `/dashboard/acp-agents` | CLIs التي يولدها OmniRoute كخلفية عبر stdio/ACP (تدفق عكسي) | انظر السجل |
تقوم المسارات القديمة بإعادة التوجيه عبر 308: `/dashboard/cli-tools``/dashboard/cli-code`، `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## كيف يعمل
## How It Works
```
كود CLI / وكلاء CLI (تدفق الاستهلاك):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (جميعها تشير إلى OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (يقوم OmniRoute بتوجيه الطلب إلى المزود الصحيح)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
وكلاء ACP (تدفق توليد عكسي):
طلب العميل → OmniRoute → يولد CLI عبر stdio/ACP → استجابة
```
**الفوائد:**
**Benefits:**
- مفتاح API واحد لإدارة جميع الأدوات
- تتبع التكاليف عبر جميع CLIs في لوحة المعلومات
- تبديل النماذج دون إعادة تكوين كل أداة
- يعمل محليًا وعلى الخوادم البعيدة (VPS، Docker، Akamai، Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## التكوين التلقائي مع `setup-*`
## Supported Tools (Dashboard Source of Truth)
لا تحتاج إلى كتابة تكوين كل أداة يدويًا. يقوم OmniRoute بتوفير أمر `setup-*`
لكل CLI مدعوم يقرأ كتالوج النموذج **الحالي** من OmniRoute قيد التشغيل (محلي أو بعيد) ويكتب تكوين الأداة الخاصة بك على جهازك:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
كل منها يقبل `--remote <url> --api-key <key>` (تكوين أداة محلية ضد OmniRoute بعيد)، `--dry-run` (معاينة دون كتابة)، و `--port`. الأدوات التي لا تحتوي على اكتشاف تلقائي للنموذج (Cline، Kilo، Roo، Goose، Aider، Qwen) تأخذ `--model <id>``--yes` للتشغيل غير التفاعلي). لإطلاق CLI مع البيئة الصحيحة المدخلة ودون كتابة أي تكوين على الإطلاق، استخدم المشغل العام
`omniroute run <target>` (claude، codex، aider، goose، opencode، qwen،
gemini — الأهداف والأسماء المستعارة تأتي من `bin/cli/cli-manifest.mjs`); تظل المشغلات القديمة لكل أداة `omniroute launch` (Claude Code) و `omniroute launch-codex`
(Codex) متاحة. CLI Gemini هو فقط للإطلاق: إنه هدف `omniroute run`
ولكن ليس له وصفة `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **المرجع الكامل:** الجدول الرئيسي — ما يكتبه كل أمر، كل علامة،
> محلي مقابل بعيد، وأي الأدوات تحتاج إلى لاحقة `/v1` — موجود في
> **[تكاملات CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### تشغيل هذه داخل حاوية
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
أمر `setup-*` المنفذ داخل حاوية OmniRoute يكتب في
المنزل الخاص بالحاوية، والذي لا تقرأه أي CLI مضيف والذي يختفي مع
الحاوية. يكتشف OmniRoute ذلك ويخرج `2` مع تعليمات بدلاً من
الكتابة. هناك طريقتان مدعومتان للمضي قدمًا — تثبيت CLI على المضيف و
`omniroute connect` إلى الحاوية، أو ربط مجلدات التكوين وتعيين
`CLI_CONFIG_HOME` (ملف تعريف المضيف في التكوين). كل أمر `setup-*`، بالإضافة إلى
`omniroute configure` و `omniroute config set`، يقبل
`--allow-container-write` عندما يكون تكوين CLIs الخاصة بالحاوية هو ما كنت تعنيه بالفعل؛ `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` يفعل نفس الشيء للخادم. انظر
[دليل Docker → تكوين أدوات CLI المضيف](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
نقطة النهاية **apply** في لوحة المعلومات (`POST /api/cli-tools/apply`) تفرض نفس الحماية: في حاوية، كتابة الهدف الذي لم يتم ربطه من المضيف يجيب **`422`** مع `containerEphemeralTarget: true`، نص الخطأ الآمن و — للأدوات التي لديها وصفة مضيف (claude، codex، opencode، cline،
kilo، continue) — أمر `hostSetupCommand` (مثل `omniroute setup-opencode`) للتشغيل
على المضيف بدلاً من ذلك؛ لا يتم كتابة أي شيء. `dryRun: true` يستمر في العمل في وضع الحاوية
ويعيد المحتوى الناتج + مسار الهدف دون لمس القرص، لذا يمكنك المعاينة من لوحة المعلومات وتطبيقها على المضيف. هذا السلوك
مقصود ومحمى من التراجع بواسطة
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — لا "تصلح" 422
عن طريق إزالة الحماية.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## مصدر الحقيقة
## Step 1 — Get an OmniRoute API Key
يعيش الكتالوج الموحد في `src/shared/constants/cliTools.ts` كـ `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
كل إدخال يحتوي على هذه الحقول (المعرفة في `src/shared/schemas/cliCatalog.ts`):
| الحقل | النوع | الوصف |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------- |
| `category` | `"code" \| "agent"` | الصفحة التي يظهر عليها الأداة |
| `vendor` | `string` | أصل الأداة ("Anthropic"، "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | يمكن استخدامها أيضًا كعميل ACP (شعار يظهر) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | مستوى دعم نقطة النهاية المخصصة. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | آلية التكوين |
| `id`, `name`, `color`, `description`, `docsUrl` | قياسي | حقول العرض الأساسية |
الإدخالات التي تحتوي على `baseUrlSupport: "none"` **لا تظهر** في صفحات لوحة المعلومات — فهي مسجلة في MITM backlog للخطة 11 (انظر `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### مستويات القدرة (موثقة × قابلة للاكتشاف × قابلة للتكوين × قابلة للتشغيل)
ليس كل أداة موثقة قابلة للاكتشاف أو التكوين أو التشغيل. كل مستوى له مصدر يعلن عنه، واختبار الانجراف يحافظ على توافقها:
| المستوى | المعنى | معلن عنه |
| ------------------ | ------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **موثقة** | تظهر في كتالوج لوحة المعلومات (الاسم، البائع، الوثائق، نوع التكوين) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **قابلة للاكتشاف** | اكتشاف الثنائيات/التكوين، فحوصات الصحة، مسارات التكوين | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **قابلة للتكوين** | مدعومة بواسطة `omniroute configure <cli>` (وصفة الإعداد موجودة) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **قابلة للتشغيل** | مدعومة بواسطة `omniroute run <target>` (حقن env/args معرف) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` هو البيان التنفيذي القياسي لأوامر CLI: `run`، `configure` ومولدات إكمال الصدفة جميعها تستمد قوائم أهدافها، وحل الأسماء المستعارة (على سبيل المثال `kilocode`/`kilo-code`/`kilo_cli``kilo`) وتوصيل علامة `--model` منها. يضمن حارس الانجراف
`tests/unit/cli/cli-manifest-drift.test.ts` أن البيان، كتالوج وقت التشغيل، كتالوج واجهة المستخدم وكل سطح مستهلك يبقى متزامنًا — الهدف المضاف إلى
سطح واحد دون الآخرين يفشل المجموعة بدلاً من الانجراف بصمت.
## 1. كتالوج كود CLI (26 أداة)
جميع الأدوات التي تظهر في `/dashboard/cli-code`. تلك التي تحتوي على `baseUrlSupport: none` متصلة من خلال MITM أو دليل يدوي بدلاً من عنوان URL أساسي مخصص:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ------------------------------ | ------------------- | -------------- | ---------- | ------------ |
| claude | كود كلود | أنثروبيك | كامل | env | true |
| codex | واجهة سطر أوامر OpenAI Codex | OpenAI | كامل | مخصص | true |
| zcode | ZCode (خطة ترميز GLM) | Z.ai | لا شيء | مخصص | false |
| cline | كلاين | OSS (ex-Claude Dev) | كامل | مخصص | true |
| kilo | كود كيلو | Kilo-Org | كامل | مخصص | false |
| roo | كود رو | رو (OSS) | كامل | دليل | false |
| continue | تابع | continue.dev | كامل | دليل | false |
| aider | مساعد | OSS (P. Gauthier) | كامل | دليل | true |
| forge | ForgeCode | Antinomy HQ | كامل | مخصص | true |
| jcode | jcode | 1jehuang (OSS) | كامل | مخصص | false |
| deepseek-tui | واجهة DeepSeek TUI | Hunter Bown (OSS) | كامل | مخصص | false |
| codewhale | CodeWhale | Hmbown (OSS) | كامل | مخصص | false |
| opencode | OpenCode | Anomaly (ex-SST) | كامل | دليل | true |
| droid | Factory Droid | Factory AI | جزئي | دليل | false |
| copilot | واجهة سطر أوامر GitHub Copilot | GitHub/MS | كامل | مخصص | false |
| cursor-cli | واجهة سطر أوامر Cursor | Anysphere | جزئي | دليل | true |
| smelt | صهر | leonardcser (OSS) | كامل | مخصص | false |
| pi | باي (عميل ترميز باي) | M. Zechner (OSS) | كامل | مخصص | false |
| grok-build | بناء Grok | xAI | كامل | مخصص | false |
| crush | سحق | OSS (Charm) | كامل | مخصص | false |
| qwen | كود كوين | Alibaba | كامل | دليل | true |
| cursor | مؤشر | Anysphere | لا شيء | دليل | false |
| antigravity | مضاد الجاذبية | Google | لا شيء | mitm | false |
| hermes | هيرميس | Nous Research | لا شيء | دليل | false |
| kiro | كيرو AI | أمازون | لا شيء | mitm | false |
| custom | واجهة سطر أوامر مخصصة | — | كامل | منشئ مخصص | false |
الأدوات التي تحتوي على `baseUrlSupport: "جزئي"` تظهر شارة "⚠ عنوان URL أساسي جزئي" في بطاقة لوحة المعلومات.
## 2. كتالوج وكلاء CLI (8 أدوات)
الوكلاء المستقلون الذين يظهرون في `/dashboard/cli-agents`:
| id | الاسم | البائع | دعم baseUrl | acpSpawnable |
| ------------ | ---------------- | -------------------- | ----------- | ------------ |
| hermes-agent | وكيل هيرميس | أبحاث نوس | كامل | خطأ |
| openclaw | OpenClaw | OSS (P. Steinberger) | كامل | صحيح |
| goose | Goose | Block / مؤسسة لينكس | كامل | صحيح |
| interpreter | Open Interpreter | OSS | كامل | صحيح |
| warp | Warp AI | Warp Inc. | جزئي | صحيح |
| agent-deck | Agent Deck | asheshgoplani (OSS) | كامل | خطأ |
| omp | Oh My Pi | OSS | كامل | صحيح |
| letta | Letta CLI | Letta | كامل | خطأ |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. وكلاء ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
تظهر هذه الصفحة (التي تم إعادة تسميتها من `/dashboard/agents`) واجهات CLI التي يمكن لـ OmniRoute **إنشاؤها** كأدوات تنفيذ خلفية عبر بروتوكول stdio/ACP. يتم الحفاظ على الكتالوج بشكل منفصل في `src/lib/acp/registry.ts` وهو **ليس** نفس `CLI_TOOLS`.
---
## 4. قائمة الانتظار MITM (غير معروضة في لوحة التحكم)
لا تدعم واجهات CLI التالية عنوان URL الأساسي المخصص بشكل أصلي وهي **غير مدرجة** في صفحات كود CLI أو وكلاء CLI. هم مرشحون للاعتراض MITM في الخطة 11:
| CLI | السبب |
| ------------------- | --------------------------------------------------------- |
| windsurf | BYOK محدود لنماذج كلود المختارة + عنوان URL/token الشركات |
| amp | نظام مغلق (Sourcegraph) |
| amazon-q / kiro-cli | مصادقة AWS SSO، لا يوجد عنوان URL مخصص |
| cowork | Anthropic Desktop، لا يوجد نقطة نهاية قابلة للتكوين |
راجع `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` للحصول على المرجع الكامل.
---
## 5. واجهة برمجة تطبيقات اكتشاف الدفعات
يتم تجميع جميع اكتشاف الأدوات عبر نقطة نهاية واحدة:
**`GET /api/cli-tools/all-statuses`**
- المصادقة: `requireCliToolsAuth(request)` (نفس مسارات `/api/cli-tools/` الأخرى)
- العائدات: `Record<toolId, ToolBatchStatus>` (النوع: `src/shared/types/cliBatchStatus.ts`)
- الاستراتيجية: `Promise.all` على جميع الأدوات، مهلة 5 ثوان لكل أداة
- التخزين المؤقت: في الذاكرة LRU مفهرس بواسطة ملف التكوين `mtime`. يتم إبطال التخزين المؤقت عند تغيير mtime. يتم إعادة تعيينه عند إعادة تشغيل الخادم.
شكل الاستجابة لكل أداة:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // تم تنظيفه، لا توجد تتبع للأخطاء
}
```
## 6. معالجات الإعدادات للأدوات الجديدة
الأدوات الجديدة التي تحتوي على `configType: "custom"` لديها مسارات واجهة برمجة التطبيقات المخصصة للإعدادات:
| المسار | الأداة |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedicated `.env` key) |
جميع المسارات تستخدم `sanitizeErrorMessage()` لردود الأخطاء (قاعدة صارمة #12).
---
## 7. هيكل صفحات لوحة التحكم
### كود CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — مكون خادم
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — شبكة عميل
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — صفحة تفاصيل الأداة
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 بطاقة أداة متخصصة + `ToolDetailClient.tsx`
### وكلاء CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — مكون خادم
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — شبكة عميل
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — يعيد استخدام `ToolDetailClient`
### وكلاء ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — مكون خادم (تم نقله من `agents/`)
### مكونات واجهة المستخدم المشتركة (`src/shared/components/cli/`)
| الملف | الغرض |
| ----------------------- | ------------------------------------------------ |
| `CliToolCard.tsx` | بطاقة حالة ذكية (الكشف + الإعداد + نقطة النهاية) |
| `CliConceptCard.tsx` | بطاقة شرح مفهوم لكل صفحة |
| `CliComparisonCard.tsx` | مقارنة عبر ثلاثة أعمدة بين أنواع CLI |
| `BaseUrlSelect.tsx` | قائمة منسدلة لنقطة النهاية (محلي/سحابي/مخصص) |
| `ApiKeySelect.tsx` | محدد مفتاح API |
| `ManualConfigModal.tsx` | نافذة نموذج مقتطف الإعداد القابل للنسخ |
### هوك مشترك (`src/shared/hooks/cli/`)
| الملف | الغرض |
| ------------------------- | ------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | يجلب `/api/cli-tools/all-statuses`، يدير حالة التحميل/التحديث |
---
## 8. i18n
تمت إضافة مساحات أسماء جديدة في الخطة 14 F9:
| مساحة الاسم | الغرض |
| ----------- | ------------------------------------------------------------------------------ |
| `cliCommon` | سلاسل مشتركة (تسميات البطاقات، نصوص المفاهيم/المقارنات، تسميات صفحات التفاصيل) |
| `cliCode` | سلاسل صفحة CLI Code |
| `cliAgents` | سلاسل صفحة CLI Agents |
| `acpAgents` | سلاسل صفحة ACP Agents |
تم توفير ترجمات كاملة بالبرتغالية البرازيلية والإنجليزية. 39 لغة أخرى تتراجع تلقائيًا إلى الإنجليزية عبر دمج مستوى مساحة الاسم في `src/i18n/request.ts`.
---
## 9. البدء السريع
### الخطوة 1 — الحصول على مفتاح API لـ OmniRoute
1. افتح `/dashboard/api-manager`**إنشاء مفتاح API**
2. أعطه اسمًا (مثل `cli-tools`) واختر جميع الأذونات
3. انسخ المفتاح — ستحتاجه لكل CLI أدناه
> يبدو مفتاحك كالتالي: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### الخطوة 2 — تثبيت أدوات CLI
تتطلب جميع الأدوات المعتمدة على npm Node.js 22.22.2+ أو 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -337,135 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (يمكن تشغيله عبر `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # يعتمد على Rust
# وكيل برمجة Pi
# انظر https://github.com/zechnerj/pi-coding-agent للتثبيت
# jcode
# انظر https://github.com/1jehuang/jcode للتثبيت
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### الخطوة 3 — التكوين عبر لوحة التحكم
## Step 3 — Set Global Environment Variables
1. انتقل إلى `http://localhost:20128/dashboard/cli-code`
2. ابحث عن أداتك في الشبكة
3. انقر على البطاقة لفتح صفحة تفاصيل الأداة
4. اختر مفتاح API الخاص بك وURL الأساسي
5. انقر على **تطبيق التكوين** أو انسخ مقتطف التكوين اليدوي
---
### الخطوة 4 — تعيين متغيرات البيئة العالمية
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# نقطة النهاية العالمية لـ OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# يقرأ Gemini CLI GOOGLE_GEMINI_BASE_URL عند الجذر (تضيف SDK الخاصة به /v1beta/... بنفسها)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> لاستبدال `localhost:20128` بـ IP الخادم أو النطاق في **خادم بعيد**،
> مثل `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### الخطوة 4 — تكوين كل أداة
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# إنشاء ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
استخدم جذر بوابة Anthropic الموحدة لـ Claude Code. لا تضف `/v1` هنا.
**اختبار:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
يقرأ Codex الحديث (v0.137+) `~/.codex/config.toml` فقط — ينتمي `config.yaml` القديم إلى CLI npm التقليدي ويتم تجاهله بصمت. يبقى مفتاح API في متغير البيئة `OMNIROUTE_API_KEY` (`env_key`)، وليس داخل الملف:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
مرجع كامل (الملفات الشخصية، `wire_api`، نوافذ السياق): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**اختبار:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**اختبار:** `opencode`
> استخدم `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> لإرسال متغيرات التفكير.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI أو VS Code)
### OpenCode
**وضع CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -477,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**وضع VS Code:**
إعدادات ملحق Cline → مزود API: `OpenAI Compatible`URL الأساسي: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
أو استخدم لوحة التحكم OmniRoute → **أدوات CLI → Cline → تطبيق التكوين**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI أو VS Code)
### KiloCode (CLI or VS Code)
**وضع CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**إعدادات VS Code:**
**VS Code settings:**
```json
{
@@ -501,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
أو استخدم لوحة التحكم OmniRoute → **أدوات CLI → KiloCode → تطبيق التكوين**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (ملحق VS Code)
### Continue (VS Code Extension)
قم بتحرير `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -519,255 +241,158 @@ models:
default: true
```
أعد تشغيل VS Code بعد التحرير.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
استخدم هذا عندما يتم تكوين VS Code Insiders لنماذج نقاط النهاية المخصصة وتريد أن يعمل OmniRoute بدون حقل رأس مخصص.
**الموقع الموصى به:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**مثال باستخدام اسم مستعار OmniRoute المرمز:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**ملاحظات:**
- استبدل `sk-your-omniroute-key` بمفتاح API تم إنشاؤه في OmniRoute.
- يجب أن يشير حقل `url` إلى `/api/v1/vscode/{token}/chat/completions`.
- يجب أن يشير حقل `modelsUrl` إلى `/api/v1/vscode/{token}/models`.
- يفضل استخدام تدفق `/v1` العادي + رأس Bearer عندما يدعم العميل الرؤوس المخصصة.
- تعتبر الرموز المدمجة في URL تراجعًا للتوافق وقد تظهر في سجلات المحرر أو تاريخ الوكيل.
---
#### Kiro CLI (أمازون)
### Kiro CLI (Amazon)
```bash
# تسجيل الدخول إلى حساب AWS/Kiro الخاص بك:
# Login to your AWS/Kiro account:
kiro-cli login
# يستخدم CLI مصادقة خاصة به — لا حاجة لـ OmniRoute كخلفية لـ Kiro CLI نفسه.
# استخدم kiro-cli جنبًا إلى جنب مع OmniRoute لأدوات أخرى.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
بالنسبة لتطبيق **Kiro IDE** المكتبي، استخدم نقطة النهاية MITM التي تعرضها OmniRoute
تحت `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. واجهة الأوامر الداخلية لـ OmniRoute
## Dashboard Auto-Configuration
يوفر الملف الثنائي `omniroute` أوامر لدورة حياة الخادم، الإعداد، التشخيص، وإدارة المزودين. نقطة الدخول: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # بدء الخادم (المنفذ الافتراضي 20128)
omniroute setup # معالج الإعداد التفاعلي
omniroute doctor # التحقق من التكوين، قاعدة البيانات، المنافذ، وقت التشغيل
omniroute providers list # اتصالات المزودين المكونة
omniroute providers test-all # اختبار كل اتصال نشط
omniroute reset-password # إعادة تعيين كلمة مرور المسؤول
omniroute logs # بث سجلات الطلبات
omniroute health # صحة مفصلة (قواطع، ذاكرة مؤقتة، ذاكرة)
omniroute --version # طباعة الإصدار
omniroute --help # عرض جميع الأوامر
```
### الإعداد والت initialization
```bash
omniroute setup # معالج الإعداد التفاعلي
omniroute setup --non-interactive # وضع CI/الأتمتة (يقرأ متغيرات البيئة + العلامات)
omniroute setup --password '<value>' # تعيين كلمة مرور المسؤول مباشرة
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # إضافة واختبار مزود في خطوة واحدة
```
متغيرات البيئة المعترف بها للإعداد غير التفاعلي:
| Var | الغرض |
| ------------------- | -------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | مفتاح API للمزود (مرتبط بـ `--api-key` عبر Commander `.env()`) |
| `DATA_DIR` | تجاوز دليل بيانات OmniRoute |
جميع المدخلات غير التفاعلية الأخرى تمر كعلامات، وليس كمتغيرات بيئة:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(انظر خيارات `omniroute setup` أعلاه).
### التشخيص
```bash
omniroute doctor # التحقق من التكوين، قاعدة البيانات، المنافذ، وقت التشغيل، الذاكرة، الحيادية
omniroute doctor --json # JSON قابل للقراءة بواسطة الآلة
omniroute doctor --no-liveness # تخطي اختبار صحة HTTP
omniroute doctor --host 0.0.0.0 # تجاوز مضيف الحيادية
omniroute doctor --liveness-url <url> # تجاوز عنوان URL لنقطة النهاية الصحية بالكامل
```
يقوم الطبيب بتشغيل هذه الفحوصات: `التكوين`، `قاعدة البيانات`، `التخزين/التشفير`،
`توفر المنفذ`، `وقت تشغيل العقدة`، `الملف الثنائي الأصلي` (better-sqlite3)،
`الذاكرة`، و`حيادية الخادم`. يخرج برقم غير صفري إذا فشل أي فحص.
### إدارة المزودين
```bash
omniroute providers available # كتالوج مزود OmniRoute
omniroute providers available --search openai # تصفية الكتالوج حسب id/الاسم/الاسم المستعار/الفئة
omniroute providers available --category api-key # تصفية حسب الفئة (api-key، oauth، مجاني، ...)
omniroute providers available --json # JSON قابل للقراءة بواسطة الآلة
omniroute providers list # اتصالات المزودين المكونة
omniroute providers list --json
omniroute providers test <id|name> # اختبار اتصال واحد مكون
omniroute providers test-all # اختبار كل اتصال نشط
omniroute providers validate # التحقق الهيكلي المحلي فقط
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # تدفق OAuth موجود
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` هي أولاً API وبالتالي تعمل ضد
السياق المحلي أو البعيد النشط. يجب أن تستخدم إدخال الاعتماد
`--credential-stdin` أو `--credential-env`؛ `--dry-run --json` تقارير فقط
عن الوجود/الشكل المحجوب. `providers available` يقرأ كتالوج OmniRoute؛
`providers list/test/test-all/validate` تحتفظ بسلوك SQLite المحلي الخاص بها ولا تتطلب تشغيل الخادم.
### الاسترداد وإعادة التعيين
```bash
omniroute reset-password # إعادة تعيين كلمة مرور المسؤول (أيضًا: omniroute-reset-password)
omniroute reset-encrypted-columns # عرض تحذير + تشغيل جافا لتعيين الاعتماد المشفر
omniroute reset-encrypted-columns --force # فعليًا إلغاء الاعتمادات المشفرة في SQLite
```
### تصدير الاعتماد (⚠ التعامل بحذر)
```bash
omniroute auth export # عرض تحذير + بوابة تأكيد — لا يوجد وصول إلى قاعدة البيانات
omniroute auth export --force # تصدير جميع اعتمادات الاتصالات غير المشفرة إلى stdout كـ JSON
omniroute auth export --force --id <id> # تصدير فقط الاتصال المطابق
omniroute auth export --force --format env # إصدار خطوط OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # الكتابة إلى ملف (تم إنشاؤه بأذونات 0600)
```
`auth export` هو **محلي فقط** (قراءة SQLite مباشرة، لا يوجد مسار HTTP) ويطبع/يكتب عمدًا
قيم `apiKey`/`accessToken`/`refreshToken`/`idToken` **بشكل نصي** — هذه هي الميزة، وليست
خطأ. لا يتم قراءة أي شيء من قاعدة البيانات، ولا يتم فك تشفير أي شيء، بدون `--force`. يتم دائمًا طباعة لافتة تحذير stderr قبل إصدار أي نص عادي. يتطلب تعيين `STORAGE_ENCRYPTION_KEY`.
يتم الإبلاغ عن حقل يفشل في فك التشفير (مفتاح قديم، نص مشفر تالف) كـ
`<field>DecryptFailed: true` بدلاً من إنهاء التصدير بالكامل أو تسريب الخطأ الأساسي.
### أوامر فرعية أخرى
تفترض هذه وجود خادم OmniRoute قيد التشغيل، ما لم يُذكر خلاف ذلك:
```bash
omniroute status # حالة شاملة لوقت التشغيل
omniroute logs # بث سجلات الطلبات (--json، --search، --follow)
omniroute config show # عرض التكوين الحالي
omniroute provider list # قائمة بالمزودين المتاحين (اسم مستعار لقائمة المزودين)
omniroute provider add # تسجيل OmniRoute كمزود على أداة
omniroute keys add | list | remove # إدارة مفاتيح API
omniroute models [provider] # قائمة النماذج (--json، --search)
omniroute combo list | switch | create | delete
omniroute backup # لقطة للتكوين + قاعدة البيانات
omniroute restore # استعادة من لقطة سابقة
omniroute health # صحة مفصلة (قواطع، ذاكرة مؤقتة، ذاكرة)
omniroute quota # استخدام حصة المزود
omniroute cache # حالة الذاكرة المؤقتة
omniroute cache clear # مسح الذاكرة المؤقتة الدلالية + التوقيع
omniroute mcp status | restart # حالة خادم MCP / إعادة التشغيل
omniroute a2a status | card # حالة خادم A2A / بطاقة الوكيل
omniroute tunnel list | create | stop # إدارة الأنفاق (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # فحص / تعيين متغيرات البيئة (مؤقتة)
omniroute test # اختبار اتصال المزود
omniroute update # التحقق من التحديثات
omniroute completion # توليد إكمال الصدفة
```
### العلامات الشائعة
| Flag | الوصف |
| ------------------- | ---------------------------------------------------------------- |
| `--no-open` | لا تفتح المتصفح تلقائيًا عند البدء |
| `--port <n>` | تجاوز منفذ API (الافتراضي 20128) |
| `--mcp` | العمل كخادم MCP عبر stdio (لـ IDEs) |
| `--non-interactive` | وضع CI (لا توجد مطالبات؛ يقرأ من env/flags) |
| `--json` | مخرجات JSON قابلة للقراءة بواسطة الآلة (doctor، providers، إلخ.) |
| `--help`, `-h` | عرض مساعدة محددة بالأمر |
| `--version`, `-v` | طباعة الإصدار المثبت |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## نقاط نهاية API المتاحة
## Built-in Agents: Droid & OpenClaw
| نقطة النهاية | الوصف | الاستخدام |
| -------------------------- | ------------------------------------------- | ------------------------------------- |
| `/v1/chat/completions` | دردشة قياسية (جميع المزودين) | جميع الأدوات الحديثة |
| `/v1/responses` | واجهة برمجة التطبيقات للردود (تنسيق OpenAI) | Codex، سير العمل الوكيلة |
| `/v1/completions` | إكمالات نصية قديمة | الأدوات القديمة التي تستخدم `prompt:` |
| `/v1/embeddings` | تضمينات نصية | RAG، بحث |
| `/v1/images/generations` | توليد الصور | GPT-Image، Flux، إلخ. |
| `/v1/audio/speech` | تحويل النص إلى كلام | ElevenLabs، OpenAI TTS |
| `/v1/audio/transcriptions` | تحويل الكلام إلى نص | Deepgram، AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
أمثلة جاهزة للنسخ مع عنوان URL موحد:
```txt
مثال على الرمز: sk-a3ab3c080beaee3a-69f4a4-070d71af
الأساس القياسي لـ OpenAI: http://localhost:20128/v1
نماذج VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
دردشة VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
ردود VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
علامات Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
دردشة Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## استكشاف الأخطاء وإصلاحها
## Available API Endpoints
| الخطأ | السبب | الحل |
| ------------------------------------------- | -------------------------- | ---------------------------------------------------- |
| `Connection refused` | OmniRoute غير قيد التشغيل | `omniroute serve` |
| `401 Unauthorized` | مفتاح API خاطئ | تحقق في `/dashboard/api-manager` |
| `No combo configured` | لا يوجد مجموعة توجيه نشطة | إعداد في `/dashboard/combos` |
| CLI يظهر "not installed" | الثنائي غير موجود في PATH | تحقق من `which <command>` |
| لوحة التحكم تظهر "not detected" بعد التثبيت | ذاكرة التخزين المؤقت قديمة | انقر على "⟳ Refresh detection" في لوحة التحكم |
| رابط قديم `/dashboard/cli-tools` | إشارة مرجعية قبل v3.8.6 | إعادة توجيه تلقائي إلى `/dashboard/cli-code` (308) |
| رابط قديم `/dashboard/agents` | إشارة مرجعية قبل v3.8.6 | إعادة توجيه تلقائي إلى `/dashboard/acp-agents` (308) |
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## استكشاف الأخطاء
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,271 +0,0 @@
# CLI-INTEGRATIONS (Azərbaycan dili)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI İnteqrasiyaları — hər hansı bir kodlama CLI-ni OmniRoute-a yönləndirin"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI İnteqrasiyaları
OmniRoute, bir kodlama CLI-nin (Codex, Claude Code, OpenCode, Cline, …) OmniRoute-u arxa planda istifadə etməsi üçün konfiqurasiya edən `setup-*` əmrləri ailəsini təqdim edir — beləliklə, alət **bir** uç nöqtə ilə danışır və OmniRoute doğru təminatçıya avtomatik geri dönmə ilə yönləndirir. Hər bir əmr, işləyən bir OmniRoute-dan **canlı** model kataloqunu oxuyur və alətin öz konfiqurasiya faylını **sizin** maşınınıza yazır. API açarı, alətin dəstəklədiyi hər yerdə bir mühit dəyişəni ilə istinad edilir. Alətə məxsus mühit faylını saxlayan əmrlər aşağıda qeyd olunmuşdur.
Eyni zamanda, `omniroute run <target>` adlı ümumi bir başlatıcı da var — bu, `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` və ya `gemini`-ni düzgün mühitlə başlatır, heç bir konfiqurasiya yazmadan. Hədəflər və onların təmsilçiləri, kanonik manifest `bin/cli/cli-manifest.mjs`-dən gəlir (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), və `omniroute completion` eyni manifest-dən əldə edilən hədəf sözlərini təqdim edir. Köhnə alət başlatıcıları`omniroute launch` (Claude Code) və `omniroute launch-codex` (Codex) — hələ də mövcuddur.
Təminatçı onboarding eyni yerli/uzaq kontekstdən mövcuddur. Aşağıdakı API-öncəli əmrlər, idarəetmə autentifikasiyasını təminatçı etimadnamələrindən ayrı saxlayır və heç vaxt strukturlu çıxışda etimadnaməni çap etmir:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Skriptlər üçün `--credential-stdin` və ya `--credential-env`-i üstün tutun; `--credential` isə nəzarət olunan yerli istifadə üçün saxlanılır. `providers remove` qeyri-interaktiv terminalda `--yes` tələb edir və beş əmrdən hamısı aktiv konteksti və ya qlobal `--base-url`/`--api-key` seçimlərini nəzərə alır.
İki ən zəngin inteqrasiyanın bir dəfəlik, əl ilə yazılmış əsas konfiqurasiyası üçün alətə xas dərin dalışlara baxın:
- [Claude Code konfiqurasiyası](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI konfiqurasiyası](./CODEX-CLI-CONFIGURATION.md)
- [Uzaq Rejim](./REMOTE-MODE.md) — laptopunuzdan uzaq OmniRoute (VPS / Tailnet) idarə edin
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot genişləndirməsi; bu, eyni zamanda redaktordan içəridən bu `setup-*` əmrlərini sizin üçün icra edə bilər
---
## Master cədvəli
Hər bir əmr **aktiv konteksti** ( `omniroute connect` ilə təyin edilmişdir, bax [Uzaq Rejim](./REMOTE-MODE.md)) və ya açıq `--remote <url> --api-key <key>` flag-larını nəzərə alır. Aşağıdakı "Yerli vs uzaq" deməkdir: heç bir flag olmadan `http://localhost:20128`-i hədəfləyir; `--remote` (və ya aktiv uzaq kontekst) ilə o, kataloqu həmin serverdən alır və konfiqurasiyanı yerli yazır.
| Əmr | Alət | Yazdığı şey | Əsas flag-lar | Yerli vs uzaq |
| -------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — uyğun mətn modeli üçün bir profil (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Hər ikisi |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — uyğun model üçün bir profil (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Hər ikisi |
| `omniroute setup-opencode` | OpenCode (openai-uyğun) | `~/.config/opencode/opencode.json` — hər bir kataloq modeli ilə `omniroute` təminatçısı (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Hər ikisi |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI rejimi) + VS Code genişləndirmə parametrlərini çap edir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Hər ikisi |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + varsa `kilocode.*`-ni VS Code `settings.json`-a birləşdirir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Hər ikisi |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modelləri, açar `${{ secrets.OMNIROUTE_API_KEY }}` vasitəsilə | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Hər ikisi |
| `omniroute setup-cursor` | Cursor | Heç nə — tətbiq içindəki addımları çap edir (Cursor konfiqurasiyası qeyri-şəffaf SQLite-dir) | `--remote` `--api-key` `--only` `--port` | Hər ikisi |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (idxal sənədi) + varsa VS Code `settings.json`-da `roo-cline.autoImportSettingsPath`-ı təyin edir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Hər ikisi |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-uyğun` təminatçı, açar `$OMNIROUTE_API_KEY` vasitəsilə | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Hər ikisi |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mühit reseptini çap edir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Hər ikisi |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mühit reseptini çap edir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Hər ikisi |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` massivi + `OMNIROUTE_API_KEY` `~/.qwen/.env`-də | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Hər ikisi |
| `omniroute run <target>` | İcra başlatma (ümumi) | Heç nə — `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini`-ni düzgün mühit və arqumentlərlə başlat; Qwen və Gemini müvəqqəti izolyasiya olunmuş ev istifadə edir | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Hər ikisi |
| `omniroute launch` | Claude Code | Heç nə — `claude`-ni `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` ilə başlatır | `--remote` `--api-key` `--token` `--profile` `--port` | Hər ikisi |
| `omniroute launch-codex` | OpenAI Codex CLI | Heç nə — `codex`-i `omniroute` təminatçısı ilə `-c` flag-ları vasitəsilə başlatır | `--remote` `--api-key` `--profile` (`-p`) `--port` | Hər ikisi |
Flag-lar haqqında qeydlər (əmr mənbəsində təsdiqlənmişdir):
- `--remote <url>` — uzaq OmniRoute-dan kataloqu alır ( `--port` və aktiv konteksti üstələyir). `--api-key <key>` həmin server üçün etimadnaməni təmin edir (varsayılan olaraq `OMNIROUTE_API_KEY` mühit dəyişəni və ya aktiv kontekstin tokeni).
- `--only <patterns>` — vergüllə ayrılmış alt stringlər; yalnız uyğun model ID-lərini saxlayır (məsələn, `--only glm,kimi`). `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`-da mövcuddur.
- `--dry-run` — fayl sisteminə toxunmadan yazılacaq şeyləri dəqiq çap edir. Hər bir `setup-*` əmrdə **istisna olmaqla** `setup-cursor` (heç vaxt fayl yazmır).
- `--model <id>` — avtomatik model aşkar etməyən alətlər üçün tələb olunur (və ya interaktiv olaraq seçilir): Cline, Kilo, Roo, Goose, Qwen, Aider. Bu alətlər həmçinin qeyri-interaktiv icra üçün `--yes` qəbul edir (bu zaman `--model` tələb olunur). `setup-opencode` varsayılan üst səviyyə modelini təyin etmək üçün `--model` qəbul edir.
- `--model <id>` `omniroute run`-da manifestin hədəf wiring-ini izləyir (`bin/cli/cli-manifest.mjs`): **aider** `--model openai/<id>` alır və **opencode** `--model omniroute/<id>` (prefix yalnız id artıq onu daşımadığı zaman əlavə olunur); **qwen****gemini** id-ni olduğu kimi alır; **claude** bunu `ANTHROPIC_MODEL` vasitəsilə alır, **goose** `GOOSE_MODEL` vasitəsilə, və **codex** `-c model_providers.omniroute.*` arqumentləri vasitəsilə. **Qwen, yalnız `--model` tələb edən yeganə icra hədəfidir**`omniroute run qwen` olmadan `2` ilə açıq bir xəta ilə çıxır.
- `--port <port>` — yerli OmniRoute portu (varsayılan `20128`, `--remote` təyin edildikdə nəzərə alınmır). Bütün `setup-*` və hər iki başlatıcıda mövcuddur.
- `omniroute run` çıxış kodları: uşaq CLI-nin öz çıxış kodu olduğu kimi ötürülür; `2` = etibarsız arqumentlər (dəstəklənməyən hədəf, tələb olunan `--model`-in olmaması, konteyner qoruyucusu); `127` = hədəf ikili `PATH`-da yoxdur; `130`/`143`/`129` başlatma `SIGINT`/`SIGTERM`/`SIGHUP` ilə bitdikdə; `1` = digər icra başlatma xətası.
- İki başlatıcı (`launch`, `launch-codex`) `setup-claude` / `setup-codex` tərəfindən yazılmış profili seçmək üçün `--profile <name>` qəbul edir, həmçinin əsas `claude` / `codex` ikilisi üçün pass-through arqumentləri.
İnteraktiv seçici, eyni zamanda konfiqurasiya reseptləri ilə də paylaşılır:
```bash
# Aktiv yerli və ya uzaq model kataloqundan seçin və hədəfi konfiqurasiya edin.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` hazırda `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue``kilo` üçün test edilmiş reseptlərə yönləndirilir. IDE-yə xas, MITM və yalnız bələdçi kataloq girişləri açıq `setup-*`/əl ilə axınlar olaraq qalır və başlatma hədəfləri kimi təqdim edilmir.
> `setup-opencode` **yüngül openai-uyğun** OpenCode inteqrasiyasıdır.
> Həmçinin daha zəngin bir plugin inteqrasiyası var — `omniroute setup opencode` — bu, `@omniroute/opencode-plugin`-i quraşdırır. Onlar fərqli əmrlərdir; yuxarıdakı cədvəl `setup-opencode`-i sənədləşdirir.
---
## Yerli istifadə
`localhost:20128` ünvanında OmniRoute işləyərkən, sadəcə alətiniz üçün qurma əmrini icra edin. Kataloq yerli serverdən alınır.
```bash
# Codex: uyğun model üçün ~/.codex/ içində profil yaz
omniroute setup-codex
codex --profile glm52 # yaradılmış profili istifadə et
# Claude Code: model başına profilləri yaz, sonra birini işə sal
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: bütün kataloq modelləri ilə openai-uyğun provayderi yaz
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} vasitəsilə istinad edilir, heç vaxt diskdə deyil
opencode -m omniroute/glm/glm-5.2 "..."
# Avtomatik aşkar etməyi tələb etməyən alətlər üçün açıq model lazımdır:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Heç nə yazmadan önizləmə:
omniroute setup-continue --dry-run
```
Heç bir konfiqurasiya yazmadan işə salın (yalnız env-injection):
```bash
omniroute launch # Claude Code → yerli OmniRoute
omniroute launch-codex # Codex CLI → yerli OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Açıq əmr yolu: --dan sonra gələn hər şeyi keçirin
omniroute run claude -- --print-system-prompt "bu fərqi nəzərdən keçirin"
```
---
## Uzaqdan istifadə
Hər hansı bir qurma əmrini `--remote` + `--api-key` ilə uzaq OmniRoute-a yönləndirin. Kataloq uzaqdan alınır; konfiqurasiya yerli maşınınıza yazılır.
```bash
# Uzaq VPS-yə qarşı OpenCode, yalnız glm/kimi modelləri saxla
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # əvvəlcə OMNIROUTE_API_KEY-i ixrac et
# Uzaq kataloqdan Codex profilləri
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Uzaqdan bir CLI işə sal
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Hər dəfə `--remote`/`--api-key` keçirmək əvəzinə, bir dəfə daxil olun və **aktiv kontekst** onların avtomatik təmin edilməsinə icazə verin:
```bash
omniroute connect 192.168.0.15 # məhdudlaşdırılmış token yaradır, konteksti saxlayır
omniroute setup-codex # ← indi uzaq kataloqdan istifadə edir
omniroute setup-opencode # ← eyni
omniroute launch # ← Claude Code uzaqda
```
Kontekstlər, sahələr və token idarəçiliyi üçün [Uzaq Rejim](./REMOTE-MODE.md) səhifəsinə baxın.
---
## Əsas URL konvensiyaları (hansı alətlər `/v1` istəyir)
OmniRoute OpenAI səthini `/v1`-də, Anthropic səthini kökdə, və yerli Gemini səthini `/v1beta`-da təqdim edir. Hər bir inteqrasiya alətinin gözlədiyi forma bağlıdır (əmr mənbəsində təsdiqlənmişdir):
| İnteqrasiya | Yazılan Əsas URL | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ------------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | kök | Xeyr — Cline `/v1/chat/completions` əlavə edir |
| `setup-goose` (`OPENAI_HOST`) | kök | Xeyr — Goose yolu əlavə edir |
| `setup-aider` (`OPENAI_API_BASE`) | kök | Xeyr — LiteLLM `/v1/chat/completions` əlavə edir |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` ilə | Bəli |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | kök | Xeyr — Claude Code `/v1/messages` əlavə edir |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` ilə | Bəli |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` ilə | Bəli |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | kök | Xeyr — SDK `/v1beta/models/…` əlavə edir |
---
## Yerli asılılıqları yeniləmək: `--include=optional`
`omniroute update` ilə yenilədikdə (təsdiqlədikdən sonra, ya da `--apply` ilə),
OmniRoute quraşdırmanı `--include=optional` ilə icra edir:
```bash
npm install -g omniroute@latest --include=optional
```
Bu, `omniroute update`-ə ötürdüyünüz bir bayraq **deyil** — bu, həmişə
yeniləyici tərəfindən tətbiq olunur. Bu, `optionalDependencies`-in (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM yığını) yeniləmədən sağ qalmasını təmin edir, əgər
npm konfiqurasiyanızda `omit=optional` təyin edilibsə, bu, yerli SQLite
sürücüsünü və OS-keyring bağlanmasını səssizcə silərdi. Dəqiq əmri tətbiq etmədən
öncə baxmaq üçün:
```bash
omniroute update --dry-run
# [DRY RUN] İcra ediləcək: npm install -g omniroute@latest --include=optional
```
Digər `omniroute update` bayraqları (mənbədə təsdiqlənmişdir): `--check` (köhnədirsə 1 ilə çıxır), `--apply` (sorğu olmadan quraşdırır), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI `omniroute run gemini` vasitəsilə
`@google/gemini-cli` 0.50.0 ilə müqavilə təsdiqlənmişdir: CLI
`GOOGLE_GEMINI_BASE_URL`-i tanıyır və `POST /v1beta/models/<model>:generateContent`
(və `:streamGenerateContent?alt=sse`) göndərir — tam olaraq OmniRoute-un yerli
Gemini interfeysi (`/v1beta`). `omniroute run gemini` bunu avtomatik olaraq
bağlayır:
- `GOOGLE_GEMINI_BASE_URL` → aktiv OmniRoute əsas URL (kök, `/v1` yoxdur);
- `GEMINI_API_KEY` → həll edilmiş OmniRoute kredensialı (seçim/env/kontekst);
- **müvəqqəti izolyasiya olunmuş `GEMINI_CLI_HOME`** hansı ki, `.gemini/settings.json`
`gemini-api-key` autentifikasiyasını seçir, beləliklə saxlanılan Google OAuth sessiyası
(Kod Dəstəyi) heç vaxt OmniRoute yönləndirilmiş başlatmanı üstələməz — çıxışdan sonra silinir;
- **env gigiyenası**: uşaq mühiti `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI``GOOGLE_GENAI_USE_GCA`-dan təmizlənir (bu, autentifikasiyanı
Vertex/Kod Dəstəyi ilə yönləndirərdi), və `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
ehtiyat olaraq təyin edilir — digər `run` hədəfləri öz münaqişəli dəyişənləri üçün eyni
müalicəni alır;
- `--model <id>` `--provider`/`--model`-dan inyeksiya.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini-nin iş sahəsi etimad qoruyucusu hələ də başsız rejimdə tətbiq olunur —
`--skip-trust` (ya da interaktiv olaraq qovluğu etimad edin) özünüz keçirin; başlatıcı
qəsdən bunu atlamır. Bu başlatıcı **ACP qeydiyyatından** (`src/lib/acp/registry.ts`, `gemini --acp`) fərqlidir, bu, `/dashboard/acp-agents` üçün agent-protokol inteqrasiyasıdır.
---
## Real tüstü süzgəci (seçimlə)
Deterministik başlatma-planı geriyə dönmə testləri CI-də (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). REAL ikili faylları REAL
OmniRoute serveri ilə təsdiqləmək üçün seçimlə bir harness mövcuddur
`tests/integration/upstream-cli-smoke.int.test.ts`. Bu, avtomatik olaraq
işləmir (hər bir alt-test `RUN_CLI_SMOKE=1` olmadıqca atlanır), kredensialı env-dəki
AD ilə ötürür (dəyər ilə deyil), qeydə alınmış çıxışdan açar formasında olan
sözləri gizlədir, quraşdırılmamış hədəfləri atlayır və uğursuzluqları
autentifikasiya / upstream / konfiqurasiya kimi təsnif edir, sadəcə boolean
yerinə:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
İstəyə bağlı: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` süzgəci məhdudlaşdırır;
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120s-lik hər hədəf üçün vaxt aşımını üstələyir.
---
## Baxın həmçinin
- [Claude Code konfiqurasiyası](./CLAUDE-CODE-CONFIGURATION.md) — daha dərin Claude Code bələdçisi
- [Codex CLI konfiqurasiyası](./CODEX-CLI-CONFIGURATION.md) — bir dəfəlik `[model_providers.omniroute]` əsas qurulması
- [Uzaq Mod](./REMOTE-MODE.md) — kontekstlər, məhdudlaşdırılmış giriş tokenləri, uzaq serveri idarə etmək
- [CLI Alətləri istinad](../reference/CLI-TOOLS.md) — dəstəklənən alətlərin tam kataloqu + idarəetmə səhifələri
- [Quraşdırma Bələdçisi](./SETUP_GUIDE.md) — quraşdırma metodları və ilk dəfə işə salma təlimatı

View File

@@ -1,308 +1,86 @@
# CLI-TOOLS (Azərbaycan dili)
# CLI Tools Setup Guide — OmniRoute (Български)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Alətləri — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Alətləri — OmniRoute
Sonuncu yeniləmə: 2026-08-18
OmniRoute, üç xüsusi idarəetmə səhifəsində yayılmış üç kateqoriyalı CLI alətləri ilə inteqrasiya edir:
| Səhifə | Marşrut | Konsept | Say |
| ----------------- | ----------------------- | ------------------------------------------------------------------------------------------ | ---------------- |
| **CLI Kodu** | `/dashboard/cli-code` | OmniRoute-a yönləndirdiyiniz kodlaşdırma alətləri (Müştəri → CLI → OmniRoute → Təchizatçı) | 26 |
| **CLI Agentləri** | `/dashboard/cli-agents` | OmniRoute-a yönləndirdiyiniz müstəqil agentlər (eyni axın, daha geniş əhatə) | 8 |
| **ACP Agentləri** | `/dashboard/acp-agents` | OmniRoute-un stdio/ACP vasitəsilə arxa planda yaratdığı CLİ-lər (tərs axın) | qeydiyyata baxın |
Köhnə marşrutlar 308 ilə yönləndirilir: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Necə İşləyir
## How It Works
```
CLI Kodu / CLI Agentləri (istehlak axını):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (hamısı OmniRoute-a yönləndirilir)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute düzgün təchizatçıya yönləndirir)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agentləri (tərs yaradılma axını):
Müştəri tələbi → OmniRoute → stdio/ACP vasitəsilə CLİ yaradır → cavab
```
**Faydaları:**
**Benefits:**
- Bütün alətləri idarə etmək üçün bir API açarı
- İdarəetmə panelində bütün CLİ-lər üzrə xərclərin izlənməsi
- Hər aləti yenidən konfiqurasiya etmədən model dəyişdirmək
- Yerli və uzaq serverlərdə (VPS, Docker, Akamai, Cloudflare Tunnel) işləyir
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*` ilə Avtomatik Konfiqurasiya
## Supported Tools (Dashboard Source of Truth)
Hər alətin konfiqurasiyasını əl ilə yazmağa ehtiyac yoxdur. OmniRoute, dəstəklənən hər bir CLİ üçün **canlı** model kataloqunu oxuyan və alətin öz konfiqurasiyasını sizin maşınınıza yazan `setup-*` komandasını təqdim edir:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Hər biri `--remote <url> --api-key <key>` (uzaq OmniRoute-a qarşı yerli aləti konfiqurasiya etmək), `--dry-run` (yazmadan önizləmə) və `--port` qəbul edir. Model avtomatik aşkar edilməyən alətlər (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` (və interaktiv olmayan işlər üçün `--yes`) qəbul edir. Doğru mühitin daxil edildiyi və heç bir konfiqurasiya yazılmadan CLİ başlatmaq üçün, ümumi `omniroute run <target>` başlatıcısını istifadə edin (claude, codex, aider, goose, opencode, qwen, gemini — hədəflər və təyin etmələr `bin/cli/cli-manifest.mjs`-dən gəlir); köhnə alət başlatmaçıları `omniroute launch` (Claude Kodu) və `omniroute launch-codex` (Codex) hələ də mövcuddur. Gemini CLİ yalnız başlatma üçündür: bu `omniroute run` hədəfidir, lakin `setup-*`/`configure` resepti yoxdur.
### CLI fingerprint sync (Agents + Settings)
> **Tam istinad:** ustad cədvəl — hər bir komandanın yazdığı, hər bir bayraq, yerli vs uzaq və hansı alətlərin `/v1` əlavəsinə ehtiyacı olduğu — **[CLI İnteqrasiyaları](../guides/CLI-INTEGRATIONS.md)**-da yerləşir.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Bir konteyner içində bunları işlətmək
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute konteyneri içində icra olunan `setup-*` komandası konteynerin öz evinə yazır, bu da heç bir ev sahibi CLİ tərəfindən oxunmur və konteynerlə birlikdə yox olur. OmniRoute bunu aşkar edir və yazmadan əvvəl təlimatlarla `2` ilə çıxır. İki dəstəklənən yol — CLİ-ni ev sahibində quraşdırmaq və konteynerə `omniroute connect` etmək, ya da konfiqurasiya qovluqlarını bağlamaq və `CLI_CONFIG_HOME` təyin etməkdir (compose `host` profili). Hər `setup-*` komandası, eləcə də `omniroute configure``omniroute config set`, konteynerin öz CLİ-lərini konfiqurasiya etmək istədiyiniz zaman `--allow-container-write` qəbul edir; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` server üçün eyni şeyi edir. Baxın
[Docker Bələdçisi → Ev sahibi CLİ alətlərini konfiqurasiya etmək](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
İdarəetmə panelinin **tətbiq son nöqtəsi** (`POST /api/cli-tools/apply`) eyni qorumağı tətbiq edir: konteynerdə, ev sahibi tərəfindən bağlanmamış bir yazı **`422`** ilə `containerEphemeralTarget: true` cavabını verir, təhlükəsiz xəta mətni və — ev sahibi resepti olan alətlər üçün (claude, codex, opencode, cline, kilo, continue) — ev sahibində işlətmək üçün `hostSetupCommand` (məsələn, `omniroute setup-opencode`) təqdim edir; heç nə yazılmır. `dryRun: true` konteyner rejimində işləməyə davam edir və diskə toxunmadan yaradılan məzmunu + hədəf yolunu qaytarır, beləliklə, siz idarəetmə panelindən önizləyə və ev sahibində tətbiq edə bilərsiniz. Bu davranış məqsədli və `tests/unit/api/cli-tools/apply-container-guard.test.ts` ilə geriyə qorunmuşdur — heç vaxt qorumanı aradan qaldıraraq 422-ni "düzəltməyin".
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Həqiqət Mənbəyi
## Step 1 — Get an OmniRoute API Key
Birləşmiş kataloq `src/shared/constants/cliTools.ts` faylında `CLI_TOOLS: Record<string, CliCatalogEntry>` kimi yaşayır.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Hər bir girişin bu sahələri var (müəyyən edilib `src/shared/schemas/cliCatalog.ts` faylında):
| Sahə | Tip | Təsvir |
| ----------------------------------------------- | ------------------------------------------------------------ | --------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Alət hansı səhifədə görünür |
| `vendor` | `string` | Alətin mənşəyi ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP Agent kimi də istifadə oluna bilər (badge göstərilir) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Xüsusi endpoint dəstək səviyyəsi. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Konfiqurasiya mexanizmi |
| `id`, `name`, `color`, `description`, `docsUrl` | standart | Əsas görüntü sahələri |
`baseUrlSupport: "none"` olan girişlər **göstərilmir** dashboard səhifələrində — onlar plan 11 üçün MITM backlog-da qeyd olunur (baxın `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Bacarıq pillələri (kataloqda × aşkar edilə bilən × konfiqurasiya edilə bilən × işə salına bilən)
Hər kataloqda olan alət aşkar edilə bilən, konfiqurasiya edilə bilən və ya işə salına bilən deyil. Hər pillənin bir
bəyannamə mənbəyi var və bir drift testi onları uyğun saxlayır:
| Pillə | Mənası | Bəyannamə edilib |
| ----------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| **Kataloqda** | Dashboard kataloqunda görünür (ad, vendor, sənədlər, konfiqurasiya tipi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Aşkar edilə bilən** | İkili/konfiqurasiya aşkar edilməsi, sağlamlıq yoxlamaları, konfiqurasiya yolları | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime kataloqu) |
| **Konfiqurasiya edilə bilən** | `omniroute configure <cli>` tərəfindən dəstəklənir (quraşdırma resepti mövcuddur) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **İşə salına bilən** | `omniroute run <target>` tərəfindən dəstəklənir (env/args inyeksiya müəyyən edilib) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` CLI əmri üçün kanonik icra manifestidir
sahələri: `run`, `configure` və shell-completion generator-ları hamısı
hədəf siyahılarını, alias həllini (məsələn, `kilocode`/`kilo-code`/`kilo_cli``kilo`)
`--model` flag bağlantısını ondan alır. Drift qoruyucusu
`tests/unit/cli/cli-manifest-drift.test.ts` manifestin, runtime
kataloqunun, UI kataloqunun və hər bir istehlakçı sahəsinin uyğun qaldığını təsdiqləyir — bir sahəyə əlavə olunan hədəf
digər sahələr olmadan əlavə edildikdə, sessiya sükutla drift etmək əvəzinə uğursuz olur.
## 1. CLI Kod Kataloqu (26 alət)
`/dashboard/cli-code`-da görünən bütün alətlər. `baseUrlSupport: none` olanlar xüsusi əsas URL əvəzinə MITM və ya manual bələdçi vasitəsilə qoşulmuşdur:
| id | ad | istehsalçı | baseUrlSupport | konfiqurasiya Növü | acpSpawnable |
| ------------ | ------------------------- | ------------------- | -------------- | ------------------ | ------------ |
| claude | Claude Kod | Anthropic | tam | env | true |
| codex | OpenAI Codex CLI | OpenAI | tam | xüsusi | true |
| zcode | ZCode (GLM Kodlama Planı) | Z.ai | heç biri | xüsusi | false |
| cline | Cline | OSS (ex-Claude Dev) | tam | xüsusi | true |
| kilo | Kilo Kod | Kilo-Org | tam | xüsusi | false |
| roo | Roo Kod | Roo (OSS) | tam | bələdçi | false |
| continue | Continue | continue.dev | tam | bələdçi | false |
| aider | Aider | OSS (P. Gauthier) | tam | bələdçi | true |
| forge | ForgeCode | Antinomy HQ | tam | xüsusi | true |
| jcode | jcode | 1jehuang (OSS) | tam | xüsusi | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | tam | xüsusi | false |
| codewhale | CodeWhale | Hmbown (OSS) | tam | xüsusi | false |
| opencode | OpenCode | Anomaly (ex-SST) | tam | bələdçi | true |
| droid | Factory Droid | Factory AI | qismən | bələdçi | false |
| copilot | GitHub Copilot CLI | GitHub/MS | tam | xüsusi | false |
| cursor-cli | Cursor CLI | Anysphere | qismən | bələdçi | true |
| smelt | Smelt | leonardcser (OSS) | tam | xüsusi | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | tam | xüsusi | false |
| grok-build | Grok Build | xAI | tam | xüsusi | false |
| crush | Crush | OSS (Charm) | tam | xüsusi | false |
| qwen | Qwen Kod | Alibaba | tam | bələdçi | true |
| cursor | Cursor | Anysphere | heç biri | bələdçi | false |
| antigravity | Antigravity | Google | heç biri | mitm | false |
| hermes | Hermes | Nous Research | heç biri | bələdçi | false |
| kiro | Kiro AI | Amazon | heç biri | mitm | false |
| custom | Xüsusi CLI | — | tam | xüsusi-builder | false |
`baseUrlSupport: "partial"` olan alətlər, idarəetmə kartında "⚠ Base URL qismən" nişanı göstərir.
## 2. CLI Agentləri Kataloqu (8 alət)
`/dashboard/cli-agents`-də görünən müstəqil agentlər:
| id | ad | istehsalçı | baseUrlDəstəyi | acpYaradılan |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | tam | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | tam | true |
| goose | Goose | Block / Linux Foundation | tam | true |
| interpreter | Open Interpreter | OSS | tam | true |
| warp | Warp AI | Warp Inc. | qismən | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | tam | false |
| omp | Oh My Pi | OSS | tam | true |
| letta | Letta CLI | Letta | tam | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP Agentləri (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Bu səhifə (`/dashboard/agents`-dən adlandırılmışdır) OmniRoute-un stdio/ACP protokolu vasitəsilə **yarada biləcəyi** arxa plan icra mühərriklərini göstərir. Kataloq ayrıca `src/lib/acp/registry.ts`-də saxlanılır və `CLI_TOOLS` ilə **eyni deyil**.
---
## 4. MITM Gecikməsi (dashboard-da göstərilmir)
Aşağıdakı CLI-lər özəl base URL-ni yerli olaraq dəstəkləmir və CLI Kodunun və ya CLI Agentləri səhifələrinin **siyahısında deyil**. Onlar plan 11-də MITM müdaxiləsi üçün namizəddirlər:
| CLI | Səbəb |
| ------------------- | ------------------------------------------------------------- |
| windsurf | BYOK yalnız seçilmiş Claude modelləri + korporativ URL/token |
| amp | Bağlı ekosistem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO auth, özəl URL yoxdur |
| cowork | Anthropic Desktop, konfiqurasiya edilə bilən son nöqtə yoxdur |
Tam kross-referans üçün `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`-ə baxın.
---
## 5. Batch Detection API
Bütün alət aşkarlanması tək bir son nöqtə vasitəsilə toplanır:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (digər `/api/cli-tools/` marşrutları ilə eynidir)
- Dönüş: `Record<toolId, ToolBatchStatus>` (növ: `src/shared/types/cliBatchStatus.ts`)
- Strategiya: `Promise.all` bütün alətlər üzərində, hər alət üçün 5s vaxt aşımı
- Cache: konfiqurasiya faylı `mtime` ilə indekslənmiş yaddaşda LRU. Cache, mtime dəyişdikdə etibarsızlaşdırılır. Server yenidən başladıqda sıfırlanır.
Hər alət üçün cavab forması:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitizasiya edilmiş, heç bir stack trace yoxdur
}
```
## 6. Yeni Alətlər Üçün Ayar İdarəediciləri
`configType: "custom"` olan yeni alətlərin xüsusi ayar API marşrutları var:
| Marşrut | Alət |
| ------------------------------------------- | ---------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, köhnə) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, əsas + köhnə `~/.deepseek` sinxronizasiya) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi kodlaşdırma agenti |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + xüsusi `.env` açarı) |
Bütün marşrutlar xəta cavabları üçün `sanitizeErrorMessage()` istifadə edir (Sərt Qayda #12).
---
## 7. İdarə Paneli Səhifələrinin Arxitekturası
### CLI Kodu (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — server komponenti
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — müştəri grid
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — alət detal səhifəsi
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 ixtisaslaşmış alət kartı + `ToolDetailClient.tsx`
### CLI Agentləri (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — server komponenti
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — müştəri grid
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient`-dən istifadə edir
### ACP Agentləri (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — server komponenti (moved from `agents/`)
### Paylaşılan UI Komponentləri (`src/shared/components/cli/`)
| Fayl | Məqsəd |
| ----------------------- | --------------------------------------------------- |
| `CliToolCard.tsx` | Ağıllı status kartı (detection + config + endpoint) |
| `CliConceptCard.tsx` | Hər səhifə üçün konsept izah kartı |
| `CliComparisonCard.tsx` | CLI növləri arasında üç sütunlu müqayisə |
| `BaseUrlSelect.tsx` | Endpoint açılan menyusu (Local/Cloud/Custom) |
| `ApiKeySelect.tsx` | API açar seçici |
| `ManualConfigModal.tsx` | Kopyalanabilən konfiqurasiya snippet modal |
### Paylaşılan Hook (`src/shared/hooks/cli/`)
| Fayl | Məqsəd |
| ------------------------- | ---------------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses`-i əldə edir, yükləmə/yeniləmə vəziyyətini idarə edir |
## 8. i18n
Plan 14 F9-da yeni adlar əlavə edildi:
| Namespace | Məqsəd |
| ----------- | ---------------------------------------------------------------------------------------- |
| `cliCommon` | Paylaşılan mətnlər (kart etiketləri, konsept/müqayisə mətnləri, detal səhifə etiketləri) |
| `cliCode` | CLI Kod səhifə mətnləri |
| `cliAgents` | CLI Agentləri səhifə mətnləri |
| `acpAgents` | ACP Agentləri səhifə mətnləri |
Tam PT-BR və EN tərcümələri təqdim edilir. 39 digər dil avtomatik olaraq EN-ə geri dönür `src/i18n/request.ts`-də ad səviyyəsində birləşmə vasitəsilə.
---
## 9. Tez Başlama
### Addım 1 — OmniRoute API Açarını Alın
1. `/dashboard/api-manager`-ıın → **API Açarı Yaradın**
2. Bir ad verin (məsələn, `cli-tools`) və bütün icazələri seçin
3. Açarı kopyalayın — aşağıdakı hər CLI üçün buna ehtiyacınız olacaq
> Açarınız belə görünür: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Addım 2 — CLI Alətləri Quraşdırın
Bütün npm əsaslı alətlər Node.js 22.22.2+ və ya 24.x tələb edir:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -320,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust əsaslı
# Pi coding agent
# quraşdırma üçün https://github.com/zechnerj/pi-coding-agent-ə baxın
# jcode
# quraşdırma üçün https://github.com/1jehuang/jcode-ə baxın
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Addım 3 — Dashboard vasitəsilə Konfiqurasiya Edin
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code`-a gedin
2. Şəbəkədə alətinizi tapın
3. Alət detal səhifəsini açmaq üçün kartı klikləyin
4. API açarınızı və əsas URL-i seçin
5. **Konfiqurasiyanı Tətbiq Et**-i klikləyin və ya manual konfiqurasiya parçasını kopyalayın
---
### Addım 4 — Qlobal Mühit Dəyişənlərini Təyin Edin
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI ROOT-da GOOGLE_GEMINI_BASE_URL oxuyur (SDK özü /v1beta/... əlavə edir)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **Uzaq server** üçün `localhost:20128`-i server IP və ya domen ilə əvəz edin,
> məsələn, `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Addım 4 — Hər Aləti Konfiqurasiya Edin
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# ~/.claude/settings.json yaradın:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code üçün birləşdirilmiş Anthropic qapı kökünü istifadə edin. Burada `/v1` əlavə etməyin.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Müasir Codex (v0.137+) yalnız `~/.codex/config.toml`-ı oxuyur — köhnə
`config.yaml` köhnə npm CLI-yə aiddir və səssizcə göz ardı edilir. API
açarı `OMNIROUTE_API_KEY` mühit dəyişənində (`env_key`) qalır, heç vaxt
faylda deyil:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Tam istinad (profil, `wire_api`, kontekst pəncərələri): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> istifadə edərək düşüncə variantlarını göndərin.
---
#### Cline (CLI və ya VS Code)
### Cline (CLI or VS Code)
**CLI rejimi:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -463,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code rejimi:**
Cline genişləndirmə parametrləri → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Yaxud OmniRoute dashboardunu istifadə edin**CLI Alətləri → Cline → Konfiqurasiyanı Tətbiq Et**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI və ya VS Code)
### KiloCode (CLI or VS Code)
**CLI rejimi:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code parametrləri:**
**VS Code settings:**
```json
{
@@ -487,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Yaxud OmniRoute dashboardunu istifadə edin**CLI Alətləri → KiloCode → Konfiqurasiyanı Tətbiq Et**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code Genişləndirməsi)
### Continue (VS Code Extension)
`~/.continue/config.yaml`-ı redaktə edin:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -505,253 +241,158 @@ models:
default: true
```
Redaktə etdikdən sonra VS Code-u yenidən başladın.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Bu, VS Code Insiders xüsusi son nöqtə modelləri üçün konfiqurasiya edildikdə və OmniRoute-un xüsusi başlıq sahəsi olmadan işləməsini istədiyiniz zaman istifadə olunur.
**Tövsiyə olunan yer:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Tokenləşdirilmiş OmniRoute təxmini istifadə edərək nümunə:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Qeydlər:**
- `sk-your-omniroute-key`-i OmniRoute-da yaradılmış API açarı ilə əvəz edin.
- `url` sahəsi `/api/v1/vscode/{token}/chat/completions`-a işarə etməlidir.
- `modelsUrl` sahəsi `/api/v1/vscode/{token}/models`-a işarə etməlidir.
- Müştəri xüsusi başlıqları dəstəklədikdə normal `/v1` + Bearer başlıq axınını üstün tutun.
- URL-də yerləşdirilmiş tokenlər uyğunluq üçün geri dönüşdür və redaktor qeydlərində və ya proxy tarixində görünə bilər.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# AWS/Kiro hesabınıza daxil olun:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI öz autentifikasiyasını istifadə edir — Kiro CLI üçün OmniRoute arxa planda lazım deyil.
# Kiro CLI-ni OmniRoute ilə yanaşı digər alətlər üçün istifadə edin.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** masaüstü tətbiqi üçün OmniRoute tərəfindən təqdim edilən MITM son nöqtəsini istifadə edin
`/dashboard/cli-tools → Kiro` altında.
---
## 10. Daxili OmniRoute CLI
### Qwen Code (Alibaba)
`omniroute` ikili serverin həyat dövrü, qurulması, diaqnostika və təminatçı idarəetməsi üçün əmrlər təqdim edir. Giriş nöqtəsi: `bin/omniroute.mjs`.
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
omniroute # Serveri başladın (default port 20128)
omniroute setup # İnteraktiv qurma sehrbazı
omniroute doctor # Konfiqurasiya, DB, portlar, iş vaxtını yoxlayın
omniroute providers list # Konfiqurasiya edilmiş təminatçı bağlantıları
omniroute providers test-all # Hər aktiv bağlantını test edin
omniroute reset-password # Admin parolunu sıfırlayın
omniroute logs # İstək loglarını axın edin
omniroute health # Ətraflı sağlamlıq (qırıcılar, keş, yaddaş)
omniroute --version # Versiyanı çap edin
omniroute --help # Bütün əmrləri göstərin
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
### Qurma və İnkşaf
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
omniroute setup # İnteraktiv qurma sehrbazı
omniroute setup --non-interactive # CI/avtomatlaşdırma rejimi (mühit dəyişənlərini + bayraqları oxuyur)
omniroute setup --password '<value>' # Admin parolunu birbaşa təyin edin
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Bir anda təminatçı əlavə edin və test edin
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
İnteraktiv olmayan qurma üçün tanınan mühit dəyişənləri:
> For a **remote server** replace `localhost:20128` with the server IP or domain.
| Var | Məqsəd |
| ------------------- | ---------------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Təminatçı API açarı (Commander `.env()` vasitəsilə `--api-key` ilə bağlanır) |
| `DATA_DIR` | OmniRoute məlumat qovluğunu üstələyin |
**Test:** `qwen "say hello"`
Bütün digər interaktiv olmayan girişlər bayraqlar kimi ötürülür, mühit dəyişənləri kimi deyil:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(baxın `omniroute setup` seçimlərinə yuxarıda).
### Cursor (Desktop App)
### Diaqnostika
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
```bash
omniroute doctor # Konfiqurasiya, DB, portlar, iş vaxtı, yaddaş, canlılıq yoxlayın
omniroute doctor --json # Maşın oxunaqlı JSON
omniroute doctor --no-liveness # HTTP sağlamlıq probunu atlayın
omniroute doctor --host 0.0.0.0 # Canlılıq hostunu üstələyin
omniroute doctor --liveness-url <url> # Tam sağlamlıq son nöqtəsi URL üstələyin
```
Via GUI: **Settings → Models → OpenAI API Key**
Doktor bu yoxlamaları aparır: `Konfiqurasiya`, `Veritabanı`, `Saxlama/şifrələmə`,
`Port mövcudluğu`, `Node iş vaxtı`, `Təbiət ikilisi` (better-sqlite3),
`Yaddaş``Server canlılığı`. Hər hansı bir yoxlama `uğursuz` olarsa, sıfırdan fərqli bir çıxış edir.
### Təminatçı İdarəetməsi
```bash
omniroute providers available # OmniRoute təminatçı kataloqu
omniroute providers available --search openai # Kataloqu id/ad/şəxsiyyət/kateqoriya ilə süzgəcdən keçirin
omniroute providers available --category api-key # Kateqoriya ilə süzgəcdən keçirin (api-key, oauth, pulsuz, ...)
omniroute providers available --json # Maşın oxunaqlı JSON
omniroute providers list # Konfiqurasiya edilmiş təminatçı bağlantıları
omniroute providers list --json
omniroute providers test <id|name> # Bir konfiqurasiya edilmiş bağlantını test edin
omniroute providers test-all # Hər aktiv bağlantını test edin
omniroute providers validate # Yalnız yerli struktural yoxlama
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Mövcud OAuth axını
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` API-ilkdir və buna görə də
aktiv yerli və ya uzaq kontekstə qarşı işləyir. Şifrə girişləri
`--credential-stdin` və ya `--credential-env` istifadə etməlidir; `--dry-run --json` yalnız
redaktə edilmiş mövcudluğu/formasını bildirir. `providers available` OmniRoute kataloqunu oxuyur;
`providers list/test/test-all/validate` yerli SQLite davranışını saxlayır və
serverin işləməsini tələb etmir.
### Bərpa və Sıfırlama
```bash
omniroute reset-password # Admin parolunu sıfırlayın (həmçinin: omniroute-reset-password)
omniroute reset-encrypted-columns # Şifrələnmiş şifrə sıfırlaması üçün xəbərdarlıq + dry-run göstərin
omniroute reset-encrypted-columns --force # SQLite-də şifrələnmiş şifrələri faktiki olaraq sıfırlayın
```
### Şifrə İxracı (⚠ diqqətlə idarə edin)
```bash
omniroute auth export # Xəbərdarlıq + təsdiq qapısı göstərin — DB giriş yoxdur
omniroute auth export --force # BÜTÜN bağlantıların ŞİFRƏLƏNMİŞ şifrələrini stdout-a JSON olaraq ixrac edin
omniroute auth export --force --id <id> # Yalnız uyğun bağlantını ixrac edin
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> xətləri çıxarın
omniroute auth export --force --out creds.json # Fayla yazın (0600 icazələri ilə yaradılır)
```
`auth export` **yalnız yerli** (birbaşa SQLite oxuma, HTTP marşrutu yoxdur) və qəsdən çap edir/yazır
**düz mətndə** `apiKey`/`accessToken`/`refreshToken`/`idToken` dəyərləri — bu, xüsusiyyətdir, səhv deyil.
Veritabanından heç nə oxunmur və heç nə şifrəsi açılmır, `--force` olmadan. Hər zaman düz mətndə çıxarılmadan əvvəl bir stderr xəbərdarlıq banneri çap olunur. `STORAGE_ENCRYPTION_KEY` təyin edilməlidir. Şifrələnmədə uğursuz olan bir sahə (köhnə açar, korrupt şifrələnmiş mətn)
`<field>DecryptFailed: true` olaraq bildirilir, bütün ixracı dayandırmadan və ya əsas səhvi sızdırmadan.
### Digər alt əmrlər
Bunlar işləyən OmniRoute serverini tələb edir, əks halda qeyd edilməmişdir:
```bash
omniroute status # Ətraflı iş vaxtı statusu
omniroute logs # İstək loglarını axın edin (--json, --search, --follow)
omniroute config show # Cari konfiqurasiyanı göstərin
omniroute provider list # Mövcud təminatçıları siyahıya alın (providers list-in təkrarı)
omniroute provider add # OmniRoute-u bir alətdə təminatçı kimi qeyd edin
omniroute keys add | list | remove # API açarlarını idarə edin
omniroute models [provider] # Modelləri siyahıya alın (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Konfiqurasiya + DB snapshot
omniroute restore # Əvvəlki snapshot-dan bərpa edin
omniroute health # Ətraflı sağlamlıq (qırıcılar, keş, yaddaş)
omniroute quota # Təminatçı kvota istifadəsi
omniroute cache # Keş statusu
omniroute cache clear # Semantik + imza keşlərini təmizləyin
omniroute mcp status | restart # MCP server statusu / yenidən başladın
omniroute a2a status | card # A2A server statusu / agent kartı
omniroute tunnel list | create | stop # Tunelləri idarə edin (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Mühit dəyişənlərini yoxlayın / təyin edin (müvəqqəti)
omniroute test # Təminatçı bağlantısı test
omniroute update # Yeniləmələri yoxlayın
omniroute completion # Shell tamamlanmasını yaradın
```
### Ümumi bayraqlar
| Bayraq | Təsvir |
| ------------------- | ------------------------------------------------------ |
| `--no-open` | Başlanğıcda brauzeri avtomatik açmayın |
| `--port <n>` | API portunu üstələyin (default 20128) |
| `--mcp` | IDE-lər üçün stdio üzərində MCP serveri kimi işləyin |
| `--non-interactive` | CI rejimi (sorğular yoxdur; mühit/bayraqlardan oxuyur) |
| `--json` | Maşın oxunaqlı JSON çıxışı (doctor, providers və s.) |
| `--help`, `-h` | Əmrə spesifik kömək göstərin |
| `--version`, `-v` | Quraşdırılmış versiyanı çap edin |
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## Mövcud API Son Nöqtələri
## Dashboard Auto-Configuration
| Son Nöqtə | Təsvir | İstifadə Üçün |
| -------------------------- | ------------------------------------ | ------------------------------------- |
| `/v1/chat/completions` | Standart söhbət (bütün provayderlər) | Bütün müasir alətlər |
| `/v1/responses` | Cavablar API (OpenAI formatı) | Codex, agentik iş axınları |
| `/v1/completions` | Köhnə mətn tamamlamaları | `prompt:` istifadə edən köhnə alətlər |
| `/v1/embeddings` | Mətn yerləşdirmələri | RAG, axtarış |
| `/v1/images/generations` | Şəkil yaradılması | GPT-Image, Flux və s. |
| `/v1/audio/speech` | Mətn-dan-səs | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Səs-dan-mətn | Deepgram, AssemblyAI |
The OmniRoute dashboard automates configuration for most tools:
Yerləşdirmək üçün hazır nümunələr tokenləşdirilmiş OmniRoute URL ilə:
```txt
Token nümunəsi: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standart OpenAI bazası: http://localhost:20128/v1
VS Code modelləri: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code söhbəti: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code cavabları: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama etiketləri: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama söhbəti: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Problemlərin Həlli
## Built-in Agents: Droid & OpenClaw
| Xəta | Səbəb | Həll |
| -------------------------------------------------------- | -------------------------------- | ------------------------------------------------------- |
| `Connection refused` | OmniRoute işləmir | `omniroute serve` |
| `401 Unauthorized` | Yanlış API açarı | `/dashboard/api-manager`-də yoxlayın |
| `No combo configured` | Aktiv yönləndirmə kombosu yoxdur | `/dashboard/combos`-da qurun |
| CLI "quraşdırılmayıb" göstərir | İcra faylı PATH-da deyil | `which <command>`-i yoxlayın |
| Dashboard quraşdırmadan sonra "təsbit edilmədi" göstərir | Keş köhnədir | Dashboard-da "⟳ Təsbiti yenilə" düyməsini basın |
| Köhnə link `/dashboard/cli-tools` | Pre-v3.8.6 işarəsi | `/dashboard/cli-code`-ə avtomatik yönləndirilir (308) |
| Köhnə link `/dashboard/agents` | Pre-v3.8.6 işarəsi | `/dashboard/acp-agents`-ə avtomatik yönləndirilir (308) |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Отстраняване на проблеми
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,308 +0,0 @@
# CLI-INTEGRATIONS (Български)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Интеграции — насочете всяко CLI за кодиране към OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Интеграции
OmniRoute предлага набор от команди `setup-*`, които конфигурират CLI за кодиране (Codex, Claude Code, OpenCode, Cline и др.) да използва OmniRoute като свой бекенд — така инструментът комуникира с **една** крайна точка и OmniRoute маршрутизира към правилния доставчик с автоматично резервиране. Всяка команда чете **активния** каталог на моделите от работещ OmniRoute (локален или отдалечен) и записва конфигурационния файл на инструмента на **вашата** машина. API ключът се посочва чрез променлива на средата, където инструментът го поддържа. Командите, които запазват локален файл на средата на инструмента, са отбелязани по-долу.
Има и универсален стартер — `omniroute run <target>` — който стартира `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` или `gemini` с правилно инжектирана среда, без да записва никаква конфигурация. Целите и техните псевдоними идват от каноничния манифест `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), а `omniroute completion` предлага
същите целеви думи, произтичащи от манифеста. Легаси стартерите за всеки инструмент —
`omniroute launch` (Claude Code) и `omniroute launch-codex` (Codex) — остават
достъпни.
Включването на доставчици е налично от същия локален/отдалечен контекст. Командите с API-първи подход по-долу поддържат управлението на удостоверяване отделно от удостоверителните данни на доставчика и никога не отпечатват удостоверителни данни в структурирания изход:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
За скриптове, предпочитайте `--credential-stdin` или `--credential-env`; `--credential`
се запазва за контролирана локална употреба. `providers remove` изисква `--yes` на
неинтерактивен терминал, а всички пет команди уважават активния контекст или глобалните опции `--base-url`/`--api-key`.
За еднократната, ръчно написана основна настройка на двата най-богати интеграции, вижте
дълбочинните анализи за всеки инструмент:
- [Конфигурация на Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Конфигурация на Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Отдалечен режим](./REMOTE-MODE.md) — управлявайте отдалечен OmniRoute (VPS / Tailnet) от вашия лаптоп
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — разширението OmniCopilot; то може също да изпълнява тези
`setup-*` команди вместо вас от вътре в редактора
---
## Основна таблица
Всяка команда уважава **активния контекст** (настроен с `omniroute connect`, вижте
[Отдалечен режим](./REMOTE-MODE.md)) или явни флагове `--remote <url> --api-key <key>`.
"Локално срещу отдалечено" по-долу означава: без флагове, целта е `http://localhost:20128`;
с `--remote` (или активен отдалечен контекст) извлича каталога от този
сървър и записва конфигурацията локално.
| Команда | Инструмент | Какво записва | Ключови флагове | Локално срещу отдалечено |
| -------------------------- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — един профил за всеки съвместим текстов модел (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | И двете |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — един профил за всеки съвпадащ модел (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | И двете |
| `omniroute setup-opencode` | OpenCode (съвместим с openai) | `~/.config/opencode/opencode.json``omniroute` доставчик с всеки модел от каталога (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | И двете |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI режим) + отпечатва настройки за разширението на VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | И двете |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + слива `kilocode.*` в `settings.json` на VS Code, ако е наличен | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | И двете |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` модели, ключ чрез `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | И двете |
| `omniroute setup-cursor` | Cursor | Нищо — отпечатва стъпките в приложението (конфигурацията на Cursor е непрозрачна SQLite) | `--remote` `--api-key` `--only` `--port` | И двете |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (импортен документ) + задава `roo-cline.autoImportSettingsPath`, ако съществува `settings.json` на VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | И двете |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` доставчик, ключ чрез `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | И двете |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + отпечатва рецепта за среда | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | И двете |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + отпечатва рецепта за среда | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | И двете |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` масив + `OMNIROUTE_API_KEY` в `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | И двете |
| `omniroute run <target>` | Стартиране на време (универсално) | Нищо — стартира `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` с правилната среда и аргументи; Qwen и Gemini използват временно изолирано домашно | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | И двете |
| `omniroute launch` | Claude Code | Нищо — стартира `claude` с инжектирани `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` | `--remote` `--api-key` `--token` `--profile` `--port` | И двете |
| `omniroute launch-codex` | OpenAI Codex CLI | Нищо — стартира `codex` с инжектиран `omniroute` доставчик чрез `-c` флагове | `--remote` `--api-key` `--profile` (`-p`) `--port` | И двете |
Бележки относно флаговете (потвърдени в източника на командата):
- `--remote <url>` — извлича каталога от отдалечен OmniRoute (презаписва `--port`
и активния контекст). `--api-key <key>` предоставя удостоверителните данни за този
сървър (по подразбиране е `OMNIROUTE_API_KEY` променливата на средата или токена на активния контекст).
- `--only <patterns>` — низове, разделени с запетаи; запазва само идентификаторите на моделите, които съвпадат
(например `--only glm,kimi`). Наличен на `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — отпечатва точно какво би било записано, без да засяга
файловата система. Наличен на всяка команда `setup-*` **освен** `setup-cursor`
(която никога не записва файл).
- `--model <id>` — задължителен (или избран интерактивно) за инструментите, които нямат
автоматично откриване на модел: Cline, Kilo, Roo, Goose, Qwen, Aider. Тези инструменти
също приемат `--yes` за неинтерактивни изпълнения (което след това изисква `--model`).
`setup-opencode` приема `--model`, за да зададе основния модел на най-високо ниво.
- `--model <id>` на `omniroute run` следва свързването на манифеста за всяка цел
(`bin/cli/cli-manifest.mjs`): **aider** получава `--model openai/<id>` и
**opencode** `--model omniroute/<id>` (префиксът се добавя само когато идентификаторът
не го носи); **qwen** и **gemini** получават идентификатора без промяна;
**claude** го получава чрез `ANTHROPIC_MODEL`, **goose** чрез `GOOSE_MODEL`, а
**codex** чрез `-c model_providers.omniroute.*` аргументи. **Qwen е единствената цел за изпълнение, която изисква `--model`**`omniroute run qwen` без него излиза
`2` с явна грешка.
- `--port <port>` — локален порт на OmniRoute (по подразбиране `20128`, игнорира се, когато е зададен `--remote`).
Наличен на всички `setup-*` и двата стартера.
- Кодове за изход на `omniroute run`: изходният код на детското CLI се предава
без промяна; `2` = невалидни аргументи (неподдържана цел, липсващ задължителен
`--model`, защитник на контейнера); `127` = целевият бинарен файл не е в `PATH`;
`130`/`143`/`129`, когато стартирането е прекратено от `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = друга грешка при стартиране.
- Двата стартера (`launch`, `launch-codex`) приемат `--profile <name>` за избор
на профил, написан от `setup-claude` / `setup-codex`, плюс аргументи за
предаване за основния бинарен файл `claude` / `codex`.
Интерактивният селектор също се споделя от рецептите за настройка:
```bash
# Изберете от активния локален или отдалечен каталог на модели и конфигурирайте целта.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` в момента делегира на тестваните рецепти за `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue` и `kilo`. Записите само за IDE,
MITM и само за ръководства остават явни `setup-*`/ръчни потоци и не се представят като целеви за стартиране.
> `setup-opencode` е **леката интеграция, съвместима с openai** OpenCode.
> Има и по-богата интеграция с плъгин — `omniroute setup opencode` — която
> инсталира `@omniroute/opencode-plugin`. Те са различни команди; таблицата
> по-горе документира `setup-opencode`.
---
## Локално използване
С OmniRoute, работещ на `localhost:20128`, просто стартирайте командата за настройка на вашия инструмент. Каталогът се извлича от локалния сървър.
```bash
# Codex: пише профил за всяка съвпаднала модел в ~/.codex/
omniroute setup-codex
codex --profile glm52 # използвайте генериран профил
# Claude Code: пише профили за всеки модел, след което стартира един
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: пише съвместим с openai доставчик с всички модели от каталога
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # реферирано чрез {env:OMNIROUTE_API_KEY}, никога на диск
opencode -m omniroute/glm/glm-5.2 "..."
# Инструменти без автоматично откриване се нуждаят от явен модел:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Преглед без записване на нищо:
omniroute setup-continue --dry-run
```
Стартирайте без записване на никаква конфигурация (само инжектиране на среда):
```bash
omniroute launch # Claude Code → локален OmniRoute
omniroute launch-codex # Codex CLI → локален OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Ясен път на командата: предайте всичко, което идва след --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Отдалечено използване
Посочете всяка команда за настройка на отдалечен OmniRoute с `--remote` + `--api-key`. Каталогът се извлича от отдалеченото; конфигурацията се записва на вашия локален компютър.
```bash
# OpenCode срещу отдалечен VPS, запазете само glm/kimi модели
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # първо експортирайте OMNIROUTE_API_KEY
# Профили Codex от отдалечен каталог
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Стартирайте CLI директно срещу отдалеченото
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Вместо да предавате `--remote`/`--api-key` всеки път, влезте веднъж и оставете **активния контекст** да ги предоставя автоматично:
```bash
omniroute connect 192.168.0.15 # генерира ограничен токен, съхранява контекста
omniroute setup-codex # ← сега използва отдалечения каталог
omniroute setup-opencode # ← същото
omniroute launch # ← Claude Code срещу отдалеченото
```
Вижте [Отдалечен режим](./REMOTE-MODE.md) за контексти, обхвати и управление на токени.
---
## Конвенции за основен URL (които инструменти искат `/v1`)
OmniRoute излага OpenAI интерфейса на `/v1`, Anthropic интерфейса на корена, и местен Gemini интерфейс на `/v1beta`. Всяка интеграция е свързана с формата, който инструментът очаква (потвърдено в източника на командата):
| Интеграция | Основен URL написан | `/v1`? |
| -------------------------------------------------------------------------- | ------------------- | ------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | корен | Не — Cline добавя `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | корен | Не — Goose добавя пътя |
| `setup-aider` (`OPENAI_API_BASE`) | корен | Не — LiteLLM добавя `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | с `/v1` | Да |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | корен | Не — Claude Code добавя `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | с `/v1` | Да |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | с `/v1` | Да |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | корен | Не — SDK добавя `/v1beta/models/…` |
---
## Поддържане на местни зависимости при актуализация: `--include=optional`
Когато актуализирате с `omniroute update` (след потвърждение или с `--apply`),
OmniRoute изпълнява инсталацията с вградена опция `--include=optional`:
```bash
npm install -g omniroute@latest --include=optional
```
Това **не е** флаг, който предавате на `omniroute update` — той винаги се прилага от
актуализатора. Това гарантира, че `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM стекът) оцеляват при актуализация, дори ако вашата npm конфигурация
има зададено `omit=optional`, което в противен случай тихо би премахнало местния SQLite
драйвер и свързването с OS-keyring. За да прегледате точната команда без прилагане:
```bash
omniroute update --dry-run
# [DRY RUN] Ще изпълни: npm install -g omniroute@latest --include=optional
```
Други флагове на `omniroute update` (потвърдени в източника): `--check` (изход 1, ако
остарял), `--apply` (инсталира без подканване), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI чрез `omniroute run gemini`
Договорът е потвърден спрямо `@google/gemini-cli` 0.50.0: CLI-то уважава
`GOOGLE_GEMINI_BASE_URL` и издава `POST /v1beta/models/<model>:generateContent`
`:streamGenerateContent?alt=sse`) срещу него — точно така, както е местната
Gemini повърхност на OmniRoute (`/v1beta`). `omniroute run gemini` автоматично
свързва това:
- `GOOGLE_GEMINI_BASE_URL` → активният базов URL на OmniRoute (корен, без `/v1`);
- `GEMINI_API_KEY` → разрешените идентификационни данни на OmniRoute (опция/среда/контекст);
- **временен изолиран `GEMINI_CLI_HOME`**, чийто `.gemini/settings.json`
избира `gemini-api-key` удостоверяване, така че съхранената Google OAuth сесия (Code Assist)
никога да не замества стартирането, насочено от OmniRoute — премахва се след изход;
- **чистота на средата**: детската среда е почистена от `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` и `GOOGLE_GENAI_USE_GCA` (които биха пренасочили
удостоверяването към Vertex/Code Assist), и `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` е
зададено като резервен вариант — другите цели на `run` получават същото
третиране за техните конфликтни променливи;
- инжектиране на `--model <id>` от `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Пазачът на доверие на работното пространство на Gemini все още важи в безглав режим — предайте
`--skip-trust` (или доверете директорията интерактивно) сами; стартерът
умишлено не го заобикаля. Този стартер е различен от **регистрацията на ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), която остава интеграция на агент-протокол за `/dashboard/acp-agents`.
---
## Истинско почистване на дим (по избор)
Детерминираният план за стартиране на регресия се изпълнява в CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). За да валидирате ИСТИНСКИТЕ бинарни файлове спрямо ИСТИНСКИ
сървър на OmniRoute, съществува опционален хъб на
`tests/integration/upstream-cli-smoke.int.test.ts`. Той никога не се изпълнява автоматично
(всяко под-тест пропуска, освен ако `RUN_CLI_SMOKE=1`), предава удостоверението чрез променлива на средата
NAME (никога по стойност), цензурира ключоподобни низове от всякакъв записан изход, пропуска
цели, чийто бинарен файл не е инсталиран, и класифицира неуспехите като
удостоверяване / upstream / конфигурация вместо просто булева стойност:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Опционално: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` ограничава почистването;
`OMNIROUTE_SMOKE_TIMEOUT_MS` заменя 120-секундния таймаут за всяка цел.
## Вижте също
- [Конфигурация на Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — по-дълбокото ръководство за Claude Code
- [Конфигурация на Codex CLI](./CODEX-CLI-CONFIGURATION.md) — еднократната основна настройка `[model_providers.omniroute]`
- [Отдалечен режим](./REMOTE-MODE.md) — контексти, ограничени токени за достъп, управление на отдалечен сървър
- [Справочник на CLI инструментите](../reference/CLI-TOOLS.md) — пълният каталог на поддържаните инструменти + страници на таблото
- [Ръководство за настройка](./SETUP_GUIDE.md) — методи за инсталиране и първоначално запознаване

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,262 +0,0 @@
# CLI-INTEGRATIONS (বাংলা)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI ইন্টিগ্রেশন — OmniRoute-এ যেকোন কোডিং CLI নির্দেশ করুন"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI ইন্টিগ্রেশন
OmniRoute একটি `setup-*` কমান্ডের পরিবার সরবরাহ করে যা একটি কোডিং CLI (Codex, Claude Code, OpenCode, Cline, …) কে OmniRoute-কে তার ব্যাকএন্ড হিসেবে ব্যবহার করতে কনফিগার করে — তাই টুলটি **একটি** এন্ডপয়েন্টের সাথে কথা বলে এবং OmniRoute সঠিক প্রদানকারীর কাছে রাউট করে স্বয়ংক্রিয়ভাবে ফallback করে। প্রতিটি কমান্ড একটি চলমান OmniRoute (স্থানীয় বা দূরবর্তী) থেকে **লাইভ** মডেল ক্যাটালগ পড়ে এবং টুলের নিজস্ব কনফিগারেশন ফাইল **আপনার** মেশিনে লেখে। API কী একটি পরিবেশ ভেরিয়েবলের মাধ্যমে উল্লেখ করা হয় যেখানে টুলটি এটি সমর্থন করে। টুল-স্থানীয় পরিবেশ ফাইল সংরক্ষণকারী কমান্ডগুলি নিচে উল্লেখ করা হয়েছে।
একটি সাধারণ লঞ্চারও রয়েছে — `omniroute run <target>` — যা সঠিক পরিবেশ ইনজেক্ট করে `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` বা `gemini` চালু করে, কোন কনফিগারেশন লেখার প্রয়োজন ছাড়াই। টার্গেট এবং তাদের উপনামগুলি ক্যানোনিক্যাল ম্যানিফেস্ট `bin/cli/cli-manifest.mjs` থেকে আসে (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), এবং `omniroute completion` একই ম্যানিফেস্ট-উৎপন্ন টার্গেট শব্দগুলি অফার করে। পুরানো প্রতি-টুল লঞ্চারগুলি — `omniroute launch` (Claude Code) এবং `omniroute launch-codex` (Codex) — উপলব্ধ রয়েছে।
প্রদানকারী অনবোর্ডিং একই স্থানীয়/দূরবর্তী প্রসঙ্গে উপলব্ধ। নিচের API-প্রথম কমান্ডগুলি ব্যবস্থাপনা প্রমাণীকরণকে প্রদানকারী শংসাপত্র থেকে আলাদা রাখে এবং কখনও একটি শংসাপত্র কাঠামোগত আউটপুটে মুদ্রণ করে না:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
স্ক্রিপ্টের জন্য, `--credential-stdin` বা `--credential-env` পছন্দ করুন; `--credential` নিয়ন্ত্রিত স্থানীয় ব্যবহারের জন্য রাখা হয়েছে। `providers remove` একটি অ-ইন্টারঅ্যাকটিভ টার্মিনালে `--yes` প্রয়োজন, এবং সমস্ত পাঁচটি কমান্ড সক্রিয় প্রসঙ্গ বা গ্লোবাল `--base-url`/`--api-key` বিকল্পগুলিকে সম্মান করে।
দুইটি সবচেয়ে সমৃদ্ধ ইন্টিগ্রেশনের একবারের জন্য, হাতে লেখা বেস সেটআপের জন্য, প্রতি-টুল গভীর ডাইভগুলি দেখুন:
- [Claude Code কনফিগারেশন](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI কনফিগারেশন](./CODEX-CLI-CONFIGURATION.md)
- [দূরবর্তী মোড](./REMOTE-MODE.md) — আপনার ল্যাপটপ থেকে একটি দূরবর্তী OmniRoute (VPS / Tailnet) চালান
- [VS Code Copilot চ্যাট](./VSCODE-COPILOT.md) — OmniCopilot এক্সটেনশন; এটি সম্পাদক থেকে আপনার জন্য এই `setup-*` কমান্ডগুলি চালাতে পারে
---
## মাস্টার টেবিল
প্রতিটি কমান্ড **সক্রিয় প্রসঙ্গ** (যা `omniroute connect` দিয়ে সেট করা হয়, দেখুন [দূরবর্তী মোড](./REMOTE-MODE.md)) বা স্পষ্ট `--remote <url> --api-key <key>` ফ্ল্যাগগুলি সম্মান করে। "স্থানীয় বনাম দূরবর্তী" নিচে মানে: কোন ফ্ল্যাগ ছাড়া এটি `http://localhost:20128` লক্ষ্য করে; `--remote` (অথবা একটি সক্রিয় দূরবর্তী প্রসঙ্গ) সহ এটি সেই সার্ভার থেকে ক্যাটালগ নিয়ে আসে এবং স্থানীয়ভাবে কনফিগারেশন লেখে।
| কমান্ড | টুল | এটি কি লেখে | মূল ফ্ল্যাগগুলি | স্থানীয় বনাম দূরবর্তী |
| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — একটি সামঞ্জস্যপূর্ণ টেক্সট মডেলের জন্য একটি প্রোফাইল (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | উভয় |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — মিলে যাওয়া মডেলের জন্য একটি প্রোফাইল (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | উভয় |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json` — প্রতিটি ক্যাটালগ মডেলের জন্য `omniroute` প্রদানকারী (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | উভয় |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI মোড) + VS Code এক্সটেনশনের সেটিংস মুদ্রণ করে | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | উভয় |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + যদি উপস্থিত থাকে তবে `kilocode.*` কে VS Code `settings.json` এ মিশ্রিত করে | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | উভয় |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` মডেল, কী `${{ secrets.OMNIROUTE_API_KEY }}` এর মাধ্যমে | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | উভয় |
| `omniroute setup-cursor` | Cursor | কিছুই নয় — ইন-অ্যাপ পদক্ষেপ মুদ্রণ করে (Cursor কনফিগারেশন অস্বচ্ছ SQLite) | `--remote` `--api-key` `--only` `--port` | উভয় |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (আমদানি নথি) + যদি একটি VS Code `settings.json` বিদ্যমান থাকে তবে `roo-cline.autoImportSettingsPath` সেট করে | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | উভয় |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` প্রদানকারী, কী `$OMNIROUTE_API_KEY` এর মাধ্যমে | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | উভয় |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + পরিবেশ রেসিপি মুদ্রণ করে | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | উভয় |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + পরিবেশ রেসিপি মুদ্রণ করে | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | উভয় |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` অ্যারে + `OMNIROUTE_API_KEY` `~/.qwen/.env` এ | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | উভয় |
| `omniroute run <target>` | রানটাইম লঞ্চ (সাধারণ) | কিছুই নয় — সঠিক পরিবেশ এবং আর্গুমেন্ট সহ `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` চালু করে; Qwen এবং Gemini একটি অস্থায়ী বিচ্ছিন্ন বাড়ি ব্যবহার করে | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | উভয় |
| `omniroute launch` | Claude Code | কিছুই নয় — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` ইনজেক্ট করে `claude` চালু করে | `--remote` `--api-key` `--token` `--profile` `--port` | উভয় |
| `omniroute launch-codex` | OpenAI Codex CLI | কিছুই নয় — `-c` ফ্ল্যাগের মাধ্যমে `omniroute` প্রদানকারী ইনজেক্ট করে `codex` চালু করে | `--remote` `--api-key` `--profile` (`-p`) `--port` | উভয় |
ফ্ল্যাগগুলির উপর নোট (কমান্ড সোর্সে যাচাই করা হয়েছে):
- `--remote <url>` — একটি দূরবর্তী OmniRoute থেকে ক্যাটালগ নিয়ে আসে (এটি `--port` এবং সক্রিয় প্রসঙ্গকে অতিক্রম করে)। `--api-key <key>` সেই সার্ভারের জন্য শংসাপত্র সরবরাহ করে (ডিফল্টভাবে `OMNIROUTE_API_KEY` পরিবেশ ভেরিয়েবল, অথবা সক্রিয় প্রসঙ্গের টোকেন)।
- `--only <patterns>` — কমা দ্বারা পৃথক সাবস্ট্রিং; শুধুমাত্র মডেল আইডি রাখুন যা মেলে (যেমন `--only glm,kimi`)। উপলব্ধ `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` এ।
- `--dry-run` — ফাইল সিস্টেমে স্পর্শ না করে ঠিক কি লেখা হবে তা মুদ্রণ করে। প্রতিটি `setup-*` কমান্ডে উপলব্ধ **ছাড়া** `setup-cursor` (যা কখনও একটি ফাইল লেখে না)।
- `--model <id>` — প্রয়োজনীয় (অথবা ইন্টারঅ্যাকটিভভাবে নির্বাচিত) টুলগুলির জন্য যাদের মডেল স্বয়ংক্রিয় আবিষ্কার নেই: Cline, Kilo, Roo, Goose, Qwen, Aider। সেই টুলগুলি `--yes` গ্রহণ করে অ-ইন্টারঅ্যাকটিভ রানগুলির জন্য (যা তখন `--model` প্রয়োজন)। `setup-opencode` ডিফল্ট শীর্ষ স্তরের মডেল সেট করতে `--model` গ্রহণ করে।
- `--model <id>` `omniroute run` এ ম্যানিফেস্টের প্রতি-টার্গেট ওয়্যারিং অনুসরণ করে (`bin/cli/cli-manifest.mjs`): **aider** `--model openai/<id>` এবং **opencode** `--model omniroute/<id>` গ্রহণ করে (প্রিফিক্সটি কেবল তখনই যোগ করা হয় যখন আইডিটি ইতিমধ্যে এটি বহন করে না); **qwen** এবং **gemini** আইডিটি যথাযথভাবে গ্রহণ করে; **claude** এটি `ANTHROPIC_MODEL` এর মাধ্যমে পায়, **goose** `GOOSE_MODEL` এর মাধ্যমে, এবং **codex** `-c model_providers.omniroute.*` আর্গুমেন্টের মাধ্যমে। **Qwen হল একমাত্র রান টার্গেট যা কঠোরভাবে `--model` প্রয়োজন**`omniroute run qwen` ছাড়া এটি `2` এর সাথে একটি স্পষ্ট ত্রুটি সহ বেরিয়ে আসে।
- `--port <port>` — স্থানীয় OmniRoute পোর্ট (ডিফল্ট `20128`, যখন `--remote` সেট করা হয় তখন উপেক্ষা করা হয়)। সমস্ত `setup-*` এবং উভয় লঞ্চারে উপস্থিত।
- `omniroute run` প্রস্থান কোড: শিশু CLI-এর নিজস্ব প্রস্থান কোড সঠিকভাবে প্রচারিত হয়; `2` = অবৈধ আর্গুমেন্ট (সমর্থিত টার্গেট, প্রয়োজনীয় `--model` অনুপস্থিত, কন্টেইনার গার্ড); `127` = টার্গেট বাইনারি `PATH` এ নেই; `130`/`143`/`129` যখন লঞ্চটি `SIGINT`/`SIGTERM`/`SIGHUP` দ্বারা শেষ হয়; `1` = অন্যান্য রানটাইম লঞ্চ ব্যর্থতা।
- দুটি লঞ্চার (`launch`, `launch-codex`) `setup-claude` / `setup-codex` দ্বারা লেখা একটি প্রোফাইল নির্বাচন করতে `--profile <name>` গ্রহণ করে, পাশাপাশি মৌলিক `claude` / `codex` বাইনারির জন্য পাস-থ্রু আর্গুমেন্ট।
ইন্টারঅ্যাকটিভ পিকারটি সেটআপ রেসিপিগুলির দ্বারা শেয়ার করা হয়:
```bash
# সক্রিয় স্থানীয় বা দূরবর্তী মডেল ক্যাটালগ থেকে নির্বাচন করুন এবং টার্গেট কনফিগার করুন।
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` বর্তমানে `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, এবং `kilo` এর জন্য পরীক্ষিত রেসিপিগুলিতে অর্পিত। IDE-শুধুমাত্র, MITM, এবং গাইড-শুধুমাত্র ক্যাটালগ এন্ট্রি স্পষ্ট `setup-*`/ম্যানুয়াল প্রবাহ হিসাবে রয়ে যায় এবং লঞ্চযোগ্য টার্গেট হিসাবে উপস্থাপন করা হয় না।
> `setup-opencode` হল **হালকা ওজনের openai-সামঞ্জস্যপূর্ণ** OpenCode ইন্টিগ্রেশন।
> একটি সমৃদ্ধ প্লাগইন ইন্টিগ্রেশনও রয়েছে — `omniroute setup opencode` — যা `@omniroute/opencode-plugin` ইনস্টল করে। এগুলি ভিন্ন কমান্ড; উপরের টেবিলটি `setup-opencode` ডকুমেন্ট করে।
---
## স্থানীয় ব্যবহার
`localhost:20128` এ OmniRoute চলমান থাকলে, আপনার টুলের জন্য কনফিগারেশন কমান্ড চালান। ক্যাটালগ স্থানীয় সার্ভার থেকে নেওয়া হয়।
```bash
# Codex: মেলানো মডেলের জন্য ~/.codex/ এ একটি প্রোফাইল লিখুন
omniroute setup-codex
codex --profile glm52 # একটি তৈরি করা প্রোফাইল ব্যবহার করুন
# Claude Code: মডেল অনুযায়ী প্রোফাইল লিখুন, তারপর একটি চালু করুন
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: সমস্ত ক্যাটালগ মডেল সহ openai-সঙ্গত প্রদানকারী লিখুন
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} এর মাধ্যমে উল্লেখ করা হয়েছে, কখনও ডিস্কে নয়
opencode -m omniroute/glm/glm-5.2 "..."
# স্বয়ংক্রিয় আবিষ্কার ছাড়া টুলগুলির জন্য একটি স্পষ্ট মডেল প্রয়োজন:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# কিছু লিখা ছাড়াই প্রিভিউ:
omniroute setup-continue --dry-run
```
কোনও কনফিগারেশন লিখা ছাড়াই চালু করুন (শুধু env-injection):
```bash
omniroute launch # Claude Code → স্থানীয় OmniRoute
omniroute launch-codex # Codex CLI → স্থানীয় OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# স্পষ্ট কমান্ড পাথ: -- এর পরে যা আসে তা পাস করুন
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## দূরবর্তী ব্যবহার
কোনও কনফিগারেশন কমান্ডকে একটি দূরবর্তী OmniRoute এ `--remote` + `--api-key` দিয়ে নির্দেশ করুন। ক্যাটালগ দূরবর্তী থেকে নেওয়া হয়; কনফিগারেশন আপনার স্থানীয় মেশিনে লেখা হয়।
```bash
# একটি দূরবর্তী VPS এর বিরুদ্ধে OpenCode, শুধুমাত্র glm/kimi মডেল রাখুন
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # প্রথমে OMNIROUTE_API_KEY রপ্তানী করুন
# একটি দূরবর্তী ক্যাটালগ থেকে Codex প্রোফাইল
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# সরাসরি দূরবর্তী বিরুদ্ধে একটি CLI চালু করুন
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
প্রতিবার `--remote`/`--api-key` পাস করার পরিবর্তে, একবার লগ ইন করুন এবং **সক্রিয় প্রসঙ্গ** তাদের স্বয়ংক্রিয়ভাবে সরবরাহ করতে দিন:
```bash
omniroute connect 192.168.0.15 # একটি স্কোপড টোকেন তৈরি করে, প্রসঙ্গ সংরক্ষণ করে
omniroute setup-codex # ← এখন দূরবর্তী ক্যাটালগ ব্যবহার করে
omniroute setup-opencode # ← একই
omniroute launch # ← Claude Code দূরবর্তী বিরুদ্ধে
```
প্রসঙ্গ, স্কোপ এবং টোকেন ব্যবস্থাপনার জন্য [দূরবর্তী মোড](./REMOTE-MODE.md) দেখুন।
---
## বেস URL কনভেনশন (যা টুলগুলি `/v1` চায়)
OmniRoute `/v1` এ OpenAI পৃষ্ঠাটি প্রকাশ করে, মূল পৃষ্ঠায় Anthropic পৃষ্ঠাটি এবং `/v1beta` এ একটি স্থানীয় Gemini পৃষ্ঠাটি। প্রতিটি ইন্টিগ্রেশন তার টুলের প্রত্যাশিত ফর্মে সংযুক্ত (কমান্ড সোর্সে যাচাই করা হয়েছে):
| ইন্টিগ্রেশন | বেস URL লেখা | `/v1`? |
| -------------------------------------------------------------------------- | ------------ | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | মূল | না — Cline `/v1/chat/completions` যোগ করে |
| `setup-goose` (`OPENAI_HOST`) | মূল | না — Goose পাথ যোগ করে |
| `setup-aider` (`OPENAI_API_BASE`) | মূল | না — LiteLLM `/v1/chat/completions` যোগ করে |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` সহ | হ্যাঁ |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | মূল | না — Claude Code `/v1/messages` যোগ করে |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` সহ | হ্যাঁ |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` সহ | হ্যাঁ |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | মূল | না — SDK `/v1beta/models/…` যোগ করে |
---
## নেটিভ ডিপেন্ডেন্সি আপডেট রাখা: `--include=optional`
যখন আপনি `omniroute update` দিয়ে আপডেট করেন (নিশ্চিত করার পরে, অথবা `--apply` দিয়ে),
OmniRoute `--include=optional` সহ ইনস্টল চালায়:
```bash
npm install -g omniroute@latest --include=optional
```
এটি `omniroute update` এ আপনি যে ফ্ল্যাগটি পাস করেন তা **নয়** — এটি সর্বদা আপডেটারের দ্বারা প্রয়োগ করা হয়। এটি নিশ্চিত করে যে `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM স্ট্যাক) আপডেটের সময় টিকে থাকে, এমনকি যদি আপনার npm কনফিগারেশনে
`omit=optional` সেট করা থাকে, যা অন্যথায় নীরবে নেটিভ SQLite ড্রাইভার এবং OS-keyring বাইন্ডিং মুছে ফেলবে। সঠিক কমান্ডটি প্রিভিউ করতে, প্রয়োগ না করে:
```bash
omniroute update --dry-run
# [DRY RUN] চালানো হবে: npm install -g omniroute@latest --include=optional
```
অন্যান্য `omniroute update` ফ্ল্যাগ (সোর্সে যাচাই করা হয়েছে): `--check` (পুরনো হলে 1 এ বেরিয়ে যাবে), `--apply` (প্রম্পট ছাড়াই ইনস্টল), `--changelog`, `--no-backup`,
`--yes`
---
## Google Gemini CLI `omniroute run gemini` এর মাধ্যমে
`@google/gemini-cli` 0.50.0 এর বিরুদ্ধে চুক্তি যাচাই করা হয়েছে: CLI `GOOGLE_GEMINI_BASE_URL` কে সম্মান করে
এবং `POST /v1beta/models/<model>:generateContent`
(এবং `:streamGenerateContent?alt=sse`) এর বিরুদ্ধে জারি করে — ঠিক OmniRoute এর নেটিভ
Gemini সারফেস (`/v1beta`)। `omniroute run gemini` এটি স্বয়ংক্রিয়ভাবে সংযুক্ত করে:
- `GOOGLE_GEMINI_BASE_URL` → সক্রিয় OmniRoute বেস URL (মূল, `/v1` নেই);
- `GEMINI_API_KEY` → সমাধানকৃত OmniRoute শংসাপত্র (অপশন/env/প্রেক্ষাপট);
- একটি **অস্থায়ী বিচ্ছিন্ন `GEMINI_CLI_HOME`** যার `.gemini/settings.json`
`gemini-api-key` প্রমাণীকরণ নির্বাচন করে, যাতে একটি সংরক্ষিত Google OAuth সেশন (Code Assist)
কখনও OmniRoute-নির্দেশিত লঞ্চকে অতিক্রম না করে — প্রস্থান করার পরে মুছে ফেলা হয়;
- **env স্বাস্থ্যবিধি**: শিশু পরিবেশ `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` এবং `GOOGLE_GENAI_USE_GCA` থেকে পরিষ্কার করা হয় (যা প্রমাণীকরণকে
Vertex/Code Assist এ পুনঃনির্দেশ করবে), এবং `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` একটি
বেল্ট-এবং-সাসপেন্ডার ব্যাকআপ হিসাবে সেট করা হয় — অন্যান্য `run` লক্ষ্য তাদের নিজস্ব
বিরোধী ভেরিয়েবলের জন্য একই চিকিত্সা পায়;
- `--model <id>` ইনজেকশন `--provider`/`--model` থেকে।
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini এর কর্মস্থান-ভরসা গার্ড এখনও হেডলেস মোডে প্রযোজ্য — `--skip-trust` পাস করুন
(অথবা ইন্টারেক্টিভভাবে ডিরেক্টরিটি বিশ্বাস করুন); লঞ্চার এটি বাইপাস করতে ইচ্ছাকৃতভাবে করে না। এই লঞ্চার **ACP নিবন্ধন** (`src/lib/acp/registry.ts`, `gemini --acp`) থেকে আলাদা,
যা `/dashboard/acp-agents` এর জন্য এজেন্ট-প্রোটোকল ইন্টিগ্রেশন হিসেবে রয়ে যায়।
---
## বাস্তব ধোঁয়াSweep (অপ্ট-ইন)
CI তে নির্ধারক লঞ্চ-প্ল্যান রিগ্রেশন চালায় (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`)। একটি বাস্তব OmniRoute সার্ভারের বিরুদ্ধে REAL বাইনারিগুলি যাচাই করতে,
একটি অপ্ট-ইন হার্নেস রয়েছে `tests/integration/upstream-cli-smoke.int.test.ts` এ। এটি স্বয়ংক্রিয়ভাবে কখনও চলে না
(প্রতিটি সাব-টেস্ট `RUN_CLI_SMOKE=1` ছাড়া স্কিপ করে), পরিবেশ-ভেরিয়েবল
নাম দ্বারা শংসাপত্রটি পাস করে (মূল্য দ্বারা কখনও নয়), রেকর্ড করা আউটপুট থেকে কী-আকৃতির স্ট্রিংগুলি মুছে ফেলে, ইনস্টল করা নেই এমন বাইনারির লক্ষ্যগুলি স্কিপ করে, এবং ব্যর্থতাগুলিকে
প্রমাণীকরণ / আপস্ট্রিম / কনফিগারেশন হিসাবে শ্রেণীবদ্ধ করে, একটি খালি বুলিয়ান নয়:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
ঐচ্ছিক: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` Sweep সীমাবদ্ধ করে;
`OMNIROUTE_SMOKE_TIMEOUT_MS` প্রতি লক্ষ্য 120 সেকেন্ডের টাইমআউটকে ওভাররাইড করে।
## আরও দেখুন
- [Claude Code কনফিগারেশন](./CLAUDE-CODE-CONFIGURATION.md) — গভীর Claude Code গাইড
- [Codex CLI কনফিগারেশন](./CODEX-CLI-CONFIGURATION.md) — একবারের জন্য `[model_providers.omniroute]` বেস সেটআপ
- [রিমোট মোড](./REMOTE-MODE.md) — প্রসঙ্গ, স্কোপড অ্যাক্সেস টোকেন, একটি রিমোট সার্ভার চালানো
- [CLI টুলস রেফারেন্স](../reference/CLI-TOOLS.md) — সমর্থিত টুলগুলোর পূর্ণ ক্যাটালগ + ড্যাশবোর্ড পৃষ্ঠা
- [সেটআপ গাইড](./SETUP_GUIDE.md) — ইনস্টল পদ্ধতি এবং প্রথমবারের অনবোর্ডিং

View File

@@ -1,326 +1,86 @@
# CLI-TOOLS (বাংলা)
# CLI Tools Setup Guide — OmniRoute (বাংলা)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Tools — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Tools — OmniRoute
শেষ আপডেট: 2026-08-18
OmniRoute তিনটি ক্যাটাগরির CLI টুলের সাথে সংযুক্ত যা তিনটি নির্দিষ্ট ড্যাশবোর্ড পৃষ্ঠায় ছড়িয়ে রয়েছে:
| পৃষ্ঠা | রুট | ধারণা | সংখ্যা |
| --------------- | ----------------------- | -------------------------------------------------------------------------------------- | ------------------ |
| **CLI কোডের** | `/dashboard/cli-code` | কোডিং টুল যা আপনি OmniRoute এ নির্দেশ করেন (ক্লায়েন্ট → CLI → OmniRoute → প্রদানকারী) | 26 |
| **CLI এজেন্টস** | `/dashboard/cli-agents` | স্বায়ত্তশাসিত এজেন্ট যা আপনি OmniRoute এ নির্দেশ করেন (একই প্রবাহ, বিস্তৃত পরিধি) | 8 |
| **ACP এজেন্টস** | `/dashboard/acp-agents` | CLIs যা OmniRoute ব্যাকএন্ড হিসেবে stdio/ACP এর মাধ্যমে তৈরি করে (বিপরীত প্রবাহ) | রেজিস্ট্রিতে দেখুন |
লিগ্যাসি রুটগুলি 308 এর মাধ্যমে পুনঃনির্দেশ করে: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## এটি কিভাবে কাজ করে
## How It Works
```
CLI কোডের / CLI এজেন্টস (ব্যবহার প্রবাহ):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (সব OmniRoute এ নির্দেশ করে)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute সঠিক প্রদানকারীর কাছে রুট করে)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP এজেন্টস (বিপরীত স্পন প্রবাহ):
ক্লায়েন্টের অনুরোধ → OmniRoute → stdio/ACP এর মাধ্যমে CLI তৈরি করে → প্রতিক্রিয়া
```
**সুবিধাসমূহ:**
**Benefits:**
- সমস্ত টুল পরিচালনার জন্য একটি API কী
- ড্যাশবোর্ডে সমস্ত CLI এর মধ্যে খরচ ট্র্যাকিং
- প্রতিটি টুল পুনঃকনফিগার না করেই মডেল পরিবর্তন
- স্থানীয় এবং দূরবর্তী সার্ভারে কাজ করে (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*` এর সাথে স্বয়ংক্রিয় কনফিগার করুন
## Supported Tools (Dashboard Source of Truth)
আপনাকে প্রতিটি টুলের কনফিগারেশন হাতে লিখতে হবে না। OmniRoute একটি `setup-*`
কমান্ড সরবরাহ করে প্রতি সমর্থিত CLI এর জন্য যা একটি চলমান
OmniRoute (স্থানীয় বা দূরবর্তী) থেকে **লাইভ** মডেল ক্যাটালগ পড়ে এবং আপনার মেশিনে টুলের নিজস্ব কনফিগারেশন লেখে:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
প্রতিটি `--remote <url> --api-key <key>` গ্রহণ করে (একটি স্থানীয় টুলকে একটি
দূরবর্তী OmniRoute এর বিরুদ্ধে কনফিগার করতে), `--dry-run` (লেখার আগে প্রিভিউ), এবং `--port`। মডেল স্বয়ংক্রিয় আবিষ্কার ছাড়া টুলগুলি (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` গ্রহণ করে (এবং `--yes` অ-ইন্টারঅ্যাকটিভ রানগুলির জন্য)। সঠিক পরিবেশ ইনজেক্ট করে এবং কোনও কনফিগারেশন লেখা ছাড়াই একটি CLI চালু করতে, সাধারণ
`omniroute run <target>` লঞ্চার ব্যবহার করুন (claude, codex, aider, goose, opencode, qwen,
gemini — লক্ষ্য এবং উপনামগুলি `bin/cli/cli-manifest.mjs` থেকে আসে); লিগ্যাসি
প্রতি-টুল লঞ্চারগুলি `omniroute launch` (Claude Code) এবং `omniroute launch-codex`
(Codex) উপলব্ধ রয়েছে। Gemini CLI শুধুমাত্র লঞ্চ-অনলি: এটি একটি `omniroute run`
লক্ষ্য কিন্তু এর কোনও `setup-*`/`configure` রেসিপি নেই।
### CLI fingerprint sync (Agents + Settings)
> **সম্পূর্ণ রেফারেন্স:** মাস্টার টেবিল — প্রতিটি কমান্ড কী লেখে, প্রতিটি পতাকা,
> স্থানীয় বনাম দূরবর্তী, এবং কোন টুলগুলি `/v1` সাফিক্স চায় — এটি
> **[CLI Integrations](../guides/CLI-INTEGRATIONS.md)** এ রয়েছে।
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### একটি কনটেইনারের ভিতরে এগুলি চালানো
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute কনটেইনারের ভিতরে কার্যকর করা একটি `setup-*` কমান্ড কনটেইনারের নিজস্ব হোমে লেখে, যা কোনও হোস্ট CLI পড়ে না এবং যা কনটেইনারের সাথে অদৃশ্য হয়ে যায়। OmniRoute এটি সনাক্ত করে এবং লেখার পরিবর্তে নির্দেশনা সহ `2` এ বেরিয়ে আসে। এগিয়ে যাওয়ার দুটি সমর্থিত উপায় — হোস্টে CLI ইনস্টল করুন এবং
`omniroute connect` কনটেইনারে, অথবা কনফিগারেশন ডিরেক্টরিগুলি বাইন্ড-মাউন্ট করুন এবং `CLI_CONFIG_HOME` সেট করুন (কম্পোজ `host` প্রোফাইল)। প্রতিটি `setup-*` কমান্ড, পাশাপাশি
`omniroute configure` এবং `omniroute config set`, গ্রহণ করে
`--allow-container-write` যখন কনটেইনারের নিজস্ব CLIs কনফিগার করা আপনার আসল উদ্দেশ্য ছিল; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` সার্ভারের জন্য একই কাজ করে। দেখুন
[Docker Guide → Configuring host CLI tools](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker)।
ড্যাশবোর্ডের **প্রয়োগ এন্ডপয়েন্ট** (`POST /api/cli-tools/apply`) একই সুরক্ষা প্রয়োগ করে: একটি কনটেইনারে, একটি লেখার লক্ষ্য যা হোস্ট থেকে বাইন্ড-মাউন্ট করা হয়নি **`422`** এর সাথে উত্তর দেয় `containerEphemeralTarget: true`, নিরাপদ ত্রুটি
টেক্সট এবং — যেসব টুলের একটি হোস্ট রেসিপি রয়েছে (claude, codex, opencode, cline,
kilo, continue) — একটি `hostSetupCommand` (যেমন `omniroute setup-opencode`) যা পরিবর্তে হোস্টে চালাতে হবে; কিছুই লেখা হয় না। `dryRun: true` কনটেইনার মোডে কাজ করে এবং ডিস্কে স্পর্শ না করে উত্পন্ন সামগ্রী + লক্ষ্য পাথ ফেরত দেয়, তাই আপনি ড্যাশবোর্ড থেকে প্রিভিউ করতে পারেন এবং হোস্টে প্রয়োগ করতে পারেন। এই আচরণটি ইচ্ছাকৃত এবং
`tests/unit/api/cli-tools/apply-container-guard.test.ts` দ্বারা রিগ্রেশন-গার্ডেড — কখনও "ফিক্স" করবেন না একটি 422 কে সুরক্ষা অপসারণ করে।
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## সত্যের উৎস
## Step 1 — Get an OmniRoute API Key
একক ক্যাটালগটি `src/shared/constants/cliTools.ts``CLI_TOOLS: Record<string, CliCatalogEntry>` হিসেবে বিদ্যমান।
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
প্রতিটি এন্ট্রির এই ক্ষেত্রগুলি রয়েছে (যা `src/shared/schemas/cliCatalog.ts` এ সংজ্ঞায়িত):
| ক্ষেত্র | প্রকার | বর্ণনা |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------- |
| `category` | `"code" \| "agent"` | টুলটি কোন পৃষ্ঠায় প্রদর্শিত হয় |
| `vendor` | `string` | টুলের উৎস ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP এজেন্ট হিসেবেও ব্যবহারযোগ্য (ব্যাজ প্রদর্শিত) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | কাস্টম এন্ডপয়েন্ট সমর্থন স্তর। `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | কনফিগারেশন প্রক্রিয়া |
| `id`, `name`, `color`, `description`, `docsUrl` | স্ট্যান্ডার্ড | মূল প্রদর্শন ক্ষেত্র |
যেসব এন্ট্রির `baseUrlSupport: "none"` রয়েছে সেগুলি **ড্যাশবোর্ড পৃষ্ঠায় প্রদর্শিত হয় না** — সেগুলি পরিকল্পনা 11 এর জন্য MITM backlog এ নিবন্ধিত হয় (দেখুন `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`)।
### সক্ষমতা স্তর (ক্যাটালগ করা × সনাক্তযোগ্য × কনফিগারযোগ্য × চালু করা যায়)
প্রতিটি ক্যাটালগ করা টুল সনাক্তযোগ্য, কনফিগারযোগ্য বা চালু করা যায় না। প্রতিটি স্তরের একটি
ঘোষণাকারী উৎস রয়েছে, এবং একটি ড্রিফট পরীক্ষা সেগুলিকে সঙ্গতিপূর্ণ রাখে:
| স্তর | অর্থ | ঘোষিত হয়েছে |
| ----------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------ |
| **ক্যাটালগ করা** | ড্যাশবোর্ড ক্যাটালগে প্রদর্শিত হয় (নাম, বিক্রেতা, ডকস, কনফিগ টাইপ) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **সনাক্তযোগ্য** | বাইনারি/কনফিগ সনাক্তকরণ, স্বাস্থ্য পরীক্ষা, কনফিগ পাথ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` রানটাইম ক্যাটালগ) |
| **কনফিগারযোগ্য** | `omniroute configure <cli>` দ্বারা সমর্থিত (সেটআপ রেসিপি বিদ্যমান) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **চালু করা যায়** | `omniroute run <target>` দ্বারা সমর্থিত (env/args ইনজেকশন সংজ্ঞায়িত) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` হল CLI কমান্ডের জন্য ক্যানোনিকাল এক্সিকিউটেবল ম্যানিফেস্ট
পৃষ্ঠাগুলি: `run`, `configure` এবং শেল-সম্পূর্ণতা জেনারেটরগুলি সমস্ত তাদের
লক্ষ্য তালিকা, উপনাম সমাধান (যেমন `kilocode`/`kilo-code`/`kilo_cli``kilo`)
এবং `--model` ফ্ল্যাগ সংযোগ থেকে এটি থেকে উদ্ভূত হয়। ড্রিফট গার্ড
`tests/unit/cli/cli-manifest-drift.test.ts` নিশ্চিত করে যে ম্যানিফেস্ট, রানটাইম
ক্যাটালগ, UI ক্যাটালগ এবং প্রতিটি ভোক্তা পৃষ্ঠাগুলি সিঙ্কে থাকে — একটি লক্ষ্য একটিতে যোগ করা
পৃষ্ঠায় অন্যদের ছাড়া পরীক্ষাটি ব্যর্থ হয়, নিঃশব্দে ড্রিফট করার পরিবর্তে।
## 1. CLI কোডের ক্যাটালগ (২৬টি টুল)
সব টুল যা `/dashboard/cli-code` এ উপস্থিত। যেগুলোর `baseUrlSupport: none` সেগুলো MITM বা একটি ম্যানুয়াল গাইডের মাধ্যমে সংযুক্ত করা হয়েছে কাস্টম বেস URL এর পরিবর্তে:
| id | নাম | বিক্রেতা | baseUrlSupport | configType | acpSpawnable |
| ------------ | --------------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | ক্লড কোড | অ্যানথ্রোপিক | পূর্ণ | env | সত্য |
| codex | OpenAI Codex CLI | OpenAI | পূর্ণ | কাস্টম | সত্য |
| zcode | ZCode (GLM কোডিং পরিকল্পনা) | Z.ai | নেই | কাস্টম | মিথ্যা |
| cline | ক্লাইন | OSS (ex-Claude Dev) | পূর্ণ | কাস্টম | সত্য |
| kilo | কিলো কোড | কিলো-অর্গ | পূর্ণ | কাস্টম | মিথ্যা |
| roo | রু কোড | রু (OSS) | পূর্ণ | গাইড | মিথ্যা |
| continue | কন্টিনিউ | continue.dev | পূর্ণ | গাইড | মিথ্যা |
| aider | এইডার | OSS (P. Gauthier) | পূর্ণ | গাইড | সত্য |
| forge | ফোর্জকোড | অ্যান্টিনমি HQ | পূর্ণ | কাস্টম | সত্য |
| jcode | জেকোড | 1jehuang (OSS) | পূর্ণ | কাস্টম | মিথ্যা |
| deepseek-tui | ডীপসিক TUI | হান্টার বাউন (OSS) | পূর্ণ | কাস্টম | মিথ্যা |
| codewhale | কোডওয়েল | এইচএমবাউন (OSS) | পূর্ণ | কাস্টম | মিথ্যা |
| opencode | ওপেনকোড | অ্যানোমালি (ex-SST) | পূর্ণ | গাইড | সত্য |
| droid | ফ্যাক্টরি ড্রয়েড | ফ্যাক্টরি AI | আংশিক | গাইড | মিথ্যা |
| copilot | গিটহাব কোপাইলট CLI | গিটহাব/MS | পূর্ণ | কাস্টম | মিথ্যা |
| cursor-cli | কার্সর CLI | অ্যানিস্ফিয়ার | আংশিক | গাইড | সত্য |
| smelt | স্মেল্ট | লিওনার্ডসার (OSS) | পূর্ণ | কাস্টম | মিথ্যা |
| pi | পাই (পাই-কোডিং-এজেন্ট) | এম. জেচনার (OSS) | পূর্ণ | কাস্টম | মিথ্যা |
| grok-build | গ্রোক বিল্ড | xAI | পূর্ণ | কাস্টম | মিথ্যা |
| crush | ক্রাশ | OSS (চার্ম) | পূর্ণ | কাস্টম | মিথ্যা |
| qwen | কিউয়েন কোড | আলিবাবা | পূর্ণ | গাইড | সত্য |
| cursor | কার্সর | অ্যানিস্ফিয়ার | নেই | গাইড | মিথ্যা |
| antigravity | অ্যান্টিগ্রাভিটি | গুগল | নেই | mitm | মিথ্যা |
| hermes | হার্মিস | নাউস রিসার্চ | নেই | গাইড | মিথ্যা |
| kiro | কিরো AI | অ্যামাজন | নেই | mitm | মিথ্যা |
| custom | কাস্টম CLI | — | পূর্ণ | কাস্টম-বিল্ডার | মিথ্যা |
`baseUrlSupport: "partial"` সহ টুলগুলি ড্যাশবোর্ড কার্ডে "⚠ বেস URL আংশিক" একটি ব্যাজ প্রদর্শন করে।
## 2. CLI এজেন্টের ক্যাটালগ (৮টি টুল)
স্বায়ত্তশাসিত এজেন্টগুলি `/dashboard/cli-agents` এ উপস্থিত:
| id | নাম | বিক্রেতা | baseUrlSupport | acpSpawnable |
| ------------ | ------------------ | ------------------------ | -------------- | ------------ |
| hermes-agent | হার্মেস এজেন্ট | Nous Research | পূর্ণ | মিথ্যা |
| openclaw | ওপেনক্ল আইন | OSS (P. স্টেইনবার্গ) | পূর্ণ | সত্য |
| goose | গুজ | ব্লক / লিনাক্স ফাউন্ডেশন | পূর্ণ | সত্য |
| interpreter | ওপেন ইন্টারপ্রেটার | OSS | পূর্ণ | সত্য |
| warp | ওয়ার্প এআই | ওয়ার্প ইনক. | আংশিক | সত্য |
| agent-deck | এজেন্ট ডেক | asheshgoplani (OSS) | পূর্ণ | মিথ্যা |
| omp | ওহ মাই পাই | OSS | পূর্ণ | সত্য |
| letta | লেটা CLI | লেটা | পূর্ণ | মিথ্যা |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP এজেন্ট (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
এই পৃষ্ঠা (যা `/dashboard/agents` থেকে নাম পরিবর্তন করা হয়েছে) CLIs দেখায় যা OmniRoute **স্পন** করতে পারে ব্যাকএন্ড এক্সিকিউশন ইঞ্জিন হিসাবে stdio/ACP প্রোটোকল মাধ্যমে। ক্যাটালগটি আলাদাভাবে `src/lib/acp/registry.ts` এ রক্ষণাবেক্ষণ করা হয় এবং এটি `CLI_TOOLS` এর সমান **নয়**
---
## 4. MITM ব্যাকলগ (ড্যাশবোর্ডে প্রদর্শিত হয় না)
নিচের CLIs গুলি কাস্টম বেস URL স্বাভাবিকভাবে সমর্থন করে না এবং CLI কোডের বা CLI এজেন্টের পৃষ্ঠায় **তালিকাভুক্ত নয়**। এগুলি পরিকল্পনা ১১ এ MITM হস্তক্ষেপের জন্য প্রার্থী:
| CLI | কারণ |
| ------------------- | ------------------------------------------------------ |
| windsurf | BYOK নির্বাচিত ক্লড মডেল + কর্পোরেট URL/token সীমাবদ্ধ |
| amp | বন্ধ ইকোসিস্টেম (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO প্রমাণীকরণ, কাস্টম URL নেই |
| cowork | অ্যানথ্রোপিক ডেস্কটপ, কনফিগারযোগ্য এন্ডপয়েন্ট নেই |
সম্পূর্ণ ক্রস-রেফারেন্সের জন্য `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` দেখুন।
---
## 5. ব্যাচ ডিটেকশন API
সমস্ত টুল ডিটেকশন একটি একক এন্ডপয়েন্টের মাধ্যমে একত্রিত হয়:
**`GET /api/cli-tools/all-statuses`**
- অথরাইজেশন: `requireCliToolsAuth(request)` (অন্যান্য `/api/cli-tools/` রুটের মতো)
- রিটার্ন: `Record<toolId, ToolBatchStatus>` (টাইপ: `src/shared/types/cliBatchStatus.ts`)
- কৌশল: `Promise.all` সমস্ত টুলের উপর, প্রতি টুলে ৫ সেকেন্ডের টাইমআউট
- ক্যাশে: ইন-মেমরি LRU কনফিগারেশন ফাইল `mtime` দ্বারা সূচীকৃত। mtime পরিবর্তিত হলে ক্যাশে অবৈধ হয়। সার্ভার পুনরায় চালু হলে রিসেট হয়।
প্রতি টুলের জন্য প্রতিক্রিয়া আকার:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // স্যানিটাইজড, কোন স্ট্যাক ট্রেস নেই
}
```
## 6. নতুন টুলের জন্য সেটিংস হ্যান্ডলার
`configType: "custom"` সহ নতুন টুলগুলির জন্য নির্দিষ্ট সেটিংস API রুট রয়েছে:
| রুট | টুল |
| ------------------------------------------- | ----------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url ফ্ল্যাগ) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, পুরনো) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, প্রাথমিক + পুরনো `~/.deepseek` সিঙ্ক) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi কোডিং এজেন্ট |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + নির্দিষ্ট `.env` কী) |
সমস্ত রুট `sanitizeErrorMessage()` ব্যবহার করে ত্রুটি প্রতিক্রিয়ার জন্য (Hard Rule #12)।
---
## 7. ড্যাশবোর্ড পৃষ্ঠার স্থাপত্য
### CLI কোডের (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — সার্ভার কম্পোনেন্ট
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — ক্লায়েন্ট গ্রিড
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — টুলের বিস্তারিত পৃষ্ঠা
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12টি বিশেষায়িত টুল কার্ড + `ToolDetailClient.tsx`
### CLI এজেন্টস (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — সার্ভার কম্পোনেন্ট
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — ক্লায়েন্ট গ্রিড
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` পুনরায় ব্যবহার করে
### ACP এজেন্টস (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — সার্ভার কম্পোনেন্ট (এজেন্টস/ থেকে স্থানান্তরিত)
### শেয়ার্ড UI কম্পোনেন্টস (`src/shared/components/cli/`)
| ফাইল | উদ্দেশ্য |
| ----------------------- | ------------------------------------------------------- |
| `CliToolCard.tsx` | স্মার্ট স্ট্যাটাস কার্ড (ডিটেকশন + কনফিগ + এন্ডপয়েন্ট) |
| `CliConceptCard.tsx` | প্রতি পৃষ্ঠার ধারণা ব্যাখ্যা কার্ড |
| `CliComparisonCard.tsx` | CLI প্রকারগুলির মধ্যে তিন কলামের তুলনা |
| `BaseUrlSelect.tsx` | এন্ডপয়েন্ট ড্রপডাউন (লোকাল/ক্লাউড/কাস্টম) |
| `ApiKeySelect.tsx` | API কী সিলেক্টর |
| `ManualConfigModal.tsx` | কপি করার জন্য কনফিগ স্নিপেট মডাল |
### শেয়ার্ড হুক (`src/shared/hooks/cli/`)
| ফাইল | উদ্দেশ্য |
| ------------------------- | ----------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` ফেচ করে, লোডিং/রিফ্রেশ স্টেট পরিচালনা করে |
---
## 8. i18n
নতুন নামস্থানগুলি পরিকল্পনা 14 F9-এ যোগ করা হয়েছে:
| Namespace | Purpose |
| ----------- | ---------------------------------------------------------------------------- |
| `cliCommon` | শেয়ার করা স্ট্রিং (কার্ড লেবেল, ধারণা/তুলনা টেক্সট, বিস্তারিত পৃষ্ঠা লেবেল) |
| `cliCode` | CLI কোডের পৃষ্ঠা স্ট্রিং |
| `cliAgents` | CLI এজেন্টস পৃষ্ঠা স্ট্রিং |
| `acpAgents` | ACP এজেন্টস পৃষ্ঠা স্ট্রিং |
পূর্ণ PT-BR এবং EN অনুবাদ প্রদান করা হয়েছে। 39 অন্যান্য লোকাল স্বয়ংক্রিয়ভাবে EN-এ ফিরে যায় `src/i18n/request.ts`-এ নামস্থান-স্তরের মার্জের মাধ্যমে।
---
## 9. দ্রুত শুরু
### পদক্ষেপ 1 — একটি OmniRoute API কী পান
1. `/dashboard/api-manager` খুলুন → **API কী তৈরি করুন**
2. একটি নাম দিন (যেমন `cli-tools`) এবং সমস্ত অনুমতি নির্বাচন করুন
3. কীটি কপি করুন — আপনাকে নিচের প্রতিটি CLI-এর জন্য এটি প্রয়োজন হবে
> আপনার কী এরূপ দেখায়: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### পদক্ষেপ 2 — CLI টুলগুলি ইনস্টল করুন
সমস্ত npm-ভিত্তিক টুলের জন্য Node.js 22.22.2+ বা 24.x প্রয়োজন:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -338,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-based
# Pi coding agent
# see https://github.com/zechnerj/pi-coding-agent for install
# jcode
# see https://github.com/1jehuang/jcode for install
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### পদক্ষেপ 3 — ড্যাশবোর্ডের মাধ্যমে কনফিগার করুন
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code` এ যান
2. গ্রিডে আপনার টুলটি খুঁজুন
3. টুলের বিস্তারিত পৃষ্ঠা খুলতে কার্ডে ক্লিক করুন
4. আপনার API কী এবং বেস URL নির্বাচন করুন
5. **কনফিগ প্রয়োগ করুন** বা ম্যানুয়াল কনফিগ স্নিপেট কপি করুন
---
### পদক্ষেপ 4 — গ্লোবাল এনভায়রনমেন্ট ভেরিয়েবল সেট করুন
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI reads GOOGLE_GEMINI_BASE_URL at the ROOT (its SDK appends /v1beta/... itself)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> একটি **রিমোট সার্ভার** এর জন্য `localhost:20128` কে সার্ভারের IP বা ডোমেইন দিয়ে প্রতিস্থাপন করুন,
> যেমন `http://<your-server-ip>:20128`
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### পদক্ষেপ 4 — প্রতিটি টুল কনফিগার করুন
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Create ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code-এর জন্য একক Anthropic গেটওয়ে রুট ব্যবহার করুন। এখানে `/v1` যোগ করবেন না।
**পরীক্ষা:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
মডার্ন Codex (v0.137+) শুধুমাত্র `~/.codex/config.toml` পড়ে — পুরানো
`config.yaml` লিগ্যাসি npm CLI-এর জন্য এবং নীরবে উপেক্ষা করা হয়। API
কী `OMNIROUTE_API_KEY` এনভায়রনমেন্ট ভেরিয়েবলে (`env_key`) থাকে, কখনও
ফাইলে নয়:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
পূর্ণ রেফারেন্স (প্রোফাইল, `wire_api`, প্রসঙ্গ উইন্ডো): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md)।
**পরীক্ষা:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**পরীক্ষা:** `opencode`
> চিন্তার ভেরিয়েন্ট পাঠানোর জন্য `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` ব্যবহার করুন।
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI বা VS Code)
### OpenCode
**CLI মোড:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -480,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code মোড:**
Cline এক্সটেনশন সেটিংস → API প্রদানকারী: `OpenAI Compatible`বেস URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
অথবা OmniRoute ড্যাশবোর্ড ব্যবহার করুন**CLI Tools → Cline → Apply Config**
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI বা VS Code)
### KiloCode (CLI or VS Code)
**CLI মোড:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code সেটিংস:**
**VS Code settings:**
```json
{
@@ -504,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
অথবা OmniRoute ড্যাশবোর্ড ব্যবহার করুন**CLI Tools → KiloCode → Apply Config**
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code Extension)
### Continue (VS Code Extension)
`~/.continue/config.yaml` সম্পাদনা করুন:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -522,252 +241,158 @@ models:
default: true
```
সম্পাদনার পর VS Code পুনরায় চালু করুন।
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
যখন VS Code Insiders কাস্টম এন্ডপয়েন্ট মডেলের জন্য কনফিগার করা হয় এবং আপনি OmniRoute-কে কাস্টম হেডার ফিল্ড ছাড়াই কাজ করতে চান তখন এটি ব্যবহার করুন।
**প্রস্তাবিত অবস্থান:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**টোকেনাইজড OmniRoute অ্যালিয়াস ব্যবহার করে উদাহরণ:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**নোট:**
- `sk-your-omniroute-key` কে OmniRoute-এ তৈরি করা একটি API কী দিয়ে প্রতিস্থাপন করুন।
- `url` ক্ষেত্রটি `/api/v1/vscode/{token}/chat/completions` নির্দেশ করা উচিত।
- `modelsUrl` ক্ষেত্রটি `/api/v1/vscode/{token}/models` নির্দেশ করা উচিত।
- ক্লায়েন্ট কাস্টম হেডার সমর্থন করলে সাধারণ `/v1` + Bearer হেডার প্রবাহকে অগ্রাধিকার দিন।
- URL-এ এম্বেড করা টোকেনগুলি একটি সামঞ্জস্যপূর্ণ ব্যাকআপ এবং সম্পাদক লগ বা প্রক্সি ইতিহাসে প্রদর্শিত হতে পারে।
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# আপনার AWS/Kiro অ্যাকাউন্টে লগইন করুন:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI তার নিজস্ব অথেন্টিকেশন ব্যবহার করে — Kiro CLI-এর জন্য OmniRoute প্রয়োজন নেই।
# অন্যান্য টুলের জন্য OmniRoute-এর সাথে kiro-cli ব্যবহার করুন।
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** ডেস্কটপ অ্যাপের জন্য, OmniRoute দ্বারা প্রকাশিত MITM এন্ডপয়েন্ট ব্যবহার করুন
`/dashboard/cli-tools → Kiro` এর অধীনে।
---
## 10. অভ্যন্তরীণ OmniRoute CLI
### Qwen Code (Alibaba)
`omniroute` বাইনারিটি সার্ভার জীবনচক্র, সেটআপ, ডায়াগনস্টিকস এবং প্রদানকারী ব্যবস্থাপনার জন্য কমান্ড প্রদান করে। প্রবেশ পয়েন্ট: `bin/omniroute.mjs`
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
omniroute # সার্ভার শুরু করুন (ডিফল্ট পোর্ট 20128)
omniroute setup # ইন্টারেক্টিভ সেটআপ উইজার্ড
omniroute doctor # কনফিগ, DB, পোর্ট, রানটাইম পরীক্ষা করুন
omniroute providers list # কনফিগার করা প্রদানকারী সংযোগ
omniroute providers test-all # প্রতিটি সক্রিয় সংযোগ পরীক্ষা করুন
omniroute reset-password # প্রশাসক পাসওয়ার্ড পুনরায় সেট করুন
omniroute logs # অনুরোধ লগ স্ট্রিম করুন
omniroute health # বিস্তারিত স্বাস্থ্য (ব্রেকার, ক্যাশে, মেমরি)
omniroute --version # সংস্করণ মুদ্রণ করুন
omniroute --help # সমস্ত কমান্ড দেখান
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
### সেটআপ এবং প্রাথমিককরণ
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
omniroute setup # ইন্টারেক্টিভ সেটআপ উইজার্ড
omniroute setup --non-interactive # CI/অটোমেশন মোড (এনভ ভ্যার + ফ্ল্যাগ পড়ে)
omniroute setup --password '<value>' # প্রশাসক পাসওয়ার্ড সরাসরি সেট করুন
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # একবারে একটি প্রদানকারী যোগ করুন এবং পরীক্ষা করুন
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
নন-ইন্টারেক্টিভ সেটআপের জন্য স্বীকৃত পরিবেশ ভেরিয়েবল:
> For a **remote server** replace `localhost:20128` with the server IP or domain.
| Var | উদ্দেশ্য |
| ------------------- | -------------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | প্রদানকারী API কী (কমান্ডার `.env()` এর মাধ্যমে `--api-key` এর সাথে বাঁধা) |
| `DATA_DIR` | OmniRoute ডেটা ডিরেক্টরি ওভাররাইড করুন |
**Test:** `qwen "say hello"`
অন্যান্য সমস্ত নন-ইন্টারেক্টিভ ইনপুট ফ্ল্যাগ হিসাবে পাস করা হয়, পরিবেশ ভেরিয়েবল নয়:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(উপরের `omniroute setup` অপশনগুলি দেখুন)।
### Cursor (Desktop App)
### ডায়াগনস্টিকস
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
```bash
omniroute doctor # কনফিগ, DB, পোর্ট, রানটাইম, মেমরি, জীবন্ততা পরীক্ষা করুন
omniroute doctor --json # মেশিন-পঠনযোগ্য JSON
omniroute doctor --no-liveness # HTTP স্বাস্থ্য প্রোব বাদ দিন
omniroute doctor --host 0.0.0.0 # জীবন্ততা হোস্ট ওভাররাইড করুন
omniroute doctor --liveness-url <url> # সম্পূর্ণ স্বাস্থ্য এন্ডপয়েন্ট URL ওভাররাইড
```
Via GUI: **Settings → Models → OpenAI API Key**
ডাক্তার এই পরীক্ষা চালায়: `কনফিগ`, `ডেটাবেস`, `স্টোরেজ/এনক্রিপশন`,
`পোর্টের প্রাপ্যতা`, `নোড রানটাইম`, `স্থানীয় বাইনারি` (better-sqlite3),
`মেমরি`, এবং `সার্ভার জীবন্ততা`। যদি কোন পরীক্ষা `ব্যর্থ` হয় তবে এটি নন-জিরো এন্ট্রি করে।
### প্রদানকারী ব্যবস্থাপনা
```bash
omniroute providers available # OmniRoute প্রদানকারী ক্যাটালগ
omniroute providers available --search openai # আইড/নাম/অ্যালিয়াস/শ্রেণী দ্বারা ক্যাটালগ ফিল্টার করুন
omniroute providers available --category api-key # শ্রেণী দ্বারা ফিল্টার করুন (api-key, oauth, free, ...)
omniroute providers available --json # মেশিন-পঠনযোগ্য JSON
omniroute providers list # কনফিগার করা প্রদানকারী সংযোগ
omniroute providers list --json
omniroute providers test <id|name> # একটি কনফিগার করা সংযোগ পরীক্ষা করুন
omniroute providers test-all # প্রতিটি সক্রিয় সংযোগ পরীক্ষা করুন
omniroute providers validate # স্থানীয়-শুধুমাত্র কাঠামোগত যাচাইকরণ
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # বিদ্যমান OAuth প্রবাহ
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` API-প্রথম এবং তাই সক্রিয় স্থানীয় বা দূরবর্তী প্রসঙ্গে কাজ করে। শংসাপত্র ইনপুট ব্যবহার করা উচিত
`--credential-stdin` বা `--credential-env`; `--dry-run --json` শুধুমাত্র
রিড্যাক্টেড উপস্থিতি/আকৃতি রিপোর্ট করে। `providers available` OmniRoute ক্যাটালগ পড়ে;
`providers list/test/test-all/validate` তাদের স্থানীয় SQLite আচরণ বজায় রাখে এবং
সার্ভার চালু থাকতে হবে না।
### পুনরুদ্ধার এবং পুনরায় সেট
```bash
omniroute reset-password # প্রশাসক পাসওয়ার্ড পুনরায় সেট করুন (এছাড়াও: omniroute-reset-password)
omniroute reset-encrypted-columns # এনক্রিপ্ট করা শংসাপত্র পুনরায় সেট করার জন্য সতর্কতা + ড্রাই-রান দেখান
omniroute reset-encrypted-columns --force # সত্যিই SQLite-এ এনক্রিপ্ট করা শংসাপত্রগুলি শূন্য করুন
```
### শংসাপত্র রপ্তানি (⚠ সাবধানতার সাথে পরিচালনা করুন)
```bash
omniroute auth export # সতর্কতা + নিশ্চিতকরণ গেট দেখান — DB অ্যাক্সেস নেই
omniroute auth export --force # সমস্ত সংযোগের ডিক্রিপ্টেড শংসাপত্র stdout এ JSON হিসাবে রপ্তানি করুন
omniroute auth export --force --id <id> # শুধুমাত্র মেলানো সংযোগ রপ্তানি করুন
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> লাইন তৈরি করুন
omniroute auth export --force --out creds.json # একটি ফাইলে লিখুন (0600 অনুমতিসহ তৈরি করা হয়েছে)
```
`auth export` হল **স্থানীয়-শুধুমাত্র** (সরাসরি SQLite পড়া, কোন HTTP রুট নেই) এবং ইচ্ছাকৃতভাবে মুদ্রণ/লিখে
**প্লেইনটেক্সট** `apiKey`/`accessToken`/`refreshToken`/`idToken` মান — এটি বৈশিষ্ট্য, ত্রুটি নয়। কিছুই ডেটাবেস থেকে পড়া হয় না, এবং কিছুই ডিক্রিপ্ট করা হয় না, `--force` ছাড়া। একটি stderr
সতর্কতা ব্যানার সর্বদা প্লেইনটেক্সট মুদ্রণের আগে মুদ্রণ করে। `STORAGE_ENCRYPTION_KEY` সেট করা আবশ্যক। একটি ক্ষেত্র যা ডিক্রিপ্ট করতে ব্যর্থ হয় (পুরানো কী, ক্ষতিগ্রস্ত সাইফারটেক্সট) রিপোর্ট করা হয়
`<field>DecryptFailed: true` হিসাবে সম্পূর্ণ রপ্তানি বন্ধ করার পরিবর্তে বা অন্তর্নিহিত ত্রুটি ফাঁস করার পরিবর্তে।
### অন্যান্য সাবকমান্ড
এইগুলি একটি চলমান OmniRoute সার্ভার অনুমান করে, অন্যথায় উল্লেখ না করা হলে:
```bash
omniroute status # ব্যাপক রানটাইম স্ট্যাটাস
omniroute logs # অনুরোধ লগ স্ট্রিম (--json, --search, --follow)
omniroute config show # বর্তমান কনফিগারেশন প্রদর্শন করুন
omniroute provider list # উপলব্ধ প্রদানকারীর তালিকা (প্রদানকারীর তালিকার অ্যালিয়াস)
omniroute provider add # একটি সরঞ্জামে প্রদানকারী হিসাবে OmniRoute নিবন্ধন করুন
omniroute keys add | list | remove # API কী পরিচালনা করুন
omniroute models [provider] # মডেল তালিকা (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # কনফিগ + DB এর স্ন্যাপশট
omniroute restore # পূর্ববর্তী স্ন্যাপশট থেকে পুনরুদ্ধার করুন
omniroute health # বিস্তারিত স্বাস্থ্য (ব্রেকার, ক্যাশে, মেমরি)
omniroute quota # প্রদানকারী কোটা ব্যবহার
omniroute cache # ক্যাশে স্ট্যাটাস
omniroute cache clear # সেমান্টিক + স্বাক্ষর ক্যাশে পরিষ্কার করুন
omniroute mcp status | restart # MCP সার্ভারের স্ট্যাটাস / পুনরায় শুরু করুন
omniroute a2a status | card # A2A সার্ভারের স্ট্যাটাস / এজেন্ট কার্ড
omniroute tunnel list | create | stop # টানেল পরিচালনা করুন (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # এনভ ভ্যারস পরিদর্শন / সেট করুন (অস্থায়ী)
omniroute test # প্রদানকারী সংযোগের ধোঁয়া পরীক্ষা
omniroute update # আপডেটের জন্য পরীক্ষা করুন
omniroute completion # শেল সম্পূর্ণতা তৈরি করুন
```
### সাধারণ ফ্ল্যাগ
| ফ্ল্যাগ | বর্ণনা |
| ------------------- | --------------------------------------------------------- |
| `--no-open` | শুরুতে ব্রাউজার স্বয়ংক্রিয়ভাবে খুলবেন না |
| `--port <n>` | API পোর্ট ওভাররাইড করুন (ডিফল্ট 20128) |
| `--mcp` | stdio এর মাধ্যমে MCP সার্ভার হিসাবে চালান (IDE এর জন্য) |
| `--non-interactive` | CI মোড (কোনো প্রম্পট নেই; এনভ/ফ্ল্যাগ থেকে পড়ে) |
| `--json` | মেশিন-পঠনযোগ্য JSON আউটপুট (ডাক্তার, প্রদানকারী, ইত্যাদি) |
| `--help`, `-h` | কমান্ড-নির্দিষ্ট সহায়তা দেখান |
| `--version`, `-v` | ইনস্টল করা সংস্করণ মুদ্রণ করুন |
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## উপলব্ধ API এন্ডপয়েন্ট
## Dashboard Auto-Configuration
| এন্ডপয়েন্ট | বর্ণনা | ব্যবহারের জন্য |
| -------------------------- | -------------------------------------- | ------------------------------------ |
| `/v1/chat/completions` | স্ট্যান্ডার্ড চ্যাট (সমস্ত প্রদানকারী) | সমস্ত আধুনিক টুল |
| `/v1/responses` | প্রতিক্রিয়া API (OpenAI ফরম্যাট) | কোডেক্স, এজেন্টিক ওয়ার্কফ্লো |
| `/v1/completions` | পুরানো টেক্সট সম্পূর্ণকরণ | পুরানো টুলগুলি `prompt:` ব্যবহার করে |
| `/v1/embeddings` | টেক্সট এম্বেডিং | RAG, অনুসন্ধান |
| `/v1/images/generations` | ইমেজ উৎপাদন | GPT-Image, Flux, ইত্যাদি |
| `/v1/audio/speech` | টেক্সট-টু-স্পিচ | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | স্পিচ-টু-টেক্সট | Deepgram, AssemblyAI |
The OmniRoute dashboard automates configuration for most tools:
পেস্ট করার জন্য প্রস্তুত উদাহরণ একটি টোকেনাইজড OmniRoute URL সহ:
```txt
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standard OpenAI base: http://localhost:20128/v1
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## সমস্যা সমাধান
## Built-in Agents: Droid & OpenClaw
| ত্রুটি | কারণ | সমাধান |
| ------------------------------------------------ | ------------------------ | -------------------------------------------------------------- |
| `Connection refused` | OmniRoute চলছে না | `omniroute serve` |
| `401 Unauthorized` | ভুল API কী | `/dashboard/api-manager` এ চেক করুন |
| `No combo configured` | সক্রিয় রাউটিং কম্বো নেই | `/dashboard/combos` এ সেট আপ করুন |
| CLI "not installed" দেখায় | বাইনারি PATH এ নেই | `which <command>` চেক করুন |
| ইনস্টল করার পরে ড্যাশবোর্ড "not detected" দেখায় | ক্যাশে পুরনো | ড্যাশবোর্ডে "⟳ Refresh detection" ক্লিক করুন |
| পুরানো লিঙ্ক `/dashboard/cli-tools` | Pre-v3.8.6 বুকমার্ক | `/dashboard/cli-code` এ স্বয়ংক্রিয়ভাবে পুনঃনির্দেশিত (308) |
| পুরানো লিঙ্ক `/dashboard/agents` | Pre-v3.8.6 বুকমার্ক | `/dashboard/acp-agents` এ স্বয়ংক্রিয়ভাবে পুনঃনির্দেশিত (308) |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Solución de Problemas
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,326 +0,0 @@
# CLI-INTEGRATIONS (Čeština)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integrace — nasměrujte jakýkoli kódovací CLI na OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integrace
OmniRoute dodává rodinu příkazů `setup-*`, které konfiguruje kódovací
CLI (Codex, Claude Code, OpenCode, Cline, …) pro použití OmniRoute jako svého backendu — takže
nástroj komunikuje s **jedním** koncovým bodem a OmniRoute směruje k správnému poskytovateli s
automatickým zálohováním. Každý příkaz čte **živý** katalog modelů z běžícího
OmniRoute (místního nebo vzdáleného) a zapisuje vlastní konfigurační soubor nástroje na **vašem**
počítači. API klíč je odkazován proměnnou prostředí, kdekoliv to nástroj podporuje. Příkazy, které uchovávají místní soubor prostředí nástroje, jsou uvedeny níže.
K dispozici je také generický spouštěč — `omniroute run <target>` — který spouští
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` nebo `gemini` s
odpovídajícím prostředím, aniž by zapisoval jakoukoli konfiguraci. Cíle a jejich
aliasy pocházejí z kanonického manifestu `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), a `omniroute completion` nabízí
stejné cílové výrazy odvozené z manifestu. Dědictví per-tool spouštěče —
`omniroute launch` (Claude Code) a `omniroute launch-codex` (Codex) — zůstávají
k dispozici.
Onboarding poskytovatele je k dispozici ze stejného místního/vzdáleného kontextu. Příkazy
API-first níže udržují autentizaci správy oddělenou od pověření poskytovatele a nikdy
nevytištějí pověření ve strukturovaném výstupu:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Pro skripty preferujte `--credential-stdin` nebo `--credential-env`; `--credential`
je zachováno pro kontrolované místní použití. `providers remove` vyžaduje `--yes` na
neinteraktivním terminálu a všech pět příkazů ctí aktivní kontext nebo globální
možnosti `--base-url`/`--api-key`.
Pro jednorázové, ručně psané základní nastavení dvou nejbohatších integrací viz
hloubkové analýzy per-tool:
- [Konfigurace Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Konfigurace Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Vzdálený režim](./REMOTE-MODE.md) — ovládejte vzdálený OmniRoute (VPS / Tailnet) ze svého laptopu
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — rozšíření OmniCopilot; může také spouštět tyto
`setup-*` příkazy za vás zevnitř editoru
---
## Hlavní tabulka
Každý příkaz ctí **aktivní kontext** (nastavený pomocí `omniroute connect`, viz
[Remote Mode](./REMOTE-MODE.md)) nebo explicitní příznaky `--remote <url> --api-key <key>`.
"Lokální vs vzdálený" níže znamená: bez příznaků cílí na `http://localhost:20128`;
s `--remote` (nebo aktivním vzdáleným kontextem) získává katalog z tohoto
serveru a zapisuje konfiguraci lokálně.
| Příkaz | Nástroj | Co zapisuje | Klíčové příznaky | Lokální vs vzdálený |
| -------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — jeden profil pro každý kompatibilní textový model (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Oba |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — jeden profil pro každý odpovídající model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Oba |
| `omniroute setup-opencode` | OpenCode (openai-kompatibilní) | `~/.config/opencode/opencode.json``omniroute` poskytovatel se všemi modely katalogu (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Oba |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI režim) + tiskne nastavení rozšíření VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Oba |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + slučuje `kilocode.*` do `settings.json` VS Code, pokud je přítomno | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Oba |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modely, klíč přes `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-cursor` | Cursor | Nic — tiskne kroky v aplikaci (konfigurace Cursor je neprůhledná SQLite) | `--remote` `--api-key` `--only` `--port` | Oba |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + nastaví `roo-cline.autoImportSettingsPath`, pokud existuje `settings.json` VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Oba |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` poskytovatel, klíč přes `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + tiskne recept pro prostředí | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + tiskne recept pro prostředí | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` pole + `OMNIROUTE_API_KEY` v `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Oba |
| `omniroute run <target>` | Runtime launch (generic) | Nic — spouští `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` s odpovídajícím prostředím a argumenty; Qwen a Gemini používají dočasný izolovaný domov | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Oba |
| `omniroute launch` | Claude Code | Nic — spouští `claude` s `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injektovaným | `--remote` `--api-key` `--token` `--profile` `--port` | Oba |
| `omniroute launch-codex` | OpenAI Codex CLI | Nic — spouští `codex` s poskytovatelem `omniroute` injektovaným pomocí `-c` příznaků | `--remote` `--api-key` `--profile` (`-p`) `--port` | Oba |
Poznámky k příznakům (ověřeno ve zdroji příkazů):
- `--remote <url>` — získává katalog z vzdáleného OmniRoute (přepisuje `--port`
a aktivní kontext). `--api-key <key>` dodává pověření pro tento
server (výchozí hodnota je proměnná prostředí `OMNIROUTE_API_KEY`, nebo token aktivního kontextu).
- `--only <patterns>` — čárkami oddělené podřetězce; uchová pouze ID modelů, které odpovídají
(např. `--only glm,kimi`). K dispozici na `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — tiskne přesně to, co by bylo zapsáno, aniž by se dotýkalo
souborového systému. K dispozici na každém příkazu `setup-*` **kromě** `setup-cursor`
(který nikdy nezapisuje soubor).
- `--model <id>` — vyžaduje se (nebo se vybírá interaktivně) pro nástroje, které nemají
automatické objevování modelů: Cline, Kilo, Roo, Goose, Qwen, Aider. Tyto nástroje
také přijímají `--yes` pro neinteraktivní běhy (což pak vyžaduje `--model`).
`setup-opencode` bere `--model` pro nastavení výchozího nejvyššího modelu.
- `--model <id>` na `omniroute run` následuje propojení per-target manifestu
(`bin/cli/cli-manifest.mjs`): **aider** přijímá `--model openai/<id>` a
**opencode** `--model omniroute/<id>` (prefix je přidán pouze tehdy, když id
jej již nenese); **qwen** a **gemini** přijímají id doslovně;
**claude** jej získává přes `ANTHROPIC_MODEL`, **goose** přes `GOOSE_MODEL`, a
**codex** přes `-c model_providers.omniroute.*` argumenty. **Qwen je jediným cílem běhu,
který tvrdě vyžaduje `--model`** — `omniroute run qwen` bez něj končí
`2` s explicitní chybou.
- `--port <port>` — místní port OmniRoute (výchozí `20128`, ignorováno, když je nastaveno `--remote`).
Přítomno na všech `setup-*` a obou spouštěčích.
- Kódy ukončení `omniroute run`: vlastní kód ukončení podřízeného CLI je propagován
doslovně; `2` = neplatné argumenty (nepodporovaný cíl, chybějící požadovaný
`--model`, ochrana kontejneru); `127` = cílový binární soubor není v `PATH`;
`130`/`143`/`129`, když je spuštění ukončeno `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = jiná chyba při spuštění.
- Dva spouštěče (`launch`, `launch-codex`) přijímají `--profile <name>` pro výběr
profilu napsaného pomocí `setup-claude` / `setup-codex`, plus předávací argumenty pro
podkladový `claude` / `codex` binární soubor.
Interaktivní výběr je také sdílen recepty nastavení:
```bash
# Vyberte z aktivního místního nebo vzdáleného katalogu modelů a nakonfigurujte cíl.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` v současnosti deleguje na testované recepty pro `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue` a `kilo`. Pouze pro IDE,
MITM a pouze pro průvodce záznamy zůstávají explicitní `setup-*`/manuální toky a
nejsou prezentovány jako spouštěcí cíle.
> `setup-opencode` je **lehká openai-kompatibilní** integrace OpenCode.
> K dispozici je také bohatší pluginová integrace — `omniroute setup opencode` — která
> instaluje `@omniroute/opencode-plugin`. Jsou to různé příkazy; tabulka
> výše dokumentuje `setup-opencode`.
---
## Místní použití
S OmniRoute běžícím na `localhost:20128`, stačí spustit příkaz pro nastavení vašeho
nástroje. Katalog je načten z místního serveru.
```bash
# Codex: zapisuje profil pro každý shodný model do ~/.codex/
omniroute setup-codex
codex --profile glm52 # použijte vygenerovaný profil
# Claude Code: zapisuje profily pro každý model, poté spustí jeden
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: zapisuje poskytovatele kompatibilního s openai se všemi modely katalogu
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # odkazováno přes {env:OMNIROUTE_API_KEY}, nikdy na disku
opencode -m omniroute/glm/glm-5.2 "..."
# Nástroje bez automatického objevování potřebují explicitní model:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Náhled bez zápisu čehokoliv:
omniroute setup-continue --dry-run
```
Spusťte bez zápisu jakékoli konfigurace (pouze injekce prostředí):
```bash
omniroute launch # Claude Code → místní OmniRoute
omniroute launch-codex # Codex CLI → místní OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "odpověď OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "odpověď OK"
omniroute run qwen --model glm/glm-5.2 -- -p "odpověď OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "odpověď OK"
# Explicitní cesta příkazu: předat cokoliv, co přijde po --
omniroute run claude -- --print-system-prompt "zkontrolujte tento rozdíl"
```
---
## Vzdálené použití
Nasměrujte jakýkoli příkaz pro nastavení na vzdálený OmniRoute s `--remote` + `--api-key`. Katalog je načten ze vzdáleného serveru; konfigurace je zapsána na vašem místním počítači.
```bash
# OpenCode proti vzdálenému VPS, ponechte pouze glm/kimi modely
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # nejprve exportujte OMNIROUTE_API_KEY
# Profily Codex z vzdáleného katalogu
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Spusťte CLI přímo proti vzdálenému
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Místo předávání `--remote`/`--api-key` pokaždé, přihlaste se jednou a nechte
**aktivní kontext** je dodávat automaticky:
```bash
omniroute connect 192.168.0.15 # vytvoří token s omezeným rozsahem, uloží kontext
omniroute setup-codex # ← nyní používá vzdálený katalog
omniroute setup-opencode # ← stejné
omniroute launch # ← Claude Code proti vzdálenému
```
Viz [Vzdálený režim](./REMOTE-MODE.md) pro kontexty, rozsahy a správu tokenů.
---
## Konvence základní URL (které nástroje chtějí `/v1`)
OmniRoute vystavuje OpenAI rozhraní na `/v1`, Anthropic rozhraní na kořenové úrovni,
a nativní Gemini rozhraní na `/v1beta`. Každá integrace je připojena k formátu, který
je pro její nástroj očekáván (ověřeno ve zdroji příkazu):
| Integrace | Základní URL zapsáno | `/v1`? |
| -------------------------------------------------------------------------- | -------------------- | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | kořen | Ne — Cline přidává `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | kořen | Ne — Goose přidává cestu |
| `setup-aider` (`OPENAI_API_BASE`) | kořen | Ne — LiteLLM přidává `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | s `/v1` | Ano |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | kořen | Ne — Claude Code přidává `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | s `/v1` | Ano |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | s `/v1` | Ano |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | kořen | Ne — SDK přidává `/v1beta/models/…` |
---
## Udržování nativních závislostí při aktualizaci: `--include=optional`
Když aktualizujete pomocí `omniroute update` (po potvrzení nebo s `--apply`),
OmniRoute spouští instalaci s `--include=optional` zabudovaným:
```bash
npm install -g omniroute@latest --include=optional
```
To **není** příznak, který předáváte `omniroute update` — je vždy aplikován
aktualizátorem. Zaručuje, že `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM stack) přežijí aktualizaci, i když je vaše npm konfigurace
nastavena na `omit=optional`, což by jinak tiše odstranilo nativní SQLite
ovladač a vazbu na OS-keyring. Chcete-li si prohlédnout přesný příkaz bez aplikace:
```bash
omniroute update --dry-run
# [DRY RUN] By běžel: npm install -g omniroute@latest --include=optional
```
Další příznaky `omniroute update` (ověřeno ve zdrojovém kódu): `--check` (ukončí s 1, pokud
je zastaralý), `--apply` (nainstaluje bez výzvy), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI přes `omniroute run gemini`
Smlouva ověřena proti `@google/gemini-cli` 0.50.0: CLI respektuje
`GOOGLE_GEMINI_BASE_URL` a vydává `POST /v1beta/models/<model>:generateContent`
(a `:streamGenerateContent?alt=sse`) proti němu — přesně jako nativní
Gemini rozhraní OmniRoute (`/v1beta`). `omniroute run gemini` to automaticky
propojuje:
- `GOOGLE_GEMINI_BASE_URL` → aktivní základní URL OmniRoute (kořen, žádné `/v1`);
- `GEMINI_API_KEY` → vyřešené pověření OmniRoute (volba/env/context);
- **dočasný izolovaný `GEMINI_CLI_HOME`**, jehož `.gemini/settings.json`
vybírá autentizaci `gemini-api-key`, takže uložená relace Google OAuth (Code Assist)
nikdy nepřepíše spuštění řízené OmniRoute — odstraněno po ukončení;
- **hygiena prostředí**: dětské prostředí je očištěno od `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` a `GOOGLE_GENAI_USE_GCA` (což by přesměrovalo
autentizaci na Vertex/Code Assist), a `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` je
nastaven jako záložní — ostatní cíle `run` dostávají stejnou
péči pro své vlastní konfliktní proměnné;
- injekce `--model <id>` z `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Ochrana důvěry pracovního prostoru Gemini stále platí v bezhlavém režimu — předejte
`--skip-trust` (nebo důvěřujte adresáři interaktivně) sami; spouštěč
úmyslně neobchází tuto ochranu. Tento spouštěč je odlišný od **registrace ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), která zůstává integrací agent-protokolu pro
`/dashboard/acp-agents`.
---
## Skutečné kouřové testy (opt-in)
Deterministické regresní testy plánu spuštění v CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Pro ověření SKUTEČNÝCH binárních souborů proti SKUTEČNÉMU
serveru OmniRoute existuje opt-in rámec na
`tests/integration/upstream-cli-smoke.int.test.ts`. Nikdy se nespouští automaticky
(všechny podtesty přeskočí, pokud není `RUN_CLI_SMOKE=1`), předává pověření pomocí env-var
NAME (nikdy podle hodnoty), rediguje klíčové řetězce z jakéhokoli zaznamenaného výstupu, přeskočí
cíle, jejichž binární soubor není nainstalován, a klasifikuje selhání jako
auth / upstream / config místo holého booleanu:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Volitelně: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` omezuje testování;
`OMNIROUTE_SMOKE_TIMEOUT_MS` přepisuje časový limit 120s na cíl.
## Viz také
- [Konfigurace Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — hlubší průvodce Claude Code
- [Konfigurace Codex CLI](./CODEX-CLI-CONFIGURATION.md) — jednorázové základní nastavení `[model_providers.omniroute]`
- [Vzdálený režim](./REMOTE-MODE.md) — kontexty, přístupové tokeny s omezeným rozsahem, ovládání vzdáleného serveru
- [Reference nástrojů CLI](../reference/CLI-TOOLS.md) — kompletní katalog podporovaných nástrojů + stránky řídicího panelu
- [Průvodce nastavením](./SETUP_GUIDE.md) — metody instalace a onboarding při prvním spuštění

View File

@@ -1,340 +1,86 @@
# CLI-TOOLS (Čeština)
# CLI Tools Setup Guide — OmniRoute (Čeština)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Nástroje — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Nástroje — OmniRoute
Poslední aktualizace: 2026-08-18
OmniRoute integruje tři kategorie CLI nástrojů rozložené na třech specializovaných stránkách dashboardu:
| Stránka | Trasa | Koncept | Počet |
| -------------- | ----------------------- | --------------------------------------------------------------------------------------------- | ----------- |
| **CLI Kód** | `/dashboard/cli-code` | Nástroje pro kódování, které směřujete na OmniRoute (Klient → CLI → OmniRoute → Poskytovatel) | 26 |
| **CLI Agenti** | `/dashboard/cli-agents` | Autonomní agenti, které směřujete na OmniRoute (stejný tok, širší rozsah) | 8 |
| **ACP Agenti** | `/dashboard/acp-agents` | CLIs, které OmniRoute spouští jako backend přes stdio/ACP (obrácený tok) | viz registr |
Zastaralé trasy přesměrovávají přes 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Jak to funguje
## How It Works
```
CLI Kód / CLI Agenti (tok spotřeby):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (vše směřuje na OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute směruje k správnému poskytovateli)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agenti (obrácený tok spuštění):
Klientský požadavek → OmniRoute → spouští CLI přes stdio/ACP → odpověď
```
**Výhody:**
**Benefits:**
- Jeden API klíč pro správu všech nástrojů
- Sledování nákladů napříč všemi CLIs v dashboardu
- Přepínání modelů bez přeconfigurování každého nástroje
- Funguje lokálně i na vzdálených serverech (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Automatická konfigurace s `setup-*`
## Supported Tools (Dashboard Source of Truth)
Nemusíte psát konfiguraci každého nástroje ručně. OmniRoute dodává příkaz `setup-*`
pro každý podporovaný CLI, který čte **živý** katalog modelů z běžícího
OmniRoute (lokálního nebo vzdáleného) a zapisuje vlastní konfiguraci nástroje na vašem stroji:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Každý přijímá `--remote <url> --api-key <key>` (konfigurovat lokální nástroj proti
vzdálenému OmniRoute), `--dry-run` (náhled bez zápisu) a `--port`. Nástroje
bez automatického objevování modelu (Cline, Kilo, Roo, Goose, Aider, Qwen) berou
`--model <id>` (a `--yes` pro neinteraktivní běhy). Pro spuštění CLI s
odpovídajícím prostředím a bez jakéhokoli zápisu konfigurace použijte generický
`omniroute run <target>` launcher (claude, codex, aider, goose, opencode, qwen,
gemini — cíle a aliasy pocházejí z `bin/cli/cli-manifest.mjs`); zastaralé
per-tool launchery `omniroute launch` (Claude Code) a `omniroute launch-codex`
(Codex) zůstávají k dispozici. Gemini CLI je pouze pro spuštění: je to cíl
`omniroute run`, ale nemá žádný `setup-*`/`configure` recept.
### CLI fingerprint sync (Agents + Settings)
> **Úplná reference:** hlavní tabulka — co každý příkaz zapisuje, každý příznak,
> lokální vs vzdálený, a které nástroje chtějí příponu `/v1` — se nachází v
> **[CLI Integrace](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Spuštění těchto příkazů uvnitř kontejneru
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Příkaz `setup-*` provedený uvnitř kontejneru OmniRoute zapisuje do
vlastního domova kontejneru, který žádný hostitelský CLI nečte a který zmizí s
kontejnerem. OmniRoute to detekuje a ukončuje s kódem `2` s instrukcemi místo
zápisu. Dva podporované způsoby vpřed — nainstalovat CLI na hostiteli a
`omniroute connect` do kontejneru, nebo bind-mount adresáře konfigurace a nastavit
`CLI_CONFIG_HOME` (profil compose `host`). Každý příkaz `setup-*`, plus
`omniroute configure` a `omniroute config set`, přijímá
`--allow-container-write`, když je skutečně zamýšleno konfigurovat vlastní CLIs
kontejneru; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` dělá to samé pro
server. Viz
[Docker Průvodce → Konfigurace hostitelských CLI nástrojů](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
**apply endpoint** dashboardu (`POST /api/cli-tools/apply`) vynucuje
stejnou ochranu: v kontejneru, zápis, jehož cíl není bind-mounted z hostitele,
odpovídá **`422`** s `containerEphemeralTarget: true`, bezpečným chybovým
textem a — pro nástroje s hostitelským receptem (claude, codex, opencode, cline,
kilo, continue) — `hostSetupCommand` (např. `omniroute setup-opencode`), který
se má spustit na hostiteli místo; nic není zapsáno. `dryRun: true` stále funguje
v režimu kontejneru a vrací vygenerovaný obsah + cílovou cestu bez dotyku disku,
takže si můžete prohlédnout z dashboardu a aplikovat na hostiteli. Toto chování je
úmyslné a chráněné regresí pomocí
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — nikdy "neopravujte" 422
odstraněním ochrany.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Zdroj pravdy
## Step 1 — Get an OmniRoute API Key
Jednotný katalog se nachází v `src/shared/constants/cliTools.ts` jako `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Každý záznam má tyto pole (definováno v `src/shared/schemas/cliCatalog.ts`):
| Pole | Typ | Popis |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Na které stránce se nástroj zobrazuje |
| `vendor` | `string` | Původ nástroje ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Také použitelný jako ACP Agent (zobrazená ikona) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Úroveň podpory vlastního koncového bodu. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mechanismus konfigurace |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Základní zobrazení polí |
Záznamy s `baseUrlSupport: "none"` **nejsou zobrazeny** na stránkách dashboardu — jsou registrovány v MITM backlogu pro plán 11 (viz `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Úrovně schopností (katalogizované × detekovatelné × konfigurovatelné × spustitelné)
Ne každý katalogizovaný nástroj je detekovatelný, konfigurovatelný nebo spustitelný. Každá úroveň má jeden
deklarující zdroj a test odchylek je udržuje v souladu:
| Úroveň | Význam | Deklarováno |
| -------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Katalogizované** | Zobrazuje se v katalogu dashboardu (název, dodavatel, dokumentace, typ konfigurace) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detekovatelné** | Detekce binárních/config, kontroly zdraví, cesty k konfiguraci | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **Konfigurovatelné** | Podporováno `omniroute configure <cli>` (existuje recept na nastavení) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Spustitelné** | Podporováno `omniroute run <target>` (definována injekce env/args) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` je kanonický spustitelný manifest pro příkazy CLI
povrchů: `run`, `configure` a generátory shell-completion odvozují své
seznamy cílů, rozlišení aliasů (například `kilocode`/`kilo-code`/`kilo_cli``kilo`)
a zapojení příznaku `--model` z něj. Ochrana proti odchylkám
`tests/unit/cli/cli-manifest-drift.test.ts` zajišťuje, že manifest, runtime
katalog, UI katalog a každý spotřebitelský povrch zůstávají synchronizovány — cíl přidaný do
jednoho povrchu bez ostatních způsobí selhání testu místo tichého odchýlení.
## 1. Katalog kódu CLI (26 nástrojů)
Všechny nástroje, které se objevují v `/dashboard/cli-code`. Ty, které mají `baseUrlSupport: none`, jsou propojeny prostřednictvím MITM nebo manuálního průvodce místo vlastního základního URL:
| id | název | dodavatel | baseUrlSupport | typKonfigurace | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
Nástroje s `baseUrlSupport: "partial"` zobrazují odznak "⚠ Částečná základní URL" na kartě řídicího panelu.
## 2. Katalog CLI agentů (8 nástrojů)
Autonomní agenti, kteří se objevují v `/dashboard/cli-agents`:
| id | název | dodavatel | podporaBaseUrl | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | plná | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | plná | true |
| goose | Goose | Block / Linux Foundation | plná | true |
| interpreter | Open Interpreter | OSS | plná | true |
| warp | Warp AI | Warp Inc. | částečná | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | plná | false |
| omp | Oh My Pi | OSS | plná | true |
| letta | Letta CLI | Letta | plná | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP agenti (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Tato stránka (přejmenována z `/dashboard/agents`) zobrazuje CLI, které může OmniRoute **vytvářet** jako backendové výkonné enginy prostřednictvím protokolu stdio/ACP. Katalog je udržován odděleně v `src/lib/acp/registry.ts` a **není** stejný jako `CLI_TOOLS`.
---
## 4. MITM backlog (není zobrazen v dashboardu)
Následující CLI nativně nepodporují vlastní základní URL a **nejsou uvedeny** na stránkách CLI kódu nebo CLI agentů. Jsou kandidáty na MITM interceptaci v plánu 11:
| CLI | Důvod |
| ------------------- | --------------------------------------------------------- |
| windsurf | BYOK omezeno na vybrané modely Claude + firemní URL/token |
| amp | Uzavřený ekosystém (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO autentizace, žádná vlastní URL |
| cowork | Anthropic Desktop, žádný konfigurovatelný koncový bod |
Viz `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` pro úplný křížový odkaz.
---
## 5. API pro detekci dávkových nástrojů
Všechny detekce nástrojů jsou agregovány prostřednictvím jednoho koncového bodu:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (stejné jako ostatní `/api/cli-tools/` trasy)
- Vrací: `Record<toolId, ToolBatchStatus>` (typ: `src/shared/types/cliBatchStatus.ts`)
- Strategie: `Promise.all` pro všechny nástroje, 5s timeout na nástroj
- Cache: v paměti LRU indexováno podle konfiguračního souboru `mtime`. Cache je neplatná, když se mtime změní. Resetováno při restartu serveru.
Tvar odpovědi na nástroj:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitizováno, žádné zásobníkové stopy
}
```
## 6. Zpracovatelé nastavení pro nové nástroje
Nové nástroje s `configType: "custom"` mají vyhrazené API trasy pro nastavení:
| Trasa | Nástroj |
| ------------------------------------------- | -------------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primární + legacy `~/.deepseek` synchronizace) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi kódovací agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + vyhrazený `.env` klíč) |
Všechny trasy používají `sanitizeErrorMessage()` pro chybové odpovědi (Pevné pravidlo #12).
---
## 7. Architektura stránek dashboardu
### CLI Kód (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — serverová komponenta
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — klientská mřížka
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — stránka detailu nástroje
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 specializovaných karet nástrojů + `ToolDetailClient.tsx`
### CLI Agenti (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — serverová komponenta
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — klientská mřížka
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — znovu používá `ToolDetailClient`
### ACP Agenti (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — serverová komponenta (přesunuta z `agents/`)
### Sdílené UI komponenty (`src/shared/components/cli/`)
| Soubor | Účel |
| ----------------------- | ---------------------------------------------------------- |
| `CliToolCard.tsx` | Chytrá stavová karta (detekce + konfigurace + koncový bod) |
| `CliConceptCard.tsx` | Karta vysvětlení konceptu na stránce |
| `CliComparisonCard.tsx` | Srovnání ve třech sloupcích napříč typy CLI |
| `BaseUrlSelect.tsx` | Rozbalovací nabídka koncového bodu (Místní/Cloud/Vlastní) |
| `ApiKeySelect.tsx` | Výběr API klíče |
| `ManualConfigModal.tsx` | Modální okno pro kopírovatelný konfigurační úryvek |
### Sdílený hook (`src/shared/hooks/cli/`)
| Soubor | Účel |
| ------------------------- | ------------------------------------------------------------------------ |
| `useToolBatchStatuses.ts` | Načítá `/api/cli-tools/all-statuses`, spravuje stav načítání/aktualizace |
## 8. i18n
Nové namespace přidány v plánu 14 F9:
| Namespace | Účel |
| ----------- | ------------------------------------------------------------------------------------- |
| `cliCommon` | Sdílené řetězce (popisky karet, texty konceptů/porovnání, popisky detailních stránek) |
| `cliCode` | Řetězce stránek CLI kódu |
| `cliAgents` | Řetězce stránek CLI agentů |
| `acpAgents` | Řetězce stránek ACP agentů |
Úplné překlady do PT-BR a EN jsou k dispozici. 39 dalších lokalizací automaticky přechází na EN prostřednictvím sloučení na úrovni namespace v `src/i18n/request.ts`.
---
## 9. Rychlý start
### Krok 1 — Získejte API klíč OmniRoute
1. Otevřete `/dashboard/api-manager`**Vytvořit API klíč**
2. Dejte mu název (např. `cli-tools`) a vyberte všechna oprávnění
3. Zkopírujte klíč — budete ho potřebovat pro každý CLI níže
> Váš klíč vypadá takto: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Krok 2 — Nainstalujte CLI nástroje
Všechny nástroje založené na npm vyžadují Node.js 22.22.2+ nebo 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -352,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (spustitelné přes `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Založené na Rustu
# Pi coding agent
# viz https://github.com/zechnerj/pi-coding-agent pro instalaci
# jcode
# viz https://github.com/1jehuang/jcode pro instalaci
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Krok 3 — Nakonfigurujte přes Dashboard
## Step 3 — Set Global Environment Variables
1. Přejděte na `http://localhost:20128/dashboard/cli-code`
2. Najděte svůj nástroj v mřížce
3. Klikněte na kartu pro otevření detailní stránky nástroje
4. Vyberte svůj API klíč a základní URL
5. Klikněte na **Použít konfiguraci** nebo zkopírujte ručně konfigurační úryvek
---
### Krok 4 — Nastavte globální proměnné prostředí
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Univerzální koncový bod
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI čte GOOGLE_GEMINI_BASE_URL na ROOT (jeho SDK přidává /v1beta/... samo)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Pro **vzdálený server** nahraďte `localhost:20128` IP adresou nebo doménou serveru,
> např. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Krok 4 — Nakonfigurujte každý nástroj
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Vytvořte ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Použijte sjednocený kořen brány Anthropic pro Claude Code. Nepřidávejte zde `/v1`.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Moderní Codex (v0.137+) čte pouze `~/.codex/config.toml` — starý
`config.yaml` patří k legacy npm CLI a je tiše ignorován. API
klíč zůstává v proměnné prostředí `OMNIROUTE_API_KEY` (`env_key`), nikdy
uvnitř souboru:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Úplná reference (profily, `wire_api`, kontextová okna): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Použijte `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> pro odeslání variant myšlení.
---
#### Cline (CLI nebo VS Code)
### Cline (CLI or VS Code)
**Režim CLI:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -495,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Režim VS Code:**
Nastavení rozšíření Cline → Poskytovatel API: `OpenAI Compatible`Základní URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Nebo použijte dashboard OmniRoute **CLI Tools → Cline → Použít konfiguraci**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI nebo VS Code)
### KiloCode (CLI or VS Code)
**Režim CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Nastavení VS Code:**
**VS Code settings:**
```json
{
@@ -519,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Nebo použijte dashboard OmniRoute **CLI Tools → KiloCode → Použít konfiguraci**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (rozšíření VS Code)
### Continue (VS Code Extension)
Upravte `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -537,257 +241,158 @@ models:
default: true
```
Po úpravě restartujte VS Code.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Použijte toto, když je VS Code Insiders nakonfigurován pro vlastní modely koncových bodů a chcete, aby OmniRoute fungoval bez vlastního pole hlavičky.
**Doporučené umístění:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Příklad použití tokenizovaného aliasu OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Poznámky:**
- Nahraďte `sk-your-omniroute-key` API klíčem vytvořeným v OmniRoute.
- Pole `url` by mělo směřovat na `/api/v1/vscode/{token}/chat/completions`.
- Pole `modelsUrl` by mělo směřovat na `/api/v1/vscode/{token}/models`.
- Preferujte normální `/v1` + Bearer hlavičkový tok, když klient podporuje vlastní hlavičky.
- Tokeny vložené do URL jsou záložním řešením kompatibility a mohou se objevit v protokolech editoru nebo historii proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Přihlaste se ke svému účtu AWS/Kiro:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI používá vlastní autentizaci — OmniRoute není potřebný jako backend pro Kiro CLI samotné.
# Používejte kiro-cli spolu s OmniRoute pro další nástroje.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Pro desktopovou aplikaci **Kiro IDE** použijte MITM koncový bod vystavený OmniRoute
pod `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. Interní OmniRoute CLI
## Dashboard Auto-Configuration
Binární soubor `omniroute` poskytuje příkazy pro životní cyklus serveru, nastavení, diagnostiku a správu poskytovatelů. Vstupní bod: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Spustit server (výchozí port 20128)
omniroute setup # Interaktivní nastavení
omniroute doctor # Zkontrolovat konfiguraci, DB, porty, runtime
omniroute providers list # Seznam nakonfigurovaných připojení poskytovatelů
omniroute providers test-all # Otestovat každé aktivní připojení
omniroute reset-password # Resetovat heslo administrátora
omniroute logs # Streamovat logy požadavků
omniroute health # Podrobný stav (přerušovače, cache, paměť)
omniroute --version # Vytisknout verzi
omniroute --help # Zobrazit všechny příkazy
```
### Nastavení a inicializace
```bash
omniroute setup # Interaktivní nastavení
omniroute setup --non-interactive # CI/automatizační režim (čte proměnné prostředí + příznaky)
omniroute setup --password '<value>' # Nastavit heslo administrátora přímo
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Přidat a otestovat poskytovatele v jednom kroku
```
Rozpoznané proměnné prostředí pro neinteraktivní nastavení:
| Var | Účel |
| ------------------- | ---------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | API klíč poskytovatele (svázaný s `--api-key` přes Commander `.env()`) |
| `DATA_DIR` | Přepsat adresář dat OmniRoute |
Všechny ostatní neinteraktivní vstupy jsou předávány jako příznaky, nikoli jako proměnné prostředí:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(podívejte se na možnosti `omniroute setup` výše).
### Diagnostika
```bash
omniroute doctor # Zkontrolovat konfiguraci, DB, porty, runtime, paměť, životnost
omniroute doctor --json # Strojově čitelný JSON
omniroute doctor --no-liveness # Přeskočit HTTP health probe
omniroute doctor --host 0.0.0.0 # Přepsat hostitele životnosti
omniroute doctor --liveness-url <url> # Úplné přepsání URL koncového bodu zdraví
```
Doktor provádí tyto kontroly: `Konfigurace`, `Databáze`, `Úložiště/šifrování`,
`Dostupnost portu`, `Node runtime`, `Nativní binární` (better-sqlite3),
`Paměť` a `Životnost serveru`. Ukončí se s nenulovým kódem, pokud jakákoli kontrola selže.
### Správa poskytovatelů
```bash
omniroute providers available # Katalog poskytovatelů OmniRoute
omniroute providers available --search openai # Filtrovat katalog podle id/název/alias/kategorie
omniroute providers available --category api-key # Filtrovat podle kategorie (api-key, oauth, free, ...)
omniroute providers available --json # Strojově čitelný JSON
omniroute providers list # Seznam nakonfigurovaných připojení poskytovatelů
omniroute providers list --json
omniroute providers test <id|name> # Otestovat jedno nakonfigurované připojení
omniroute providers test-all # Otestovat každé aktivní připojení
omniroute providers validate # Lokální strukturovaná validace
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Existující OAuth tok
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` jsou API-first a proto fungují proti
aktivnímu místnímu nebo vzdálenému kontextu. Vstup pro pověření by měl používat
`--credential-stdin` nebo `--credential-env`; `--dry-run --json` hlásí pouze
redigovanou přítomnost/tvar. `providers available` čte katalog OmniRoute;
`providers list/test/test-all/validate` si zachovávají své místní SQLite chování a
nevyžadují, aby server běžel.
### Obnova a reset
```bash
omniroute reset-password # Resetovat heslo administrátora (také: omniroute-reset-password)
omniroute reset-encrypted-columns # Zobrazit varování + dry-run pro reset šifrovaných pověření
omniroute reset-encrypted-columns --force # Opravuji šifrovaná pověření v SQLite
```
### Export pověření (⚠ zacházejte opatrně)
```bash
omniroute auth export # Zobrazit varování + potvrzovací bránu — žádný přístup k DB
omniroute auth export --force # ExportOVAT VŠECHNA DEŠIFROVANÁ pověření připojení do stdout jako JSON
omniroute auth export --force --id <id> # Exportovat pouze odpovídající připojení
omniroute auth export --force --format env # Vydat řádky OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # Zapsat do souboru (vytvořeno s 0600 oprávněními)
```
`auth export` je **pouze lokální** (přímé čtení SQLite, žádná HTTP trasa) a záměrně tiskne/zapisuje
**čistý text** `apiKey`/`accessToken`/`refreshToken`/`idToken` hodnoty — to je funkce, nikoli
chyba. Nic není čteno z databáze a nic není dešifrováno, bez `--force`. Varovný banner na stderr
se vždy tiskne před jakýmkoli čistým textem. Vyžaduje nastavení `STORAGE_ENCRYPTION_KEY`.
Pole, které se nepodaří dešifrovat (stará klíč, poškozený ciphertext), je hlášeno jako
`<field>DecryptFailed: true` místo přerušení celého exportu nebo úniku základní chyby.
### Další podpříkazy
Tyto předpokládají běžící server OmniRoute, pokud není uvedeno jinak:
```bash
omniroute status # Komplexní stav runtime
omniroute logs # Streamovat logy požadavků (--json, --search, --follow)
omniroute config show # Zobrazit aktuální konfiguraci
omniroute provider list # Seznam dostupných poskytovatelů (alias poskytovatelů seznam)
omniroute provider add # Registrovat OmniRoute jako poskytovatele na nástroji
omniroute keys add | list | remove # Spravovat API klíče
omniroute models [provider] # Seznam modelů (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfigurace + DB
omniroute restore # Obnovit z předchozího snapshotu
omniroute health # Podrobný stav (přerušovače, cache, paměť)
omniroute quota # Využití kvóty poskytovatele
omniroute cache # Stav cache
omniroute cache clear # Vymazat sémantické + podpisové cache
omniroute mcp status | restart # Stav serveru MCP / restart
omniroute a2a status | card # Stav serveru A2A / agent karta
omniroute tunnel list | create | stop # Spravovat tunely (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Zkontrolovat / nastavit proměnné prostředí (dočasné)
omniroute test # Test připojení poskytovatele
omniroute update # Zkontrolovat aktualizace
omniroute completion # Generovat shell completion
```
### Běžné příznaky
| Příznak | Popis |
| ------------------- | ----------------------------------------------------------- |
| `--no-open` | Neotevírat automaticky prohlížeč při spuštění |
| `--port <n>` | Přepsat API port (výchozí 20128) |
| `--mcp` | Spustit jako MCP server přes stdio (pro IDE) |
| `--non-interactive` | CI režim (žádné výzvy; čte z proměnných prostředí/příznaků) |
| `--json` | Strojově čitelný JSON výstup (doktor, poskytovatelé, atd.) |
| `--help`, `-h` | Zobrazit konkrétní pomoc pro příkaz |
| `--version`, `-v` | Vytisknout nainstalovanou verzi |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Dostupné API koncové body
## Built-in Agents: Droid & OpenClaw
| Koncový bod | Popis | Použití |
| -------------------------- | --------------------------------------- | ------------------------------------- |
| `/v1/chat/completions` | Standardní chat (všichni poskytovatelé) | Všechny moderní nástroje |
| `/v1/responses` | API odpovědí (formát OpenAI) | Codex, agentické pracovní toky |
| `/v1/completions` | Zastaralé textové doplnění | Starší nástroje používající `prompt:` |
| `/v1/embeddings` | Textová embeddings | RAG, vyhledávání |
| `/v1/images/generations` | Generování obrázků | GPT-Image, Flux, atd. |
| `/v1/audio/speech` | Text na řeč | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Řeč na text | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
Příklady připravené k vložení s tokenizovanou OmniRoute URL:
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
Token příklad: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Standardní OpenAI základna: http://localhost:20128/v1
VS Code modely: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code odpovědi: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tagy: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Řešení problémů
| Chyba | Příčina | Oprava |
| ----------------------------------------------- | --------------------------------- | --------------------------------------------------------- |
| `Connection refused` | OmniRoute neběží | `omniroute serve` |
| `401 Unauthorized` | Špatný API klíč | Zkontrolujte v `/dashboard/api-manager` |
| `No combo configured` | Žádná aktiv routovací kombinace | Nastavte v `/dashboard/combos` |
| CLI zobrazuje "not installed" | Binární soubor není v PATH | Zkontrolujte `which <command>` |
| Dashboard zobrazuje "not detected" po instalaci | Cache je zastaralá | Klikněte na "⟳ Obnovit detekci" v dashboardu |
| Starý odkaz `/dashboard/cli-tools` | Záložka před v3.8.6 | Automaticky přesměrováno na `/dashboard/cli-code` (308) |
| Starý odkaz `/dashboard/agents` | Záložka před v3.8.6 | Automaticky přesměrováno na `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,309 +0,0 @@
# CLI-INTEGRATIONS (Dansk)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integrationer — peg enhver kodnings-CLI mod OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integrationer
OmniRoute leverer en familie af `setup-*` kommandoer, der konfigurerer en kodnings-CLI (Codex, Claude Code, OpenCode, Cline, …) til at bruge OmniRoute som sin backend — så værktøjet kommunikerer med **én** endpoint, og OmniRoute ruter til den rette udbyder med automatisk tilbagefald. Hver kommando læser den **live** modelkatalog fra en kørende OmniRoute (lokal eller fjern) og skriver værktøjets egen konfigurationsfil på **din** maskine. API-nøglen refereres af en miljøvariabel, hvor værktøjet understøtter det. Kommandoer, der bevarer en værktøjslokal miljøfil, er noteret nedenfor.
Der er også en generisk launcher — `omniroute run <target>` — der starter `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` eller `gemini` med den rette miljøvariabel injiceret, uden at skrive nogen konfiguration overhovedet. Mål og deres aliaser kommer fra det kanoniske manifest `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), og `omniroute completion` tilbyder de samme manifest-afledte målord. De ældre per-værktøj launchers —
`omniroute launch` (Claude Code) og `omniroute launch-codex` (Codex) — forbliver tilgængelige.
Udbyder onboarding er tilgængelig fra den samme lokale/fjern kontekst. De API-første kommandoer nedenfor holder administrationsautentifikation adskilt fra udbyderlegitimationer og printer aldrig en legitimationsoplysning i struktureret output:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
For scripts, foretræk `--credential-stdin` eller `--credential-env`; `--credential`
bevares til kontrolleret lokal brug. `providers remove` kræver `--yes` på en
ikke-interaktiv terminal, og alle fem kommandoer respekterer den aktive kontekst eller de globale `--base-url`/`--api-key` muligheder.
For den engangs, håndskrevne basisopsætning af de to rigeste integrationer, se de
per-værktøj dybdegående analyser:
- [Claude Code konfiguration](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI konfiguration](./CODEX-CLI-CONFIGURATION.md)
- [Fjernmode](./REMOTE-MODE.md) — styre en fjern OmniRoute (VPS / Tailnet) fra din bærbare computer
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot-udvidelsen; den kan også køre disse
`setup-*` kommandoer for dig fra indeni editoren
---
## Mastertabel
Hver kommando respekterer den **aktive kontekst** (sat med `omniroute connect`, se
[Remote Mode](./REMOTE-MODE.md)) eller eksplicitte `--remote <url> --api-key <key>` flag. "Lokal vs fjern" nedenfor betyder: uden flag retter den sig mod `http://localhost:20128`;
med `--remote` (eller en aktiv fjern kontekst) henter den kataloget fra den
server og skriver konfigurationen lokalt.
| Kommando | Værktøj | Hvad den skriver | Nøgleflag | Lokal vs fjern |
| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — én profil pr. kompatibel tekstmodel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Begge |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — én profil pr. matchet model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Begge |
| `omniroute setup-opencode` | OpenCode (openai-kompatibel) | `~/.config/opencode/opencode.json``omniroute` udbyder med hver katalogmodel (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Begge |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI mode) + printer VS Code udvidelsesindstillinger | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Begge |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + fusionerer `kilocode.*` ind i VS Code `settings.json`, hvis til stede | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Begge |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modeller, nøgle via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-cursor` | Cursor | Intet — printer de trin i appen (Cursor konfiguration er uklar SQLite) | `--remote` `--api-key` `--only` `--port` | Begge |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (importdokument) + sætter `roo-cline.autoImportSettingsPath`, hvis en VS Code `settings.json` eksisterer | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Begge |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-kompat` udbyder, nøgle via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + printer miljøopskrift | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + printer miljøopskrift | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` array + `OMNIROUTE_API_KEY` i `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Begge |
| `omniroute run <target>` | Runtime launch (generisk) | Intet — starter `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` med det rette miljø og argumenter; Qwen og Gemini bruger et midlertidigt isoleret hjem | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Begge |
| `omniroute launch` | Claude Code | Intet — starter `claude` med `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injiceret | `--remote` `--api-key` `--token` `--profile` `--port` | Begge |
| `omniroute launch-codex` | OpenAI Codex CLI | Intet — starter `codex` med `omniroute` udbyderen injiceret via `-c` flag | `--remote` `--api-key` `--profile` (`-p`) `--port` | Begge |
Bemærkninger om flag (verificeret i kommandoens kilde):
- `--remote <url>` — hent kataloget fra en fjern OmniRoute (overskriver `--port`
og den aktive kontekst). `--api-key <key>` leverer legitimationsoplysningen for den
server (standard til `OMNIROUTE_API_KEY` miljøvariabel, eller den aktive kontexts token).
- `--only <patterns>` — komma-separerede understrenge; behold kun model-ID'er, der matcher
(f.eks. `--only glm,kimi`). Tilgængelig på `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — print præcist hvad der ville blive skrevet uden at røre ved
filsystemet. Tilgængelig på hver `setup-*` kommando **undtagen** `setup-cursor`
(som aldrig skriver en fil).
- `--model <id>` — påkrævet (eller valgt interaktivt) for de værktøjer, der ikke har
model auto-opdagelse: Cline, Kilo, Roo, Goose, Qwen, Aider. Disse værktøjer
accepterer også `--yes` til ikke-interaktive kørsel (som så kræver `--model`).
`setup-opencode` tager `--model` for at sætte den standard top-niveau model.
- `--model <id>``omniroute run` følger manifestets per-mål wiring
(`bin/cli/cli-manifest.mjs`): **aider** modtager `--model openai/<id>` og
**opencode** `--model omniroute/<id>` (præfikset tilføjes kun, når id'et
ikke allerede bærer det); **qwen** og **gemini** modtager id'et verbatim;
**claude** får det via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, og
**codex** via `-c model_providers.omniroute.*` args. **Qwen er det eneste kørsel
mål, der hårdt kræver `--model`** — `omniroute run qwen` uden det afslutter
`2` med en eksplicit fejl.
- `--port <port>` — lokal OmniRoute port (standard `20128`, ignoreres når `--remote`
er sat). Tilstede på alle `setup-*` og begge launchers.
- `omniroute run` exit-koder: barnets CLI's egen exit-kode videreføres
verbatim; `2` = ugyldige argumenter (unsupported target, manglende påkrævet
`--model`, container guard); `127` = mål-binæren er ikke i `PATH`;
`130`/`143`/`129` når lanceringen afsluttes af `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = anden runtime lancering fejl.
- De to launchers (`launch`, `launch-codex`) accepterer `--profile <name>` for at vælge
en profil skrevet af `setup-claude` / `setup-codex`, plus pass-through args for
den underliggende `claude` / `codex` binære.
Den interaktive vælger deles også af opsætningsopskrifterne:
```bash
# Vælg fra den aktive lokale eller fjern modelkatalog og konfigurer målet.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` delegerer i øjeblikket til de testede opskrifter for `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, og `kilo`. IDE-only,
MITM, og guide-only katalogindgange forbliver eksplicitte `setup-*`/manuelle flows og
præsenteres ikke som lancerbare mål.
> `setup-opencode` er den **lette openai-kompatible** OpenCode integration.
> Der er også en rigere plugin-integration — `omniroute setup opencode` — som
> installerer `@omniroute/opencode-plugin`. De er forskellige kommandoer; tabellen
> ovenfor dokumenterer `setup-opencode`.
---
## Lokal brug
Med OmniRoute kørende på `localhost:20128`, skal du blot køre opsætningskommandoen for dit værktøj. Kataloget hentes fra den lokale server.
```bash
# Codex: skriv en profil pr. matchet model ind i ~/.codex/
omniroute setup-codex
codex --profile glm52 # brug en genereret profil
# Claude Code: skriv profiler pr. model, og start så en
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: skriv den openai-kompatible udbyder med alle katalogmodeller
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # refereret via {env:OMNIROUTE_API_KEY}, aldrig på disk
opencode -m omniroute/glm/glm-5.2 "..."
# Værktøjer uden automatisk opdagelse kræver en eksplicit model:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Forhåndsvisning uden at skrive noget:
omniroute setup-continue --dry-run
```
Start uden at skrive nogen konfiguration overhovedet (kun miljøinjektion):
```bash
omniroute launch # Claude Code → lokal OmniRoute
omniroute launch-codex # Codex CLI → lokal OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Eksplicit kommando sti: send alt hvad der kommer efter --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Fjernbrug
Peg enhver opsætningskommando mod en fjern OmniRoute med `--remote` + `--api-key`. Kataloget hentes fra den fjerne; konfigurationen skrives på din lokale maskine.
```bash
# OpenCode mod en fjern VPS, behold kun glm/kimi modeller
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # eksportér OMNIROUTE_API_KEY først
# Codex profiler fra et fjernt katalog
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Start en CLI direkte mod den fjerne
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
I stedet for at sende `--remote`/`--api-key` hver gang, log ind én gang og lad den **aktive kontekst** levere dem automatisk:
```bash
omniroute connect 192.168.0.15 # opretter en scoped token, gemmer konteksten
omniroute setup-codex # ← bruger nu det fjerne katalog
omniroute setup-opencode # ← samme
omniroute launch # ← Claude Code mod den fjerne
```
Se [Fjerntilstand](./REMOTE-MODE.md) for kontekster, scopes og tokenhåndtering.
---
## Basis-URL konventioner (hvilke værktøjer ønsker `/v1`)
OmniRoute eksponerer OpenAI-overfladen ved `/v1`, den Anthropic-overflade ved roden, og en native Gemini-overflade ved `/v1beta`. Hver integration er tilsluttet den form, som dens værktøj forventer (verificeret i kommandoens kilde):
| Integration | Basis-URL skrevet | `/v1`? |
| -------------------------------------------------------------------------- | ----------------- | --------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | rod | Nej — Cline tilføjer `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | rod | Nej — Goose tilføjer stien |
| `setup-aider` (`OPENAI_API_BASE`) | rod | Nej — LiteLLM tilføjer `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | med `/v1` | Ja |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | rod | Nej — Claude Code tilføjer `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | med `/v1` | Ja |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | med `/v1` | Ja |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | rod | Nej — SDK'en tilføjer `/v1beta/models/…` |
---
## Bevare native afhængigheder ved opdatering: `--include=optional`
Når du opdaterer med `omniroute update` (efter bekræftelse eller med `--apply`),
kører OmniRoute installationen med `--include=optional` indbygget:
```bash
npm install -g omniroute@latest --include=optional
```
Dette er **ikke** en flag, du sender til `omniroute update` — det anvendes altid af
opdateringsprogrammet. Det garanterer, at `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM-stakken) overlever opdateringen, selvom din npm-konfiguration
har `omit=optional` indstillet, hvilket ellers stille ville fjerne den native SQLite
driver og OS-keyring binding. For at forhåndsvise den nøjagtige kommando uden at anvende:
```bash
omniroute update --dry-run
# [DRY RUN] Ville køre: npm install -g omniroute@latest --include=optional
```
Andre `omniroute update` flag (verificeret i kildekoden): `--check` (afslut 1 hvis
forældet), `--apply` (installer uden at spørge), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Kontrakten er verificeret mod `@google/gemini-cli` 0.50.0: CLI'en respekterer
`GOOGLE_GEMINI_BASE_URL` og udsender `POST /v1beta/models/<model>:generateContent`
(og `:streamGenerateContent?alt=sse`) imod det — præcist OmniRoutes native
Gemini-overflade (`/v1beta`). `omniroute run gemini` forbinder det automatisk:
- `GOOGLE_GEMINI_BASE_URL` → den aktive OmniRoute base URL (rod, ingen `/v1`);
- `GEMINI_API_KEY` → den løste OmniRoute legitimationsoplysning (mulighed/miljø/kontekst);
- en **midlertidig isoleret `GEMINI_CLI_HOME`** hvis `.gemini/settings.json`
vælger `gemini-api-key` autentifikation, så en gemt Google OAuth-session (Code Assist)
aldrig overskriver den OmniRoute-styrede lancering — fjernet efter exit;
- **miljøhygiejne**: børne-miljøet er renset for `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` og `GOOGLE_GENAI_USE_GCA` (som ville omdirigere
autentifikation til Vertex/Code Assist), og `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` er
indstillet som en sikkerhedsforanstaltning — de andre `run` mål får samme
behandling for deres egne konfliktende variabler;
- `--model <id>` injektion fra `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Geminis arbejdsplads-tillidsbeskyttelse gælder stadig i headless-tilstand — send
`--skip-trust` (eller stol på mappen interaktivt) selv; lanceren
omgår bevidst ikke dette. Denne lancer er forskellig fra **ACP
registreringen** (`src/lib/acp/registry.ts`, `gemini --acp`), som forbliver
agent-protokol integrationen for `/dashboard/acp-agents`.
---
## Real smoke sweep (opt-in)
Deterministiske lanceringsplan regressionskørsler i CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). For at validere de REAL binære mod en REAL
OmniRoute server, findes der en opt-in ramme ved
`tests/integration/upstream-cli-smoke.int.test.ts`. Den kører aldrig automatisk
(alle under-tests springes over medmindre `RUN_CLI_SMOKE=1`), sender legitimationsoplysningerne via miljøvariabel
NAVN (aldrig ved værdi), redigerer nøgleformede strenge fra enhver registreret output, springer
mål over hvis binæren ikke er installeret, og klassificerer fejl som
auth / upstream / config i stedet for en ren boolean:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Valgfrit: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` begrænser sweepet;
`OMNIROUTE_SMOKE_TIMEOUT_MS` overskriver timeout på 120s pr. mål.
---
## Se også
- [Claude Code konfiguration](./CLAUDE-CODE-CONFIGURATION.md) — den dybere Claude Code guide
- [Codex CLI konfiguration](./CODEX-CLI-CONFIGURATION.md) — den engangs `[model_providers.omniroute]` grundopsætning
- [Fjernbetjeningstilstand](./REMOTE-MODE.md) — kontekster, scoped adgangstokens, kørsel af en fjernserver
- [CLI Værktøjer reference](../reference/CLI-TOOLS.md) — det fulde katalog over understøttede værktøjer + dashboard sider
- [Opsætningsguide](./SETUP_GUIDE.md) — installationsmetoder og onboarding ved første kørsel

View File

@@ -1,340 +1,86 @@
# CLI-TOOLS (Dansk)
# CLI Tools Setup Guide — OmniRoute (Dansk)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Værktøjer — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Værktøjer — OmniRoute
Sidst opdateret: 2026-08-18
OmniRoute integrerer med tre kategorier af CLI værktøjer fordelt på tre dedikerede dashboard sider:
| Side | Rute | Koncept | Antal |
| --------------- | ----------------------- | ----------------------------------------------------------------------------- | ----------- |
| **CLI Kode's** | `/dashboard/cli-code` | Kodningsværktøjer, du peger på OmniRoute (Klient → CLI → OmniRoute → Udbyder) | 26 |
| **CLI Agenter** | `/dashboard/cli-agents` | Autonome agenter, du peger på OmniRoute (samme flow, bredere omfang) | 8 |
| **ACP Agenter** | `/dashboard/acp-agents` | CLIs, som OmniRoute genererer som backend via stdio/ACP (omvendt flow) | se register |
Legacy ruter omdirigerer via 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Hvordan det fungerer
## How It Works
```
CLI Kode's / CLI Agenter (forbrugsflow):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (alle peger på OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute ruter til den rigtige udbyder)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agenter (omvendt genereringsflow):
Klientanmodning → OmniRoute → genererer CLI via stdio/ACP → svar
```
**Fordele:**
**Benefits:**
- Én API-nøgle til at administrere alle værktøjer
- Omkostningssporing på tværs af alle CLIs i dashboardet
- Modelskift uden at omkonfigurere hvert værktøj
- Fungerer lokalt og på fjernservere (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-konfigurer med `setup-*`
## Supported Tools (Dashboard Source of Truth)
Du behøver ikke at skrive hver værktøjs konfiguration i hånden. OmniRoute leverer en `setup-*`
kommando pr. understøttet CLI, der læser den **live** modelkatalog fra en kørende
OmniRoute (lokal eller fjern) og skriver værktøjets egen konfiguration på din maskine:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Hver accepterer `--remote <url> --api-key <key>` (konfigurer et lokalt værktøj mod en
fjern OmniRoute), `--dry-run` (forhåndsvisning uden at skrive), og `--port`. Værktøjer
uden model auto-opdagelse (Cline, Kilo, Roo, Goose, Aider, Qwen) tager
`--model <id>` (og `--yes` for ikke-interaktive kørsel). For at starte en CLI med den
rette miljøvariabel injiceret og ingen konfiguration skrevet overhovedet, brug den generiske
`omniroute run <target>` launcher (claude, codex, aider, goose, opencode, qwen,
gemini — mål og aliaser kommer fra `bin/cli/cli-manifest.mjs`); de legacy
per-værktøj launchers `omniroute launch` (Claude Code) og `omniroute launch-codex`
(Codex) forbliver tilgængelige. Gemini CLI er kun til lancering: det er et `omniroute run`
mål, men har ingen `setup-*`/`configure` opskrift.
### CLI fingerprint sync (Agents + Settings)
> **Fuld reference:** mastertabellen — hvad hver kommando skriver, hver flag,
> lokal vs fjern, og hvilke værktøjer der ønsker et `/v1` suffix — findes i
> **[CLI Integrationer](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Kørsel af disse inde i en container
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
En `setup-*` kommando udført inde i OmniRoute containeren skriver ind i
containerens egen hjemmemappe, som ingen værts-CLI læser og som forsvinder med
containeren. OmniRoute opdager det og afslutter med `2` med instruktioner i stedet for
at skrive. To understøttede måder fremad — installer CLI på værten og
`omniroute connect` til containeren, eller bind-mount konfigurationsmapperne og sæt
`CLI_CONFIG_HOME` (den compose `host` profil). Hver `setup-*` kommando, plus
`omniroute configure` og `omniroute config set`, accepterer
`--allow-container-write`, når konfiguration af containerens egne CLIs er det, du
faktisk mente; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` gør det samme for
serveren. Se
[Docker Guide → Konfigurering af værts-CLI værktøjer](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
Dashboardets **apply endpoint** (`POST /api/cli-tools/apply`) håndhæver den
samme beskyttelse: i en container, en skrivning hvis mål ikke er bind-mountet fra
værten svarer **`422`** med `containerEphemeralTarget: true`, den sikre fejltekst og — for
de værktøjer med en værtsopskrift (claude, codex, opencode, cline,
kilo, continue) — en `hostSetupCommand` (f.eks. `omniroute setup-opencode`) der skal køres
på værten i stedet; intet skrives. `dryRun: true` fortsætter med at fungere i container
tilstand og returnerer det genererede indhold + målsti uden at røre disken, så
du kan forhåndsvise fra dashboardet og anvende på værten. Denne adfærd er
intentionel og regressionsbeskyttet af
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — fjern aldrig "fix" en 422
ved at fjerne beskyttelsen.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Sandkasse
## Step 1 — Get an OmniRoute API Key
Den samlede katalog findes i `src/shared/constants/cliTools.ts` som `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Hver post har disse felter (defineret i `src/shared/schemas/cliCatalog.ts`):
| Felt | Type | Beskrivelse |
| ----------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Hvilken side værktøjet vises på |
| `vendor` | `string` | Værktøjets oprindelse ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Også brugbar som en ACP Agent (badge vist) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Niveau for tilpasset endpoint support. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Konfigurationsmekanisme |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Kernevisningsfelter |
Poster med `baseUrlSupport: "none"` vises **ikke** på dashboard-siderne — de er registreret i MITM-backloggen for plan 11 (se `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Kapabilitet niveauer (katalogiseret × detekterbar × konfigurerbar × lancerbar)
Ikke hvert katalogiseret værktøj er detekterbart, konfigurerbart eller lancerbart. Hvert niveau har en
erklærende kilde, og en driftstest holder dem synkroniseret:
| Niveau | Betydning | Erklæret i |
| ----------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Katalogiseret** | Visas i dashboard-kataloget (navn, leverandør, dokumentation, konfigurationstype) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detekterbar** | Binær/konfigurationsdetektion, sundhedstjek, konfigurationsstier | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime katalog) |
| **Konfigurerbar** | Understøttet af `omniroute configure <cli>` (opsætningsopskrift eksisterer) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Lancerbar** | Understøttet af `omniroute run <target>` (env/args injektion defineret) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` er det kanoniske eksekverbare manifest for CLI-kommandoerne
overflader: `run`, `configure` og shell-completion generatorer afleder alle deres
mål lister, alias opløsning (for eksempel `kilocode`/`kilo-code`/`kilo_cli``kilo`)
og `--model` flag wiring fra det. Driftbeskyttelsen
`tests/unit/cli/cli-manifest-drift.test.ts` bekræfter, at manifestet, runtime
kataloget, UI kataloget og hver forbruger overflade forbliver synkroniseret — et mål tilføjet til
én overflade uden de andre fejler suite i stedet for at drive stille.
## 1. CLI Kodekatalog (26 værktøjer)
Alle værktøjer, der vises i `/dashboard/cli-code`. De med `baseUrlSupport: none` er tilsluttet gennem MITM eller en manuel vejledning i stedet for en tilpasset base URL:
| id | navn | leverandør | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Kode | Anthropic | fuld | env | true |
| codex | OpenAI Codex CLI | OpenAI | fuld | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | ingen | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | fuld | custom | true |
| kilo | Kilo Kode | Kilo-Org | fuld | custom | false |
| roo | Roo Kode | Roo (OSS) | fuld | guide | false |
| continue | Continue | continue.dev | fuld | guide | false |
| aider | Aider | OSS (P. Gauthier) | fuld | guide | true |
| forge | ForgeCode | Antinomy HQ | fuld | custom | true |
| jcode | jcode | 1jehuang (OSS) | fuld | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | fuld | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | fuld | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | fuld | guide | true |
| droid | Factory Droid | Factory AI | delvis | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | fuld | custom | false |
| cursor-cli | Cursor CLI | Anysphere | delvis | guide | true |
| smelt | Smelt | leonardcser (OSS) | fuld | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | fuld | custom | false |
| grok-build | Grok Build | xAI | fuld | custom | false |
| crush | Crush | OSS (Charm) | fuld | custom | false |
| qwen | Qwen Kode | Alibaba | fuld | guide | true |
| cursor | Cursor | Anysphere | ingen | guide | false |
| antigravity | Antigravity | Google | ingen | mitm | false |
| hermes | Hermes | Nous Research | ingen | guide | false |
| kiro | Kiro AI | Amazon | ingen | mitm | false |
| custom | Custom CLI | — | fuld | custom-builder | false |
Værktøjer med `baseUrlSupport: "partial"` viser et badge "⚠ Base URL parcial" i dashboardkortet.
## 2. CLI Agenter Katalog (8 værktøjer)
Autonome agenter, der vises i `/dashboard/cli-agents`:
| id | navn | leverandør | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | fuld | falsk |
| openclaw | OpenClaw | OSS (P. Steinberger) | fuld | sand |
| goose | Goose | Block / Linux Foundation | fuld | sand |
| interpreter | Open Interpreter | OSS | fuld | sand |
| warp | Warp AI | Warp Inc. | delvis | sand |
| agent-deck | Agent Deck | asheshgoplani (OSS) | fuld | falsk |
| omp | Oh My Pi | OSS | fuld | sand |
| letta | Letta CLI | Letta | fuld | falsk |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP Agenter (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Denne side (omdøbt fra `/dashboard/agents`) viser CLIs, som OmniRoute kan **spawne** som backend eksekveringsmotorer via stdio/ACP protokol. Katalogen vedligeholdes separat i `src/lib/acp/registry.ts` og er **ikke** den samme som `CLI_TOOLS`.
---
## 4. MITM Backlog (ikke vist i dashboard)
Følgende CLIs understøtter ikke brugerdefineret base URL nativt og er **ikke listet** i CLI Code's eller CLI Agents sider. De er kandidater til MITM interception i plan 11:
| CLI | Årsag |
| ------------------- | --------------------------------------------------------------------- |
| windsurf | BYOK begrænset til udvalgte Claude modeller + virksomhedens URL/token |
| amp | Lukket økosystem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO autentificering, ingen brugerdefineret URL |
| cowork | Anthropic Desktop, ingen konfigurerbar endpoint |
Se `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` for den fulde krydsreference.
---
## 5. Batch Detection API
Alle værktøjsdetektioner er aggregeret via et enkelt endpoint:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (samme som andre `/api/cli-tools/` ruter)
- Returnerer: `Record<toolId, ToolBatchStatus>` (type: `src/shared/types/cliBatchStatus.ts`)
- Strategi: `Promise.all` over alle værktøjer, 5s timeout pr. værktøj
- Cache: i-hukommelse LRU indekseret efter konfigurationsfil `mtime`. Cache ugyldiggjort når mtime ændres. Nulstil ved server genstart.
Responsform pr. værktøj:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitiseret, ingen stack traces
}
```
## 6. Indstillinger Håndterere for Nye Værktøjer
Nye værktøjer med `configType: "custom"` har dedikerede indstillings-API-ruter:
| Rute | Værktøj |
| ------------------------------------------- | --------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primær + legacy `~/.deepseek` synk) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedikeret `.env` nøgle) |
Alle ruter bruger `sanitizeErrorMessage()` til fejlrespons (Hard Rule #12).
---
## 7. Dashboard Sider Arkitektur
### CLI Kode (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — serverkomponent
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — klientgitter
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — værktøjsdetaljeside
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 specialiserede værktøjskort + `ToolDetailClient.tsx`
### CLI Agenter (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — serverkomponent
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — klientgitter
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — genbruger `ToolDetailClient`
### ACP Agenter (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — serverkomponent (flyttet fra `agents/`)
### Delte UI Komponenter (`src/shared/components/cli/`)
| Fil | Formål |
| ----------------------- | ------------------------------------------------------- |
| `CliToolCard.tsx` | Smart statuskort (detektion + konfiguration + endpoint) |
| `CliConceptCard.tsx` | Per-side konceptforklaringskort |
| `CliComparisonCard.tsx` | Tre-kolonne sammenligning på tværs af CLI-typer |
| `BaseUrlSelect.tsx` | Endpoint dropdown (Lokal/Cloud/Custom) |
| `ApiKeySelect.tsx` | API-nøglevælger |
| `ManualConfigModal.tsx` | Kopierbar konfigurationssnippet modal |
### Delte Hook (`src/shared/hooks/cli/`)
| Fil | Formål |
| ------------------------- | ---------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Henter `/api/cli-tools/all-statuses`, håndterer indlæsning/opdateringsstatus |
## 8. i18n
Nye navnerum tilføjet i plan 14 F9:
| Navnerum | Formål |
| ----------- | ------------------------------------------------------------------------------------- |
| `cliCommon` | Delte strenge (kortetiketter, koncept/komparative tekster, detaljerede sideetiketter) |
| `cliCode` | CLI Code's side-strenge |
| `cliAgents` | CLI Agents side-strenge |
| `acpAgents` | ACP Agents side-strenge |
Fuld PT-BR og EN oversættelser er tilgængelige. 39 andre lokaliteter falder automatisk tilbage til EN via navnerumsniveau-sammenlægning i `src/i18n/request.ts`.
---
## 9. Hurtig Start
### Trin 1 — Få en OmniRoute API-nøgle
1. Åbn `/dashboard/api-manager`**Opret API-nøgle**
2. Giv den et navn (f.eks. `cli-tools`) og vælg alle tilladelser
3. Kopier nøgle — du får brug for den til hver CLI nedenfor
> Din nøgle ser sådan ud: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Trin 2 — Installer CLI-værktøjer
Alle npm-baserede værktøjer kræver Node.js 22.22.2+ eller 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -352,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (kan startes via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-baseret
# Pi coding agent
# se https://github.com/zechnerj/pi-coding-agent for installation
# jcode
# se https://github.com/1jehuang/jcode for installation
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Trin 3 — Konfigurer via Dashboard
## Step 3 — Set Global Environment Variables
1. Gå til `http://localhost:20128/dashboard/cli-code`
2. Find dit værktøj i gitteret
3. Klik på kortet for at åbne værktøjets detaljeside
4. Vælg din API-nøgle og base-URL
5. Klik på **Anvend konfiguration** eller kopier den manuelle konfigurationssnippet
---
### Trin 4 — Indstil globale miljøvariabler
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI læser GOOGLE_GEMINI_BASE_URL ved ROOT (dens SDK tilføjer /v1beta/... selv)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> For en **fjernserver** erstat `localhost:20128` med serverens IP eller domæne,
> f.eks. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Trin 4 — Konfigurer hvert værktøj
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Opret ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Brug den samlede Anthropic gateway root til Claude Code. Tilføj ikke `/v1` her.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Moderne Codex (v0.137+) læser kun `~/.codex/config.toml` — den gamle
`config.yaml` tilhører den forældede npm CLI og ignoreres stille. API-nøglen
forbliver i miljøvariablen `OMNIROUTE_API_KEY` (`env_key`), aldrig
inde i filen:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Fuld reference (profiler, `wire_api`, kontekstvinduer): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Brug `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> for at sende tænkevarianter.
---
#### Cline (CLI eller VS Code)
### Cline (CLI or VS Code)
**CLI-tilstand:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -495,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code-tilstand:**
Cline-udvidelsesindstillinger → API-udbyder: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Eller brug OmniRoute-dashboardet**CLI Tools → Cline → Anvend konfiguration**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI eller VS Code)
### KiloCode (CLI or VS Code)
**CLI-tilstand:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code-indstillinger:**
**VS Code settings:**
```json
{
@@ -519,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Eller brug OmniRoute-dashboardet**CLI Tools → KiloCode → Anvend konfiguration**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code-udvidelse)
### Continue (VS Code Extension)
Rediger `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -537,255 +241,158 @@ models:
default: true
```
Genstart VS Code efter redigering.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Brug dette, når VS Code Insiders er konfigureret til brugerdefinerede endpoint-modeller, og du ønsker, at OmniRoute skal fungere uden et brugerdefineret headerfelt.
**Anbefalet placering:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Eksempel ved brug af den tokeniserede OmniRoute-alias:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Bemærkninger:**
- Erstat `sk-your-omniroute-key` med en API-nøgle oprettet i OmniRoute.
- Feltet `url` skal pege på `/api/v1/vscode/{token}/chat/completions`.
- Feltet `modelsUrl` skal pege på `/api/v1/vscode/{token}/models`.
- Foretræk den normale `/v1` + Bearer header-flow, når klienten understøtter brugerdefinerede headers.
- URL-embedded tokens er en kompatibilitetsfald tilbage og kan vises i editorlogs eller proxyhistorik.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Log ind på din AWS/Kiro-konto:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI'en bruger sin egen autentificering — OmniRoute er ikke nødvendig som backend for Kiro CLI selv.
# Brug kiro-cli sammen med OmniRoute til andre værktøjer.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
For **Kiro IDE** desktopapp, brug MITM-endpointet, der er eksponeret af OmniRoute
under `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. Intern OmniRoute CLI
## Dashboard Auto-Configuration
Den `omniroute` binære fil giver kommandoer til serverlivscyklus, opsætning, diagnostik og leverandørstyring. Indgangspunkt: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Start server (standard port 20128)
omniroute setup # Interaktiv opsætningsguide
omniroute doctor # Tjek konfiguration, DB, porte, runtime
omniroute providers list # Konfigurerede leverandørforbindelser
omniroute providers test-all # Test hver aktiv forbindelse
omniroute reset-password # Nulstil adminadgangskode
omniroute logs # Stream anmodningslogs
omniroute health # Detaljeret sundhed (afbrydere, cache, hukommelse)
omniroute --version # Udskriv version
omniroute --help # Vis alle kommandoer
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
### Opsætning & Initialisering
---
```bash
omniroute setup # Interaktiv opsætningsguide
omniroute setup --non-interactive # CI/automatiseringsmode (læser miljøvariabler + flags)
omniroute setup --password '<value>' # Indstil adminadgangskode direkte
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Tilføj og test en leverandør i ét hug
```
## Built-in Agents: Droid & OpenClaw
Anerkendte miljøvariabler til ikke-interaktiv opsætning:
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
| Var | Formål |
| ------------------- | -------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Leverandør API-nøgle (bundet til `--api-key` via Commander `.env()`) |
| `DATA_DIR` | Overskriv OmniRoute data katalog |
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
Alle andre ikke-interaktive input gives som flags, ikke miljøvariabler:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(se `omniroute setup` mulighederne ovenfor).
---
### Diagnostik
## Available API Endpoints
```bash
omniroute doctor # Tjek konfiguration, DB, porte, runtime, hukommelse, livlighed
omniroute doctor --json # Maskinlæsbart JSON
omniroute doctor --no-liveness # Spring HTTP sundhedsprobe over
omniroute doctor --host 0.0.0.0 # Overskriv livlighedsvært
omniroute doctor --liveness-url <url> # Fuldt sundhedsendepunkt URL-overskrivning
```
Doktoren kører disse tjek: `Konfiguration`, `Database`, `Lagring/kryptering`,
`Porttilgængelighed`, `Node runtime`, `Native binær` (better-sqlite3),
`Hukommelse`, og `Serverlivlighed`. Den afslutter ikke-nul, hvis nogen tjek er `fejl`.
### Leverandørstyring
```bash
omniroute providers available # OmniRoute leverandørkatalog
omniroute providers available --search openai # Filtrer katalog efter id/navn/alias/kategori
omniroute providers available --category api-key # Filtrer efter kategori (api-key, oauth, gratis, ...)
omniroute providers available --json # Maskinlæsbart JSON
omniroute providers list # Konfigurerede leverandørforbindelser
omniroute providers list --json
omniroute providers test <id|name> # Test én konfigureret forbindelse
omniroute providers test-all # Test hver aktiv forbindelse
omniroute providers validate # Lokalt strukturel validering
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Eksisterende OAuth-flow
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` er API-først og fungerer derfor mod
den aktive lokale eller fjerntliggende kontekst. Credential input bør bruge
`--credential-stdin` eller `--credential-env`; `--dry-run --json` rapporterer kun
redigeret tilstedeværelse/form. `providers available` læser OmniRoute kataloget;
`providers list/test/test-all/validate` bevarer deres lokale SQLite adfærd og
kræver ikke, at serveren kører.
### Gendannelse & Nulstilling
```bash
omniroute reset-password # Nulstil adminadgangskode (også: omniroute-reset-password)
omniroute reset-encrypted-columns # Vis advarsel + tørkørsel for nulstilling af krypterede legitimationsoplysninger
omniroute reset-encrypted-columns --force # Faktisk nulstil krypterede legitimationsoplysninger i SQLite
```
### Eksport af legitimationsoplysninger (⚠ håndter med omhu)
```bash
omniroute auth export # Vis advarsel + bekræftelsesport — ingen DB-adgang
omniroute auth export --force # Eksporter ALLE forbindelsers DEKRYPPERET legitimationsoplysninger til stdout som JSON
omniroute auth export --force --id <id> # Eksporter kun den matchende forbindelse
omniroute auth export --force --format env # Udsend OMNIROUTE_<PROVIDER>_<FIELD>=<value> linjer
omniroute auth export --force --out creds.json # Skriv til en fil (oprettet med 0600 tilladelser)
```
`auth export` er **lokal-only** (direkte SQLite læsning, ingen HTTP rute) og udskriver/skriver
**ukrypteret** `apiKey`/`accessToken`/`refreshToken`/`idToken` værdier — det er funktionen, ikke en
fejl. Intet læses fra databasen, og intet dekrypteres, uden `--force`. En stderr
advarselsbanner udskrives altid før nogen ukrypteret data udsendes. Kræver `STORAGE_ENCRYPTION_KEY` at
være indstillet. Et felt, der ikke kan dekrypteres (gammel nøgle, beskadiget ciphertext) rapporteres som
`<field>DecryptFailed: true` i stedet for at abortere hele eksporten eller lække den underliggende fejl.
### Andre underkommandoer
Disse antager en kørende OmniRoute server, medmindre andet er angivet:
```bash
omniroute status # Omfattende runtime status
omniroute logs # Stream anmodningslogs (--json, --search, --follow)
omniroute config show # Vis nuværende konfiguration
omniroute provider list # Liste over tilgængelige leverandører (alias af providers list)
omniroute provider add # Registrer OmniRoute som en leverandør på et værktøj
omniroute keys add | list | remove # Administrer API-nøgler
omniroute models [provider] # Liste over modeller (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfiguration + DB
omniroute restore # Gendan fra et tidligere snapshot
omniroute health # Detaljeret sundhed (afbrydere, cache, hukommelse)
omniroute quota # Leverandør kvote brug
omniroute cache # Cache status
omniroute cache clear # Ryd semantiske + signatur caches
omniroute mcp status | restart # MCP server status / genstart
omniroute a2a status | card # A2A server status / agentkort
omniroute tunnel list | create | stop # Administrer tunneler (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspicer / indstil miljøvariabler (midlertidige)
omniroute test # Leverandør tilslutning røgtest
omniroute update # Tjek for opdateringer
omniroute completion # Generer shell completion
```
### Almindelige flags
| Flag | Beskrivelse |
| ------------------- | --------------------------------------------------- |
| `--no-open` | Åbn ikke automatisk browseren ved start |
| `--port <n>` | Overskriv API-porten (standard 20128) |
| `--mcp` | Kør som MCP-server over stdio (til IDE'er) |
| `--non-interactive` | CI-mode (ingen prompts; læser fra env/flags) |
| `--json` | Maskinlæsbart JSON-output (doctor, providers, osv.) |
| `--help`, `-h` | Vis kommando-specifik hjælp |
| `--version`, `-v` | Udskriv den installerede version |
## Tilgængelige API Endpoints
| Endpoint | Beskrivelse | Brug til |
| -------------------------- | ----------------------------- | ------------------------------------ |
| `/v1/chat/completions` | Standard chat (alle udbydere) | Alle moderne værktøjer |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentiske arbejdsgange |
| `/v1/completions` | Legacy tekstkompletteringer | Ældre værktøjer der bruger `prompt:` |
| `/v1/embeddings` | Tekst embeddings | RAG, søgning |
| `/v1/images/generations` | Billedgenerering | GPT-Image, Flux, osv. |
| `/v1/audio/speech` | Tekst-til-tale | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Tale-til-tekst | Deepgram, AssemblyAI |
Klar-til-at-indsætte eksempler med en tokeniseret OmniRoute URL:
```txt
Token eksempel: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standard OpenAI base: http://localhost:20128/v1
VS Code modeller: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Fejlfinding
| Fejl | Årsag | Løsning |
| ------------------------------------------------- | ------------------------- | -------------------------------------------------- |
| `Connection refused` | OmniRoute kører ikke | `omniroute serve` |
| `401 Unauthorized` | Forkert API-nøgle | Tjek i `/dashboard/api-manager` |
| `No combo configured` | Ingen aktiv routing combo | Opsæt i `/dashboard/combos` |
| CLI viser "not installed" | Binær ikke i PATH | Tjek `which <command>` |
| Dashboard viser "not detected" efter installation | Cache forældet | Klik "⟳ Opdater registrering" i dashboard |
| Gamle link `/dashboard/cli-tools` | Pre-v3.8.6 bogmærke | Auto-omdirigeret til `/dashboard/cli-code` (308) |
| Gamle link `/dashboard/agents` | Pre-v3.8.6 bogmærke | Auto-omdirigeret til `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,271 +0,0 @@
# CLI-INTEGRATIONS (Deutsch)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI-Integrationen — jede Coding-CLI auf OmniRoute ausrichten"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI-Integrationen
OmniRoute liefert eine Familie von `setup-*`-Befehlen, die eine Coding-CLI (Codex, Claude Code, OpenCode, Cline, …) so konfigurieren, dass sie OmniRoute als Backend verwendet — sodass das Tool mit **einem** Endpunkt kommuniziert und OmniRoute an den richtigen Anbieter weiterleitet mit automatischem Fallback. Jeder Befehl liest den **aktuellen** Modellkatalog von einem laufenden OmniRoute (lokal oder remote) und schreibt die eigene Konfigurationsdatei des Tools auf **deinem** Rechner. Der API-Schlüssel wird durch eine Umgebungsvariable referenziert, wo immer das Tool dies unterstützt. Befehle, die eine lokal umgebungsbezogene Datei des Tools speichern, sind unten aufgeführt.
Es gibt auch einen generischen Launcher — `omniroute run <target>` — der `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` oder `gemini` mit der richtigen Umgebung injiziert, ohne überhaupt eine Konfiguration zu schreiben. Ziele und deren Aliase stammen aus dem kanonischen Manifest `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), und `omniroute completion` bietet die gleichen manifest-abgeleiteten Zielwörter an. Die Legacy-Launcher pro Tool — `omniroute launch` (Claude Code) und `omniroute launch-codex` (Codex) — bleiben verfügbar.
Die Anbieter-Onboarding ist aus demselben lokalen/remote Kontext verfügbar. Die API-first-Befehle unten halten die Verwaltungsauthentifizierung von den Anbieteranmeldeinformationen getrennt und drucken niemals eine Anmeldeinformation in strukturiertem Output:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Für Skripte bevorzuge `--credential-stdin` oder `--credential-env`; `--credential` bleibt für kontrollierte lokale Nutzung erhalten. `providers remove` erfordert `--yes` in einem nicht-interaktiven Terminal, und alle fünf Befehle respektieren den aktiven Kontext oder die globalen `--base-url`/`--api-key`-Optionen.
Für die einmalige, handgeschriebene Basiseinrichtung der beiden umfangreichsten Integrationen siehe die tiefgehenden Analysen pro Tool:
- [Claude Code-Konfiguration](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI-Konfiguration](./CODEX-CLI-CONFIGURATION.md)
- [Remote-Modus](./REMOTE-MODE.md) — steuere ein entferntes OmniRoute (VPS / Tailnet) von deinem Laptop aus
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — die OmniCopilot-Erweiterung; sie kann auch diese `setup-*`-Befehle für dich innerhalb des Editors ausführen
---
## Mastertabelle
Jeder Befehl respektiert den **aktiven Kontext** (gesetzt mit `omniroute connect`, siehe [Remote-Modus](./REMOTE-MODE.md)) oder explizite `--remote <url> --api-key <key>`-Flags. "Lokal vs. remote" bedeutet unten: ohne Flags zielt es auf `http://localhost:20128`; mit `--remote` (oder einem aktiven Remote-Kontext) wird der Katalog von diesem Server abgerufen und die Konfiguration lokal geschrieben.
| Befehl | Tool | Was es schreibt | Schlüssel-Flags | Lokal vs. remote |
| -------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — ein Profil pro kompatiblem Textmodell (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Beide |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — ein Profil pro übereinstimmendem Modell (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Beide |
| `omniroute setup-opencode` | OpenCode (openai-kompatibel) | `~/.config/opencode/opencode.json``omniroute`-Anbieter mit jedem Katalogmodell (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Beide |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI-Modus) + druckt VS Code-Erweiterungseinstellungen | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Beide |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + fügt `kilocode.*` in die VS Code `settings.json` ein, falls vorhanden | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Beide |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` Modelle, Schlüssel über `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-cursor` | Cursor | Nichts — druckt die Schritte in der App (Cursor-Konfiguration ist undurchsichtiges SQLite) | `--remote` `--api-key` `--only` `--port` | Beide |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (Importdokument) + setzt `roo-cline.autoImportSettingsPath`, falls eine VS Code `settings.json` existiert | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Beide |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-kompatibler` Anbieter, Schlüssel über `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + druckt Umgebungsrezept | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + druckt Umgebungsrezept | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai`-Array + `OMNIROUTE_API_KEY` in `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Beide |
| `omniroute run <target>` | Laufzeit-Launcher (generisch) | Nichts — startet `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` mit der richtigen Umgebung und Argumenten; Qwen und Gemini verwenden ein temporäres isoliertes Home | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Beide |
| `omniroute launch` | Claude Code | Nichts — startet `claude` mit `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injiziert | `--remote` `--api-key` `--token` `--profile` `--port` | Beide |
| `omniroute launch-codex` | OpenAI Codex CLI | Nichts — startet `codex` mit dem `omniroute`-Anbieter, der über `-c`-Flags injiziert wird | `--remote` `--api-key` `--profile` (`-p`) `--port` | Beide |
Hinweise zu den Flags (verifiziert im Befehlsquellcode):
- `--remote <url>` — ruft den Katalog von einem entfernten OmniRoute ab (überschreibt `--port` und den aktiven Kontext). `--api-key <key>` liefert die Anmeldeinformation für diesen Server (standardmäßig auf die Umgebungsvariable `OMNIROUTE_API_KEY` oder das Token des aktiven Kontexts gesetzt).
- `--only <patterns>` — durch Kommas getrennte Teilstrings; behält nur Modell-IDs, die übereinstimmen (z. B. `--only glm,kimi`). Verfügbar bei `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — druckt genau das, was geschrieben werden würde, ohne das Dateisystem zu berühren. Verfügbar bei jedem `setup-*`-Befehl **außer** `setup-cursor` (das niemals eine Datei schreibt).
- `--model <id>` — erforderlich (oder interaktiv ausgewählt) für die Tools, die keine Modell-Autoentdeckung haben: Cline, Kilo, Roo, Goose, Qwen, Aider. Diese Tools akzeptieren auch `--yes` für nicht-interaktive Ausführungen (was dann `--model` erfordert). `setup-opencode` benötigt `--model`, um das standardmäßige oberste Modell festzulegen.
- `--model <id>` bei `omniroute run` folgt der pro-Ziel-Verkabelung des Manifests (`bin/cli/cli-manifest.mjs`): **aider** erhält `--model openai/<id>` und **opencode** `--model omniroute/<id>` (das Präfix wird nur hinzugefügt, wenn die ID es nicht bereits trägt); **qwen** und **gemini** erhalten die ID unverändert; **claude** erhält sie über `ANTHROPIC_MODEL`, **goose** über `GOOSE_MODEL`, und **codex** über `-c model_providers.omniroute.*`-Argumente. **Qwen ist das einzige Laufziel, das zwingend `--model` erfordert**`omniroute run qwen` ohne es beendet mit `2` und einem expliziten Fehler.
- `--port <port>` — lokaler OmniRoute-Port (Standard `20128`, ignoriert, wenn `--remote` gesetzt ist). Vorhanden bei allen `setup-*` und beiden Launchern.
- `omniroute run` Rückgabecodes: Der eigene Rückgabecode der untergeordneten CLI wird unverändert weitergegeben; `2` = ungültige Argumente (nicht unterstütztes Ziel, fehlendes erforderliches `--model`, Container-Schutz); `127` = die Zielbinary ist nicht im `PATH`; `130`/`143`/`129`, wenn der Start durch `SIGINT`/`SIGTERM`/`SIGHUP` beendet wird; `1` = andere Laufzeitstartfehler.
- Die beiden Launcher (`launch`, `launch-codex`) akzeptieren `--profile <name>`, um ein von `setup-claude` / `setup-codex` geschriebenes Profil auszuwählen, plus Durchlauf-Argumente für die zugrunde liegende `claude` / `codex`-Binary.
Der interaktive Picker wird auch von den Setup-Rezepten geteilt:
```bash
# Wähle aus dem aktiven lokalen oder entfernten Modellkatalog und konfiguriere das Ziel.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` delegiert derzeit an die getesteten Rezepte für `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue` und `kilo`. IDE-only, MITM und guide-only Katalogeinträge bleiben explizite `setup-*`/manuelle Abläufe und werden nicht als startbare Ziele präsentiert.
> `setup-opencode` ist die **leichte openai-kompatible** OpenCode-Integration.
> Es gibt auch eine umfangreichere Plugin-Integration — `omniroute setup opencode` — die `@omniroute/opencode-plugin` installiert. Es sind verschiedene Befehle; die obige Tabelle dokumentiert `setup-opencode`.
---
## Lokale Nutzung
Mit OmniRoute, das auf `localhost:20128` läuft, führen Sie einfach den Setup-Befehl für Ihr Tool aus. Der Katalog wird vom lokalen Server abgerufen.
```bash
# Codex: schreibe ein Profil pro übereinstimmendem Modell in ~/.codex/
omniroute setup-codex
codex --profile glm52 # verwende ein generiertes Profil
# Claude Code: schreibe pro Modell Profile und starte dann eines
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: schreibe den openai-kompatiblen Anbieter mit allen Katalogmodellen
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # verwiesen über {env:OMNIROUTE_API_KEY}, niemals auf der Festplatte
opencode -m omniroute/glm/glm-5.2 "..."
# Tools ohne automatische Erkennung benötigen ein explizites Modell:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Vorschau ohne irgendetwas zu schreiben:
omniroute setup-continue --dry-run
```
Starten Sie ohne jegliche Konfiguration zu schreiben (nur Umgebungsinjektion):
```bash
omniroute launch # Claude Code → lokales OmniRoute
omniroute launch-codex # Codex CLI → lokales OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "antwort OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "antwort OK"
omniroute run qwen --model glm/glm-5.2 -- -p "antwort OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "antwort OK"
# Expliziter Befehls-Pfad: alles, was nach -- kommt, wird durchgereicht
omniroute run claude -- --print-system-prompt "überprüfe diesen Unterschied"
```
---
## Remote-Nutzung
Richten Sie jeden Setup-Befehl auf ein entferntes OmniRoute mit `--remote` + `--api-key` aus. Der Katalog wird von der Ferne abgerufen; die Konfiguration wird auf Ihrem lokalen Computer geschrieben.
```bash
# OpenCode gegen einen entfernten VPS, nur glm/kimi Modelle behalten
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exportiere OMNIROUTE_API_KEY zuerst
# Codex-Profile aus einem entfernten Katalog
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Starte eine CLI direkt gegen die Ferne
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Anstatt `--remote`/`--api-key` jedes Mal zu übergeben, melden Sie sich einmal an und lassen Sie den **aktiven Kontext** sie automatisch bereitstellen:
```bash
omniroute connect 192.168.0.15 # erstellt ein eingeschränktes Token, speichert den Kontext
omniroute setup-codex # ← verwendet jetzt den entfernten Katalog
omniroute setup-opencode # ← dasselbe
omniroute launch # ← Claude Code gegen die Ferne
```
Siehe [Remote-Modus](./REMOTE-MODE.md) für Kontexte, Bereiche und Token-Management.
---
## Basis-URL-Konventionen (welche Tools `/v1` wollen)
OmniRoute stellt die OpenAI-Oberfläche unter `/v1` zur Verfügung, die Anthropic-Oberfläche an der Wurzel und eine native Gemini-Oberfläche unter `/v1beta`. Jede Integration ist an die Form angeschlossen, die ihr Tool erwartet (verifiziert in der Befehlsquelle):
| Integration | Basis-URL geschrieben | `/v1`? |
| -------------------------------------------------------------------------- | --------------------- | ------------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | Wurzel | Nein — Cline fügt `/v1/chat/completions` hinzu |
| `setup-goose` (`OPENAI_HOST`) | Wurzel | Nein — Goose fügt den Pfad hinzu |
| `setup-aider` (`OPENAI_API_BASE`) | Wurzel | Nein — LiteLLM fügt `/v1/chat/completions` hinzu |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | mit `/v1` | Ja |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | Wurzel | Nein — Claude Code fügt `/v1/messages` hinzu |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | mit `/v1` | Ja |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | mit `/v1` | Ja |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | Wurzel | Nein — das SDK fügt `/v1beta/models/…` hinzu |
---
## Native Abhängigkeiten bei Updates beibehalten: `--include=optional`
Wenn Sie mit `omniroute update` aktualisieren (nach Bestätigung oder mit `--apply`),
führt OmniRoute die Installation mit `--include=optional` aus:
```bash
npm install -g omniroute@latest --include=optional
```
Dies ist **kein** Flag, das Sie an `omniroute update` übergeben — es wird immer vom
Updater angewendet. Es garantiert, dass die `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, der LLMLingua SLM-Stack) das Update überstehen, selbst wenn Ihre npm-Konfiguration
`omit=optional` gesetzt hat, was andernfalls den nativen SQLite-Treiber und die OS-Keyring-Bindung
stillschweigend entfernen würde. Um den genauen Befehl ohne Anwendung anzuzeigen:
```bash
omniroute update --dry-run
# [DRY RUN] Würde ausgeführt: npm install -g omniroute@latest --include=optional
```
Andere `omniroute update`-Flags (verifiziert im Quellcode): `--check` (beendet mit 1, wenn
veraltet), `--apply` (installiert ohne Aufforderung), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI über `omniroute run gemini`
Vertrag verifiziert gegen `@google/gemini-cli` 0.50.0: die CLI respektiert
`GOOGLE_GEMINI_BASE_URL` und gibt `POST /v1beta/models/<model>:generateContent`
(und `:streamGenerateContent?alt=sse`) dagegen aus — genau wie die native
Gemini-Oberfläche von OmniRoute (`/v1beta`). `omniroute run gemini` verbindet das automatisch:
- `GOOGLE_GEMINI_BASE_URL` → die aktive OmniRoute-Basis-URL (Wurzel, kein `/v1`);
- `GEMINI_API_KEY` → die aufgelöste OmniRoute-Anmeldeinformation (Option/Umgebung/Kontext);
- ein **temporäres isoliertes `GEMINI_CLI_HOME`**, dessen `.gemini/settings.json`
die Authentifizierung `gemini-api-key` auswählt, sodass eine gespeicherte Google OAuth-Sitzung (Code Assist)
niemals den OmniRoute-gesteuerten Start überschreibt — nach dem Verlassen entfernt;
- **Umgebungs-Hygiene**: die Kind-Umgebung wird von `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` und `GOOGLE_GENAI_USE_GCA` bereinigt (die die
Authentifizierung an Vertex/Code Assist umleiten würden), und `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` wird
als Sicherheitsnetz gesetzt — die anderen `run`-Ziele erhalten die gleiche
Behandlung für ihre eigenen widersprüchlichen Variablen;
- `--model <id>`-Einspritzung von `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Der Workspace-Vertrauensschutz von Gemini gilt weiterhin im Headless-Modus — übergeben Sie
`--skip-trust` (oder vertrauen Sie dem Verzeichnis interaktiv) selbst; der Launcher
umgeht dies absichtlich nicht. Dieser Launcher ist von der **ACP-Registrierung**
(`src/lib/acp/registry.ts`, `gemini --acp`) zu unterscheiden, die die
Agenten-Protokoll-Integration für `/dashboard/acp-agents` bleibt.
---
## Echter Smoke-Test (Opt-in)
Deterministische Launch-Plan-Regressionsläufe in CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Um die REALEN Binärdateien gegen einen REALEN
OmniRoute-Server zu validieren, gibt es ein Opt-in-Harness unter
`tests/integration/upstream-cli-smoke.int.test.ts`. Es wird niemals automatisch ausgeführt
(jeder Untertest wird übersprungen, es sei denn, `RUN_CLI_SMOKE=1`), übergibt die Anmeldeinformationen
über die Umgebungsvariable NAME (niemals durch Wert), redigiert schlüsselähnliche Zeichenfolgen
aus allen aufgezeichneten Ausgaben, überspringt Ziele, deren Binärdatei nicht installiert ist,
und klassifiziert Fehler als auth / upstream / config anstelle eines einfachen Booleans:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Optional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` beschränkt den Test;
`OMNIROUTE_SMOKE_TIMEOUT_MS` überschreibt das Timeout von 120s pro Ziel.
---
## Siehe auch
- [Claude Code-Konfiguration](./CLAUDE-CODE-CONFIGURATION.md) — der tiefere Claude Code-Leitfaden
- [Codex CLI-Konfiguration](./CODEX-CLI-CONFIGURATION.md) — die einmalige `[model_providers.omniroute]` Basiseinrichtung
- [Remote-Modus](./REMOTE-MODE.md) — Kontexte, eingeschränkte Zugriffstoken, einen Remote-Server steuern
- [CLI-Tools-Referenz](../reference/CLI-TOOLS.md) — der vollständige Katalog unterstützter Tools + Dashboard-Seiten
- [Einrichtungsanleitung](./SETUP_GUIDE.md) — Installationsmethoden und Onboarding beim ersten Start

View File

@@ -1,326 +1,86 @@
# CLI-TOOLS (Deutsch)
# CLI Tools Setup Guide — OmniRoute (Deutsch)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI-Tools — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI-Tools — OmniRoute
Zuletzt aktualisiert: 2026-08-18
OmniRoute integriert sich mit drei Kategorien von CLI-Tools, die auf drei speziellen Dashboard-Seiten verteilt sind:
| Seite | Route | Konzept | Anzahl |
| -------------- | ----------------------- | ------------------------------------------------------------------------------------------ | ------------------- |
| **CLI Code's** | `/dashboard/cli-code` | Codierungswerkzeuge, die Sie auf OmniRoute verweisen (Client → CLI → OmniRoute → Provider) | 26 |
| **CLI Agents** | `/dashboard/cli-agents` | Autonome Agenten, die Sie auf OmniRoute verweisen (derselbe Fluss, breiterer Umfang) | 8 |
| **ACP Agents** | `/dashboard/acp-agents` | CLIs, die OmniRoute als Backend über stdio/ACP erzeugt (umgekehrter Fluss) | siehe Registrierung |
Legacy-Routen leiten über 308 um: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## So funktioniert es
## How It Works
```
CLI Code's / CLI Agents (Konsumfluss):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (alle verweisen auf OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute leitet an den richtigen Anbieter weiter)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agents (umgekehrter Erzeugungsfluss):
Client-Anfrage → OmniRoute → erzeugt CLI über stdio/ACP → Antwort
```
**Vorteile:**
**Benefits:**
- Ein API-Schlüssel zur Verwaltung aller Werkzeuge
- Kostenverfolgung über alle CLIs im Dashboard
- Modellwechsel ohne Neukonfiguration jedes Werkzeugs
- Funktioniert lokal und auf Remote-Servern (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Automatische Konfiguration mit `setup-*`
## Supported Tools (Dashboard Source of Truth)
Sie müssen die Konfiguration jedes Werkzeugs nicht von Hand schreiben. OmniRoute liefert einen `setup-*`
Befehl pro unterstütztem CLI, der das **live** Modellkatalog von einem laufenden
OmniRoute (lokal oder remote) liest und die eigene Konfiguration des Werkzeugs auf Ihrem Rechner schreibt:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Jeder akzeptiert `--remote <url> --api-key <key>` (konfiguriert ein lokales Werkzeug gegen ein
remote OmniRoute), `--dry-run` (Vorschau ohne Schreiben) und `--port`. Werkzeuge
ohne automatische Modellerkennung (Cline, Kilo, Roo, Goose, Aider, Qwen) benötigen
`--model <id>` (und `--yes` für nicht-interaktive Ausführungen). Um ein CLI mit der
richtigen Umgebung zu starten und keine Konfiguration überhaupt zu schreiben, verwenden Sie den generischen
`omniroute run <target>` Launcher (claude, codex, aider, goose, opencode, qwen,
gemini — Ziele und Aliase stammen aus `bin/cli/cli-manifest.mjs`); die Legacy
pro-Werkzeug-Launcher `omniroute launch` (Claude Code) und `omniroute launch-codex`
(Codex) bleiben verfügbar. Gemini CLI ist nur zum Starten: es ist ein `omniroute run`
Ziel, hat aber kein `setup-*`/`configure` Rezept.
### CLI fingerprint sync (Agents + Settings)
> **Vollständige Referenz:** die Mastertabelle — was jeder Befehl schreibt, jede Flagge,
> lokal vs. remote und welche Werkzeuge ein `/v1` Suffix benötigen — befindet sich in
> **[CLI-Integrationen](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Ausführen dieser innerhalb eines Containers
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Ein `setup-*` Befehl, der innerhalb des OmniRoute-Containers ausgeführt wird, schreibt in das
eigene Home des Containers, das von keinem Host-CLI gelesen wird und mit dem
Container verschwindet. OmniRoute erkennt das und beendet mit `2` und Anweisungen, anstatt zu schreiben. Zwei unterstützte Wege nach vorne — installieren Sie das CLI auf dem Host und
`omniroute connect` zum Container, oder binden Sie die Konfigurationsverzeichnisse und setzen Sie
`CLI_CONFIG_HOME` (das Compose `host` Profil). Jeder `setup-*` Befehl, plus
`omniroute configure` und `omniroute config set`, akzeptiert
`--allow-container-write`, wenn die Konfiguration der eigenen CLIs des Containers tatsächlich gemeint war; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` tut dasselbe für
den Server. Siehe
[Docker Guide → Konfigurieren von Host-CLI-Tools](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
Der **apply endpoint** des Dashboards (`POST /api/cli-tools/apply`) erzwingt den
gleichen Schutz: in einem Container beantwortet ein Schreiben, dessen Ziel nicht vom
Host gebunden ist, mit **`422`** und `containerEphemeralTarget: true`, dem sicheren Fehlertext und — für die Werkzeuge mit einem Host-Rezept (claude, codex, opencode, cline,
kilo, continue) — einem `hostSetupCommand` (z.B. `omniroute setup-opencode`), das stattdessen auf dem Host ausgeführt werden soll; es wird nichts geschrieben. `dryRun: true` funktioniert weiterhin im Container-Modus und gibt den generierten Inhalt + Zielpfad zurück, ohne die Festplatte zu berühren, sodass Sie eine Vorschau vom Dashboard anzeigen und auf dem Host anwenden können. Dieses Verhalten ist
absichtlich und durch `tests/unit/api/cli-tools/apply-container-guard.test.ts` geschützt — niemals "reparieren" Sie ein 422, indem Sie den Schutz entfernen.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Quelle der Wahrheit
## Step 1 — Get an OmniRoute API Key
Der einheitliche Katalog befindet sich in `src/shared/constants/cliTools.ts` als `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Jeder Eintrag hat diese Felder (definiert in `src/shared/schemas/cliCatalog.ts`):
| Feld | Typ | Beschreibung |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | Auf welcher Seite das Tool erscheint |
| `vendor` | `string` | Herkunft des Tools ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Auch als ACP-Agent nutzbar (Abzeichen angezeigt) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Unterstützungsgrad für benutzerdefinierte Endpunkte. `"none"` = MITM-Rückstand |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Konfigurationsmechanismus |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Kernanzeigefelder |
Einträge mit `baseUrlSupport: "none"` werden **nicht angezeigt** auf den Dashboard-Seiten — sie sind im MITM-Rückstand für Plan 11 registriert (siehe `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Fähigkeitsstufen (katalogisiert × erkennbar × konfigurierbar × startbar)
Nicht jedes katalogisierte Tool ist erkennbar, konfigurierbar oder startbar. Jede Stufe hat eine deklarierende Quelle, und ein Drift-Test hält sie synchron:
| Stufe | Bedeutung | Deklariert in |
| ------------------ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Katalogisiert** | Erscheint im Dashboard-Katalog (Name, Anbieter, Dokumentation, Konfigurationstyp) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Erkennbar** | Binär-/Konfigurationsdetektion, Gesundheitsprüfungen, Konfigurationspfade | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` Laufzeitkatalog) |
| **Konfigurierbar** | Unterstützt durch `omniroute configure <cli>` (Setup-Rezept vorhanden) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Startbar** | Unterstützt durch `omniroute run <target>` (Umgebungs-/Argumenteinfügung definiert) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` ist das kanonische ausführbare Manifest für die CLI-Befehle: `run`, `configure` und die Shell-Vervollständigungs-Generatoren leiten ihre Ziel-Listen, Alias-Auflösung (zum Beispiel `kilocode`/`kilo-code`/`kilo_cli``kilo`) und die Verkabelung des `--model`-Flags davon ab. Der Drift-Wächter `tests/unit/cli/cli-manifest-drift.test.ts` stellt sicher, dass das Manifest, der Laufzeitkatalog, der UI-Katalog und jede Verbraucherschnittstelle synchron bleiben — ein Ziel, das einer Oberfläche hinzugefügt wird, ohne dass die anderen aktualisiert werden, führt zum Fehlschlagen der Suite, anstatt stillschweigend abzuweichen.
## 1. Katalog der CLI-Tools (26 Werkzeuge)
Alle Werkzeuge, die in `/dashboard/cli-code` erscheinen. Die mit `baseUrlSupport: none` sind über MITM oder einen manuellen Leitfaden verbunden, anstatt über eine benutzerdefinierte Basis-URL:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
Werkzeuge mit `baseUrlSupport: "partial"` zeigen ein Badge "⚠ Teilweise Basis-URL" in der Dashboard-Karte an.
---
## 2. CLI-Agenten-Katalog (8 Werkzeuge)
Autonome Agenten, die in `/dashboard/cli-agents` erscheinen:
| id | name | vendor | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes-Agent | Nous Research | voll | falsch |
| openclaw | OpenClaw | OSS (P. Steinberger) | voll | wahr |
| goose | Goose | Block / Linux Foundation | voll | wahr |
| interpreter | Open Interpreter | OSS | voll | wahr |
| warp | Warp AI | Warp Inc. | teilweise | wahr |
| agent-deck | Agent Deck | asheshgoplani (OSS) | voll | falsch |
| omp | Oh My Pi | OSS | voll | wahr |
| letta | Letta CLI | Letta | voll | falsch |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP-Agenten (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Diese Seite (umbenannt von `/dashboard/agents`) zeigt CLIs, die OmniRoute als **Backend-Ausführungs-Engines** über das stdio/ACP-Protokoll **erzeugen** kann. Der Katalog wird separat in `src/lib/acp/registry.ts` gepflegt und ist **nicht** dasselbe wie `CLI_TOOLS`.
---
## 4. MITM-Rückstand (nicht im Dashboard angezeigt)
Die folgenden CLIs unterstützen nativ keine benutzerdefinierte Basis-URL und sind **nicht aufgeführt** auf den Seiten CLI Code oder CLI Agents. Sie sind Kandidaten für die MITM-Abfangung im Plan 11:
| CLI | Grund |
| ------------------- | ----------------------------------------------------------------------- |
| windsurf | BYOK beschränkt auf ausgewählte Claude-Modelle + Unternehmens-URL/Token |
| amp | Geschlossenes Ökosystem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO-Auth, keine benutzerdefinierte URL |
| cowork | Anthropic Desktop, kein konfigurierbarer Endpunkt |
Siehe `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` für das vollständige Querverzeichnis.
---
## 5. Batch Detection API
Alle Werkzeugerkennungen werden über einen einzigen Endpunkt aggregiert:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (gleich wie bei anderen `/api/cli-tools/` Routen)
- Gibt zurück: `Record<toolId, ToolBatchStatus>` (Typ: `src/shared/types/cliBatchStatus.ts`)
- Strategie: `Promise.all` über alle Werkzeuge, 5s Timeout pro Werkzeug
- Cache: In-Memory LRU, indiziert nach Konfigurationsdatei `mtime`. Cache wird ungültig, wenn sich mtime ändert. Wird beim Neustart des Servers zurückgesetzt.
Antwortstruktur pro Werkzeug:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // bereinigt, keine Stack-Traces
}
```
## 6. Einstellungen für neue Werkzeuge
Neue Werkzeuge mit `configType: "custom"` haben dedizierte API-Routen für Einstellungen:
| Route | Werkzeug |
| ------------------------------------------- | --------------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url Flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primär + legacy `~/.deepseek` Synchronisierung) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi Coding-Agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedizierter `.env` Schlüssel) |
Alle Routen verwenden `sanitizeErrorMessage()` für Fehlermeldungen (Hard Rule #12).
---
## 7. Architektur der Dashboard-Seiten
### CLI-Code (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — Serverkomponente
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — Client-Grid
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — Werkzeug-Detailseite
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 spezialisierte Werkzeugkarten + `ToolDetailClient.tsx`
### CLI-Agenten (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — Serverkomponente
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — Client-Grid
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — wiederverwendet `ToolDetailClient`
### ACP-Agenten (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — Serverkomponente (verschoben von `agents/`)
### Gemeinsame UI-Komponenten (`src/shared/components/cli/`)
| Datei | Zweck |
| ----------------------- | --------------------------------------------------------------- |
| `CliToolCard.tsx` | Intelligente Statuskarte (Erkennung + Konfiguration + Endpunkt) |
| `CliConceptCard.tsx` | Konzept-Erklärungskarte pro Seite |
| `CliComparisonCard.tsx` | Dreispaltiger Vergleich zwischen CLI-Typen |
| `BaseUrlSelect.tsx` | Endpunkt-Dropdown (Lokal/Cloud/Benutzerdefiniert) |
| `ApiKeySelect.tsx` | API-Schlüssel-Auswahl |
| `ManualConfigModal.tsx` | Kopierbarer Konfigurationsausschnitt-Modus |
### Gemeinsamer Hook (`src/shared/hooks/cli/`)
| Datei | Zweck |
| ------------------------- | ----------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Ruft `/api/cli-tools/all-statuses` ab, verwaltet Lade-/Aktualisierungszustand |
## 8. i18n
Neue Namensräume, die in Plan 14 F9 hinzugefügt wurden:
| Namensraum | Zweck |
| ----------- | ----------------------------------------------------------------------------------------------- |
| `cliCommon` | Gemeinsame Strings (Kartenbeschriftungen, Konzept-/Vergleichstexte, Detailseitenbeschriftungen) |
| `cliCode` | Strings der CLI-Code-Seite |
| `cliAgents` | Strings der CLI-Agenten-Seite |
| `acpAgents` | Strings der ACP-Agenten-Seite |
Vollständige PT-BR- und EN-Übersetzungen sind vorhanden. 39 andere Lokalisierungen fallen automatisch auf EN über die Namensraum-Ebene in `src/i18n/request.ts` zurück.
---
## 9. Schnellstart
### Schritt 1 — Holen Sie sich einen OmniRoute API-Schlüssel
1. Öffnen Sie `/dashboard/api-manager`**API-Schlüssel erstellen**
2. Geben Sie ihm einen Namen (z.B. `cli-tools`) und wählen Sie alle Berechtigungen aus
3. Kopieren Sie den Schlüssel — Sie benötigen ihn für jede CLI unten
> Ihr Schlüssel sieht so aus: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Schritt 2 — Installieren Sie die CLI-Tools
Alle npm-basierten Tools erfordern Node.js 22.22.2+ oder 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -338,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (startbar über `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-basiert
# Pi-Coding-Agent
# siehe https://github.com/zechnerj/pi-coding-agent für die Installation
# jcode
# siehe https://github.com/1jehuang/jcode für die Installation
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Schritt 3 — Konfigurieren Sie über das Dashboard
## Step 3 — Set Global Environment Variables
1. Gehen Sie zu `http://localhost:20128/dashboard/cli-code`
2. Finden Sie Ihr Tool im Raster
3. Klicken Sie auf die Karte, um die Detailseite des Tools zu öffnen
4. Wählen Sie Ihren API-Schlüssel und die Basis-URL aus
5. Klicken Sie auf **Konfiguration anwenden** oder kopieren Sie den manuellen Konfigurationsausschnitt
---
### Schritt 4 — Setzen Sie globale Umgebungsvariablen
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universeller Endpunkt
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI liest GOOGLE_GEMINI_BASE_URL an der WURZEL (sein SDK fügt /v1beta/... selbst hinzu)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Für einen **Remote-Server** ersetzen Sie `localhost:20128` durch die Server-IP oder Domain,
> z.B. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Schritt 4 — Konfigurieren Sie jedes Tool
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Erstellen Sie ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Verwenden Sie das einheitliche Anthropic-Gateway-Wurzel für Claude Code. Fügen Sie hier nicht `/v1` hinzu.
**Test:** `claude "sag hallo"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Der moderne Codex (v0.137+) liest nur `~/.codex/config.toml` — die alte
`config.yaml` gehört zur Legacy-npm-CLI und wird stillschweigend ignoriert. Der API
Schlüssel bleibt in der Umgebungsvariablen `OMNIROUTE_API_KEY` (`env_key`), niemals
innerhalb der Datei:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Vollständige Referenz (Profile, `wire_api`, Kontextfenster): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "was ist 2+2?"`
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Verwenden Sie `opencode run "Ihr Prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> um Denkvarianten zu senden.
---
#### Cline (CLI oder VS Code)
### Cline (CLI or VS Code)
**CLI-Modus:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -481,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code-Modus:**
Cline-Erweiterungseinstellungen → API-Anbieter: `OpenAI Compatible` → Basis-URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Oder verwenden Sie das OmniRoute-Dashboard → **CLI-Tools → Cline → Konfiguration anwenden**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI oder VS Code)
### KiloCode (CLI or VS Code)
**CLI-Modus:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code-Einstellungen:**
**VS Code settings:**
```json
{
@@ -505,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Oder verwenden Sie das OmniRoute-Dashboard → **CLI-Tools → KiloCode → Konfiguration anwenden**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code-Erweiterung)
### Continue (VS Code Extension)
Bearbeiten Sie `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -523,253 +241,158 @@ models:
default: true
```
Starten Sie VS Code nach der Bearbeitung neu.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Verwenden Sie dies, wenn VS Code Insiders für benutzerdefinierte Endpunktmodelle konfiguriert ist und Sie möchten, dass OmniRoute ohne ein benutzerdefiniertes Headerfeld funktioniert.
**Empfohlener Speicherort:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Beispiel unter Verwendung des tokenisierten OmniRoute-Alias:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Hinweise:**
- Ersetzen Sie `sk-your-omniroute-key` durch einen in OmniRoute erstellten API-Schlüssel.
- Das `url`-Feld sollte auf `/api/v1/vscode/{token}/chat/completions` zeigen.
- Das `modelsUrl`-Feld sollte auf `/api/v1/vscode/{token}/models` zeigen.
- Bevorzugen Sie den normalen `/v1` + Bearer-Header-Flow, wenn der Client benutzerdefinierte Header unterstützt.
- URL-eingebettete Tokens sind ein Kompatibilitätsfallback und können in Editorprotokollen oder Proxyverläufen erscheinen.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Melden Sie sich bei Ihrem AWS/Kiro-Konto an:
# Login to your AWS/Kiro account:
kiro-cli login
# Die CLI verwendet ihre eigene Authentifizierung — OmniRoute wird nicht als Backend für die Kiro CLI selbst benötigt.
# Verwenden Sie kiro-cli zusammen mit OmniRoute für andere Tools.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Für die **Kiro IDE** Desktop-App verwenden Sie den MITM-Endpunkt, der von OmniRoute unter `/dashboard/cli-tools → Kiro` bereitgestellt wird.
---
## 10. Interne OmniRoute CLI
### Qwen Code (Alibaba)
Die `omniroute`-Binärdatei bietet Befehle für den Serverlebenszyklus, die Einrichtung, Diagnosen und das Management von Anbietern. Einstiegspunkt: `bin/omniroute.mjs`.
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
omniroute # Server starten (Standardport 20128)
omniroute setup # Interaktiver Einrichtungsassistent
omniroute doctor # Konfiguration, DB, Ports, Laufzeit überprüfen
omniroute providers list # Konfigurierte Anbieterverbindungen
omniroute providers test-all # Jede aktive Verbindung testen
omniroute reset-password # Admin-Passwort zurücksetzen
omniroute logs # Anforderungsprotokolle streamen
omniroute health # Detaillierte Gesundheit (Schalter, Cache, Speicher)
omniroute --version # Version drucken
omniroute --help # Alle Befehle anzeigen
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
### Einrichtung & Initialisierung
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
omniroute setup # Interaktiver Einrichtungsassistent
omniroute setup --non-interactive # CI/Automatisierungsmodus (liest Umgebungsvariablen + Flags)
omniroute setup --password '<value>' # Admin-Passwort direkt festlegen
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Anbieter hinzufügen und in einem Schritt testen
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
Erkannte Umgebungsvariablen für die nicht-interaktive Einrichtung:
> For a **remote server** replace `localhost:20128` with the server IP or domain.
| Var | Zweck |
| ------------------- | ------------------------------------------------------------------------ |
| `OMNIROUTE_API_KEY` | Anbieter-API-Schlüssel (gebunden an `--api-key` über Commander `.env()`) |
| `DATA_DIR` | Überschreibt das OmniRoute-Datenverzeichnis |
**Test:** `qwen "say hello"`
Alle anderen nicht-interaktiven Eingaben werden als Flags übergeben, nicht als Umgebungsvariablen:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(siehe die Optionen `omniroute setup` oben).
### Cursor (Desktop App)
### Diagnosen
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
```bash
omniroute doctor # Konfiguration, DB, Ports, Laufzeit, Speicher, Lebensfähigkeit überprüfen
omniroute doctor --json # Maschinenlesbares JSON
omniroute doctor --no-liveness # HTTP-Gesundheitsprüfung überspringen
omniroute doctor --host 0.0.0.0 # Lebensfähigkeits-Host überschreiben
omniroute doctor --liveness-url <url> # Vollständige URL-Überschreibung des Gesundheitsendpunkts
```
Via GUI: **Settings → Models → OpenAI API Key**
Der Arzt führt diese Überprüfungen durch: `Konfiguration`, `Datenbank`, `Speicher/Verschlüsselung`,
`Portverfügbarkeit`, `Node-Laufzeit`, `Native Binärdatei` (better-sqlite3),
`Speicher` und `Serverlebensfähigkeit`. Er beendet mit einem Nicht-Null-Wert, wenn eine Überprüfung `fehlt`.
### Anbieterverwaltung
```bash
omniroute providers available # OmniRoute-Anbieterkatalog
omniroute providers available --search openai # Katalog nach ID/Name/Alias/Kategorie filtern
omniroute providers available --category api-key # Nach Kategorie filtern (api-key, oauth, free, ...)
omniroute providers available --json # Maschinenlesbares JSON
omniroute providers list # Konfigurierte Anbieterverbindungen
omniroute providers list --json
omniroute providers test <id|name> # Eine konfigurierte Verbindung testen
omniroute providers test-all # Jede aktive Verbindung testen
omniroute providers validate # Nur lokal strukturelle Validierung
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Vorhandener OAuth-Fluss
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` sind API-first und funktionieren daher gegen
den aktiven lokalen oder entfernten Kontext. Die Eingabe von Anmeldeinformationen sollte
`--credential-stdin` oder `--credential-env` verwenden; `--dry-run --json` berichtet nur
über die redigierte Präsenz/Form. `providers available` liest den OmniRoute-Katalog;
`providers list/test/test-all/validate` behalten ihr lokales SQLite-Verhalten bei und
erfordern nicht, dass der Server läuft.
### Wiederherstellung & Zurücksetzen
```bash
omniroute reset-password # Admin-Passwort zurücksetzen (auch: omniroute-reset-password)
omniroute reset-encrypted-columns # Warnung anzeigen + Trockenlauf für das Zurücksetzen verschlüsselter Anmeldeinformationen
omniroute reset-encrypted-columns --force # Tatsächlich verschlüsselte Anmeldeinformationen in SQLite nullen
```
### Anmeldeinformationen exportieren (⚠ vorsichtig behandeln)
```bash
omniroute auth export # Warnung anzeigen + Bestätigungstür — kein DB-Zugriff
omniroute auth export --force # ALLE Verbindungen DEKRYPTIERTE Anmeldeinformationen als JSON in stdout exportieren
omniroute auth export --force --id <id> # Nur die übereinstimmende Verbindung exportieren
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> Zeilen ausgeben
omniroute auth export --force --out creds.json # In eine Datei schreiben (mit 0600 Berechtigungen erstellt)
```
`auth export` ist **nur lokal** (direkter SQLite-Lesezugriff, kein HTTP-Routen) und druckt/schreibt absichtlich
**Klartext** `apiKey`/`accessToken`/`refreshToken`/`idToken`-Werte — das ist das Feature, kein
Fehler. Nichts wird aus der Datenbank gelesen und nichts wird entschlüsselt, ohne `--force`. Ein stderr
Warnbanner wird immer vor der Ausgabe von Klartext gedruckt. Erfordert, dass `STORAGE_ENCRYPTION_KEY` gesetzt ist. Ein Feld, das nicht entschlüsselt werden kann (veralteter Schlüssel, beschädigter Chiffretext), wird als
`<field>DecryptFailed: true` gemeldet, anstatt den gesamten Export abzubrechen oder den zugrunde liegenden Fehler zu leaken.
### Andere Unterbefehle
Diese setzen einen laufenden OmniRoute-Server voraus, es sei denn, es wird anders angegeben:
```bash
omniroute status # Umfassender Laufzeitstatus
omniroute logs # Anforderungsprotokolle streamen (--json, --search, --follow)
omniroute config show # Aktuelle Konfiguration anzeigen
omniroute provider list # Verfügbare Anbieter auflisten (Alias von providers list)
omniroute provider add # OmniRoute als Anbieter in einem Tool registrieren
omniroute keys add | list | remove # API-Schlüssel verwalten
omniroute models [provider] # Modelle auflisten (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot von Konfiguration + DB
omniroute restore # Aus einem vorherigen Snapshot wiederherstellen
omniroute health # Detaillierte Gesundheit (Schalter, Cache, Speicher)
omniroute quota # Anbieterquotenverbrauch
omniroute cache # Cache-Status
omniroute cache clear # Semantische + Signatur-Caches leeren
omniroute mcp status | restart # MCP-Serverstatus / Neustart
omniroute a2a status | card # A2A-Serverstatus / Agentenkarte
omniroute tunnel list | create | stop # Tunnel verwalten (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Umgebungsvariablen inspizieren / setzen (vorübergehend)
omniroute test # Anbieter-Konnektivitätstest
omniroute update # Auf Updates überprüfen
omniroute completion # Shell-Vervollständigung generieren
```
### Häufige Flags
| Flag | Beschreibung |
| ------------------- | ----------------------------------------------------------- |
| `--no-open` | Browser beim Start nicht automatisch öffnen |
| `--port <n>` | API-Port überschreiben (Standard 20128) |
| `--mcp` | Als MCP-Server über stdio (für IDEs) ausführen |
| `--non-interactive` | CI-Modus (keine Eingabeaufforderungen; liest von env/flags) |
| `--json` | Maschinenlesbare JSON-Ausgabe (doctor, providers usw.) |
| `--help`, `-h` | Befehlsspezifische Hilfe anzeigen |
| `--version`, `-v` | Installierte Version drucken |
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## Verfügbare API-Endpunkte
## Dashboard Auto-Configuration
| Endpunkt | Beschreibung | Verwendung |
| -------------------------- | ------------------------------ | ----------------------------------------- |
| `/v1/chat/completions` | Standard-Chat (alle Anbieter) | Alle modernen Werkzeuge |
| `/v1/responses` | Responses API (OpenAI-Format) | Codex, agentische Workflows |
| `/v1/completions` | Legacy-Textvervollständigungen | Ältere Werkzeuge, die `prompt:` verwenden |
| `/v1/embeddings` | Text-Embeddings | RAG, Suche |
| `/v1/images/generations` | Bildgenerierung | GPT-Image, Flux usw. |
| `/v1/audio/speech` | Text-zu-Sprache | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Sprache-zu-Text | Deepgram, AssemblyAI |
The OmniRoute dashboard automates configuration for most tools:
Bereit zum Einfügen Beispiele mit einer tokenisierten OmniRoute-URL:
```txt
Token-Beispiel: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standard OpenAI-Basis: http://localhost:20128/v1
VS Code-Modelle: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code-Chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code-Antworten: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama-Tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama-Chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Fehlersuche
## Built-in Agents: Droid & OpenClaw
| Fehler | Ursache | Lösung |
| ------------------------------------------------- | -------------------------------- | ----------------------------------------------------------- |
| `Connection refused` | OmniRoute läuft nicht | `omniroute serve` |
| `401 Unauthorized` | Falscher API-Schlüssel | Überprüfen in `/dashboard/api-manager` |
| `No combo configured` | Keine aktive Routing-Kombination | Einrichten in `/dashboard/combos` |
| CLI zeigt "nicht installiert" | Binary nicht im PATH | Überprüfen mit `which <command>` |
| Dashboard zeigt "nicht erkannt" nach Installation | Cache veraltet | Klicken Sie auf "⟳ Erkennung aktualisieren" im Dashboard |
| Alter Link `/dashboard/cli-tools` | Lesezeichen vor v3.8.6 | Automatische Weiterleitung zu `/dashboard/cli-code` (308) |
| Alter Link `/dashboard/agents` | Lesezeichen vor v3.8.6 | Automatische Weiterleitung zu `/dashboard/acp-agents` (308) |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Fehlerbehebung
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,299 +0,0 @@
# CLI-INTEGRATIONS (Español)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integraciones CLI — dirija cualquier CLI de codificación a OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integraciones CLI
OmniRoute incluye una familia de comandos `setup-*` que configuran un CLI de codificación (Codex, Claude Code, OpenCode, Cline, …) para usar OmniRoute como su backend — así que la herramienta se comunica con **un** endpoint y OmniRoute dirige a el proveedor correcto con retroceso automático. Cada comando lee el catálogo de modelos **en vivo** de un OmniRoute en ejecución (local o remoto) y escribe el archivo de configuración de la herramienta en **tu** máquina. La clave API se referencia mediante una variable de entorno donde la herramienta lo soporte. Los comandos que persisten un archivo de entorno local de la herramienta se anotan a continuación.
También hay un lanzador genérico — `omniroute run <target>` — que inicia `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` o `gemini` con el entorno correcto inyectado, sin escribir ninguna configuración en absoluto. Los objetivos y sus alias provienen del manifiesto canónico `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), y `omniroute completion` ofrece las mismas palabras de objetivo derivadas del manifiesto. Los lanzadores por herramienta heredados — `omniroute launch` (Claude Code) y `omniroute launch-codex` (Codex) — siguen disponibles.
La incorporación de proveedores está disponible desde el mismo contexto local/remoto. Los comandos API-first a continuación mantienen la autenticación de gestión separada de las credenciales del proveedor y nunca imprimen una credencial en la salida estructurada:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Para scripts, se prefiere `--credential-stdin` o `--credential-env`; `--credential` se conserva para uso local controlado. `providers remove` requiere `--yes` en un terminal no interactivo, y los cinco comandos honran el contexto activo o las opciones globales `--base-url`/`--api-key`.
Para la configuración base escrita a mano de una sola vez de las dos integraciones más ricas, consulte las profundizaciones por herramienta:
- [Configuración de Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Configuración de Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Modo Remoto](./REMOTE-MODE.md) — controla un OmniRoute remoto (VPS / Tailnet) desde tu laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — la extensión OmniCopilot; también puede ejecutar estos
comandos `setup-*` por ti desde dentro del editor
---
## Tabla maestra
Cada comando honra el **contexto activo** (establecido con `omniroute connect`, vea
[Modo Remoto](./REMOTE-MODE.md)) o las banderas explícitas `--remote <url> --api-key <key>`. "Local vs remoto" a continuación significa: sin banderas se dirige a `http://localhost:20128`; con `--remote` (o un contexto remoto activo) se obtiene el catálogo de ese servidor y se escribe la configuración localmente.
| Comando | Herramienta | Lo que escribe | Banderas clave | Local vs remoto |
| -------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — un perfil por modelo de texto compatible (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Ambos |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — un perfil por modelo coincidente (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Ambos |
| `omniroute setup-opencode` | OpenCode (compatible con openai) | `~/.config/opencode/opencode.json` — proveedor `omniroute` con cada modelo del catálogo (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Ambos |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (modo CLI) + imprime la configuración de la extensión de VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Ambos |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + fusiona `kilocode.*` en `settings.json` de VS Code si está presente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Ambos |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modelos `provider: openai`, clave a través de `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-cursor` | Cursor | Nada — imprime los pasos en la aplicación (la configuración de Cursor es opaca SQLite) | `--remote` `--api-key` `--only` `--port` | Ambos |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (documento de importación) + establece `roo-cline.autoImportSettingsPath` si existe un `settings.json` de VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Ambos |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — proveedor `compatible con openai`, clave a través de `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + imprime receta de entorno | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + imprime receta de entorno | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — matriz `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` en `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Ambos |
| `omniroute run <target>` | Lanzamiento en tiempo de ejecución (genérico) | Nada — inicia `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` con el entorno y argumentos correctos; Qwen y Gemini utilizan un hogar aislado temporal | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Ambos |
| `omniroute launch` | Claude Code | Nada — inicia `claude` con `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` inyectados | `--remote` `--api-key` `--token` `--profile` `--port` | Ambos |
| `omniroute launch-codex` | OpenAI Codex CLI | Nada — inicia `codex` con el proveedor `omniroute` inyectado a través de banderas `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Ambos |
Notas sobre las banderas (verificadas en la fuente del comando):
- `--remote <url>` — obtiene el catálogo de un OmniRoute remoto (anula `--port`
y el contexto activo). `--api-key <key>` proporciona la credencial para ese
servidor (por defecto a la variable de entorno `OMNIROUTE_API_KEY`, o el token del contexto activo).
- `--only <patterns>` — subcadenas separadas por comas; mantiene solo los IDs de modelo que coinciden
(por ejemplo, `--only glm,kimi`). Disponible en `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — imprime exactamente lo que se escribiría sin tocar el
sistema de archivos. Disponible en cada comando `setup-*` **excepto** `setup-cursor`
(que nunca escribe un archivo).
- `--model <id>` — requerido (o seleccionado interactivamente) para las herramientas que no tienen
auto-descubrimiento de modelos: Cline, Kilo, Roo, Goose, Qwen, Aider. Esas herramientas
también aceptan `--yes` para ejecuciones no interactivas (que luego requieren `--model`).
`setup-opencode` toma `--model` para establecer el modelo predeterminado de nivel superior.
- `--model <id>` en `omniroute run` sigue el cableado por objetivo del manifiesto
(`bin/cli/cli-manifest.mjs`): **aider** recibe `--model openai/<id>` y
**opencode** `--model omniroute/<id>` (el prefijo se agrega solo cuando el id
no lo lleva ya); **qwen** y **gemini** reciben el id tal cual;
**claude** lo obtiene a través de `ANTHROPIC_MODEL`, **goose** a través de `GOOSE_MODEL`, y
**codex** a través de argumentos `-c model_providers.omniroute.*`. **Qwen es el único objetivo de ejecución
que requiere obligatoriamente `--model`** — `omniroute run qwen` sin él sale
`2` con un error explícito.
- `--port <port>` — puerto local de OmniRoute (por defecto `20128`, ignorado cuando se establece `--remote`).
Presente en todos los `setup-*` y ambos lanzadores.
- Códigos de salida de `omniroute run`: el propio código de salida del CLI hijo se propaga
tal cual; `2` = argumentos inválidos (objetivo no soportado, falta `--model` requerido, guardia de contenedor); `127` = el binario objetivo no está en `PATH`;
`130`/`143`/`129` cuando el lanzamiento se termina por `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = otro fallo de lanzamiento en tiempo de ejecución.
- Los dos lanzadores (`launch`, `launch-codex`) aceptan `--profile <name>` para seleccionar
un perfil escrito por `setup-claude` / `setup-codex`, además de argumentos de paso para
el binario subyacente `claude` / `codex`.
El selector interactivo también se comparte por las recetas de configuración:
```bash
# Selecciona del catálogo de modelos local o remoto activo y configura el objetivo.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` actualmente delega en las recetas probadas para `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, y `kilo`. Las entradas de catálogo solo para IDE,
MITM, y solo guía permanecen como flujos explícitos `setup-*`/manuales y no se presentan como objetivos lanzables.
> `setup-opencode` es la integración de OpenCode **compatible con openai** y ligera.
> También hay una integración de plugin más rica — `omniroute setup opencode` — que
> instala `@omniroute/opencode-plugin`. Son comandos diferentes; la tabla
> anterior documenta `setup-opencode`.
---
## Uso local
Con OmniRoute ejecutándose en `localhost:20128`, solo ejecuta el comando de configuración para tu herramienta. El catálogo se obtiene del servidor local.
```bash
# Codex: escribe un perfil por modelo coincidente en ~/.codex/
omniroute setup-codex
codex --profile glm52 # usa un perfil generado
# Claude Code: escribe perfiles por modelo, luego lanza uno
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: escribe el proveedor compatible con openai con todos los modelos del catálogo
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # referenciado a través de {env:OMNIROUTE_API_KEY}, nunca en disco
opencode -m omniroute/glm/glm-5.2 "..."
# Herramientas sin auto-descubrimiento necesitan un modelo explícito:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Vista previa sin escribir nada:
omniroute setup-continue --dry-run
```
Lanza sin escribir ninguna configuración en absoluto (solo inyección de env):
```bash
omniroute launch # Claude Code → OmniRoute local
omniroute launch-codex # Codex CLI → OmniRoute local
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Ruta de comando explícita: pasa todo lo que venga después de --
omniroute run claude -- --print-system-prompt "revisa esta diferencia"
```
---
## Uso remoto
Apunta cualquier comando de configuración a un OmniRoute remoto con `--remote` + `--api-key`. El catálogo se obtiene del remoto; la configuración se escribe en tu máquina local.
```bash
# OpenCode contra un VPS remoto, mantener solo modelos glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exporta OMNIROUTE_API_KEY primero
# Perfiles de Codex desde un catálogo remoto
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Lanza un CLI directamente contra el remoto
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
En lugar de pasar `--remote`/`--api-key` cada vez, inicia sesión una vez y deja que el **contexto activo** los proporcione automáticamente:
```bash
omniroute connect 192.168.0.15 # genera un token con alcance, almacena el contexto
omniroute setup-codex # ← ahora usa el catálogo remoto
omniroute setup-opencode # ← lo mismo
omniroute launch # ← Claude Code contra el remoto
```
Consulta [Modo Remoto](./REMOTE-MODE.md) para contextos, alcances y gestión de tokens.
---
## Convenciones de URL base (que las herramientas quieren `/v1`)
OmniRoute expone la superficie de OpenAI en `/v1`, la superficie de Anthropic en la raíz, y una superficie nativa de Gemini en `/v1beta`. Cada integración está conectada a la forma que su herramienta espera (verificado en la fuente del comando):
| Integración | URL base escrita | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ----------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | raíz | No — Cline añade `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | raíz | No — Goose añade la ruta |
| `setup-aider` (`OPENAI_API_BASE`) | raíz | No — LiteLLM añade `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | con `/v1` | Sí |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | raíz | No — Claude Code añade `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | con `/v1` | Sí |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | con `/v1` | Sí |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | raíz | No — el SDK añade `/v1beta/models/…` |
---
## Manteniendo las dependencias nativas en la actualización: `--include=optional`
Cuando actualizas con `omniroute update` (después de confirmar, o con `--apply`),
OmniRoute ejecuta la instalación con `--include=optional` incorporado:
```bash
npm install -g omniroute@latest --include=optional
```
Este **no** es un flag que pasas a `omniroute update` — siempre se aplica por el
actualizador. Garantiza que las `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, la pila LLMLingua SLM) sobrevivan a la actualización incluso si tu configuración de npm
tiene `omit=optional` establecido, lo que de otro modo eliminaría silenciosamente el controlador nativo de SQLite
y el enlace del keyring del sistema operativo. Para previsualizar el comando exacto sin aplicar:
```bash
omniroute update --dry-run
# [DRY RUN] Ejecutaría: npm install -g omniroute@latest --include=optional
```
Otros flags de `omniroute update` (verificados en el código fuente): `--check` (salir 1 si
desactualizado), `--apply` (instalar sin preguntar), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI a través de `omniroute run gemini`
Contrato verificado contra `@google/gemini-cli` 0.50.0: la CLI respeta
`GOOGLE_GEMINI_BASE_URL` y emite `POST /v1beta/models/<model>:generateContent`
(y `:streamGenerateContent?alt=sse`) contra él — exactamente la superficie nativa de
Gemini de OmniRoute (`/v1beta`). `omniroute run gemini` lo conecta automáticamente:
- `GOOGLE_GEMINI_BASE_URL` → la URL base activa de OmniRoute (raíz, sin `/v1`);
- `GEMINI_API_KEY` → la credencial resuelta de OmniRoute (opción/env/contexto);
- un **`GEMINI_CLI_HOME` temporal aislado** cuyo `.gemini/settings.json`
selecciona la autenticación `gemini-api-key`, por lo que una sesión de Google OAuth almacenada (Code Assist)
nunca anula el lanzamiento dirigido por OmniRoute — eliminado después de salir;
- **higiene del entorno**: el entorno hijo se limpia de `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` y `GOOGLE_GENAI_USE_GCA` (que redirigirían
la autenticación a Vertex/Code Assist), y se establece `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` como
un respaldo adicional — los otros objetivos de `run` reciben el mismo
tratamiento para sus propias variables en conflicto;
- inyección de `--model <id>` desde `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
La guardia de confianza del espacio de trabajo de Gemini aún se aplica en modo sin cabeza — pasa
`--skip-trust` (o confía en el directorio de forma interactiva) tú mismo; el lanzador
deliberadamente no lo omite. Este lanzador es distinto de la **registración ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), que sigue siendo la
integración del protocolo de agente para `/dashboard/acp-agents`.
---
## Barrido de humo real (opcional)
Las ejecuciones de regresión del plan de lanzamiento determinista se realizan en CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Para validar los binarios REALES contra un servidor REAL
de OmniRoute, existe un arnés opcional en
`tests/integration/upstream-cli-smoke.int.test.ts`. Nunca se ejecuta automáticamente
(cada sub-prueba se salta a menos que `RUN_CLI_SMOKE=1`), pasa la credencial por la variable de entorno
NOMBRE (nunca por valor), redacta cadenas con forma de clave de cualquier salida registrada, salta
objetivos cuyo binario no está instalado, y clasifica fallos como
autenticación / upstream / configuración en lugar de un booleano simple:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opcional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` restringe el barrido;
`OMNIROUTE_SMOKE_TIMEOUT_MS` anula el tiempo de espera de 120s por objetivo.
---
## Ver también
- [Configuración de Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — la guía más profunda de Claude Code
- [Configuración de Codex CLI](./CODEX-CLI-CONFIGURATION.md) — la configuración base de una sola vez `[model_providers.omniroute]`
- [Modo Remoto](./REMOTE-MODE.md) — contextos, tokens de acceso con alcance, controlando un servidor remoto
- [Referencia de Herramientas CLI](../reference/CLI-TOOLS.md) — el catálogo completo de herramientas soportadas + páginas del panel de control
- [Guía de Configuración](./SETUP_GUIDE.md) — métodos de instalación y orientación en el primer uso

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,273 +0,0 @@
# CLI-INTEGRATIONS (فارسی)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "ادغام‌های CLI — هر CLI کدنویسی را به OmniRoute متصل کنید"
version: 3.8.50
lastUpdated: 2026-08-18
---
# ادغام‌های CLI
OmniRoute یک خانواده از دستورات `setup-*` را ارائه می‌دهد که یک CLI کدنویسی (Codex، Claude Code، OpenCode، Cline و ...) را برای استفاده از OmniRoute به عنوان بک‌اند خود پیکربندی می‌کند — بنابراین ابزار با **یک** نقطه پایانی ارتباط برقرار می‌کند و OmniRoute به ارائه‌دهنده مناسب با بازگشت خودکار هدایت می‌کند. هر دستور فهرست مدل **زنده** را از یک OmniRoute در حال اجرا (محلی یا از راه دور) می‌خواند و فایل پیکربندی خود ابزار را بر روی **ماشین شما** می‌نویسد. کلید API توسط یک متغیر محیطی در هر جایی که ابزار از آن پشتیبانی می‌کند، ارجاع داده می‌شود. دستورات که یک فایل محیط محلی ابزار را حفظ می‌کنند، در زیر ذکر شده‌اند.
همچنین یک راه‌انداز عمومی وجود دارد — `omniroute run <target>` — که `claude`، `codex`، `aider`، `goose`، `opencode`، `qwen` یا `gemini` را با محیط مناسب تزریق شده، بدون نوشتن هیچ پیکربندی، راه‌اندازی می‌کند. اهداف و نام‌های مستعار آن‌ها از فهرست رسمی `bin/cli/cli-manifest.mjs` می‌آیند (`claude-code|cc|anthropic`، `codex-cli|openai-codex|openai`، `goose-cli`، `open-code`، `qwen-code`، `gemini-cli`) و `omniroute completion` همان کلمات هدف مشتق شده از فهرست را ارائه می‌دهد. راه‌اندازهای قدیمی برای هر ابزار — `omniroute launch` (Claude Code) و `omniroute launch-codex` (Codex) — همچنان در دسترس هستند.
پذیرش ارائه‌دهنده از همان زمینه محلی/از راه دور در دسترس است. دستورات API-first زیر مدیریت احراز هویت را از اعتبارنامه‌های ارائه‌دهنده جدا نگه می‌دارند و هرگز اعتبارنامه‌ای را در خروجی ساختاری چاپ نمی‌کنند:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
برای اسکریپت‌ها، `--credential-stdin` یا `--credential-env` را ترجیح دهید؛ `--credential` برای استفاده محلی کنترل شده حفظ شده است. `providers remove` نیاز به `--yes` در یک ترمینال غیرتعامل دارد و همه پنج دستور به زمینه فعال یا گزینه‌های جهانی `--base-url`/`--api-key` احترام می‌گذارند.
برای پیکربندی اولیه یک‌باره و دست‌نویس از دو ادغام غنی‌ترین، به بررسی‌های عمیق هر ابزار مراجعه کنید:
- [پیکربندی Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [پیکربندی Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [حالت از راه دور](./REMOTE-MODE.md) — کنترل یک OmniRoute از راه دور (VPS / Tailnet) از لپ‌تاپ شما
- [چت VS Code Copilot](./VSCODE-COPILOT.md) — افزونه OmniCopilot؛ همچنین می‌تواند این دستورات `setup-*` را از داخل ویرایشگر برای شما اجرا کند
---
## جدول اصلی
هر دستور به **زمینه فعال** (تنظیم شده با `omniroute connect`، به [حالت از راه دور](./REMOTE-MODE.md) مراجعه کنید) یا پرچم‌های صریح `--remote <url> --api-key <key>` احترام می‌گذارد. "محلی در مقابل از راه دور" در زیر به این معناست: بدون پرچم‌ها به `http://localhost:20128` هدف‌گذاری می‌کند؛ با `--remote` (یا یک زمینه از راه دور فعال) فهرست را از آن سرور دریافت کرده و پیکربندی را به صورت محلی می‌نویسد.
| دستور | ابزار | آنچه می‌نویسد | پرچم‌های کلیدی | محلی در مقابل از راه دور |
| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------ |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — یک پروفایل برای هر مدل متنی سازگار (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | هر دو |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — یک پروفایل برای هر مدل مطابقت یافته (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | هر دو |
| `omniroute setup-opencode` | OpenCode (سازگار با openai) | `~/.config/opencode/opencode.json` — ارائه‌دهنده `omniroute` با هر مدل فهرست (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | هر دو |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (حالت CLI) + چاپ تنظیمات افزونه VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | هر دو |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + ادغام `kilocode.*` به `settings.json` VS Code در صورت وجود | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | هر دو |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — مدل‌های `provider: openai`، کلید از طریق `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | هر دو |
| `omniroute setup-cursor` | Cursor | هیچ چیز — چاپ مراحل درون‌برنامه (پیکربندی Cursor غیرشفاف SQLite) | `--remote` `--api-key` `--only` `--port` | هر دو |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (مدرک وارد شده) + تنظیم `roo-cline.autoImportSettingsPath` اگر یک `settings.json` VS Code وجود داشته باشد | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | هر دو |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — ارائه‌دهنده سازگار با `openai`، کلید از طریق `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | هر دو |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + چاپ دستورالعمل محیط | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | هر دو |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + چاپ دستورالعمل محیط | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | هر دو |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — آرایه `V4 modelProviders.openai` + `OMNIROUTE_API_KEY` در `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | هر دو |
| `omniroute run <target>` | راه‌اندازی زمان اجرا (عمومی) | هیچ چیز — راه‌اندازی `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` با محیط و آرگومان‌های مناسب؛ Qwen و Gemini از یک خانه موقتی ایزوله استفاده می‌کنند | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | هر دو |
| `omniroute launch` | Claude Code | هیچ چیز — `claude` را با `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` تزریق شده راه‌اندازی می‌کند | `--remote` `--api-key` `--token` `--profile` `--port` | هر دو |
| `omniroute launch-codex` | OpenAI Codex CLI | هیچ چیز — `codex` را با ارائه‌دهنده `omniroute` تزریق شده از طریق پرچم‌های `-c` راه‌اندازی می‌کند | `--remote` `--api-key` `--profile` (`-p`) `--port` | هر دو |
نکات مربوط به پرچم‌ها (تأیید شده در منبع دستور):
- `--remote <url>` — فهرست را از یک OmniRoute از راه دور دریافت کنید (پرچم‌های `--port` و زمینه فعال را نادیده می‌گیرد). `--api-key <key>` اعتبارنامه را برای آن سرور تأمین می‌کند (به طور پیش‌فرض به متغیر محیطی `OMNIROUTE_API_KEY` یا توکن زمینه فعال اشاره می‌کند).
- `--only <patterns>` — زیررشته‌های جداشده با کاما؛ فقط شناسه‌های مدل‌هایی که مطابقت دارند را نگه‌دارید (به عنوان مثال `--only glm,kimi`). در `setup-codex`، `setup-claude`، `setup-opencode`، `setup-continue`، `setup-cursor`، `setup-crush` در دسترس است.
- `--dry-run` — دقیقاً آنچه که نوشته می‌شود را بدون لمس سیستم فایل چاپ کنید. در هر دستور `setup-*` **به جز** `setup-cursor` در دسترس است (که هرگز فایلی نمی‌نویسد).
- `--model <id>` — برای ابزارهایی که کشف خودکار مدل ندارند، الزامی است (یا به صورت تعاملی انتخاب می‌شود): Cline، Kilo، Roo، Goose، Qwen، Aider. این ابزارها همچنین `--yes` را برای اجراهای غیرتعامل می‌پذیرند (که سپس نیاز به `--model` دارد). `setup-opencode` `--model` را برای تنظیم مدل پیش‌فرض سطح بالا می‌پذیرد.
- `--model <id>` در `omniroute run` از اتصالات مشخص شده در فهرست استفاده می‌کند (`bin/cli/cli-manifest.mjs`): **aider** `--model openai/<id>` و **opencode** `--model omniroute/<id>` (پیشوند فقط زمانی اضافه می‌شود که شناسه قبلاً آن را نداشته باشد)؛ **qwen** و **gemini** شناسه را به صورت عینی دریافت می‌کنند؛ **claude** آن را از طریق `ANTHROPIC_MODEL`، **goose** از طریق `GOOSE_MODEL` و **codex** از طریق آرگومان‌های `-c model_providers.omniroute.*` دریافت می‌کند. **Qwen تنها هدف اجرایی است که به شدت نیاز به `--model` دارد**`omniroute run qwen` بدون آن با خطای صریح `2` خارج می‌شود.
- `--port <port>` — پورت محلی OmniRoute (پیش‌فرض `20128`، در صورت تنظیم `--remote` نادیده گرفته می‌شود). در تمام `setup-*` و هر دو راه‌انداز موجود است.
- کدهای خروجی `omniroute run`: کد خروجی خود CLI فرزند به صورت عینی منتقل می‌شود؛ `2` = آرگومان‌های نامعتبر (هدف پشتیبانی نشده، `--model` مورد نیاز گم شده، نگهبان کانتینر)؛ `127` = باینری هدف در `PATH` نیست؛ `130`/`143`/`129` زمانی که راه‌اندازی با `SIGINT`/`SIGTERM`/`SIGHUP` پایان می‌یابد؛ `1` = سایر خطاهای راه‌اندازی زمان اجرا.
- دو راه‌انداز (`launch`، `launch-codex`) `--profile <name>` را برای انتخاب یک پروفایل نوشته شده توسط `setup-claude` / `setup-codex` می‌پذیرند، به علاوه آرگومان‌های عبوری برای باینری‌های زیرین `claude` / `codex`.
انتخابگر تعاملی همچنین توسط دستورالعمل‌های پیکربندی به اشتراک گذاشته می‌شود:
```bash
# از فهرست مدل محلی یا از راه دور فعال انتخاب کنید و هدف را پیکربندی کنید.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` در حال حاضر به دستورالعمل‌های آزمایش شده برای `codex`، `claude`، `opencode`، `qwen`، `aider`، `goose`، `cline`، `continue` و `kilo` واگذار می‌شود. ورودی‌های فهرست فقط IDE، MITM و راهنما به صورت صریح `setup-*`/جریان‌های دستی باقی می‌مانند و به عنوان اهداف قابل راه‌اندازی ارائه نمی‌شوند.
> `setup-opencode` ادغام **سبک سازگار با openai** OpenCode است.
> همچنین یک ادغام پلاگین غنی‌تر وجود دارد — `omniroute setup opencode` — که `@omniroute/opencode-plugin` را نصب می‌کند. این‌ها دستورات متفاوتی هستند؛ جدول بالا `setup-opencode` را مستند می‌کند.
---
## استفاده محلی
با اجرای OmniRoute بر روی `localhost:20128`، فقط دستور راه‌اندازی را برای ابزار خود اجرا کنید. کاتالوگ از سرور محلی دریافت می‌شود.
```bash
# Codex: نوشتن یک پروفایل برای هر مدل مطابقت یافته در ~/.codex/
omniroute setup-codex
codex --profile glm52 # استفاده از پروفایل تولید شده
# Claude Code: نوشتن پروفایل‌های هر مدل، سپس راه‌اندازی یکی
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: نوشتن ارائه‌دهنده سازگار با openai با تمام مدل‌های کاتالوگ
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # ارجاع داده شده از طریق {env:OMNIROUTE_API_KEY}، هرگز بر روی دیسک
opencode -m omniroute/glm/glm-5.2 "..."
# ابزارهایی که به کشف خودکار نیاز ندارند به یک مدل صریح نیاز دارند:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# پیش‌نمایش بدون نوشتن هیچ چیزی:
omniroute setup-continue --dry-run
```
بدون نوشتن هیچ پیکربندی (فقط تزریق متغیر محیطی) راه‌اندازی کنید:
```bash
omniroute launch # Claude Code → OmniRoute محلی
omniroute launch-codex # Codex CLI → OmniRoute محلی
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# مسیر دستور صریح: هر چیزی که بعد از -- بیاید را عبور دهید
omniroute run claude -- --print-system-prompt "این تفاوت را بررسی کنید"
```
---
## استفاده از راه دور
هر دستور راه‌اندازی را به یک OmniRoute از راه دور با `--remote` + `--api-key` اشاره کنید. کاتالوگ از راه دور دریافت می‌شود؛ پیکربندی بر روی ماشین محلی شما نوشته می‌شود.
```bash
# OpenCode در برابر یک VPS از راه دور، فقط مدل‌های glm/kimi را نگه دارید
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # ابتدا OMNIROUTE_API_KEY را صادر کنید
# پروفایل‌های Codex از یک کاتالوگ از راه دور
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# راه‌اندازی یک CLI به طور مستقیم در برابر راه دور
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
به جای اینکه هر بار `--remote`/`--api-key` را عبور دهید، یک بار وارد شوید و اجازه دهید **زمینه فعال** به طور خودکار آنها را تأمین کند:
```bash
omniroute connect 192.168.0.15 # یک توکن محدوده‌ای ایجاد می‌کند، زمینه را ذخیره می‌کند
omniroute setup-codex # ← حالا از کاتالوگ از راه دور استفاده می‌کند
omniroute setup-opencode # ← مشابه
omniroute launch # ← Claude Code در برابر راه دور
```
برای زمینه‌ها، دامنه‌ها و مدیریت توکن به [حالت راه دور](./REMOTE-MODE.md) مراجعه کنید.
---
## کنوانسیون‌های URL پایه (کدام ابزارها به `/v1` نیاز دارند)
OmniRoute سطح OpenAI را در `/v1`، سطح Anthropic را در ریشه و یک سطح بومی Gemini را در `/v1beta` ارائه می‌دهد. هر یکپارچگی به شکلی که ابزارش انتظار دارد متصل شده است (در منبع دستور تأیید شده):
| یکپارچگی | URL پایه نوشته شده | `/v1`؟ |
| -------------------------------------------------------------------------- | ------------------ | ---------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | ریشه | خیر — Cline `/v1/chat/completions` را اضافه می‌کند |
| `setup-goose` (`OPENAI_HOST`) | ریشه | خیر — Goose مسیر را اضافه می‌کند |
| `setup-aider` (`OPENAI_API_BASE`) | ریشه | خیر — LiteLLM `/v1/chat/completions` را اضافه می‌کند |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | با `/v1` | بله |
| `setup-claude` (`ANTHROPIC_BASE_URL``launch` | ریشه | خیر — Claude Code `/v1/messages` را اضافه می‌کند |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | با `/v1` | بله |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | با `/v1` | بله |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | ریشه | خیر — SDK `/v1beta/models/…` را اضافه می‌کند |
---
## نگهداری وابستگی‌های بومی در بروزرسانی: `--include=optional`
زمانی که با `omniroute update` بروزرسانی می‌کنید (پس از تأیید یا با `--apply`
OmniRoute نصب را با `--include=optional` انجام می‌دهد:
```bash
npm install -g omniroute@latest --include=optional
```
این **یک** پرچم نیست که به `omniroute update` بدهید — همیشه توسط بروزرسان
اعمال می‌شود. این اطمینان می‌دهد که `optionalDependencies` (`better-sqlite3`، `keytar`،
`tls-client`، پشته LLMLingua SLM) در طول بروزرسانی باقی بمانند حتی اگر پیکربندی npm شما
دارای `omit=optional` باشد، که در غیر این صورت به طور خاموش درایور SQLite بومی و
بایندینگ OS-keyring را حذف می‌کند. برای پیش‌نمایش فرمان دقیق بدون اعمال:
```bash
omniroute update --dry-run
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
سایر پرچم‌های `omniroute update` (تأیید شده در منبع): `--check` (خروج 1 اگر
قدیمی باشد)، `--apply` (نصب بدون درخواست)، `--changelog`، `--no-backup`،
`--yes`.
---
## Google Gemini CLI از طریق `omniroute run gemini`
قرارداد تأیید شده در برابر `@google/gemini-cli` 0.50.0: CLI به
`GOOGLE_GEMINI_BASE_URL` احترام می‌گذارد و `POST /v1beta/models/<model>:generateContent`
`:streamGenerateContent?alt=sse`) را به آن ارسال می‌کند — دقیقاً سطح بومی
Gemini OmniRoute (`/v1beta`). `omniroute run gemini` این را به طور خودکار متصل می‌کند:
- `GOOGLE_GEMINI_BASE_URL` → URL پایه فعال OmniRoute (ریشه، بدون `/v1`
- `GEMINI_API_KEY` → اعتبارنامه حل شده OmniRoute (گزینه/محیط/زمینه)؛
- یک **`GEMINI_CLI_HOME` موقت و ایزوله** که `.gemini/settings.json` آن
احراز هویت `gemini-api-key` را انتخاب می‌کند، بنابراین یک جلسه OAuth
ذخیره شده Google (Code Assist) هرگز راه‌اندازی هدایت شده OmniRoute را
نادیده نمی‌گیرد — پس از خروج حذف می‌شود؛
- **بهداشت محیط**: محیط فرزند از `GOOGLE_API_KEY`،
`GOOGLE_GENAI_USE_VERTEXAI` و `GOOGLE_GENAI_USE_GCA` پاک می‌شود (که
احراز هویت را به Vertex/Code Assist هدایت می‌کند)، و `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
به عنوان یک پشتیبان اضافی تنظیم می‌شود — سایر اهداف `run` همین
درمان را برای متغیرهای متضاد خود دریافت می‌کنند؛
- تزریق `--model <id>` از `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
نگهبان اعتماد workspace Gemini هنوز در حالت بدون سر اعمال می‌شود —
`--skip-trust` را عبور دهید (یا به صورت تعاملی به دایرکتوری اعتماد کنید)؛
راه‌انداز عمداً از آن عبور نمی‌کند. این راه‌انداز از **ثبت ACP**
(`src/lib/acp/registry.ts`، `gemini --acp`) متمایز است، که
ادغام پروتکل عامل برای `/dashboard/acp-agents` باقی می‌ماند.
---
## پاکسازی واقعی دود (اختیاری)
اجرای برنامه راه‌اندازی قطعی در CI (`tests/unit/cli/run-command.test.ts`،
`tests/unit/cli/run-execution.test.ts`). برای اعتبارسنجی باینری‌های واقعی
در برابر یک سرور واقعی OmniRoute، یک ابزار اختیاری در
`tests/integration/upstream-cli-smoke.int.test.ts` وجود دارد. این ابزار هرگز به
طور خودکار اجرا نمی‌شود (هر زیرآزمایش رد می‌شود مگر اینکه `RUN_CLI_SMOKE=1`
اعتبارنامه را از طریق متغیر محیطی NAME (هرگز از طریق مقدار) منتقل می‌کند،
رشته‌های کلید شکل را از هر خروجی ثبت شده حذف می‌کند، اهدافی که باینری آن‌ها
نصب نشده است را رد می‌کند و شکست‌ها را به عنوان auth / upstream / config
به جای یک بولین خالص طبقه‌بندی می‌کند:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
اختیاری: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` پاکسازی را محدود می‌کند؛
`OMNIROUTE_SMOKE_TIMEOUT_MS` زمان‌سنج 120 ثانیه‌ای برای هر هدف را نادیده می‌گیرد.
---
## همچنین ببینید
- [پیکربندی کلاود کد](./CLAUDE-CODE-CONFIGURATION.md) — راهنمای عمیق‌تر کلاود کد
- [پیکربندی CLI کدکس](./CODEX-CLI-CONFIGURATION.md) — تنظیمات پایه یک‌باره `[model_providers.omniroute]`
- [حالت از راه دور](./REMOTE-MODE.md) — زمینه‌ها، توکن‌های دسترسی محدود، راه‌اندازی یک سرور از راه دور
- [مرجع ابزارهای CLI](../reference/CLI-TOOLS.md) — کاتالوگ کامل ابزارهای پشتیبانی‌شده + صفحات داشبورد
- [راهنمای راه‌اندازی](./SETUP_GUIDE.md) — روش‌های نصب و آموزش اولیه در اولین اجرا

View File

@@ -1,316 +1,86 @@
# CLI-TOOLS (فارسی)
# CLI Tools Setup Guide — OmniRoute (فارسی)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "ابزارهای CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# ابزارهای CLI — OmniRoute
آخرین به‌روزرسانی: 2026-08-18
OmniRoute با سه دسته از ابزارهای CLI که در سه صفحه داشبورد اختصاصی پخش شده‌اند، یکپارچه می‌شود:
| صفحه | مسیر | مفهوم | تعداد |
| ----------------- | ----------------------- | -------------------------------------------------------------------------------------- | ---------------------- |
| **کدهای CLI** | `/dashboard/cli-code` | ابزارهای کدنویسی که به OmniRoute اشاره می‌کنند (مشتری → CLI → OmniRoute → ارائه‌دهنده) | 26 |
| **نمایندگان CLI** | `/dashboard/cli-agents` | نمایندگان خودکار که به OmniRoute اشاره می‌کنند (همان جریان، دامنه وسیع‌تر) | 8 |
| **نمایندگان ACP** | `/dashboard/acp-agents` | CLIهایی که OmniRoute به عنوان بک‌اند از طریق stdio/ACP ایجاد می‌کند (جریان معکوس) | به ثبت‌نام مراجعه کنید |
مسیرهای قدیمی از طریق 308 هدایت می‌شوند: `/dashboard/cli-tools``/dashboard/cli-code`، `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## نحوه کار
## How It Works
```
کدهای CLI / نمایندگان CLI (جریان مصرف):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (همه به OmniRoute اشاره می‌کنند)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute به ارائه‌دهنده صحیح هدایت می‌کند)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
نمایندگان ACP (جریان ایجاد معکوس):
درخواست مشتری → OmniRoute → CLI را از طریق stdio/ACP ایجاد می‌کند → پاسخ
```
**مزایا:**
**Benefits:**
- یک کلید API برای مدیریت همه ابزارها
- ردیابی هزینه‌ها در تمام CLIها در داشبورد
- تغییر مدل بدون نیاز به پیکربندی مجدد هر ابزار
- کارکرد محلی و بر روی سرورهای از راه دور (VPS، Docker، Akamai، Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## پیکربندی خودکار با `setup-*`
## Supported Tools (Dashboard Source of Truth)
شما نیازی به نوشتن پیکربندی هر ابزار به صورت دستی ندارید. OmniRoute یک دستور `setup-*`
برای هر CLI پشتیبانی شده ارائه می‌دهد که کاتالوگ مدل **زنده** را از یک OmniRoute در حال اجرا (محلی یا از راه دور) می‌خواند و پیکربندی خود ابزار را بر روی ماشین شما می‌نویسد:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
هر کدام `--remote <url> --api-key <key>` را می‌پذیرند (پیکربندی یک ابزار محلی در برابر یک OmniRoute از راه دور)، `--dry-run` (پیش‌نمایش بدون نوشتن) و `--port`. ابزارهایی که کشف خودکار مدل ندارند (Cline، Kilo، Roo، Goose، Aider، Qwen) `--model <id>` را می‌پذیرند (و `--yes` برای اجراهای غیرتعامل‌پذیر). برای راه‌اندازی یک CLI با محیط صحیح و بدون نوشتن هیچ پیکربندی، از راه‌انداز عمومی
`omniroute run <target>` استفاده کنید (claude، codex، aider، goose، opencode، qwen،
gemini — اهداف و نام‌های مستعار از `bin/cli/cli-manifest.mjs` می‌آیند)؛ راه‌اندازهای قدیمی به ازای هر ابزار `omniroute launch` (Claude Code) و `omniroute launch-codex`
(Codex) همچنان در دسترس هستند. CLI جیمنای فقط برای راه‌اندازی است: این یک هدف `omniroute run`
است اما هیچ دستور `setup-*`/`configure` ندارد.
### CLI fingerprint sync (Agents + Settings)
> **مرجع کامل:** جدول اصلی — آنچه هر دستور می‌نویسد، هر پرچم،
> محلی در مقابل از راه دور، و اینکه کدام ابزارها به یک پسوند `/v1` نیاز دارند — در
> **[یکپارچه‌سازی‌های CLI](../guides/CLI-INTEGRATIONS.md)** موجود است.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### اجرای این‌ها در داخل یک کانتینر
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
یک دستور `setup-*` که در داخل کانتینر OmniRoute اجرا می‌شود، در خانه خود کانتینر می‌نویسد، که هیچ CLI میزبان آن را نمی‌خواند و با کانتینر ناپدید می‌شود. OmniRoute این را تشخیص می‌دهد و با دستورالعمل‌ها `2` خارج می‌شود به جای نوشتن. دو راه پشتیبانی شده برای پیشرفت — نصب CLI بر روی میزبان و
`omniroute connect` به کانتینر، یا بایند-مونت کردن دایرکتوری‌های پیکربندی و تنظیم
`CLI_CONFIG_HOME` (پروفایل میزبان کامپوز). هر دستور `setup-*`، به علاوه
`omniroute configure` و `omniroute config set`، `--allow-container-write` را می‌پذیرند زمانی که پیکربندی CLIهای خود کانتینر واقعاً منظور شما بوده است؛ `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` همین کار را برای
سرور انجام می‌دهد. به
[راهنمای Docker → پیکربندی ابزارهای CLI میزبان](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker) مراجعه کنید.
نقطه پایانی **اعمال داشبورد** (`POST /api/cli-tools/apply`) همان محافظ را اعمال می‌کند: در یک کانتینر، نوشتن که هدف آن از میزبان بایند-مونت نشده است، **`422`** را با `containerEphemeralTarget: true`، متن خطای ایمن و — برای ابزارهایی که دستور میزبان دارند (claude، codex، opencode، cline،
kilo، continue) — یک `hostSetupCommand` (به عنوان مثال `omniroute setup-opencode`) برای اجرا بر روی میزبان به جای آن؛ هیچ چیزی نوشته نمی‌شود. `dryRun: true` در حالت کانتینر همچنان کار می‌کند و محتوای تولید شده + مسیر هدف را بدون لمس دیسک برمی‌گرداند، بنابراین می‌توانید از داشبورد پیش‌نمایش کنید و بر روی میزبان اعمال کنید. این رفتار عمدی است و توسط
`tests/unit/api/cli-tools/apply-container-guard.test.ts` محافظت می‌شود — هرگز "اصلاح" نکنید یک 422 را با حذف محافظ.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## منبع حقیقت
## Step 1 — Get an OmniRoute API Key
کاتالوگ یکپارچه در `src/shared/constants/cliTools.ts` به عنوان `CLI_TOOLS: Record<string, CliCatalogEntry>` وجود دارد.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
هر ورودی دارای این فیلدها است (تعریف شده در `src/shared/schemas/cliCatalog.ts`):
| فیلد | نوع | توضیحات |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | کدام صفحه ابزار را نمایش می‌دهد |
| `vendor` | `string` | منبع ابزار ("Anthropic"، "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | همچنین به عنوان یک عامل ACP قابل استفاده است (نشان داده شده) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | سطح پشتیبانی از نقطه پایانی سفارشی. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | مکانیزم پیکربندی |
| `id`, `name`, `color`, `description`, `docsUrl` | استاندارد | فیلدهای اصلی نمایش |
ورودی‌هایی با `baseUrlSupport: "none"` در صفحات داشبورد **نمایش داده نمی‌شوند** — آنها در MITM backlog برای طرح 11 ثبت شده‌اند (به `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` مراجعه کنید).
### سطوح قابلیت (کاتالوگ شده × قابل شناسایی × قابل پیکربندی × قابل راه‌اندازی)
هر ابزار کاتالوگ شده قابل شناسایی، قابل پیکربندی یا قابل راه‌اندازی نیست. هر سطح یک منبع اعلام کننده دارد و یک تست انحراف آنها را هم‌راستا نگه می‌دارد:
| سطح | معنی | اعلام شده در |
| ------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **کاتالوگ شده** | در کاتالوگ داشبورد ظاهر می‌شود (نام، فروشنده، مستندات، نوع پیکربندی) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **قابل شناسایی** | شناسایی باینری/پیکربندی، بررسی سلامت، مسیرهای پیکربندی | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **قابل پیکربندی** | توسط `omniroute configure <cli>` پشتیبانی می‌شود (دستورالعمل راه‌اندازی وجود دارد) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **قابل راه‌اندازی** | توسط `omniroute run <target>` پشتیبانی می‌شود (تزریق env/args تعریف شده) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` مانفیست اجرایی رسمی برای دستورات CLI است: `run`، `configure` و تولیدکنندگان تکمیل شل همه لیست‌های هدف، حل نام مستعار (به عنوان مثال `kilocode`/`kilo-code`/`kilo_cli``kilo`) و اتصال پرچم `--model` را از آن استخراج می‌کنند. نگهبان انحراف
`tests/unit/cli/cli-manifest-drift.test.ts` تأیید می‌کند که مانفیست، کاتالوگ زمان اجرا، کاتالوگ UI و هر سطح مصرف‌کننده در همگام بمانند — هدفی که به یک سطح اضافه می‌شود بدون اینکه به دیگران اضافه شود، به جای انحراف بی‌صدا، آزمون را شکست می‌دهد.
## 1. کاتالوگ کد CLI (۲۶ ابزار)
تمام ابزارهایی که در `/dashboard/cli-code` ظاهر می‌شوند. آن‌هایی که `baseUrlSupport: none` دارند از طریق MITM یا یک راهنمای دستی به جای یک URL پایه سفارشی متصل شده‌اند:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ------------------------ | --------------------------- | -------------- | -------------- | ------------ |
| claude | کد کلاود | Anthropic | full | env | true |
| codex | CLI کد OpenAI | OpenAI | full | custom | true |
| zcode | ZCode (برنامه نویسی GLM) | Z.ai | none | custom | false |
| cline | Cline | OSS (توسعه‌دهنده ex-Claude) | full | custom | true |
| kilo | کد کیلو | Kilo-Org | full | custom | false |
| roo | کد رو | Roo (OSS) | full | guide | false |
| continue | ادامه | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | CLI کد GitHub Copilot | GitHub/MS | full | custom | false |
| cursor-cli | CLI کد Cursor | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (عامل کدگذاری pi) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | کد Qwen | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | ضد جاذبه | Google | none | mitm | false |
| hermes | هرمس | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | CLI سفارشی | — | full | custom-builder | false |
ابزارهایی که `baseUrlSupport: "partial"` دارند در کارت داشبورد نشان "⚠ Base URL parcial" را نمایش می‌دهند.
---
## 2. کاتالوگ ابزارهای CLI (8 ابزار)
عامل‌های خودمختار که در `/dashboard/cli-agents` ظاهر می‌شوند:
| id | name | vendor | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | عامل هرمس | Nous Research | full | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | full | true |
| goose | Goose | Block / Linux Foundation | full | true |
| interpreter | Open Interpreter | OSS | full | true |
| warp | Warp AI | Warp Inc. | partial | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | full | false |
| omp | Oh My Pi | OSS | full | true |
| letta | Letta CLI | Letta | full | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. عامل‌های ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
این صفحه (که از `/dashboard/agents` تغییر نام داده است) CLIهایی را نشان می‌دهد که OmniRoute می‌تواند به عنوان موتورهای اجرایی backend از طریق پروتکل stdio/ACP **ایجاد** کند. کاتالوگ به طور جداگانه در `src/lib/acp/registry.ts` نگهداری می‌شود و **همانند** `CLI_TOOLS` نیست.
---
## 4. لیست معوقه MITM (در داشبورد نمایش داده نمی‌شود)
CLIهای زیر به طور طبیعی از URL پایه سفارشی پشتیبانی نمی‌کنند و در صفحات کد CLI یا عامل‌های CLI **فهرست نشده‌اند**. آن‌ها نامزدهای مداخله MITM در طرح 11 هستند:
| CLI | دلیل |
| ------------------- | ------------------------------------------------------ |
| windsurf | BYOK محدود به مدل‌های انتخابی Claude + URL/token شرکتی |
| amp | اکوسیستم بسته (Sourcegraph) |
| amazon-q / kiro-cli | احراز هویت AWS SSO، بدون URL سفارشی |
| cowork | Anthropic Desktop، بدون نقطه پایانی قابل تنظیم |
برای مرجع کامل به `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` مراجعه کنید.
---
## 5. API تشخیص دسته‌ای
تمام تشخیص ابزارها از طریق یک نقطه پایانی واحد تجمیع می‌شود:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (همانند سایر مسیرهای `/api/cli-tools/`)
- Returns: `Record<toolId, ToolBatchStatus>` (نوع: `src/shared/types/cliBatchStatus.ts`)
- Strategy: `Promise.all` بر روی تمام ابزارها، 5 ثانیه زمان محدود برای هر ابزار
- Cache: در حافظه LRU با ایندکس فایل پیکربندی `mtime`. کش زمانی که mtime تغییر کند، نامعتبر می‌شود. در زمان راه‌اندازی مجدد سرور بازنشانی می‌شود.
شکل پاسخ برای هر ابزار:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitized, no stack traces
}
```
## ۶. مدیریت تنظیمات برای ابزارهای جدید
ابزارهای جدید با `configType: "custom"` دارای مسیرهای API تنظیمات اختصاصی هستند:
| مسیر | ابزار |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedicated `.env` key) |
تمام مسیرها از `sanitizeErrorMessage()` برای پاسخ‌های خطا استفاده می‌کنند (قانون سخت شماره ۱۲).
---
## ۷. معماری صفحات داشبورد
### کد CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — کامپوننت سرور
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — گرید کلاینت
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — صفحه جزئیات ابزار
- `src/app/(dashboard)/dashboard/cli-code/components/` — ۱۲ کارت ابزار تخصصی + `ToolDetailClient.tsx`
### عوامل CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — کامپوننت سرور
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — گرید کلاینت
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — استفاده مجدد از `ToolDetailClient`
### عوامل ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — کامپوننت سرور (انتقال یافته از `agents/`)
### کامپوننت‌های UI مشترک (`src/shared/components/cli/`)
| فایل | هدف |
| ----------------------- | ------------------------------------------------- |
| `CliToolCard.tsx` | کارت وضعیت هوشمند (تشخیص + تنظیمات + نقطه پایانی) |
| `CliConceptCard.tsx` | کارت توضیح مفهوم در هر صفحه |
| `CliComparisonCard.tsx` | مقایسه سه ستونی بین انواع CLI |
| `BaseUrlSelect.tsx` | منوی کشویی نقطه پایانی (محلی/ابری/سفارشی) |
| `ApiKeySelect.tsx` | انتخاب‌کننده کلید API |
| `ManualConfigModal.tsx` | مدال قطعه کد تنظیمات قابل کپی |
### هوک مشترک (`src/shared/hooks/cli/`)
| فایل | هدف |
| ------------------------- | ---------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | دریافت `/api/cli-tools/all-statuses`، مدیریت حالت بارگذاری/به‌روزرسانی |
## 8. i18n
فضاهای نام جدید در طرح 14 F9 اضافه شده‌اند:
| Namespace | Purpose |
| ----------- | ------------------------------------------------------------------------- |
| `cliCommon` | رشته‌های مشترک (برچسب‌های کارت، متون مفهوم/مقایسه، برچسب‌های صفحه جزئیات) |
| `cliCode` | رشته‌های صفحه CLI Code |
| `cliAgents` | رشته‌های صفحه CLI Agents |
| `acpAgents` | رشته‌های صفحه ACP Agents |
ترجمه‌های کامل PT-BR و EN ارائه شده‌اند. 39 زبان دیگر به طور خودکار از طریق ادغام سطح فضای نام در `src/i18n/request.ts` به EN برمی‌گردند.
---
## 9. شروع سریع
### مرحله 1 — دریافت کلید API OmniRoute
1. به `/dashboard/api-manager` بروید → **ایجاد کلید API**
2. یک نام به آن بدهید (مثلاً `cli-tools`) و تمام مجوزها را انتخاب کنید
3. کلید را کپی کنید — شما به آن برای هر CLI زیر نیاز خواهید داشت
> کلید شما به شکل زیر است: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### مرحله 2 — نصب ابزارهای CLI
تمام ابزارهای مبتنی بر npm به Node.js 22.22.2+ یا 24.x نیاز دارند:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -328,135 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (قابل راه‌اندازی از طریق `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # مبتنی بر Rust
# Pi coding agent
# برای نصب به https://github.com/zechnerj/pi-coding-agent مراجعه کنید
# jcode
# برای نصب به https://github.com/1jehuang/jcode مراجعه کنید
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### مرحله 3 — پیکربندی از طریق داشبورد
## Step 3 — Set Global Environment Variables
1. به `http://localhost:20128/dashboard/cli-code` بروید
2. ابزار خود را در شبکه پیدا کنید
3. بر روی کارت کلیک کنید تا صفحه جزئیات ابزار باز شود
4. کلید API و URL پایه خود را انتخاب کنید
5. بر روی **اعمال پیکربندی** کلیک کنید یا قطعه کد پیکربندی دستی را کپی کنید
---
### مرحله 4 — تنظیم متغیرهای محیطی جهانی
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# نقطه پایانی جهانی OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI در ROOT متغیر GOOGLE_GEMINI_BASE_URL را می‌خواند (SDK آن به طور خودکار /v1beta/... را اضافه می‌کند)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> برای **سرور از راه دور** `localhost:20128` را با IP یا دامنه سرور جایگزین کنید،
> مثلاً `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### مرحله 4 — پیکربندی هر ابزار
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# ایجاد ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
از ریشه دروازه یکپارچه Anthropic برای Claude Code استفاده کنید. در اینجا `/v1` را اضافه نکنید.
**آزمایش:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Codex مدرن (v0.137+) فقط `~/.codex/config.toml` را می‌خواند — `config.yaml` قدیمی متعلق به CLI قدیمی npm است و به طور خاموش نادیده گرفته می‌شود. کلید API در متغیر محیطی `OMNIROUTE_API_KEY` (`env_key`) باقی می‌ماند و هرگز در داخل فایل نیست:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
مرجع کامل (پروفایل‌ها، `wire_api`، پنجره‌های زمینه): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**آزمایش:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**آزمایش:** `opencode`
> از `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> برای ارسال واریانت‌های تفکر استفاده کنید.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI یا VS Code)
### OpenCode
**حالت CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -468,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**حالت VS Code:**
تنظیمات افزونه Cline → ارائه‌دهنده API: `OpenAI Compatible`URL پایه: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
یا از داشبورد OmniRoute استفاده کنید**CLI Tools → Cline → Apply Config**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI یا VS Code)
### KiloCode (CLI or VS Code)
**حالت CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**تنظیمات VS Code:**
**VS Code settings:**
```json
{
@@ -492,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
یا از داشبورد OmniRoute استفاده کنید**CLI Tools → KiloCode → Apply Config**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (افزونه VS Code)
### Continue (VS Code Extension)
فایل `~/.continue/config.yaml` را ویرایش کنید:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -510,254 +241,158 @@ models:
default: true
```
پس از ویرایش، VS Code را دوباره راه‌اندازی کنید.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
از این مورد زمانی استفاده کنید که VS Code Insiders برای مدل‌های نقطه پایانی سفارشی پیکربندی شده و می‌خواهید OmniRoute بدون فیلد هدر سفارشی کار کند.
**محل توصیه شده:**
- لینوکس: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- ویندوز: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**مثال با استفاده از نام مستعار توکن‌شده OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**نکات:**
- `sk-your-omniroute-key` را با کلید API ایجاد شده در OmniRoute جایگزین کنید.
- فیلد `url` باید به `/api/v1/vscode/{token}/chat/completions` اشاره کند.
- فیلد `modelsUrl` باید به `/api/v1/vscode/{token}/models` اشاره کند.
- در صورت پشتیبانی کلاینت از هدرهای سفارشی، از جریان معمول `/v1` + هدر Bearer استفاده کنید.
- توکن‌های جاسازی شده در URL یک بازگشت سازگاری هستند و ممکن است در لاگ‌های ویرایشگر یا تاریخچه پروکسی ظاهر شوند.
---
#### Kiro CLI (آمازون)
### Kiro CLI (Amazon)
```bash
# به حساب AWS/Kiro خود وارد شوید:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI از احراز هویت خود استفاده می‌کند — OmniRoute به عنوان backend برای Kiro CLI خود لازم نیست.
# از kiro-cli در کنار OmniRoute برای ابزارهای دیگر استفاده کنید.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
برای برنامه دسکتاپ **Kiro IDE**، از نقطه پایانی MITM که توسط OmniRoute در زیر `/dashboard/cli-tools → Kiro` در دسترس است استفاده کنید.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. CLI داخلی OmniRoute
## Dashboard Auto-Configuration
باینری `omniroute` دستورات مربوط به چرخه عمر سرور، راه‌اندازی، تشخیص و مدیریت ارائه‌دهنده را فراهم می‌کند. نقطه ورودی: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # شروع سرور (پورت پیش‌فرض 20128)
omniroute setup # ویزارد راه‌اندازی تعاملی
omniroute doctor # بررسی پیکربندی، پایگاه داده، پورت‌ها، زمان اجرا
omniroute providers list # اتصالات ارائه‌دهنده پیکربندی شده
omniroute providers test-all # تست هر اتصال فعال
omniroute reset-password # بازنشانی رمز عبور مدیر
omniroute logs # استریم لاگ‌های درخواست
omniroute health # سلامت دقیق (شکست‌ها، کش، حافظه)
omniroute --version # چاپ نسخه
omniroute --help # نمایش تمام دستورات
```
### راه‌اندازی و اولیه‌سازی
```bash
omniroute setup # ویزارد راه‌اندازی تعاملی
omniroute setup --non-interactive # حالت CI/خودکار (خواندن متغیرهای محیطی + پرچم‌ها)
omniroute setup --password '<value>' # تنظیم رمز عبور مدیر به طور مستقیم
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # افزودن و تست یک ارائه‌دهنده در یک مرحله
```
متغیرهای محیطی شناخته شده برای راه‌اندازی غیر تعاملی:
| Var | Purpose |
| ------------------- | --------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | کلید API ارائه‌دهنده (متصل به `--api-key` از طریق Commander `.env()`) |
| `DATA_DIR` | بازنویسی دایرکتوری داده‌های OmniRoute |
تمام ورودی‌های غیر تعاملی دیگر به عنوان پرچم‌ها ارسال می‌شوند، نه متغیرهای محیطی:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(به گزینه‌های `omniroute setup` در بالا مراجعه کنید).
### تشخیص
```bash
omniroute doctor # بررسی پیکربندی، پایگاه داده، پورت‌ها، زمان اجرا، حافظه، زنده بودن
omniroute doctor --json # JSON قابل خواندن توسط ماشین
omniroute doctor --no-liveness # رد کردن پروب سلامت HTTP
omniroute doctor --host 0.0.0.0 # بازنویسی میزبان زنده بودن
omniroute doctor --liveness-url <url> # بازنویسی کامل URL نقطه پایانی سلامت
```
دکتر این بررسی‌ها را انجام می‌دهد: `پیکربندی`, `پایگاه داده`, `ذخیره‌سازی/رمزگذاری`,
`دسترس‌پذیری پورت`, `زمان اجرای نود`, `باینری بومی` (better-sqlite3),
`حافظه`, و `زنده بودن سرور`. اگر هر بررسی `شکست` بخورد، با کد غیر صفر خارج می‌شود.
### مدیریت ارائه‌دهنده
```bash
omniroute providers available # کاتالوگ ارائه‌دهنده OmniRoute
omniroute providers available --search openai # فیلتر کاتالوگ بر اساس id/name/alias/category
omniroute providers available --category api-key # فیلتر بر اساس دسته (api-key, oauth, free, ...)
omniroute providers available --json # JSON قابل خواندن توسط ماشین
omniroute providers list # اتصالات ارائه‌دهنده پیکربندی شده
omniroute providers list --json
omniroute providers test <id|name> # تست یک اتصال پیکربندی شده
omniroute providers test-all # تست هر اتصال فعال
omniroute providers validate # اعتبارسنجی ساختاری محلی
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # جریان OAuth موجود
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` API-first هستند و بنابراین بر اساس
زمینه محلی یا از راه دور فعال کار می‌کنند. ورودی اعتبارنامه باید از
`--credential-stdin` یا `--credential-env` استفاده کند؛ `--dry-run --json` فقط
حضور/شکل مخفی شده را گزارش می‌دهد. `providers available` کاتالوگ OmniRoute را می‌خواند؛
`providers list/test/test-all/validate` رفتار SQLite محلی خود را حفظ می‌کنند و
نیاز به اجرای سرور ندارند.
### بازیابی و بازنشانی
```bash
omniroute reset-password # بازنشانی رمز عبور مدیر (همچنین: omniroute-reset-password)
omniroute reset-encrypted-columns # نمایش هشدار + اجرای آزمایشی برای بازنشانی اعتبارنامه‌های رمزگذاری شده
omniroute reset-encrypted-columns --force # در واقع اعتبارنامه‌های رمزگذاری شده را در SQLite خنثی کنید
```
### صادرات اعتبارنامه (⚠ با احتیاط برخورد کنید)
```bash
omniroute auth export # نمایش هشدار + دروازه تأیید — بدون دسترسی به پایگاه داده
omniroute auth export --force # صادرات اعتبارنامه‌های DECRYPTED تمام اتصالات به stdout به عنوان JSON
omniroute auth export --force --id <id> # صادرات فقط اتصال مطابقت‌دهنده
omniroute auth export --force --format env # تولید خطوط OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # نوشتن در یک فایل (ایجاد شده با مجوز 0600)
```
`auth export` **فقط محلی** است (خواندن مستقیم SQLite، بدون مسیر HTTP) و عمداً
مقادیر **متن ساده** `apiKey`/`accessToken`/`refreshToken`/`idToken` را چاپ/می‌نویسد — این ویژگی است، نه یک
اشکال. هیچ چیزی از پایگاه داده خوانده نمی‌شود و هیچ چیزی بدون `--force` رمزگشایی نمی‌شود. یک بنر هشدار stderr همیشه قبل از هر متنی چاپ می‌شود. نیاز به تنظیم `STORAGE_ENCRYPTION_KEY` دارد. یک فیلدی که در رمزگشایی شکست می‌خورد (کلید منقضی، متن رمزگذاری شده خراب) به عنوان
`<field>DecryptFailed: true` گزارش می‌شود به جای اینکه کل صادرات را متوقف کند یا خطای زیرین را نشت دهد.
### سایر زیر دستورات
اینها فرض می‌کنند که یک سرور OmniRoute در حال اجرا است، مگر اینکه خلاف آن ذکر شده باشد:
```bash
omniroute status # وضعیت جامع زمان اجرا
omniroute logs # استریم لاگ‌های درخواست (--json, --search, --follow)
omniroute config show # نمایش پیکربندی فعلی
omniroute provider list # لیست ارائه‌دهندگان موجود (معادل لیست ارائه‌دهندگان)
omniroute provider add # ثبت OmniRoute به عنوان یک ارائه‌دهنده در یک ابزار
omniroute keys add | list | remove # مدیریت کلیدهای API
omniroute models [provider] # لیست مدل‌ها (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # عکس‌برداری از پیکربندی + پایگاه داده
omniroute restore # بازیابی از یک عکس‌برداری قبلی
omniroute health # سلامت دقیق (شکست‌ها، کش، حافظه)
omniroute quota # استفاده از سهم ارائه‌دهنده
omniroute cache # وضعیت کش
omniroute cache clear # پاک کردن کش‌های معنایی + امضا
omniroute mcp status | restart # وضعیت سرور MCP / راه‌اندازی مجدد
omniroute a2a status | card # وضعیت سرور A2A / کارت عامل
omniroute tunnel list | create | stop # مدیریت تونل‌ها (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # بررسی / تنظیم متغیرهای محیطی (موقت)
omniroute test # تست اتصال به ارائه‌دهنده
omniroute update # بررسی به‌روزرسانی‌ها
omniroute completion # تولید تکمیل شل
```
### پرچم‌های رایج
| Flag | Description |
| ------------------- | -------------------------------------------------------------- |
| `--no-open` | به طور خودکار مرورگر را در شروع باز نکنید |
| `--port <n>` | بازنویسی پورت API (پیش‌فرض 20128) |
| `--mcp` | به عنوان سرور MCP بر روی stdio اجرا شود (برای IDEها) |
| `--non-interactive` | حالت CI (بدون درخواست؛ خواندن از env/flags) |
| `--json` | خروجی JSON قابل خواندن توسط ماشین (دکتر، ارائه‌دهندگان و غیره) |
| `--help`, `-h` | نمایش کمک خاص به دستور |
| `--version`, `-v` | چاپ نسخه نصب شده |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## نقاط پایانی API موجود
## Built-in Agents: Droid & OpenClaw
| نقطه پایانی | توضیحات | استفاده برای |
| -------------------------- | -------------------------------- | ---------------------------------------------- |
| `/v1/chat/completions` | چت استاندارد (همه ارائه‌دهندگان) | همه ابزارهای مدرن |
| `/v1/responses` | API پاسخ‌ها (فرمت OpenAI) | Codex، جریان‌های عاملی |
| `/v1/completions` | تکمیل متن قدیمی | ابزارهای قدیمی که از `prompt:` استفاده می‌کنند |
| `/v1/embeddings` | جاسازی‌های متنی | RAG، جستجو |
| `/v1/images/generations` | تولید تصویر | GPT-Image، Flux و غیره |
| `/v1/audio/speech` | تبدیل متن به گفتار | ElevenLabs، OpenAI TTS |
| `/v1/audio/transcriptions` | تبدیل گفتار به متن | Deepgram، AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
نمونه‌های آماده برای چسباندن با یک URL OmniRoute توکن‌شده:
```txt
مثال توکن: sk-a3ab3c080beaee3a-69f4a4-070d71af
پایه استاندارد OpenAI: http://localhost:20128/v1
مدل‌های VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
چت VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
پاسخ‌های VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
برچسب‌های Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
چت Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## عیب‌یابی
## Available API Endpoints
| خطا | علت | راه حل |
| --------------------------------------------- | ----------------------------------- | ------------------------------------------------------- |
| `Connection refused` | OmniRoute در حال اجرا نیست | `omniroute serve` |
| `401 Unauthorized` | کلید API اشتباه | بررسی در `/dashboard/api-manager` |
| `No combo configured` | هیچ ترکیب مسیریابی فعالی وجود ندارد | تنظیم در `/dashboard/combos` |
| CLI نشان می‌دهد "not installed" | باینری در PATH نیست | بررسی `which <command>` |
| داشبورد بعد از نصب نشان می‌دهد "not detected" | کش قدیمی | کلیک بر روی "⟳ Refresh detection" در داشبورد |
| لینک قدیمی `/dashboard/cli-tools` | بوکمارک پیش از v3.8.6 | به طور خودکار به `/dashboard/cli-code` (308) هدایت شد |
| لینک قدیمی `/dashboard/agents` | بوکمارک پیش از v3.8.6 | به طور خودکار به `/dashboard/acp-agents` (308) هدایت شد |
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Solución de Problemas
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,320 +0,0 @@
# CLI-INTEGRATIONS (Suomi)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integraatiot — osoita mikä tahansa koodaus CLI OmniRouteen"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integraatiot
OmniRoute toimittaa joukon `setup-*` komentoja, jotka konfiguroivat koodaus
CLI:n (Codex, Claude Code, OpenCode, Cline, …) käyttämään OmniRoutea taustajärjestelmänään — joten
työkalu kommunikoi **yksi** päätepiste ja OmniRoute ohjaa oikealle palveluntarjoajalle automaattisella varajärjestelmällä. Jokainen komento lukee **live** malliluettelon toimivasta
OmniRoute:sta (paikallinen tai etä) ja kirjoittaa työkalun oman konfiguraatiotiedoston **sinun**
koneellesi. API-avain viitataan ympäristömuuttujaan, missä tahansa työkalussa
se tukee sitä. Komennot, jotka säilyttävät työkalukohtaisen ympäristötiedoston, on merkitty alla.
On myös yleinen käynnistin — `omniroute run <target>` — joka käynnistää
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` tai `gemini` oikealla ympäristöllä ilman, että kirjoitetaan mitään konfiguraatiota. Kohteet ja niiden
aliasit tulevat kanonisesta manifestista `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), ja `omniroute completion` tarjoaa
saman manifestista johdetun kohdesanaston. Perinteiset työkalukohtaiset käynnistimet —
`omniroute launch` (Claude Code) ja `omniroute launch-codex` (Codex) — ovat edelleen
käytettävissä.
Palveluntarjoajan rekrytointi on saatavilla samasta paikallisesta/etäyhteydestä.
Alla olevat API-ensimmäiset komennot pitävät hallintotodistuksen erillään palveluntarjoajan
tunnistetiedoista eivätkä koskaan tulosta tunnistetietoa jäsennellyssä tulosteessa:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Skripteissä suositaan `--credential-stdin` tai `--credential-env`; `--credential`
säilytetään hallittua paikallista käyttöä varten. `providers remove` vaatii `--yes` ei-interaktiivisella terminaalilla, ja kaikki viisi komentoa kunnioittavat aktiivista kontekstia tai
globaaleja `--base-url`/`--api-key` vaihtoehtoja.
Kaksi rikkainta integraatiota varten kertakirjoitettu perusasetuksen osalta, katso
työkalukohtaiset syväsukellukset:
- [Claude Code konfigurointi](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI konfigurointi](./CODEX-CLI-CONFIGURATION.md)
- [Etätila](./REMOTE-MODE.md) — ohjaa etä OmniRoutea (VPS / Tailnet) kannettavalta tietokoneeltasi
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot-laajennus; se voi myös suorittaa nämä
`setup-*` komennot puolestasi editorin sisällä
---
## Päätaulukko
Jokainen komento kunnioittaa **aktiivista kontekstia** (asetettu `omniroute connect`, katso
[Etätila](./REMOTE-MODE.md)) tai eksplisiittisiä `--remote <url> --api-key <key>` lippuja.
"Paikallinen vs etä" alla tarkoittaa: ilman lippuja se kohdistaa `http://localhost:20128`;
`--remote` (tai aktiivinen etäyhteys) hakee luettelon kyseiseltä palvelimelta ja kirjoittaa konfiguraation paikallisesti.
| Komento | Työkalu | Mitä se kirjoittaa | Avainliput | Paikallinen vs etä |
| -------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — yksi profiili per yhteensopiva tekstimalli (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Molemmat |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — yksi profiili per vastaava malli (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Molemmat |
| `omniroute setup-opencode` | OpenCode (openai-yhteensopiva) | `~/.config/opencode/opencode.json``omniroute` palveluntarjoaja jokaiselle luettelomallille (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Molemmat |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI-tila) + tulostaa VS Code laajennuksen asetukset | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Molemmat |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + yhdistää `kilocode.*` VS Code `settings.json` tiedostoon, jos se on olemassa | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Molemmat |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` mallit, avain kautta `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Molemmat |
| `omniroute setup-cursor` | Cursor | Ei mitään — tulostaa sovelluksen vaiheet (Cursorin konfiguraatio on läpinäkyvä SQLite) | `--remote` `--api-key` `--only` `--port` | Molemmat |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (tuontidokumentti) + asettaa `roo-cline.autoImportSettingsPath`, jos VS Code `settings.json` tiedosto on olemassa | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Molemmat |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-yhteensopiva` palveluntarjoaja, avain kautta `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Molemmat |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + tulostaa ympäristöreseptin | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Molemmat |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + tulostaa ympäristöreseptin | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Molemmat |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` taulukko + `OMNIROUTE_API_KEY` tiedostossa `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Molemmat |
| `omniroute run <target>` | Ajanotto (yleinen) | Ei mitään — käynnistää `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` oikealla ympäristöllä ja argumenteilla; Qwen ja Gemini käyttävät väliaikaista eristettyä kotia | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Molemmat |
| `omniroute launch` | Claude Code | Ei mitään — käynnistää `claude` `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injektoituna | `--remote` `--api-key` `--token` `--profile` `--port` | Molemmat |
| `omniroute launch-codex` | OpenAI Codex CLI | Ei mitään — käynnistää `codex` `omniroute` palveluntarjoaja injektoituna `-c` lippujen kautta | `--remote` `--api-key` `--profile` (`-p`) `--port` | Molemmat |
Huomautuksia lipuista (vahvistettu komennon lähteessä):
- `--remote <url>` — hakee luettelon etä OmniRoute:sta (ylittää `--port`
ja aktiivisen kontekstin). `--api-key <key>` toimittaa tunnistetiedon kyseiselle
palvelimelle (oletuksena `OMNIROUTE_API_KEY` ympäristömuuttuja tai aktiivisen kontekstin token).
- `--only <patterns>` — pilkuilla erotellut alimerkit; säilyttää vain malli-ID:t, jotka vastaavat
(esim. `--only glm,kimi`). Saatavilla `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — tulostaa tarkalleen mitä kirjoitettaisiin ilman, että kosketaan
tiedostojärjestelmään. Saatavilla jokaisessa `setup-*` komennossa **paitsi** `setup-cursor`
(joka ei koskaan kirjoita tiedostoa).
- `--model <id>` — vaaditaan (tai valitaan interaktiivisesti) työkaluissa, joilla ei ole
mallin automaattista löytämistä: Cline, Kilo, Roo, Goose, Qwen, Aider. Nämä työkalut
hyväksyvät myös `--yes` ei-interaktiivisiin suorituksiin (jotka sitten vaativat `--model`).
`setup-opencode` ottaa `--model` asettaakseen oletustason mallin.
- `--model <id>` komennossa `omniroute run` seuraa manifestin per-kohde kytkentää
(`bin/cli/cli-manifest.mjs`): **aider** saa `--model openai/<id>` ja
**opencode** `--model omniroute/<id>` (etuliite lisätään vain, kun id
ei jo sisällä sitä); **qwen** ja **gemini** saavat id:n sellaisenaan;
**claude** saa sen `ANTHROPIC_MODEL` kautta, **goose** `GOOSE_MODEL` kautta, ja
**codex** `-c model_providers.omniroute.*` argumenttien kautta. **Qwen on ainoa suorituskohde, joka vaatii ehdottomasti `--model`**`omniroute run qwen` ilman sitä poistuu
`2` virheellä.
- `--port <port>` — paikallinen OmniRoute portti (oletus `20128`, ohitetaan kun `--remote`
on asetettu). Läsnä kaikissa `setup-*` ja molemmissa käynnistimissä.
- `omniroute run` poistumiskoodit: lapsi CLI:n oma poistumiskoodi siirretään
sellaisenaan; `2` = virheelliset argumentit (tuettu kohde puuttuu, vaadittu
`--model` puuttuu, säilön suoja); `127` = kohdebinaaria ei ole `PATH`:issa;
`130`/`143`/`129` kun käynnistys päättyy `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = muu ajonaikainen käynnistysvirhe.
- Kaksi käynnistintä (`launch`, `launch-codex`) hyväksyvät `--profile <name>` valitsemaan
profiilin, joka on kirjoitettu `setup-claude` / `setup-codex`, sekä läpivientiarvot
taustalla olevalle `claude` / `codex` binäärille.
Interaktiivinen valitsin on myös jaettu asetusreseptien kanssa:
```bash
# Valitse aktiivisesta paikallisesta tai etä malliluettelosta ja konfiguroi kohde.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` tällä hetkellä delegoi testattuihin resepteihin `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, ja `kilo`. IDE:lle vain,
MITM, ja opas vain luettelon merkinnät pysyvät eksplisiittisinä `setup-*`/manuaalisina prosesseina
eivätkä esitetä käynnistettävinä kohteina.
> `setup-opencode` on **kevyt openai-yhteensopiva** OpenCode integraatio.
> On myös rikkaampi liitännäintegraatio — `omniroute setup opencode` — joka
> asentaa `@omniroute/opencode-plugin`. Ne ovat eri komentoja; taulukko
> yllä dokumentoi `setup-opencode`.
---
## Paikallinen käyttö
Kun OmniRoute toimii `localhost:20128`, suorita vain asetuskäsky työkalullesi. Luettelo haetaan paikalliselta palvelimelta.
```bash
# Codex: kirjoita profiili jokaiselle vastaavalle mallille ~/.codex/
omniroute setup-codex
codex --profile glm52 # käytä luotua profiilia
# Claude Code: kirjoita mallikohtaiset profiilit, sitten käynnistä yksi
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: kirjoita openai-yhteensopiva tarjoaja kaikilla luettelomalleilla
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # viitattu {env:OMNIROUTE_API_KEY} kautta, ei koskaan levyllä
opencode -m omniroute/glm/glm-5.2 "..."
# Työkalut, joissa ei ole automaattista löytämistä, tarvitsevat erillisen mallin:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Esikatselu ilman mitään kirjoittamista:
omniroute setup-continue --dry-run
```
Käynnistä ilman mitään konfiguraation kirjoittamista (vain ympäristöinjektio):
```bash
omniroute launch # Claude Code → paikallinen OmniRoute
omniroute launch-codex # Codex CLI → paikallinen OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Erityinen komento polku: siirrä kaikki, mikä tulee jälkeen --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Etäkäyttö
Suunnittele mikä tahansa asetuskäsky etäiseen OmniRouteen `--remote` + `--api-key`. Luettelo haetaan etäyhteydestä; konfiguraatio kirjoitetaan paikalliselle koneellesi.
```bash
# OpenCode etä-VPS:lle, pidä vain glm/kimi mallit
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # vie OMNIROUTE_API_KEY ensin
# Codex-profiilit etäluettelosta
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Käynnistä CLI suoraan etäyhteyteen
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Sen sijaan, että siirtäisit `--remote`/`--api-key` joka kerta, kirjaudu sisään kerran ja anna **aktiivisen kontekstin** toimittaa ne automaattisesti:
```bash
omniroute connect 192.168.0.15 # luo rajatun tokenin, tallentaa kontekstin
omniroute setup-codex # ← nyt käyttää etäluetteloa
omniroute setup-opencode # ← sama
omniroute launch # ← Claude Code etäyhteyteen
```
Katso [Etätila](./REMOTE-MODE.md) konteksteista, alueista ja tokenin hallinnasta.
---
## Perus-URL-säännöt (mitkä työkalut haluavat `/v1`)
OmniRoute altistaa OpenAI-pinnan `/v1`-osoitteessa, Anthropic-pinnan juuriosoitteessa ja natiivin Gemini-pinnan `/v1beta`-osoitteessa. Jokainen integraatio on kytketty muotoon, jota työkalu odottaa (vahvistettu komennon lähteessä):
| Integraatio | Perus-URL kirjoitettu | `/v1`? |
| -------------------------------------------------------------------------- | --------------------- | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | juuriosoitteessa | Ei — Cline liittää `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | juuriosoitteessa | Ei — Goose liittää polun |
| `setup-aider` (`OPENAI_API_BASE`) | juuriosoitteessa | Ei — LiteLLM liittää `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1`-osoitteella | Kyllä |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | juuriosoitteessa | Ei — Claude Code liittää `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1`-osoitteella | Kyllä |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1`-osoitteella | Kyllä |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | juuriosoitteessa | Ei — SDK liittää `/v1beta/models/…` |
---
## Säilytä natiiviriippuvuudet päivityksessä: `--include=optional`
Kun päivität komennolla `omniroute update` (vahvistamisen jälkeen tai `--apply`-lipulla),
OmniRoute suorittaa asennuksen `--include=optional` mukana:
```bash
npm install -g omniroute@latest --include=optional
```
Tämä **ei** ole lippu, jonka annat `omniroute update` -komennolle — se on aina
sovellettuna päivityksessä. Se takaa, että `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM -pino) säilyvät päivityksen aikana, vaikka npm-konfiguraatiossasi
olisi asetettu `omit=optional`, mikä muuten hiljaisesti poistaisi natiivin SQLite
ohjaimen ja OS-avainrenkaan sidoksen. Jos haluat ennakoida tarkan komennon ilman
soveltamista:
```bash
omniroute update --dry-run
# [DRY RUN] Suorittaisi: npm install -g omniroute@latest --include=optional
```
Muut `omniroute update` -liput (vahvistettu lähdekoodissa): `--check` (poistu 1, jos
vanhentunut), `--apply` (asentaa ilman kehotusta), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI komennolla `omniroute run gemini`
Sopimus vahvistettu `@google/gemini-cli` 0.50.0: CLI kunnioittaa
`GOOGLE_GEMINI_BASE_URL` ja lähettää `POST /v1beta/models/<model>:generateContent`
(ja `:streamGenerateContent?alt=sse`) sitä vastaan — tarkalleen OmniRoute:n natiivin
Gemini-pinnan (`/v1beta`). `omniroute run gemini` yhdistää tämän automaattisesti:
- `GOOGLE_GEMINI_BASE_URL` → aktiivinen OmniRoute perus-URL (juuri, ei `/v1`);
- `GEMINI_API_KEY` → ratkaistu OmniRoute-todistus (vaihtoehto/env/konteksti);
- **väliaikainen eristetty `GEMINI_CLI_HOME`**, jonka `.gemini/settings.json`
valitsee `gemini-api-key`-todistuksen, joten tallennettu Google OAuth -istunto (Code Assist)
ei koskaan ohita OmniRoute-ohjattua käynnistystä — poistetaan uloskirjautumisen jälkeen;
- **ympäristöhygienia**: lapsiympäristö puhdistetaan `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` ja `GOOGLE_GENAI_USE_GCA` (jotka ohjaisivat
todistusta Vertex/Code Assist:lle), ja `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` on
asetettu varmistukseksi — muut `run`-kohteet saavat saman käsittelyn omille
ristiriitaisille muuttujilleen;
- `--model <id>` injektointi `--provider`/`--model`-lipuista.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Geminin työtilan luottamussuoja on edelleen voimassa headless-tilassa — käytä
`--skip-trust` (tai luota hakemistoon interaktiivisesti) itse; käynnistin
ei tarkoituksellisesti ohita sitä. Tämä käynnistin on erillinen **ACP
rekisteröinnistä** (`src/lib/acp/registry.ts`, `gemini --acp`), joka pysyy
agenttiprotokollan integraationa `/dashboard/acp-agents`.
---
## Todellinen savupyynti (valinnainen)
Deterministinen käynnistys-suunnitelman regressiotestit CI:ssä (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Vahvistaaksesi REAALIT binäärit REAALIN
OmniRoute-palvelimen kanssa, on olemassa valinnainen kehys osoitteessa
`tests/integration/upstream-cli-smoke.int.test.ts`. Se ei koskaan käynnisty automaattisesti
(koska jokainen alakoe ohittaa, ellei `RUN_CLI_SMOKE=1`), välittää todistuksen ympäristömuuttujan
NIMEN kautta (ei koskaan arvon kautta), peittää avainmuotoiset merkkijonot kaikesta tallennetusta
tulosteesta, ohittaa kohteet, joiden binääriä ei ole asennettu, ja luokittelee epäonnistumiset
todistukseksi / upstreamiksi / konfiguraatioksi sen sijaan, että se olisi pelkkä boolean:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Valinnainen: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` rajoittaa pyyntiä;
`OMNIROUTE_SMOKE_TIMEOUT_MS` ohittaa 120s kohdekohtaista aikarajaa.
---
## Katso myös
- [Claude Code -konfiguraatio](./CLAUDE-CODE-CONFIGURATION.md) — syvällisempi Claude Code -opas
- [Codex CLI -konfiguraatio](./CODEX-CLI-CONFIGURATION.md) — kertaluonteinen `[model_providers.omniroute]` perusasetukset
- [Etätila](./REMOTE-MODE.md) — kontekstit, rajatut pääsytunnukset, etäpalvelimen ohjaaminen
- [CLI Työkalujen viite](../reference/CLI-TOOLS.md) — täydellinen luettelo tuetuista työkaluista + hallintapaneelin sivut
- [Asennusopas](./SETUP_GUIDE.md) — asennusmenetelmät ja ensimmäisen käytön perehdytys

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,269 +0,0 @@
# CLI-INTEGRATIONS (Français)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Intégrations CLI — dirigez n'importe quel CLI de codage vers OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Intégrations CLI
OmniRoute propose une famille de commandes `setup-*` qui configurent un CLI de codage (Codex, Claude Code, OpenCode, Cline, …) pour utiliser OmniRoute comme son backend — ainsi l'outil communique avec **un** point de terminaison et OmniRoute redirige vers le bon fournisseur avec un retour automatique. Chaque commande lit le catalogue de modèles **en direct** d'un OmniRoute en cours d'exécution (local ou distant) et écrit le fichier de configuration de l'outil sur **votre** machine. La clé API est référencée par une variable d'environnement chaque fois que l'outil le supporte. Les commandes qui persistent un fichier d'environnement local à l'outil sont notées ci-dessous.
Il existe également un lanceur générique — `omniroute run <target>` — qui lance `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` ou `gemini` avec le bon environnement injecté, sans écrire de configuration du tout. Les cibles et leurs alias proviennent du manifeste canonique `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), et `omniroute completion` propose les mêmes mots cibles dérivés du manifeste. Les lanceurs par outil hérités — `omniroute launch` (Claude Code) et `omniroute launch-codex` (Codex) — restent disponibles.
L'intégration des fournisseurs est disponible depuis le même contexte local/distant. Les commandes orientées API ci-dessous maintiennent l'authentification de gestion séparée des informations d'identification du fournisseur et n'impriment jamais une information d'identification dans la sortie structurée :
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Pour les scripts, préférez `--credential-stdin` ou `--credential-env` ; `--credential` est conservé pour un usage local contrôlé. `providers remove` nécessite `--yes` sur un terminal non interactif, et les cinq commandes respectent le contexte actif ou les options globales `--base-url`/`--api-key`.
Pour la configuration de base écrite à la main une seule fois des deux intégrations les plus riches, consultez les plongées approfondies par outil :
- [Configuration de Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Configuration de Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Mode Distant](./REMOTE-MODE.md) — pilotez un OmniRoute distant (VPS / Tailnet) depuis votre ordinateur portable
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — l'extension OmniCopilot ; elle peut également exécuter ces commandes `setup-*` pour vous depuis l'éditeur
---
## Tableau maître
Chaque commande respecte le **contexte actif** (défini avec `omniroute connect`, voir [Mode Distant](./REMOTE-MODE.md)) ou les drapeaux explicites `--remote <url> --api-key <key>`. "Local vs distant" ci-dessous signifie : sans drapeaux, cela cible `http://localhost:20128` ; avec `--remote` (ou un contexte distant actif), cela récupère le catalogue depuis ce serveur et écrit la configuration localement.
| Commande | Outil | Ce qu'elle écrit | Drapeaux clés | Local vs distant |
| -------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — un profil par modèle de texte compatible (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Les deux |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — un profil par modèle correspondant (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Les deux |
| `omniroute setup-opencode` | OpenCode (compatible openai) | `~/.config/opencode/opencode.json` — fournisseur `omniroute` avec chaque modèle du catalogue (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Les deux |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mode CLI) + imprime les paramètres de l'extension VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Les deux |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + fusionne `kilocode.*` dans `settings.json` de VS Code si présent | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Les deux |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modèles `provider: openai`, clé via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Les deux |
| `omniroute setup-cursor` | Cursor | Rien — imprime les étapes dans l'application (la configuration de Cursor est opaque SQLite) | `--remote` `--api-key` `--only` `--port` | Les deux |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (doc d'importation) + définit `roo-cline.autoImportSettingsPath` si un `settings.json` de VS Code existe | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Les deux |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — fournisseur `openai-compat`, clé via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Les deux |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + imprime la recette d'environnement | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Les deux |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + imprime la recette d'environnement | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Les deux |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — tableau `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` dans `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Les deux |
| `omniroute run <target>` | Lancement d'exécution (générique) | Rien — lance `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` avec le bon environnement et les bons arguments ; Qwen et Gemini utilisent un répertoire temporaire isolé | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Les deux |
| `omniroute launch` | Claude Code | Rien — lance `claude` avec `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injectés | `--remote` `--api-key` `--token` `--profile` `--port` | Les deux |
| `omniroute launch-codex` | OpenAI Codex CLI | Rien — lance `codex` avec le fournisseur `omniroute` injecté via des drapeaux `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Les deux |
Notes sur les drapeaux (vérifiés dans la source de la commande) :
- `--remote <url>` — récupère le catalogue depuis un OmniRoute distant (remplace `--port` et le contexte actif). `--api-key <key>` fournit l'information d'identification pour ce serveur (par défaut à la variable d'environnement `OMNIROUTE_API_KEY`, ou le jeton du contexte actif).
- `--only <patterns>` — sous-chaînes séparées par des virgules ; conserve uniquement les ID de modèle qui correspondent (par exemple `--only glm,kimi`). Disponible sur `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — imprime exactement ce qui serait écrit sans toucher au système de fichiers. Disponible sur chaque commande `setup-*` **sauf** `setup-cursor` (qui n'écrit jamais de fichier).
- `--model <id>` — requis (ou choisi de manière interactive) pour les outils qui n'ont pas de découverte automatique de modèle : Cline, Kilo, Roo, Goose, Qwen, Aider. Ces outils acceptent également `--yes` pour des exécutions non interactives (ce qui nécessite alors `--model`). `setup-opencode` prend `--model` pour définir le modèle par défaut de niveau supérieur.
- `--model <id>` sur `omniroute run` suit le câblage par cible du manifeste (`bin/cli/cli-manifest.mjs`) : **aider** reçoit `--model openai/<id>` et **opencode** `--model omniroute/<id>` (le préfixe est ajouté uniquement lorsque l'id ne le porte pas déjà) ; **qwen** et **gemini** reçoivent l'id tel quel ; **claude** l'obtient via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, et **codex** via des arguments `-c model_providers.omniroute.*`. **Qwen est la seule cible d'exécution qui nécessite absolument `--model`**`omniroute run qwen` sans cela sort `2` avec une erreur explicite.
- `--port <port>` — port local d'OmniRoute (par défaut `20128`, ignoré lorsque `--remote` est défini). Présent sur toutes les commandes `setup-*` et les deux lanceurs.
- Codes de sortie de `omniroute run` : le code de sortie du CLI enfant est propagé tel quel ; `2` = arguments invalides (cible non prise en charge, `--model` requis manquant, garde de conteneur) ; `127` = le binaire cible n'est pas dans `PATH` ; `130`/`143`/`129` lorsque le lancement est terminé par `SIGINT`/`SIGTERM`/`SIGHUP` ; `1` = autre échec de lancement d'exécution.
- Les deux lanceurs (`launch`, `launch-codex`) acceptent `--profile <name>` pour sélectionner un profil écrit par `setup-claude` / `setup-codex`, plus des arguments de passage pour le binaire sous-jacent `claude` / `codex`.
Le sélecteur interactif est également partagé par les recettes de configuration :
```bash
# Choisissez dans le catalogue de modèles local ou distant actif et configurez la cible.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` délègue actuellement aux recettes testées pour `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, et `kilo`. Les entrées de catalogue uniquement IDE, MITM, et guide restent des flux explicites `setup-*`/manuels et ne sont pas présentées comme des cibles lancables.
> `setup-opencode` est l'intégration OpenCode **légère compatible openai**.
> Il existe également une intégration de plugin plus riche — `omniroute setup opencode` — qui installe `@omniroute/opencode-plugin`. Ce sont des commandes différentes ; le tableau ci-dessus documente `setup-opencode`.
---
## Utilisation locale
Avec OmniRoute en cours d'exécution sur `localhost:20128`, il suffit d'exécuter la commande de configuration pour votre outil. Le catalogue est récupéré depuis le serveur local.
```bash
# Codex : écrire un profil par modèle correspondant dans ~/.codex/
omniroute setup-codex
codex --profile glm52 # utiliser un profil généré
# Claude Code : écrire des profils par modèle, puis en lancer un
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode : écrire le fournisseur compatible OpenAI avec tous les modèles du catalogue
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # référencé via {env:OMNIROUTE_API_KEY}, jamais sur disque
opencode -m omniroute/glm/glm-5.2 "..."
# Les outils sans auto-découverte nécessitent un modèle explicite :
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Prévisualisation sans rien écrire :
omniroute setup-continue --dry-run
```
Lancez sans écrire de configuration du tout (injection d'environnement uniquement) :
```bash
omniroute launch # Claude Code → OmniRoute local
omniroute launch-codex # Codex CLI → OmniRoute local
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "réponse OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "réponse OK"
omniroute run qwen --model glm/glm-5.2 -- -p "réponse OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "réponse OK"
# Chemin de commande explicite : passez tout ce qui vient après --
omniroute run claude -- --print-system-prompt "révisez cette différence"
```
---
## Utilisation à distance
Pointez toute commande de configuration vers un OmniRoute distant avec `--remote` + `--api-key`. Le catalogue est récupéré depuis le distant ; la configuration est écrite sur votre machine locale.
```bash
# OpenCode contre un VPS distant, ne garder que les modèles glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exportez d'abord OMNIROUTE_API_KEY
# Profils Codex depuis un catalogue distant
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Lancez un CLI directement contre le distant
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Au lieu de passer `--remote`/`--api-key` à chaque fois, connectez-vous une fois et laissez le **contexte actif** les fournir automatiquement :
```bash
omniroute connect 192.168.0.15 # génère un jeton de portée, stocke le contexte
omniroute setup-codex # ← utilise maintenant le catalogue distant
omniroute setup-opencode # ← même chose
omniroute launch # ← Claude Code contre le distant
```
Voir [Mode à distance](./REMOTE-MODE.md) pour les contextes, les portées et la gestion des jetons.
---
## Conventions d'URL de base (que les outils veulent `/v1`)
OmniRoute expose la surface OpenAI à `/v1`, la surface Anthropic à la racine, et une surface Gemini native à `/v1beta`. Chaque intégration est câblée à la forme que son outil attend (vérifiée dans la source de la commande) :
| Intégration | URL de base écrite | `/v1` ? |
| -------------------------------------------------------------------------- | ------------------ | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | racine | Non — Cline ajoute `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | racine | Non — Goose ajoute le chemin |
| `setup-aider` (`OPENAI_API_BASE`) | racine | Non — LiteLLM ajoute `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | avec `/v1` | Oui |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | racine | Non — Claude Code ajoute `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | avec `/v1` | Oui |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | avec `/v1` | Oui |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | racine | Non — le SDK ajoute `/v1beta/models/…` |
---
## Maintenir les dépendances natives à jour : `--include=optional`
Lorsque vous mettez à jour avec `omniroute update` (après confirmation, ou avec `--apply`), OmniRoute exécute l'installation avec `--include=optional` intégré :
```bash
npm install -g omniroute@latest --include=optional
```
Ce n'est **pas** un drapeau que vous passez à `omniroute update` — il est toujours appliqué par le
programme de mise à jour. Cela garantit que les `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, la pile LLMLingua SLM) survivent à la mise à jour même si votre configuration npm
a `omit=optional` défini, ce qui autrement supprimerait silencieusement le pilote SQLite
natif et le lien avec le trousseau de clés du système. Pour prévisualiser la commande exacte sans appliquer :
```bash
omniroute update --dry-run
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
Autres drapeaux `omniroute update` (vérifiés dans la source) : `--check` (sortie 1 si
obsolète), `--apply` (installer sans demander), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Contrat vérifié contre `@google/gemini-cli` 0.50.0 : le CLI respecte
`GOOGLE_GEMINI_BASE_URL` et émet `POST /v1beta/models/<model>:generateContent`
(et `:streamGenerateContent?alt=sse`) contre celui-ci — exactement la surface
native Gemini d'OmniRoute (`/v1beta`). `omniroute run gemini` le connecte automatiquement :
- `GOOGLE_GEMINI_BASE_URL` → l'URL de base active d'OmniRoute (racine, pas de `/v1`) ;
- `GEMINI_API_KEY` → les informations d'identification résolues d'OmniRoute (option/env/contexte) ;
- un **`GEMINI_CLI_HOME` isolé temporaire** dont le `.gemini/settings.json`
sélectionne l'authentification `gemini-api-key`, de sorte qu'une session OAuth Google stockée (Code Assist)
ne remplace jamais le lancement dirigé par OmniRoute — supprimé après la sortie ;
- **hygiène de l'environnement** : l'environnement enfant est nettoyé de `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` et `GOOGLE_GENAI_USE_GCA` (qui redirigerait
l'authentification vers Vertex/Code Assist), et `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` est
défini comme une sauvegarde — les autres cibles `run` reçoivent le même
traitement pour leurs propres variables conflictuelles ;
- injection de `--model <id>` à partir de `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
La protection de confiance de l'espace de travail de Gemini s'applique toujours en mode sans tête — passez
`--skip-trust` (ou faites confiance au répertoire de manière interactive) vous-même ; le lanceur
ne le contourne délibérément pas. Ce lanceur est distinct de l'**enregistrement ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), qui reste l'intégration du protocole d'agent pour `/dashboard/acp-agents`.
---
## Réel balayage de fumée (opt-in)
Des exécutions de régression de plan de lancement déterministe dans CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Pour valider les binaires RÉELS contre un serveur OmniRoute RÉEL,
un cadre d'opt-in existe à
`tests/integration/upstream-cli-smoke.int.test.ts`. Il ne s'exécute jamais automatiquement
(tous les sous-tests sont ignorés sauf si `RUN_CLI_SMOKE=1`), passe les informations d'identification par la variable d'environnement
NAME (jamais par valeur), masque les chaînes en forme de clé de toute sortie enregistrée, ignore
les cibles dont le binaire n'est pas installé, et classe les échecs comme
auth / upstream / config au lieu d'un simple booléen :
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Optionnel : `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` restreint le balayage ;
`OMNIROUTE_SMOKE_TIMEOUT_MS` remplace le délai d'attente de 120s par cible.
---
## Voir aussi
- [Configuration de Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — le guide approfondi de Claude Code
- [Configuration de Codex CLI](./CODEX-CLI-CONFIGURATION.md) — la configuration de base `[model_providers.omniroute]` à effectuer une seule fois
- [Mode distant](./REMOTE-MODE.md) — contextes, jetons d'accès limités, contrôle d'un serveur distant
- [Référence des outils CLI](../reference/CLI-TOOLS.md) — le catalogue complet des outils pris en charge + pages de tableau de bord
- [Guide d'installation](./SETUP_GUIDE.md) — méthodes d'installation et intégration lors du premier lancement

View File

@@ -1,331 +1,86 @@
# CLI-TOOLS (Français)
# CLI Tools Setup Guide — OmniRoute (Français)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "Outils CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Outils CLI — OmniRoute
Dernière mise à jour : 2026-08-18
OmniRoute s'intègre avec trois catégories d'outils CLI répartis sur trois pages de tableau de bord dédiées :
| Page | Route | Concept | Compte |
| -------------- | ----------------------- | ----------------------------------------------------------------------------------------- | ------------- |
| **Code CLI** | `/dashboard/cli-code` | Outils de codage que vous pointez vers OmniRoute (Client → CLI → OmniRoute → Fournisseur) | 26 |
| **Agents CLI** | `/dashboard/cli-agents` | Agents autonomes que vous pointez vers OmniRoute (même flux, portée plus large) | 8 |
| **Agents ACP** | `/dashboard/acp-agents` | CLIs qu'OmniRoute génère en tant que backend via stdio/ACP (flux inverse) | voir registre |
Les routes héritées redirigent via 308 : `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Comment ça fonctionne
## How It Works
```
Code CLI / Agents CLI (flux de consommation) :
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (tous pointent vers OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute route vers le bon fournisseur)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Agents ACP (flux de génération inverse) :
Demande client → OmniRoute → génère CLI via stdio/ACP → réponse
```
**Avantages :**
**Benefits:**
- Une clé API pour gérer tous les outils
- Suivi des coûts à travers tous les CLIs dans le tableau de bord
- Changement de modèle sans reconfigurer chaque outil
- Fonctionne localement et sur des serveurs distants (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-configuration avec `setup-*`
## Supported Tools (Dashboard Source of Truth)
Vous n'avez pas à écrire la configuration de chaque outil à la main. OmniRoute fournit une commande `setup-*`
par CLI supporté qui lit le catalogue de modèles **en direct** d'un OmniRoute en cours d'exécution
(local ou distant) et écrit la configuration propre de l'outil sur votre machine :
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Chacune accepte `--remote <url> --api-key <key>` (configurer un outil local contre un
OmniRoute distant), `--dry-run` (aperçu sans écriture), et `--port`. Les outils
sans découverte automatique de modèle (Cline, Kilo, Roo, Goose, Aider, Qwen) prennent
`--model <id>` (et `--yes` pour des exécutions non interactives). Pour lancer un CLI avec le
bon environnement injecté et aucune configuration écrite, utilisez le lanceur générique
`omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — cibles et alias proviennent de `bin/cli/cli-manifest.mjs`); les lanceurs par outil hérités `omniroute launch` (Claude Code) et `omniroute launch-codex`
(Codex) restent disponibles. Le CLI Gemini est uniquement pour le lancement : c'est une cible `omniroute run`
mais n'a pas de recette `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **Référence complète :** le tableau maître — ce que chaque commande écrit, chaque drapeau,
> local vs distant, et quels outils veulent un suffixe `/v1` — se trouve dans
> **[Intégrations CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Exécution de ces commandes à l'intérieur d'un conteneur
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Une commande `setup-*` exécutée à l'intérieur du conteneur OmniRoute écrit dans le
dossier personnel du conteneur, que aucun CLI hôte ne lit et qui disparaît avec le
conteneur. OmniRoute détecte cela et sort avec `2` avec des instructions plutôt que
d'écrire. Deux façons prises en charge — installer le CLI sur l'hôte et
`omniroute connect` au conteneur, ou monter les répertoires de configuration et définir
`CLI_CONFIG_HOME` (le profil `host` de compose). Chaque commande `setup-*`, plus
`omniroute configure` et `omniroute config set`, accepte
`--allow-container-write` lorsque la configuration des CLIs propres au conteneur est ce que vous
vouliez réellement ; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` fait la même chose pour
le serveur. Voir
[Guide Docker → Configuration des outils CLI hôtes](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
Le **point de terminaison d'application** du tableau de bord (`POST /api/cli-tools/apply`) impose la
même protection : dans un conteneur, une écriture dont la cible n'est pas montée à partir de
l'hôte répond **`422`** avec `containerEphemeralTarget: true`, le texte d'erreur sécurisé et — pour les outils avec une recette hôte (claude, codex, opencode, cline,
kilo, continue) — une `hostSetupCommand` (par exemple `omniroute setup-opencode`) à exécuter
sur l'hôte à la place ; rien n'est écrit. `dryRun: true` continue de fonctionner en mode conteneur
et retourne le contenu généré + le chemin cible sans toucher au disque, vous permettant de prévisualiser depuis le tableau de bord et d'appliquer sur l'hôte. Ce comportement est
intentionnel et protégé contre les régressions par
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — ne "réparez" jamais un 422
en supprimant la protection.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Source de vérité
## Step 1 — Get an OmniRoute API Key
Le catalogue unifié se trouve dans `src/shared/constants/cliTools.ts` sous `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Chaque entrée a ces champs (définis dans `src/shared/schemas/cliCatalog.ts`):
| Champ | Type | Description |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Sur quelle page l'outil apparaît |
| `vendor` | `string` | Origine de l'outil ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Également utilisable en tant qu'agent ACP (badge affiché) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Niveau de support des points de terminaison personnalisés. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mécanisme de configuration |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Champs d'affichage principaux |
Les entrées avec `baseUrlSupport: "none"` **ne sont pas affichées** dans les pages du tableau de bord — elles sont enregistrées dans le backlog MITM pour le plan 11 (voir `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Niveaux de capacité (catalogué × détectable × configurable × lançable)
Tous les outils catalogués ne sont pas détectables, configurables ou lançables. Chaque niveau a une source déclarative, et un test de dérive les maintient alignés :
| Niveau | Signification | Déclaré dans |
| -------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **Catalogué** | Apparaît dans le catalogue du tableau de bord (nom, fournisseur, docs, type de configuration) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Détectable** | Détection binaire/configuration, vérifications de santé, chemins de configuration | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` catalogue d'exécution) |
| **Configuré** | Supporté par `omniroute configure <cli>` (recette de configuration existante) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Lançable** | Supporté par `omniroute run <target>` (injection d'env/args définie) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` est le manifeste exécutable canonique pour les commandes CLI : `run`, `configure` et les générateurs de complétion de shell dérivent tous leurs listes de cibles, résolution d'alias (par exemple `kilocode`/`kilo-code`/`kilo_cli``kilo`) et câblage du drapeau `--model` à partir de celui-ci. Le garde de dérive `tests/unit/cli/cli-manifest-drift.test.ts` affirme que le manifeste, le catalogue d'exécution, le catalogue UI et chaque surface de consommateur restent synchronisés — une cible ajoutée à une surface sans les autres échoue la suite au lieu de dériver silencieusement.
## 1. Catalogue des outils CLI (26 outils)
Tous les outils qui apparaissent dans `/dashboard/cli-code`. Ceux avec `baseUrlSupport: none` sont connectés via MITM ou un guide manuel au lieu d'une URL de base personnalisée :
| id | nom | fournisseur | supportBaseUrl | typeConfig | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | ------------------------- | ------------ |
| claude | Claude Code | Anthropic | complet | env | vrai |
| codex | OpenAI Codex CLI | OpenAI | complet | personnalisé | vrai |
| zcode | ZCode (GLM Coding Plan) | Z.ai | aucun | personnalisé | faux |
| cline | Cline | OSS (ex-Claude Dev) | complet | personnalisé | vrai |
| kilo | Kilo Code | Kilo-Org | complet | personnalisé | faux |
| roo | Roo Code | Roo (OSS) | complet | guide | faux |
| continue | Continue | continue.dev | complet | guide | faux |
| aider | Aider | OSS (P. Gauthier) | complet | guide | vrai |
| forge | ForgeCode | Antinomy HQ | complet | personnalisé | vrai |
| jcode | jcode | 1jehuang (OSS) | complet | personnalisé | faux |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | complet | personnalisé | faux |
| codewhale | CodeWhale | Hmbown (OSS) | complet | personnalisé | faux |
| opencode | OpenCode | Anomaly (ex-SST) | complet | guide | vrai |
| droid | Factory Droid | Factory AI | partiel | guide | faux |
| copilot | GitHub Copilot CLI | GitHub/MS | complet | personnalisé | faux |
| cursor-cli | Cursor CLI | Anysphere | partiel | guide | vrai |
| smelt | Smelt | leonardcser (OSS) | complet | personnalisé | faux |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | complet | personnalisé | faux |
| grok-build | Grok Build | xAI | complet | personnalisé | faux |
| crush | Crush | OSS (Charm) | complet | personnalisé | faux |
| qwen | Qwen Code | Alibaba | complet | guide | vrai |
| cursor | Cursor | Anysphere | aucun | guide | faux |
| antigravity | Antigravity | Google | aucun | mitm | faux |
| hermes | Hermes | Nous Research | aucun | guide | faux |
| kiro | Kiro AI | Amazon | aucun | mitm | faux |
| custom | Custom CLI | — | complet | constructeur-personnalisé | faux |
Les outils avec `baseUrlSupport: "partiel"` affichent un badge "⚠ Base URL partiel" dans la carte du tableau de bord.
---
## 2. Catalogue des agents CLI (8 outils)
Agents autonomes qui apparaissent dans `/dashboard/cli-agents` :
| id | nom | fournisseur | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Agent Hermes | Nous Research | complet | faux |
| openclaw | OpenClaw | OSS (P. Steinberger) | complet | vrai |
| goose | Goose | Block / Linux Foundation | complet | vrai |
| interpreter | Open Interpreter | OSS | complet | vrai |
| warp | Warp AI | Warp Inc. | partiel | vrai |
| agent-deck | Agent Deck | asheshgoplani (OSS) | complet | faux |
| omp | Oh My Pi | OSS | complet | vrai |
| letta | Letta CLI | Letta | complet | faux |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. Agents ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Cette page (renommée depuis `/dashboard/agents`) montre les CLI que OmniRoute peut **générer** en tant que moteurs d'exécution backend via le protocole stdio/ACP. Le catalogue est maintenu séparément dans `src/lib/acp/registry.ts` et **n'est pas** le même que `CLI_TOOLS`.
---
## 4. Retard MITM (non affiché dans le tableau de bord)
Les CLI suivantes ne prennent pas en charge l'URL de base personnalisée nativement et **ne sont pas listées** dans les pages de Code CLI ou d'Agents CLI. Elles sont candidates à l'interception MITM dans le plan 11 :
| CLI | Raison |
| ------------------- | -------------------------------------------------------------- |
| windsurf | BYOK limité à certains modèles Claude + URL/token d'entreprise |
| amp | Écosystème fermé (Sourcegraph) |
| amazon-q / kiro-cli | Auth AWS SSO, pas d'URL personnalisée |
| cowork | Anthropic Desktop, pas de point de terminaison configurable |
Voir `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` pour la référence complète.
---
## 5. API de détection par lot
Toute détection d'outil est agrégée via un seul point de terminaison :
**`GET /api/cli-tools/all-statuses`**
- Auth : `requireCliToolsAuth(request)` (identique aux autres routes `/api/cli-tools/`)
- Retourne : `Record<toolId, ToolBatchStatus>` (type : `src/shared/types/cliBatchStatus.ts`)
- Stratégie : `Promise.all` sur tous les outils, délai d'attente de 5s par outil
- Cache : LRU en mémoire indexé par le fichier de configuration `mtime`. Cache invalidé lorsque mtime change. Réinitialisé au redémarrage du serveur.
Structure de la réponse par outil :
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // assaini, pas de traces de pile
}
```
## 6. Gestionnaires de Paramètres pour Nouveaux Outils
Les nouveaux outils avec `configType: "custom"` ont des routes API de paramètres dédiées :
| Route | Outil |
| ------------------------------------------- | ---------------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primaire + synchronisation legacy `~/.deepseek`) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Agent de codage Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + clé `.env` dédiée) |
Toutes les routes utilisent `sanitizeErrorMessage()` pour les réponses d'erreur (Règle stricte #12).
---
## 7. Architecture des Pages du Tableau de Bord
### Code CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — composant serveur
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grille client
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — page de détail de l'outil
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 cartes d'outils spécialisées + `ToolDetailClient.tsx`
### Agents CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — composant serveur
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grille client
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — réutilise `ToolDetailClient`
### Agents ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — composant serveur (déplacé de `agents/`)
### Composants UI Partagés (`src/shared/components/cli/`)
| Fichier | But |
| ----------------------- | --------------------------------------------------------------------- |
| `CliToolCard.tsx` | Carte d'état intelligente (détection + config + point de terminaison) |
| `CliConceptCard.tsx` | Carte d'explication de concept par page |
| `CliComparisonCard.tsx` | Comparaison en trois colonnes entre les types de CLI |
| `BaseUrlSelect.tsx` | Menu déroulant de point de terminaison (Local/Cloud/Personnalisé) |
| `ApiKeySelect.tsx` | Sélecteur de clé API |
| `ManualConfigModal.tsx` | Modal de snippet de configuration copiable |
### Hook Partagé (`src/shared/hooks/cli/`)
| Fichier | But |
| ------------------------- | ---------------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Récupère `/api/cli-tools/all-statuses`, gère l'état de chargement/rafraîchissement |
## 8. i18n
Nouveaux espaces de noms ajoutés dans le plan 14 F9 :
| Namespace | But |
| ----------- | ---------------------------------------------------------------------------------------------------- |
| `cliCommon` | Chaînes partagées (étiquettes de carte, textes de concept/comparaison, étiquettes de page de détail) |
| `cliCode` | Chaînes de page du code CLI |
| `cliAgents` | Chaînes de page des agents CLI |
| `acpAgents` | Chaînes de page des agents ACP |
Des traductions complètes en PT-BR et EN sont fournies. 39 autres locales se rabattent automatiquement sur l'EN via la fusion au niveau de l'espace de noms dans `src/i18n/request.ts`.
---
## 9. Démarrage rapide
### Étape 1 — Obtenez une clé API OmniRoute
1. Ouvrez `/dashboard/api-manager`**Créer une clé API**
2. Donnez-lui un nom (par exemple `cli-tools`) et sélectionnez toutes les autorisations
3. Copiez la clé — vous en aurez besoin pour chaque CLI ci-dessous
> Votre clé ressemble à : `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Étape 2 — Installez les outils CLI
Tous les outils basés sur npm nécessitent Node.js 22.22.2+ ou 24.x :
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -343,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (lancé via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Basé sur Rust
# Agent de codage Pi
# voir https://github.com/zechnerj/pi-coding-agent pour l'installation
# jcode
# voir https://github.com/1jehuang/jcode pour l'installation
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Étape 3 — Configurez via le tableau de bord
## Step 3 — Set Global Environment Variables
1. Allez à `http://localhost:20128/dashboard/cli-code`
2. Trouvez votre outil dans la grille
3. Cliquez sur la carte pour ouvrir la page de détail de l'outil
4. Sélectionnez votre clé API et l'URL de base
5. Cliquez sur **Appliquer la configuration** ou copiez le snippet de configuration manuelle
---
### Étape 4 — Définir des variables d'environnement globales
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# Point de terminaison universel OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Le CLI Gemini lit GOOGLE_GEMINI_BASE_URL à la RACINE (son SDK ajoute /v1beta/... lui-même)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Pour un **serveur distant**, remplacez `localhost:20128` par l'IP ou le domaine du serveur,
> par exemple `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Étape 4 — Configurez chaque outil
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Créez ~/.claude/settings.json :
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Utilisez la racine de la passerelle unifiée Anthropic pour Claude Code. Ne pas ajouter `/v1` ici.
**Test :** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Le Codex moderne (v0.137+) lit uniquement `~/.codex/config.toml` — l'ancien
`config.yaml` appartient au CLI npm hérité et est silencieusement ignoré. La clé API
reste dans la variable d'environnement `OMNIROUTE_API_KEY` (`env_key`), jamais
dans le fichier :
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Référence complète (profils, `wire_api`, fenêtres de contexte) : [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test :** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**Test :** `opencode`
> Utilisez `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> pour envoyer des variantes de réflexion.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI ou VS Code)
### OpenCode
**Mode CLI :**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -486,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Mode VS Code :**
Paramètres de l'extension Cline → Fournisseur API : `OpenAI Compatible`URL de base : `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Ou utilisez le tableau de bord OmniRoute → **Outils CLI → Cline → Appliquer la configuration**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI ou VS Code)
### KiloCode (CLI or VS Code)
**Mode CLI :**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Paramètres VS Code :**
**VS Code settings:**
```json
{
@@ -510,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Ou utilisez le tableau de bord OmniRoute → **Outils CLI → KiloCode → Appliquer la configuration**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Extension VS Code)
### Continue (VS Code Extension)
Éditez `~/.continue/config.yaml` :
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -528,257 +241,158 @@ models:
default: true
```
Redémarrez VS Code après l'édition.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Utilisez ceci lorsque VS Code Insiders est configuré pour des modèles de point de terminaison personnalisés et que vous souhaitez qu'OmniRoute fonctionne sans champ d'en-tête personnalisé.
**Emplacement recommandé :**
- Linux : `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows : `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Exemple utilisant l'alias OmniRoute tokenisé :**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Remarques :**
- Remplacez `sk-your-omniroute-key` par une clé API créée dans OmniRoute.
- Le champ `url` doit pointer vers `/api/v1/vscode/{token}/chat/completions`.
- Le champ `modelsUrl` doit pointer vers `/api/v1/vscode/{token}/models`.
- Préférez le flux normal `/v1` + en-tête Bearer lorsque le client prend en charge les en-têtes personnalisés.
- Les tokens intégrés dans l'URL sont un retour de compatibilité et peuvent apparaître dans les journaux de l'éditeur ou l'historique du proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Connectez-vous à votre compte AWS/Kiro :
# Login to your AWS/Kiro account:
kiro-cli login
# Le CLI utilise sa propre authentification — OmniRoute n'est pas nécessaire en tant que backend pour Kiro CLI lui-même.
# Utilisez kiro-cli avec OmniRoute pour d'autres outils.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Pour l'application de bureau **Kiro IDE**, utilisez le point de terminaison MITM exposé par OmniRoute
sous `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. CLI OmniRoute Interne
## Dashboard Auto-Configuration
Le binaire `omniroute` fournit des commandes pour le cycle de vie du serveur, la configuration, le diagnostic et la gestion des fournisseurs. Point d'entrée : `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Démarrer le serveur (port par défaut 20128)
omniroute setup # Assistant de configuration interactif
omniroute doctor # Vérifier la configuration, la base de données, les ports, l'exécution
omniroute providers list # Connexions de fournisseurs configurées
omniroute providers test-all # Tester chaque connexion active
omniroute reset-password # Réinitialiser le mot de passe admin
omniroute logs # Diffuser les journaux de requêtes
omniroute health # Santé détaillée (disjoncteurs, cache, mémoire)
omniroute --version # Afficher la version
omniroute --help # Afficher toutes les commandes
```
### Configuration et Initialisation
```bash
omniroute setup # Assistant de configuration interactif
omniroute setup --non-interactive # Mode CI/automatisation (lit les variables d'environnement + flags)
omniroute setup --password '<value>' # Définir le mot de passe admin directement
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Ajouter et tester un fournisseur en une seule fois
```
Variables d'environnement reconnues pour la configuration non interactive :
| Var | But |
| ------------------- | ------------------------------------------------------------------ |
| `OMNIROUTE_API_KEY` | Clé API du fournisseur (liée à `--api-key` via Commander `.env()`) |
| `DATA_DIR` | Remplacer le répertoire de données d'OmniRoute |
Toutes les autres entrées non interactives sont passées en tant que flags, pas en tant que variables d'environnement :
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(voir les options `omniroute setup` ci-dessus).
### Diagnostics
```bash
omniroute doctor # Vérifier la configuration, la base de données, les ports, l'exécution, la mémoire, la vivacité
omniroute doctor --json # JSON lisible par machine
omniroute doctor --no-liveness # Ignorer le probe de santé HTTP
omniroute doctor --host 0.0.0.0 # Remplacer l'hôte de vivacité
omniroute doctor --liveness-url <url> # Remplacer l'URL de l'endpoint de santé complet
```
Le doctor effectue ces vérifications : `Configuration`, `Base de données`, `Stockage/chiffrement`,
`Disponibilité des ports`, `Exécution de Node`, `Binaire natif` (better-sqlite3),
`Mémoire`, et `Vivacité du serveur`. Il sort avec un code non nul si une vérification échoue.
### Gestion des Fournisseurs
```bash
omniroute providers available # Catalogue des fournisseurs OmniRoute
omniroute providers available --search openai # Filtrer le catalogue par id/nom/alias/catégorie
omniroute providers available --category api-key # Filtrer par catégorie (api-key, oauth, gratuit, ...)
omniroute providers available --json # JSON lisible par machine
omniroute providers list # Connexions de fournisseurs configurées
omniroute providers list --json
omniroute providers test <id|name> # Tester une connexion configurée
omniroute providers test-all # Tester chaque connexion active
omniroute providers validate # Validation structurelle locale uniquement
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Flux OAuth existant
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` sont orientés API et fonctionnent donc contre
le contexte local ou distant actif. L'entrée des identifiants doit utiliser
`--credential-stdin` ou `--credential-env`; `--dry-run --json` ne rapporte que
la présence/forme masquée. `providers available` lit le catalogue OmniRoute ;
`providers list/test/test-all/validate` conservent leur comportement SQLite local et
ne nécessitent pas que le serveur soit en cours d'exécution.
### Récupération et Réinitialisation
```bash
omniroute reset-password # Réinitialiser le mot de passe admin (aussi : omniroute-reset-password)
omniroute reset-encrypted-columns # Afficher un avertissement + exécution à blanc pour la réinitialisation des identifiants chiffrés
omniroute reset-encrypted-columns --force # Réinitialiser réellement les identifiants chiffrés dans SQLite
```
### Exportation des Identifiants (⚠ à manipuler avec précaution)
```bash
omniroute auth export # Afficher un avertissement + porte de confirmation — pas d'accès à la base de données
omniroute auth export --force # Exporter tous les identifiants déchiffrés des connexions vers stdout au format JSON
omniroute auth export --force --id <id> # Exporter uniquement la connexion correspondante
omniroute auth export --force --format env # Émettre des lignes OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # Écrire dans un fichier (créé avec des permissions 0600)
```
`auth export` est **local uniquement** (lecture directe de SQLite, pas de route HTTP) et imprime/écrit intentionnellement
des valeurs **en texte clair** `apiKey`/`accessToken`/`refreshToken`/`idToken` — c'est la fonctionnalité, pas un
bug. Rien n'est lu dans la base de données, et rien n'est déchiffré, sans `--force`. Une bannière d'avertissement stderr
s'imprime toujours avant que du texte clair ne soit émis. Nécessite que `STORAGE_ENCRYPTION_KEY` soit
défini. Un champ qui échoue à se déchiffrer (clé obsolète, texte chiffré corrompu) est signalé comme
`<field>DecryptFailed: true` au lieu d'abandonner l'ensemble de l'exportation ou de divulguer l'erreur sous-jacente.
### Autres sous-commandes
Celles-ci supposent un serveur OmniRoute en cours d'exécution, sauf indication contraire :
```bash
omniroute status # État d'exécution complet
omniroute logs # Diffuser les journaux de requêtes (--json, --search, --follow)
omniroute config show # Afficher la configuration actuelle
omniroute provider list # Lister les fournisseurs disponibles (alias de providers list)
omniroute provider add # Enregistrer OmniRoute en tant que fournisseur sur un outil
omniroute keys add | list | remove # Gérer les clés API
omniroute models [provider] # Lister les modèles (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Instantané de la configuration + base de données
omniroute restore # Restaurer à partir d'un instantané précédent
omniroute health # Santé détaillée (disjoncteurs, cache, mémoire)
omniroute quota # Utilisation du quota du fournisseur
omniroute cache # État du cache
omniroute cache clear # Effacer les caches sémantiques + de signature
omniroute mcp status | restart # État du serveur MCP / redémarrer
omniroute a2a status | card # État du serveur A2A / carte d'agent
omniroute tunnel list | create | stop # Gérer les tunnels (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspecter / définir les variables d'environnement (temporaire)
omniroute test # Test de connectivité du fournisseur
omniroute update # Vérifier les mises à jour
omniroute completion # Générer la complétion de shell
```
### Flags Communs
| Flag | Description |
| ------------------- | --------------------------------------------------------- |
| `--no-open` | Ne pas ouvrir automatiquement le navigateur au démarrage |
| `--port <n>` | Remplacer le port API (par défaut 20128) |
| `--mcp` | Exécuter en tant que serveur MCP via stdio (pour les IDE) |
| `--non-interactive` | Mode CI (pas de prompts ; lit depuis env/flags) |
| `--json` | Sortie JSON lisible par machine (doctor, providers, etc.) |
| `--help`, `-h` | Afficher l'aide spécifique à la commande |
| `--version`, `-v` | Afficher la version installée |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Points de terminaison API disponibles
## Built-in Agents: Droid & OpenClaw
| Point de terminaison | Description | Utilisé pour |
| -------------------------- | ------------------------------------- | --------------------------------------- |
| `/v1/chat/completions` | Chat standard (tous les fournisseurs) | Tous les outils modernes |
| `/v1/responses` | API des réponses (format OpenAI) | Codex, flux agentique |
| `/v1/completions` | Complétions de texte héritées | Outils plus anciens utilisant `prompt:` |
| `/v1/embeddings` | Embeddings de texte | RAG, recherche |
| `/v1/images/generations` | Génération d'images | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Texte en parole | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Parole en texte | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
Exemples prêts à coller avec une URL OmniRoute tokenisée :
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
Exemple de token : sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Base OpenAI standard : http://localhost:20128/v1
Modèles VS Code : http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Chat VS Code : http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Réponses VS Code : http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tags Ollama : http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Chat Ollama : http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Dépannage
| Erreur | Cause | Solution |
| -------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------- |
| `Connection refused` | OmniRoute non en cours d'exécution | `omniroute serve` |
| `401 Unauthorized` | Clé API incorrecte | Vérifiez dans `/dashboard/api-manager` |
| `No combo configured` | Pas de combo de routage actif | Configurez dans `/dashboard/combos` |
| CLI affiche "not installed" | Binaire non dans le PATH | Vérifiez `which <command>` |
| Le tableau de bord affiche "not detected" après l'installation | Cache obsolète | Cliquez sur "⟳ Actualiser la détection" dans le tableau de bord |
| Ancien lien `/dashboard/cli-tools` | Favori avant v3.8.6 | Redirection automatique vers `/dashboard/cli-code` (308) |
| Ancien lien `/dashboard/agents` | Favori avant v3.8.6 | Redirection automatique vers `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,311 +0,0 @@
# CLI-INTEGRATIONS (ગુજરાતી)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI ઇન્ટિગ્રેશન્સ — કોઈપણ કોડિંગ CLI ને OmniRoute પર પોઈન્ટ કરો"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI ઇન્ટિગ્રેશન્સ
OmniRoute `setup-*` આદેશોની એક કુટુંબ સાથે આવે છે જે કોડિંગ
CLI (Codex, Claude Code, OpenCode, Cline, …) ને OmniRoute ને તેના બેકએન્ડ તરીકે ઉપયોગ કરવા માટે કન્ફિગર કરે છે — જેથી
આ સાધન **એક** એન્ડપોઈન્ટ સાથે વાત કરે છે અને OmniRoute યોગ્ય પ્રદાતા તરફ માર્ગદર્શન આપે છે
ઓટો-ફોલબેક સાથે. દરેક આદેશ એક ચાલતી
OmniRoute (સ્થાનિક અથવા દૂરસ્થ)માંથી **લાઇવ** મોડેલ કૅટલોગ વાંચે છે અને **તમારા**
યંત્ર પર સાધનનું પોતાનું કન્ફિગરેશન ફાઇલ લખે છે. API કી એ વાતાવરણના ચલ દ્વારા સંદર્ભિત છે જ્યાં પણ સાધન
તેને સપોર્ટ કરે છે. સાધનો જે સાધન-સ્થાનિક વાતાવરણ ફાઇલને જાળવે છે તે નીચે નોંધાયેલા છે.
એક સામાન્ય લોન્ચર પણ છે — `omniroute run <target>` — જે `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` અથવા `gemini` ને યોગ્ય એન્વાયર્નમેન્ટ ઇન્જેક્ટ કરીને શરૂ કરે છે, કોઈપણ કન્ફિગરેશન લખ્યા વિના. ટાર્ગેટ અને તેમના
ઉપનામો કૅનોનિકલ મેનિફેસ્ટ `bin/cli/cli-manifest.mjs`માંથી આવે છે
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), અને `omniroute completion`
સમાન મેનિફેસ્ટ-ઉપજિત ટાર્ગેટ શબ્દો આપે છે. વારસાગત પ્રત્યેક સાધન લોન્ચર્સ —
`omniroute launch` (Claude Code) અને `omniroute launch-codex` (Codex) — ઉપલબ્ધ રહે છે.
પ્રદાતા ઓનબોર્ડિંગ સમાન સ્થાનિક/દૂરસ્થ સંદર્ભમાંથી ઉપલબ્ધ છે. નીચેના
API-પ્રથમ આદેશો વ્યવસ્થાપન પ્રમાણપત્રોને પ્રદાતા
પ્રમાણપત્રોથી અલગ રાખે છે અને ક્યારેય રચનાત્મક આઉટપુટમાં પ્રમાણપત્ર છાપતા નથી:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
સ્ક્રિપ્ટો માટે, `--credential-stdin` અથવા `--credential-env` પસંદ કરો; `--credential`
નિયંત્રિત સ્થાનિક ઉપયોગ માટે જ રાખવામાં આવે છે. `providers remove` ને
નોન-ઇન્ટરેક્ટિવ ટર્મિનલ પર `--yes`ની જરૂર છે, અને તમામ પાંચ આદેશો સક્રિય સંદર્ભ અથવા
ગ્લોબલ `--base-url`/`--api-key` વિકલ્પોને માન્ય રાખે છે.
બે સૌથી ધનવાન ઇન્ટિગ્રેશન્સના એકવારના, હેન્ડ-લખેલા આધાર સેટઅપ માટે, જુઓ
પ્રત્યેક સાધનની ઊંડાણમાં:
- [Claude Code કન્ફિગરેશન](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI કન્ફિગરેશન](./CODEX-CLI-CONFIGURATION.md)
- [દૂરસ્થ મોડ](./REMOTE-MODE.md) — તમારા લેપટોપમાંથી દૂરસ્થ OmniRoute (VPS / Tailnet) ચલાવો
- [VS Code Copilot ચેટ](./VSCODE-COPILOT.md) — OmniCopilot એક્સટેંશન; તે તમારા માટે આ
`setup-*` આદેશો સંપાદકની અંદર ચલાવી શકે છે
---
## માસ્ટર ટેબલ
દરેક આદેશ **સક્રિય સંદર્ભ**ને માન્ય રાખે છે (જેને `omniroute connect` સાથે સેટ કરવામાં આવે છે, જુઓ
[દૂરસ્થ મોડ](./REMOTE-MODE.md)) અથવા સ્પષ્ટ `--remote <url> --api-key <key>` ફ્લેગ્સ.
"સ્થાનિક વિરુદ્ધ દૂરસ્થ" નીચેનો અર્થ છે: કોઈ ફ્લેગ્સ વિના તે `http://localhost:20128`ને લક્ષ્ય બનાવે છે;
`--remote` (અથવા સક્રિય દૂરસ્થ સંદર્ભ) સાથે તે કૅટલોગને તે સર્વર પરથી મેળવે છે અને કન્ફિગરેશનને સ્થાનિક રીતે લખે છે.
| આદેશ | સાધન | તે શું લખે છે | મુખ્ય ફ્લેગ્સ | સ્થાનિક વિરુદ્ધ દૂરસ્થ |
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — એક સુસંગત ટેક્સ્ટ મોડેલ માટે એક પ્રોફાઇલ (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | બંને |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — મેળવનાર મોડેલ માટે એક પ્રોફાઇલ (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | બંને |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json``omniroute` પ્રદાતા સાથે દરેક કૅટલોગ મોડેલ (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | બંને |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI મોડ) + VS Code એક્સટેંશન સેટિંગ્સ છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | બંને |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + જો હાજર હોય તો VS Code `settings.json` માં `kilocode.*` મર્જ કરે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | બંને |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` મોડેલ, કી `${{ secrets.OMNIROUTE_API_KEY }}` દ્વારા | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | બંને |
| `omniroute setup-cursor` | Cursor | કશું નહીં — એપ્લિકેશનમાં પગલાં છાપે (Cursor કન્ફિગરેશન ઓપેક SQLite છે) | `--remote` `--api-key` `--only` `--port` | બંને |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (આયાત દસ્તાવેજ) + જો VS Code `settings.json` હાજર હોય તો `roo-cline.autoImportSettingsPath` સેટ કરે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | બંને |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` પ્રદાતા, કી `$OMNIROUTE_API_KEY` દ્વારા | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | બંને |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + એન્વાયર્નમેન્ટ રેસીપી છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | બંને |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + એન્વાયર્નમેન્ટ રેસીપી છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | બંને |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` એરે + `OMNIROUTE_API_KEY` `~/.qwen/.env` માં | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | બંને |
| `omniroute run <target>` | રનટાઇમ લોન્ચ (સામાન્ય) | કશું નહીં — `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` ને યોગ્ય એન્વાયર્નમેન્ટ અને આર્ગ્યુમેન્ટ્સ સાથે શરૂ કરે છે; Qwen અને Gemini એક તાત્કાલિક અલગ હોમનો ઉપયોગ કરે છે | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | બંને |
| `omniroute launch` | Claude Code | કશું નહીં — `claude` ને `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` ઇન્જેક્ટ કરીને શરૂ કરે | `--remote` `--api-key` `--token` `--profile` `--port` | બંને |
| `omniroute launch-codex` | OpenAI Codex CLI | કશું નહીં — `codex` ને `omniroute` પ્રદાતા ઇન્જેક્ટ કરીને શરૂ કરે છે `-c` ફ્લેગ્સ દ્વારા | `--remote` `--api-key` `--profile` (`-p`) `--port` | બંને |
ફ્લેગ્સ પર નોંધો (આદેશના સ્ત્રોતમાં ચકાસવામાં આવ્યું):
- `--remote <url>` — દૂરસ્થ OmniRouteમાંથી કૅટલોગ મેળવો (જે `--port` ને ઓવરરાઈડ કરે છે
અને સક્રિય સંદર્ભ). `--api-key <key>` તે સર્વર માટે પ્રમાણપત્ર પૂરૂં પાડે છે (ડિફોલ્ટ `OMNIROUTE_API_KEY` એન્વાયર્નમેન્ટ ચલ અથવા સક્રિય સંદર્ભના ટોકન પર).
- `--only <patterns>` — કોમાના-separated substrings; માત્ર મોડેલ ID જ રાખો જે મેળવે છે
(ઉદાહરણ તરીકે, `--only glm,kimi`). ઉપલબ્ધ છે `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — ફાઇલ સિસ્ટમને સ્પર્શ કર્યા વિના લખાશે તે ચોક્કસપણે છાપે. દરેક `setup-*` આદેશ પર ઉપલબ્ધ છે **છતાં** `setup-cursor`
(જે ક્યારેય ફાઇલ લખતું નથી).
- `--model <id>` — જરૂરી (અથવા ઇન્ટરેક્ટિવ રીતે પસંદ કરવામાં આવે છે) તે સાધનો માટે જેમણે કોઈ નથી
મોડેલ ઓટો-ડિસ્કવરી: Cline, Kilo, Roo, Goose, Qwen, Aider. તે સાધનો
પણ `--yes` માટે નોન-ઇન્ટરેક્ટિવ ચલણો સ્વીકાર કરે છે (જે પછી `--model`ની જરૂર છે).
`setup-opencode` ડિફોલ્ટ ટોપ-લેવલ મોડેલ સેટ કરવા માટે `--model` લે છે.
- `--model <id>` પર `omniroute run` મેનિફેસ્ટના પ્રતિ-લક્ષ્ય વાયરિંગને અનુસરે છે
(`bin/cli/cli-manifest.mjs`): **aider**ને `--model openai/<id>` મળે છે અને
**opencode**ને `--model omniroute/<id>` (પ્રિફિક્સ માત્ર ત્યારે જ ઉમેરવામાં આવે છે જ્યારે ID
પહેલેથી જ તેને ધરાવતું નથી); **qwen** અને **gemini**ને ID વર્બેટિમ મળે છે;
**claude**ને `ANTHROPIC_MODEL` દ્વારા મળે છે, **goose**ને `GOOSE_MODEL` દ્વારા, અને
**codex**ને `-c model_providers.omniroute.*` આર્ગ્યુમેન્ટ્સ દ્વારા. **Qwen એ એકમાત્ર રન છે
લક્ષ્ય જે કડક રીતે `--model`ની જરૂર છે** — `omniroute run qwen` વિના તે બહાર જાય છે
`2` સાથે સ્પષ્ટ ભૂલ.
- `--port <port>` — સ્થાનિક OmniRoute પોર્ટ (ડિફોલ્ટ `20128`, જ્યારે `--remote`
સેટ કરવામાં આવે છે ત્યારે અવગણવામાં આવે છે). તમામ `setup-*` અને બંને લોન્ચર્સ પર હાજર છે.
- `omniroute run` ની બહાર નીકળવાની કોડ: બાળક CLI ની પોતાની બહાર નીકળવાની કોડ જાળવવામાં આવે છે
વર્બેટિમ; `2` = અમાન્ય દલીલ (અસમર્થિત લક્ષ્ય, જરૂરી ખોટું `--model`, કન્ટેનર ગાર્ડ); `127` = લક્ષ્ય બાયનરી `PATH`માં નથી;
`130`/`143`/`129` જ્યારે લોન્ચ `SIGINT`/`SIGTERM`/`SIGHUP` દ્વારા સમાપ્ત થાય છે;
`1` = અન્ય રનટાઇમ લોન્ચ નિષ્ફળતા.
- બે લોન્ચર્સ (`launch`, `launch-codex`) `--profile <name>`ને સ્વીકારે છે
`setup-claude` / `setup-codex` દ્વારા લખાયેલ પ્રોફાઇલ પસંદ કરવા માટે, ઉપરાંત
નીચેના `claude` / `codex` બાયનરી માટે પાસ-થ્રૂ આર્ગ્યુમેન્ટ્સ.
ઇન્ટરેક્ટિવ પિકર પણ સેટઅપ રેસીપી દ્વારા શેર કરવામાં આવે છે:
```bash
# સક્રિય સ્થાનિક અથવા દૂરસ્થ મોડેલ કૅટલોગમાંથી પસંદ કરો અને લક્ષ્યને કન્ફિગર કરો.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` હાલમાં `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, અને `kilo` માટે પરીક્ષણ કરેલી રેસીપીને સોંપે છે. IDE-માત્ર,
MITM, અને માર્ગદર્શિકા-માત્ર કૅટલોગ એન્ટ્રીઓ સ્પષ્ટ `setup-*`/હાથથી પ્રવાહો તરીકે રહે છે અને
લોંચેબલ ટાર્ગેટ તરીકે રજૂ કરવામાં આવતી નથી.
> `setup-opencode` એ **હલકો openai-compatible** OpenCode ઇન્ટિગ્રેશન છે.
> વધુ ધનવાન પ્લગઇન ઇન્ટિગ્રેશન પણ છે — `omniroute setup opencode` — જે
> `@omniroute/opencode-plugin` ઇન્સ્ટોલ કરે છે. તે અલગ આદેશો છે; ટેબલ
> ઉપર `setup-opencode`ને દસ્તાવેજ કરે છે.
---
## સ્થાનિક ઉપયોગ
`localhost:20128` પર OmniRoute ચલાવતા, તમારા સાધન માટે સેટઅપ કમાન્ડ ચલાવો. કેટલોગ સ્થાનિક સર્વર પરથી મેળવવામાં આવે છે.
```bash
# Codex: મેળવનારા મોડલ માટે ~/.codex/ માં એક પ્રોફાઇલ લખો
omniroute setup-codex
codex --profile glm52 # જનરેટ કરેલી પ્રોફાઇલનો ઉપયોગ કરો
# Claude Code: મોડલ મુજબ પ્રોફાઇલ લખો, પછી એક લોન્ચ કરો
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: તમામ કેટલોગ મોડલ સાથે openai-સંગત પ્રદાતા લખો
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} દ્વારા સંદર્ભિત, ક્યારેય ડિસ્ક પર નહીં
opencode -m omniroute/glm/glm-5.2 "..."
# ઓટો-ડિસ્કવરી વગરના સાધનોને સ્પષ્ટ મોડલની જરૂર છે:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# કંઈપણ લખ્યા વિના પૂર્વદર્શન:
omniroute setup-continue --dry-run
```
કોઈપણ કન્ફિગ લખ્યા વિના લોન્ચ કરો (ફક્ત env-injection):
```bash
omniroute launch # Claude Code → સ્થાનિક OmniRoute
omniroute launch-codex # Codex CLI → સ્થાનિક OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# સ્પષ્ટ કમાન્ડ પાથ: -- પછી જે પણ આવે છે તે પસાર કરો
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## દૂરસ્થ ઉપયોગ
કોઈપણ સેટઅપ કમાન્ડને `--remote` + `--api-key` સાથે દૂરસ્થ OmniRoute પર નિશાન બનાવો. કેટલોગ દૂરસ્થમાંથી મેળવવામાં આવે છે; કન્ફિગ તમારા સ્થાનિક મશીન પર લખવામાં આવે છે.
```bash
# દૂરસ્થ VPS સામે OpenCode, ફક્ત glm/kimi મોડલ જ રાખો
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # પહેલા OMNIROUTE_API_KEY નિકાસ કરો
# દૂરસ્થ કેટલોગમાંથી Codex પ્રોફાઇલ
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# દૂરસ્થ સામે સીધા CLI લોન્ચ કરો
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
દરેક વખતે `--remote`/`--api-key` પસાર કરવા બદલે, એકવાર લોગિન કરો અને **સક્રિય સંદર્ભ** તેમને આપોઆપ પૂરા પાડવા દો:
```bash
omniroute connect 192.168.0.15 # એક સ્કોપ્ડ ટોકન બનાવે છે, સંદર્ભ સંગ્રહિત કરે છે
omniroute setup-codex # ← હવે દૂરસ્થ કેટલોગનો ઉપયોગ કરે છે
omniroute setup-opencode # ← સમાન
omniroute launch # ← Claude Code દૂરસ્થ સામે
```
સંદર્ભો, સ્કોપ્સ અને ટોકન વ્યવસ્થાપન માટે [દૂરસ્થ મોડ](./REMOTE-MODE.md) જુઓ.
---
## બેઝ URL પરંપરાઓ (જે સાધનો `/v1` માંગે છે)
OmniRoute OpenAI સપાટી `/v1` પર, Anthropic સપાટી મૂળ પર, અને એક નેટિવ Gemini સપાટી `/v1beta` પર પ્રદર્શિત કરે છે. દરેક ઇન્ટિગ્રેશન તેના સાધન દ્વારા અપેક્ષિત સ્વરૂપમાં જોડાયેલ છે (કમાન્ડ સ્ત્રોતમાં ચકાસવામાં આવ્યું):
| ઇન્ટિગ્રેશન | બેઝ URL લખાયેલ | `/v1`? |
| -------------------------------------------------------------------------- | -------------- | ---------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | મૂળ | નહીં — Cline `/v1/chat/completions` ઉમેરે છે |
| `setup-goose` (`OPENAI_HOST`) | મૂળ | નહીં — Goose પાથ ઉમેરે છે |
| `setup-aider` (`OPENAI_API_BASE`) | મૂળ | નહીં — LiteLLM `/v1/chat/completions` ઉમેરે છે |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` સાથે | હા |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | મૂળ | નહીં — Claude Code `/v1/messages` ઉમેરે છે |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` સાથે | હા |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` સાથે | હા |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | મૂળ | નહીં — SDK `/v1beta/models/…` ઉમેરે છે |
---
## નેટિવ ડિપેન્ડન્સી અપડેટ રાખવું: `--include=optional`
જ્યારે તમે `omniroute update` સાથે અપડેટ કરો છો (પુષ્ટિ કર્યા પછી, અથવા `--apply` સાથે),
OmniRoute `--include=optional` સાથે ઇન્સ્ટોલ ચલાવે છે:
```bash
npm install -g omniroute@latest --include=optional
```
**નહીં** એક ફ્લેગ છે જે તમે `omniroute update` ને આપો છો — તે હંમેશા અપડેટર દ્વારા લાગુ કરવામાં આવે છે. તે ખાતરી આપે છે કે `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM સ્ટેક) અપડેટ દરમિયાન જીવંત રહે છે, ભલે તમારા npm કન્ફિગમાં
`omit=optional` સેટ હોય, જે અન્યથા નેટિવ SQLite ડ્રાઇવર અને OS-keyring બાઇન્ડિંગને મૌન રીતે દૂર કરશે. ચોક્કસ કમાન્ડને પૂર્વાવલોકન કરવા માટે, લાગુ કર્યા વિના:
```bash
omniroute update --dry-run
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
અન્ય `omniroute update` ફ્લેગ્સ (સોર્સમાં ચકાસવામાં આવ્યા): `--check` (અપડેટેડ ન હોય તો 1 ની બહાર નીકળે), `--apply` (પ્રોમ્પ્ટ કર્યા વિના ઇન્સ્ટોલ કરે), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI દ્વારા `omniroute run gemini`
`@google/gemini-cli` 0.50.0 સામે કરાર ચકાસવામાં આવ્યો: CLI
`GOOGLE_GEMINI_BASE_URL` નો માન રાખે છે અને `POST /v1beta/models/<model>:generateContent`
(અને `:streamGenerateContent?alt=sse`) સામે જારી કરે છે — ચોક્કસ રીતે OmniRouteનું નેટિવ
Gemini સપાટી (`/v1beta`). `omniroute run gemini` તે આપોઆપ જોડે છે:
- `GOOGLE_GEMINI_BASE_URL` → સક્રિય OmniRoute આધાર URL (રૂટ, કોઈ `/v1` નથી);
- `GEMINI_API_KEY` → ઉકેલાયેલ OmniRoute ક્રેડેન્શિયલ (વિકલ્પ/env/સંદર્ભ);
- એક **અસ્થાયી અલગ `GEMINI_CLI_HOME`** જેનું `.gemini/settings.json`
`gemini-api-key` ઓથને પસંદ કરે છે, જેથી સંગ્રહિત Google OAuth સત્ર (Code Assist)
ક્યારેય OmniRoute-દિશાનિર્દેશિત લોન્ચને ઓવરરાઈડ ન કરે — બહાર નીકળ્યા પછી દૂર કરવામાં આવે છે;
- **env સ્વચ્છતા**: બાળક env માંથી `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` અને `GOOGLE_GENAI_USE_GCA` દૂર કરવામાં આવે છે (જે
ઓથને Vertex/Code Assist તરફ ફરી મોકલશે), અને `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
બેલ્ટ-અને-સસ્પેન્ડર્સ બેકઅપ તરીકે સેટ કરવામાં આવે છે — અન્ય `run` લક્ષ્યોને તેમના પોતાના
વિરુદ્ધતા વેરિયેબલ્સ માટે સમાન સારવાર મળે છે;
- `--model <id>` ઇન્જેક્શન `--provider`/`--model` માંથી.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Geminiનું વર્કસ્પેસ-ટ્રસ્ટ ગાર્ડ હેડલેસ મોડમાં હજી પણ લાગુ પડે છે — `--skip-trust` પસાર કરો
(અથવા ડિરેક્ટરીને ઇન્ટરેક્ટિવ રીતે વિશ્વાસ કરો); લોન્ચર જાનબૂઝીને તેને બાયપાસ નથી કરતું. આ લોન્ચર **ACP
રજીસ્ટ્રેશન** (`src/lib/acp/registry.ts`, `gemini --acp`) થી અલગ છે, જે `/dashboard/acp-agents` માટે એજન્ટ-પ્રોટોકોલ ઇન્ટિગ્રેશન રહે છે.
---
## વાસ્તવિક ધૂમ્રપાન સ્વીપ (ઓપ્ટ-ઇન)
CI માં નિશ્ચિત લોંચ-યોજન પુનરાવર્તન ચલાવે છે (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). વાસ્તવિક બાઇનરીઓને વાસ્તવિક
OmniRoute સર્વર સામે માન્ય કરવા માટે, એક ઓપ્ટ-ઇન હાર્નેસ છે
`tests/integration/upstream-cli-smoke.int.test.ts`. તે ક્યારેય આપોઆપ ચલાવવામાં નથી આવતું
(દરેક ઉપ-ટેસ્ટ છોડી દે છે જો `RUN_CLI_SMOKE=1` ન હોય), ક્રેડેન્શિયલને env-var
NAME દ્વારા પસાર કરે છે (ક્યારેય મૂલ્ય દ્વારા નહીં), કોઈપણ નોંધાયેલા આઉટપુટમાંથી કી-આકારના સ્ટ્રિંગ્સને છુપાવે છે, તે લક્ષ્યોને છોડી દે છે જેમની બાઇનરી ઇન્સ્ટોલ નથી, અને નિષ્ફળતાઓને
ઓથ / અપસ્ટ્રીમ / કન્ફિગ તરીકે વર્ગીકૃત કરે છે, ન કે માત્ર બેર બુલિયન:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
વિકલ્પિક: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` સ્વીપને મર્યાદિત કરે છે;
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120સેકન્ડ પ્રતિ-લક્ષ્ય ટાઈમઆઉટને ઓવરરાઈડ કરે છે.
---
## વધુ જુઓ
- [Claude Code રૂપરેખાંકન](./CLAUDE-CODE-CONFIGURATION.md) — ઊંડા Claude Code માર્ગદર્શિકા
- [Codex CLI રૂપરેખાંકન](./CODEX-CLI-CONFIGURATION.md) — એકવારનો `[model_providers.omniroute]` આધારભૂત સેટઅપ
- [દૂરનું મોડ](./REMOTE-MODE.md) — સંદર્ભ, સ્કોપ કરેલા ઍક્સેસ ટોકન, એક દૂરના સર્વર ચલાવવું
- [CLI ટૂલ્સ સંદર્ભ](../reference/CLI-TOOLS.md) — સમર્થિત ટૂલ્સ + ડેશબોર્ડ પૃષ્ઠોનો સંપૂર્ણ કૅટલોગ
- [સેટઅપ માર્ગદર્શિકા](./SETUP_GUIDE.md) — ઇન્સ્ટોલ પદ્ધતિઓ અને પ્રથમ વખત શરૂ થવા માટેની માર્ગદર્શિકા

View File

@@ -1,309 +1,86 @@
# CLI-TOOLS (ગુજરાતી)
# CLI Tools Setup Guide — OmniRoute (ગુજરાતી)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Tools — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Tools — OmniRoute
છેલ્લી અપડેટ: 2026-08-18
OmniRoute ત્રણ શ્રેણીઓના CLI ટૂલ્સ સાથે સંકલિત થાય છે જે ત્રણ સમર્પિત ડેશબોર્ડ પેજો પર ફેલાય છે:
| પેજ | માર્ગ | સંકલ્પના | ગણતરી |
| --------------- | ----------------------- | -------------------------------------------------------------------------------------- | ------------- |
| **CLI Code's** | `/dashboard/cli-code` | કોડિંગ ટૂલ્સ જે તમે OmniRoute પર નિર્દેશ કરો છો (ક્લાયન્ટ → CLI → OmniRoute → પ્રદાતા) | 26 |
| **CLI એજન્ટ્સ** | `/dashboard/cli-agents` | સ્વાયત્ત એજન્ટો જે તમે OmniRoute પર નિર્દેશ કરો છો (એક જ પ્રવાહ, વ્યાપક વ્યાપ) | 8 |
| **ACP એજન્ટ્સ** | `/dashboard/acp-agents` | CLIs જે OmniRoute stdio/ACP દ્વારા બેકએન્ડ તરીકે ઉત્પન્ન કરે છે (વિપરીત પ્રવાહ) | રજીસ્ટ્રી જુઓ |
Legacy routes 308 દ્વારા રીડાયરેક્ટ કરે છે: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## કેવી રીતે કાર્ય કરે છે
## How It Works
```
CLI Code's / CLI Agents (ઉપભોગ પ્રવાહ):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (બધા OmniRoute તરફ નિર્દેશ કરે છે)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute યોગ્ય પ્રદાતાને માર્ગ આપે છે)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agents (વિપરીત ઉત્પન્ન પ્રવાહ):
ક્લાયન્ટ વિનંતી → OmniRoute → stdio/ACP દ્વારા CLI ઉત્પન્ન કરે છે → પ્રતિસાદ
```
**લાભ:**
**Benefits:**
- તમામ ટૂલ્સને સંચાલિત કરવા માટે એક API કી
- ડેશબોર્ડમાં તમામ CLIs માટે ખર્ચ ટ્રેકિંગ
- દરેક ટૂલને ફરીથી કન્ફિગર કર્યા વિના મોડલ સ્વિચિંગ
- સ્થાનિક અને દૂરસ્થ સર્વરો (VPS, Docker, Akamai, Cloudflare Tunnel) પર કાર્ય કરે છે
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*` સાથે આપોઆપ કન્ફિગર કરો
## Supported Tools (Dashboard Source of Truth)
તમે દરેક ટૂલની કન્ફિગરેશન હાથથી લખવાની જરૂર નથી. OmniRoute એક `setup-*`
કમાન્ડ પ્રત્યેક સમર્થિત CLI માટે મોકલે છે જે એક ચાલતી
OmniRoute (સ્થાનિક અથવા દૂરસ્થ)માંથી **લાઇવ** મોડલ કેટલોગ વાંચે છે અને તમારા મશીન પર ટૂલની પોતાની કન્ફિગરેશન લખે છે:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
દરેક `--remote <url> --api-key <key>` સ્વીકારે છે (દૂરસ્થ OmniRoute સામે સ્થાનિક ટૂલને કન્ફિગર કરો), `--dry-run` (લખ્યા વિના પૂર્વદર્શન), અને `--port`. મોડલ આપોઆપ શોધી ન શકતા ટૂલ્સ (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` લે છે (અને `--yes` નોન-ઇન્ટરેક્ટિવ ચલાવવા માટે). યોગ્ય એન્વાયર્નમેન્ટ ઇન્જેક્ટેડ અને બિલકુલ કન્ફિગરેશન લખ્યા વિના CLI શરૂ કરવા માટે, સામાન્ય `omniroute run <target>` લોન્ચરનો ઉપયોગ કરો (claude, codex, aider, goose, opencode, qwen, gemini — ટાર્ગેટ અને અલિયાસ `bin/cli/cli-manifest.mjs`માંથી આવે છે); લેગસી પ્રત્યેક ટૂલ લોન્ચર્સ `omniroute launch` (Claude Code) અને `omniroute launch-codex` (Codex) ઉપલબ્ધ રહે છે. Gemini CLI માત્ર લોન્ચ-માત્ર છે: તે `omniroute run` ટાર્ગેટ છે પરંતુ તેમાં `setup-*`/`configure` રેસીપી નથી.
### CLI fingerprint sync (Agents + Settings)
> **પૂર્ણ સંદર્ભ:** માસ્ટર ટેબલ — દરેક કમાન્ડ શું લખે છે, દરેક ફ્લેગ,
> સ્થાનિક વિરુદ્ધ દૂરસ્થ, અને કયા ટૂલ્સ `/v1` સોફિક્સ માંગે છે — રહે છે
> **[CLI Integrations](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### કન્ટેનરમાં આ ચલાવવું
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute કન્ટેનરમાં અમલમાં લાવવામાં આવેલ `setup-*` કમાન્ડ કન્ટેનરના પોતાના હોમમાં લખે છે, જે કોઈ હોસ્ટ CLI વાંચતું નથી અને જે કન્ટેનર સાથે ગુમ થઈ જાય છે. OmniRoute તે શોધે છે અને લખવા બદલે સૂચનાઓ સાથે `2` ની બહાર નીકળે છે. આગળ વધવા માટે બે સમર્થિત માર્ગો — હોસ્ટ પર CLI ઇન્સ્ટોલ કરો અને `omniroute connect` કન્ટેનર સાથે, અથવા કન્ફિગરેશન ડિરેક્ટરીઓને બાઇન્ડ-માઉન્ટ કરો અને `CLI_CONFIG_HOME` સેટ કરો (કમ્પોઝ `હોસ્ટ` પ્રોફાઇલ). દરેક `setup-*` કમાન્ડ, ઉપરાંત `omniroute configure` અને `omniroute config set`, કન્ટેનરના પોતાના CLIs ને કન્ફિગર કરતી વખતે `--allow-container-write` સ્વીકારે છે; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` સર્વર માટે તે જ કરે છે. જુઓ
[Docker Guide → Configuring host CLI tools](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
ડેશબોર્ડનું **લાગુ કરો એન્ડપોઈન્ટ** (`POST /api/cli-tools/apply`) સમાન રક્ષણ લાગુ કરે છે: કન્ટેનરમાં, લખાણ જેનો લક્ષ્ય હોસ્ટમાંથી બાઇન્ડ-માઉન્ટ નથી તે **`422`** સાથે જવાબ આપે છે `containerEphemeralTarget: true`, સુરક્ષિત ભૂલ
ટેક્સ્ટ અને — હોસ્ટ રેસીપી ધરાવતા ટૂલ્સ માટે (claude, codex, opencode, cline,
kilo, continue) — એક `hostSetupCommand` (ઉદાહરણ તરીકે `omniroute setup-opencode`) જે હોસ્ટ પર ચલાવવા માટે; કશું લખાયું નથી. `dryRun: true` કન્ટેનર મોડમાં કાર્યરત રહે છે અને જનરેટ કરેલ સામગ્રી + લક્ષ્ય પાથ પાછું આપે છે, જેથી તમે ડેશબોર્ડમાંથી પૂર્વદર્શન કરી શકો અને હોસ્ટ પર લાગુ કરી શકો. આ વર્તન ઇરાદાપૂર્વક છે અને
`tests/unit/api/cli-tools/apply-container-guard.test.ts` દ્વારા રેગ્રેશન-ગાર્ડેડ છે — ક્યારેય "ફિક્સ" 422 ને રક્ષણ દૂર કરીને.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## સત્યનો સ્ત્રોત
## Step 1 — Get an OmniRoute API Key
એકીકૃત કૅટલોગ `src/shared/constants/cliTools.ts` માં `CLI_TOOLS: Record<string, CliCatalogEntry>` તરીકે રહે છે.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
પ્રત્યેક એન્ટ્રીમાં આ ક્ષેત્રો હોય છે (જેઓ `src/shared/schemas/cliCatalog.ts` માં વ્યાખ્યાયિત છે):
| ક્ષેત્ર | પ્રકાર | વર્ણન |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
| `શ્રેણી` | `"code" \| "agent"` | ટૂલ કયા પૃષ્ઠ પર દેખાય છે |
| `વેન્ડર` | `string` | ટૂલનો ઉદ્ભવ ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP એજન્ટ તરીકે પણ ઉપયોગી (બેજ દર્શાવવામાં આવે છે) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | કસ્ટમ એન્ડપોઈન્ટ સપોર્ટ સ્તર. `"none"` = MITM બેકલોગ |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | કન્ફિગરેશન મિકેનિઝમ |
| `id`, `name`, `color`, `description`, `docsUrl` | માનક | મુખ્ય પ્રદર્શિત ક્ષેત્રો |
`baseUrlSupport: "none"` ધરાવતી એન્ટ્રીઓ ડેશબોર્ડ પૃષ્ઠોમાં **દેખાવતી નથી** — તે MITM બેકલોગમાં યોજના 11 માટે નોંધાયેલ છે (જુઓ `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### ક્ષમતા સ્તરો (કૅટલોગ કરેલ × શોધી શકાય તેવા × કન્ફિગર કરી શકાય તેવા × શરૂ કરી શકાય તેવા)
દરેક કૅટલોગ કરેલ ટૂલ શોધી શકાય તેવા, કન્ફિગર કરી શકાય તેવા અથવા શરૂ કરી શકાય તેવા નથી. દરેક સ્તરે એક જાહેર કરેલ સ્ત્રોત હોય છે, અને એક ડ્રિફ્ટ ટેસ્ટ તેમને સમન્વયિત રાખે છે:
| સ્તર | અર્થ | જાહેર કરવામાં આવ્યું છે |
| ------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **કૅટલોગ કરેલ** | ડેશબોર્ડ કૅટલોગમાં દેખાય છે (નામ, વેન્ડર, દસ્તાવેજો, કન્ફિગરેશન પ્રકાર) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **શોધી શકાય તેવા** | બાઈનરી/કન્ફિગરેશન શોધ, આરોગ્ય ચકાસણીઓ, કન્ફિગરેશન પાથ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` રનટાઇમ કૅટલોગ) |
| **કન્ફિગર કરી શકાય તેવા** | `omniroute configure <cli>` દ્વારા સપોર્ટેડ (સેટઅપ રેસીપી હાજર છે) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **શરૂ કરી શકાય તેવા** | `omniroute run <target>` દ્વારા સપોર્ટેડ (env/args ઇન્જેક્શન વ્યાખ્યાયિત) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` CLI આદેશ માટેનું કૅનોનિકલ એક્ઝિક્યુટેબલ મેનિફેસ્ટ છે જે સપાટી: `run`, `configure` અને શેલ-કમ્પ્લેશન જનરેટર્સ તમામ તેમના લક્ષ્ય યાદીઓ, ઉપનામ ઉકેલ (ઉદાહરણ તરીકે `kilocode`/`kilo-code`/`kilo_cli``kilo`) અને `--model` ફ્લેગ વાયરિંગમાંથી ઉત્પન્ન કરે છે. ડ્રિફ્ટ ગાર્ડ `tests/unit/cli/cli-manifest-drift.test.ts` ખાતરી કરે છે કે મેનિફેસ્ટ, રનટાઇમ કૅટલોગ, UI કૅટલોગ અને દરેક ગ્રાહક સપાટી સમન્વયિત રહે — એક સપાટી પર ઉમેરાયેલ લક્ષ્ય અન્ય વિના નિષ્ફળ થાય છે, જે ડ્રિફ્ટ થવા બદલે સુટને નિષ્ફળ બનાવે છે.
## 1. CLI કોડનું કેટલોગ (26 સાધનો)
બધા સાધનો જે `/dashboard/cli-code` માં દેખાય છે. જેમના પાસે `baseUrlSupport: none` છે, તેઓ MITM અથવા મેન્યુઅલ માર્ગદર્શિકા દ્વારા કસ્ટમ બેઝ URL ના બદલે જોડાયેલા છે:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
`baseUrlSupport: "partial"` ધરાવતા સાધનો ડેશબોર્ડ કાર્ડમાં "⚠ Base URL parcial" બેજ દર્શાવે છે.
---
## 2. CLI એજન્ટો કૅટલોગ (8 સાધનો)
સ્વતંત્ર એજન્ટો જે `/dashboard/cli-agents` માં દેખાય છે:
| id | name | vendor | baseUrlSupport | acpSpawnable |
| ------------ | --------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | હર્મેસ એજન્ટ | Nous Research | સંપૂર્ણ | ખોટું |
| openclaw | ઓપનક્લો | OSS (P. સ્ટાઇનબર્ગર) | સંપૂર્ણ | સાચું |
| goose | ગૂસ | બ્લોક / લિનક્સ ફાઉન્ડેશન | સંપૂર્ણ | સાચું |
| interpreter | ઓપન ઇન્ટરપ્રિટર | OSS | સંપૂર્ણ | સાચું |
| warp | વાર્પ એઆઈ | વાર્પ ઇન્ક. | અર્ધ | સાચું |
| agent-deck | એજન્ટ ડેક | આશેશગોપલાની (OSS) | સંપૂર્ણ | ખોટું |
| omp | ઓહ માય પાઈ | OSS | સંપૂર્ણ | સાચું |
| letta | લેતા CLI | લેતા | સંપૂર્ણ | ખોટું |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP એજન્ટો (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
આ પૃષ્ઠ (જેનું નામ બદલવામાં આવ્યું છે `/dashboard/agents`) CLIs દર્શાવે છે કે જે ઓમ્નીરૂટ **સ્પોન** કરી શકે છે બેકએન્ડ અમલ એન્જિન તરીકે stdio/ACP પ્રોટોકોલ દ્વારા. કૅટલોગ અલગથી `src/lib/acp/registry.ts` માં જાળવવામાં આવે છે અને તે `CLI_TOOLS` સાથે **એકસરખું** નથી.
---
## 4. MITM બેકલોગ (ડેશબોર્ડમાં દર્શાવવામાં આવતું નથી)
નીચેના CLIs કસ્ટમ બેઝ URL ને સ્વાભાવિક રીતે સપોર્ટ કરતા નથી અને CLI કોડ અથવા CLI એજન્ટો પૃષ્ઠોમાં **યાદીબદ્ધ** નથી. તેઓ યોજના 11 માં MITM અવરોધન માટે ઉમેદવાર છે:
| CLI | કારણ |
| ------------------- | ------------------------------------------------- |
| windsurf | BYOK પસંદ કરેલા ક્લોડ મોડલ્સ + કોર્પોરેટ URL/ટોકન |
| amp | બંધ ઇકોસિસ્ટમ (સોર્સગ્રાફ) |
| amazon-q / kiro-cli | AWS SSO ઓથ, કસ્ટમ URL નથી |
| cowork | એન્થ્રોપિક ડેસ્કટોપ, કન્ફિગરેબલ એન્ડપોઈન્ટ નથી |
પૂર્ણ ક્રોસ-રેફરન્સ માટે `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` જુઓ.
---
## 5. બેચ ડિટેક્શન API
બધા સાધન ડિટેક્શન એક જ એન્ડપોઈન્ટ દ્વારા સંકલિત કરવામાં આવે છે:
**`GET /api/cli-tools/all-statuses`**
- ઓથેન્ટિકેશન: `requireCliToolsAuth(request)` (અન્ય `/api/cli-tools/` માર્ગો સમાન)
- પાછું આપે છે: `Record<toolId, ToolBatchStatus>` (પ્રકાર: `src/shared/types/cliBatchStatus.ts`)
- વ્યૂહ: `Promise.all` તમામ સાધનો પર, 5સ ટાઇમઆઉટ પ્રતિ સાધન
- કેશ: મેમરીમાં LRU કન્ફિગરેશન ફાઇલ `mtime` દ્વારા સૂચિબદ્ધ. જ્યારે mtime બદલાય છે ત્યારે કેશ અમાન્ય થાય છે. સર્વર પુનઃપ્રારંભ પર પુનઃસેટ થાય છે.
પ્રતિ સાધન પ્રતિસાદ આકાર:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // સાફ, કોઈ સ્ટેક ટ્રેસ નથી
}
```
## 6. નવા સાધનો માટે સેટિંગ્સ હેન્ડલર્સ
`configType: "custom"` ધરાવતી નવા સાધનો માટે સમર્પિત સેટિંગ્સ API માર્ગો છે:
| માર્ગ | સાધન |
| ------------------------------------------- | -------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url ધ્વજ) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, વારસાગત) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, પ્રાથમિક + વારસાગત `~/.deepseek` સમન્વય) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi કોડિંગ એજન્ટ |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + સમર્પિત `.env` કી) |
બધા માર્ગો ભૂલના પ્રતિસાદ માટે `sanitizeErrorMessage()` નો ઉપયોગ કરે છે (Hard Rule #12).
---
## 7. ડેશબોર્ડ પેજોની આર્કિટેક્ચર
### CLI કોડ (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — સર્વર ઘટક
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — ક્લાયન્ટ ગ્રિડ
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — સાધન વિગતો પેજ
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 વિશિષ્ટ સાધન કાર્ડ + `ToolDetailClient.tsx`
### CLI એજન્ટો (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — સર્વર ઘટક
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — ક્લાયન્ટ ગ્રિડ
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` નો પુનઃઉપયોગ કરે છે
### ACP એજન્ટો (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — સર્વર ઘટક (એજન્ટમાંથી ખસેડવામાં આવ્યું)
### શેર કરેલ UI ઘટકો (`src/shared/components/cli/`)
| ફાઇલ | ઉદ્દેશ |
| ----------------------- | ---------------------------------------------------- |
| `CliToolCard.tsx` | સ્માર્ટ સ્થિતિ કાર્ડ (પહેચાન + કન્ફિગ + અંતિમ બિંદુ) |
| `CliConceptCard.tsx` | પ્રતિ પેજ સંકલ્પના સમજાવતી કાર્ડ |
| `CliComparisonCard.tsx` | CLI પ્રકારો વચ્ચે ત્રણ કૉલમની તુલના |
| `BaseUrlSelect.tsx` | અંતિમ બિંદુ ડ્રોપડાઉન (સ્થાનિક/ક્લાઉડ/કસ્ટમ) |
| `ApiKeySelect.tsx` | API કી પસંદકર્તા |
| `ManualConfigModal.tsx` | નકલ કરી શકાય તેવી કન્ફિગ સ્નિપેટ મોડલ |
### શેર કરેલ હૂક (`src/shared/hooks/cli/`)
| ફાઇલ | ઉદ્દેશ |
| ------------------------- | ----------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` ને લાવે છે, લોડિંગ/ફરેશ સ્થિતિને સંચાલિત કરે છે |
## 8. i18n
યોજનામાં 14 F9 માં નવા નામસ્થાનો ઉમેરવામાં આવ્યા છે:
| Namespace | Purpose |
| ----------- | ------------------------------------------------------------------------- |
| `cliCommon` | શેર કરેલ સ્ટ્રિંગ્સ (કાર્ડ લેબલ, સંકલ્પના/તુલના ટેક્સ્ટ, વિગત પાનું લેબલ) |
| `cliCode` | CLI કોડના પાનું સ્ટ્રિંગ્સ |
| `cliAgents` | CLI એજન્ટ્સ પાનું સ્ટ્રિંગ્સ |
| `acpAgents` | ACP એજન્ટ્સ પાનું સ્ટ્રિંગ્સ |
પૂર્ણ PT-BR અને EN અનુવાદ પ્રદાન કરવામાં આવ્યા છે. 39 અન્ય લોકલ્સ આપમેળે EN પર પાછા ફરે છે `src/i18n/request.ts` માં નામસ્થાન-સ્તર મર્જ દ્વારા.
---
## 9. ઝડપી શરૂઆત
### પગલું 1 — એક OmniRoute API કી મેળવો
1. ખોલો `/dashboard/api-manager`**API કી બનાવો**
2. તેને એક નામ આપો (ઉદાહરણ તરીકે `cli-tools`) અને તમામ પરવાનગીઓ પસંદ કરો
3. કી નકલ કરો — તમને નીચેના દરેક CLI માટે તેની જરૂર પડશે
> તમારી કી આ રીતે દેખાય છે: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### પગલું 2 — CLI ટૂલ્સ સ્થાપિત કરો
બધા npm આધારિત ટૂલ્સ માટે Node.js 22.22.2+ અથવા 24.x ની જરૂર છે:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -321,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust આધારિત
# Pi coding agent
# સ્થાપન માટે https://github.com/zechnerj/pi-coding-agent જુઓ
# jcode
# સ્થાપન માટે https://github.com/1jehuang/jcode જુઓ
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### પગલું 3 — ડેશબોર્ડ દ્વારા કન્ફિગર કરો
## Step 3 — Set Global Environment Variables
1. જાઓ `http://localhost:20128/dashboard/cli-code`
2. ગ્રિડમાં તમારી ટૂલ શોધો
3. ટૂલ વિગત પાનું ખોલવા માટે કાર્ડ પર ક્લિક કરો
4. તમારી API કી અને બેઝ URL પસંદ કરો
5. **કન્ફિગર લાગુ કરો** પર ક્લિક કરો અથવા મેન્યુઅલ કન્ફિગર સ્નિપેટ નકલ કરો
---
### પગલું 4 — વૈશ્વિક પર્યાવરણ ચલ સેટ કરો
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute યુનિવર્સલ એન્ડપોઈન્ટ
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI ROOT પર GOOGLE_GEMINI_BASE_URL વાંચે છે (તેનું SDK પોતે /v1beta/... ઉમેરે છે)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **દૂરના સર્વર** માટે `localhost:20128` ને સર્વર IP અથવા ડોમેન સાથે બદલો,
> ઉદાહરણ તરીકે `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### પગલું 4 — દરેક ટૂલને કન્ફિગર કરો
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# બનાવો ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code માટે એકીકૃત Anthropic ગેટવે રૂટનો ઉપયોગ કરો. અહીં `/v1` ઉમેરશો નહીં.
**પરીક્ષણ:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
આધુનિક Codex (v0.137+) ફક્ત `~/.codex/config.toml` વાંચે છે — જૂનું
`config.yaml` વારસાગત npm CLI માટે છે અને મૌન રીતે અવગણવામાં આવે છે. API
કી `OMNIROUTE_API_KEY` પર્યાવરણ ચલ (`env_key`) માં રહે છે, ક્યારેય
ફાઇલની અંદર નહીં:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
પૂર્ણ સંદર્ભ (પ્રોફાઇલ, `wire_api`, સંદર્ભ વિન્ડોઝ): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**પરીક્ષણ:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**પરીક્ષણ:** `opencode`
> વિચારણા રૂપો મોકલવા માટે `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` નો ઉપયોગ કરો.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI અથવા VS Code)
### OpenCode
**CLI મોડ:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -463,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code મોડ:**
Cline વિસ્તરણ સેટિંગ્સ → API પ્રદાતા: `OpenAI Compatible`બેઝ URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
અથવા OmniRoute ડેશબોર્ડનો ઉપયોગ કરો**CLI ટૂલ્સ → Cline → કન્ફિગર લાગુ કરો**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI અથવા VS Code)
### KiloCode (CLI or VS Code)
**CLI મોડ:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code સેટિંગ્સ:**
**VS Code settings:**
```json
{
@@ -487,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
અથવા OmniRoute ડેશબોર્ડનો ઉપયોગ કરો**CLI ટૂલ્સ → KiloCode → કન્ફિગર લાગુ કરો**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code Extension)
### Continue (VS Code Extension)
`~/.continue/config.yaml` સંપાદિત કરો:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -505,253 +241,158 @@ models:
default: true
```
સંપાદન પછી VS Code ફરી શરૂ કરો.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
જ્યારે VS Code Insiders કસ્ટમ એન્ડપોઈન્ટ મોડલ માટે કન્ફિગર કરવામાં આવે છે અને તમે OmniRoute ને કસ્ટમ હેડર ફીલ્ડ વિના કાર્ય કરવા માંગો છો ત્યારે આનો ઉપયોગ કરો.
**સૂચવેલ સ્થાન:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**ટોકનાઇઝ્ડ OmniRoute ઉપનામનો ઉપયોગ કરીને ઉદાહરણ:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**નોંધ:**
- `sk-your-omniroute-key` ને OmniRoute માં બનાવવામાં આવેલી API કી સાથે બદલો.
- `url` ફીલ્ડને `/api/v1/vscode/{token}/chat/completions` તરફ સંકેત કરવો જોઈએ.
- `modelsUrl` ફીલ્ડને `/api/v1/vscode/{token}/models` તરફ સંકેત કરવો જોઈએ.
- જ્યારે ક્લાયન્ટ કસ્ટમ હેડર્સને સપોર્ટ કરે છે ત્યારે સામાન્ય `/v1` + બેરર હેડર પ્રવાહને પ્રાથમિકતા આપો.
- URL-એમ્બેડેડ ટોકન્સ એક સુસંગતતા પાછા ફરવા છે અને સંપાદક લોગ્સ અથવા પ્રોક્સી ઇતિહાસમાં દેખાઈ શકે છે.
---
#### Kiro CLI (અમેઝોન)
### Kiro CLI (Amazon)
```bash
# તમારા AWS/Kiro ખાતામાં લોગિન કરો:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI તેની પોતાની ઓથનો ઉપયોગ કરે છે — Kiro CLI માટે બેકએન્ડ તરીકે OmniRouteની જરૂર નથી.
# અન્ય ટૂલ્સ માટે OmniRoute સાથે kiro-cli નો ઉપયોગ કરો.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** ડેસ્કટોપ એપ્લિકેશન માટે, OmniRoute દ્વારા પ્રદર્શિત MITM એન્ડપોઈન્ટનો ઉપયોગ કરો
`/dashboard/cli-tools → Kiro` હેઠળ.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. આંતરિક ઓમ્નીરૂટ CLI
## Dashboard Auto-Configuration
`omniroute` બાઈનરી સર્વર જીવનચક્ર, સેટઅપ, નિદાન અને પ્રદાતા વ્યવસ્થાપન માટે આદેશો પ્રદાન કરે છે. પ્રવેશ બિંદુ: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # સર્વર શરૂ કરો (ડિફોલ્ટ પોર્ટ 20128)
omniroute setup # ઇન્ટરેક્ટિવ સેટઅપ વિઝાર્ડ
omniroute doctor # કન્ફિગ, DB, પોર્ટ, રનટાઇમ તપાસો
omniroute providers list # કન્ફિગર્ડ પ્રદાતા કનેક્શન
omniroute providers test-all # દરેક સક્રિય કનેક્શનનું પરીક્ષણ કરો
omniroute reset-password # એડમિન પાસવર્ડ ફરીથી સેટ કરો
omniroute logs # વિનંતી લોગ્સ સ્ટ્રીમ કરો
omniroute health # વિગતવાર આરોગ્ય (બ્રેકર્સ, કેશ, મેમરી)
omniroute --version # સંસ્કરણ છાપો
omniroute --help # બધા આદેશો બતાવો
```
### સેટઅપ અને આરંભ
```bash
omniroute setup # ઇન્ટરેક્ટિવ સેટઅપ વિઝાર્ડ
omniroute setup --non-interactive # CI/ઓટોમેશન મોડ (પર્યાવરણ ચલ + ફ્લેગ્સ વાંચે છે)
omniroute setup --password '<value>' # એડમિન પાસવર્ડ સીધો સેટ કરો
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # એક જ શોટમાં પ્રદાતા ઉમેરો અને પરીક્ષણ કરો
```
ગેર-ઇન્ટરેક્ટિવ સેટઅપ માટે માન્ય પર્યાવરણ ચલ:
| Var | ઉદ્દેશ |
| ------------------- | --------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | પ્રદાતા API કી (કમાંડર `.env()` દ્વારા `--api-key` સાથે બાઉન્ડ) |
| `DATA_DIR` | ઓમ્નીરૂટ ડેટા ડિરેક્ટરીને ઓવરરાઈડ કરો |
બાકીના બધા ગેર-ઇન્ટરેક્ટિવ ઇનપુટ્સ ફ્લેગ્સ તરીકે પસાર થાય છે, પર્યાવરણ ચલ તરીકે નહીં:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(ઉપરના `omniroute setup` વિકલ્પો જુઓ).
### નિદાન
```bash
omniroute doctor # કન્ફિગ, DB, પોર્ટ, રનટાઇમ, મેમરી, જીવંતતા તપાસો
omniroute doctor --json # મશીન-વાંચનક્ષમ JSON
omniroute doctor --no-liveness # HTTP આરોગ્ય પ્રોબને છોડી દો
omniroute doctor --host 0.0.0.0 # જીવંતતા હોસ્ટને ઓવરરાઈડ કરો
omniroute doctor --liveness-url <url> # સંપૂર્ણ આરોગ્ય અંતિમ બિંદુ URL ઓવરરાઈડ
```
ડોક્ટર આ ચકાસણીઓ ચલાવે છે: `કન્ફિગ`, `ડેટાબેઝ`, `સ્ટોરેજ/એન્ક્રિપ્શન`,
`પોર્ટ ઉપલબ્ધતા`, `નોડ રનટાઇમ`, `નેટિવ બાઈનરી` (બેટર-સ્ક્વાઇટ 3),
`મેમરી`, અને `સર્વર જીવંતતા`. જો કોઈ ચકાસણી `ફેલ` થાય તો તે નોન-ઝીરોમાં બહાર નીકળે છે.
### પ્રદાતા વ્યવસ્થાપન
```bash
omniroute providers available # ઓમ્નીરૂટ પ્રદાતા કૅટલોગ
omniroute providers available --search openai # id/name/alias/category દ્વારા કૅટલોગને ફિલ્ટર કરો
omniroute providers available --category api-key # શ્રેણી દ્વારા ફિલ્ટર કરો (api-key, oauth, free, ...)
omniroute providers available --json # મશીન-વાંચનક્ષમ JSON
omniroute providers list # કન્ફિગર્ડ પ્રદાતા કનેક્શન
omniroute providers list --json
omniroute providers test <id|name> # એક કન્ફિગર્ડ કનેક્શનનું પરીક્ષણ કરો
omniroute providers test-all # દરેક સક્રિય કનેક્શનનું પરીક્ષણ કરો
omniroute providers validate # સ્થાનિક-માત્ર બંધારણ માન્યતા
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # અસ્તિત્વમાં આવેલા OAuth પ્રવાહ
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` એ API-પ્રથમ છે અને તેથી સક્રિય સ્થાનિક અથવા દૂરના સંદર્ભ સામે કાર્ય કરે છે. પ્રમાણપત્ર ઇનપુટને ઉપયોગ કરવો જોઈએ
`--credential-stdin` અથવા `--credential-env`; `--dry-run --json` માત્ર
લાલિત્યની હાજરી/આકારની માહિતી આપે છે. `providers available` ઓમ્નીરૂટ કૅટલોગને વાંચે છે;
`providers list/test/test-all/validate` તેમના સ્થાનિક SQLite વર્તનને જાળવે છે અને
સર્વર ચલાવવાની જરૂર નથી.
### પુનઃપ્રાપ્તિ અને પુનઃસેટ
```bash
omniroute reset-password # એડમિન પાસવર્ડ ફરીથી સેટ કરો (અન્ય: omniroute-reset-password)
omniroute reset-encrypted-columns # એન્ક્રિપ્ટેડ પ્રમાણપત્ર પુનઃસેટ માટે ચેતવણી + ડ્રાય-રન બતાવો
omniroute reset-encrypted-columns --force # વાસ્તવમાં SQLite માં એન્ક્રિપ્ટેડ પ્રમાણપત્રને નલ કરો
```
### પ્રમાણપત્ર નિકાસ (⚠ ધ્યાનથી હેન્ડલ કરો)
```bash
omniroute auth export # ચેતવણી + પુષ્ટિ ગેટ — DB ઍક્સેસ નથી
omniroute auth export --force # તમામ કનેક્શનના ડિક્રિપ્ટેડ પ્રમાણપત્રોને stdout પર JSON તરીકે નિકાસ કરો
omniroute auth export --force --id <id> # ફક્ત મેળ ખાતા કનેક્શનને નિકાસ કરો
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> લાઇન ઉત્પન્ન કરો
omniroute auth export --force --out creds.json # ફાઇલમાં લખો (0600 પરમિશન સાથે બનાવવામાં આવે છે)
```
`auth export`**સ્થાનિક-માત્ર** (સિધા SQLite વાંચન, કોઈ HTTP માર્ગ નથી) અને ઇરાદાપૂર્વક છાપે/લખે છે
**પ્લેઇનટેક્સ્ટ** `apiKey`/`accessToken`/`refreshToken`/`idToken` મૂલ્યો — આ ફીચર છે, બગ નથી. ડેટાબેઝમાંથી કંઈપણ વાંચવામાં આવતું નથી, અને કંઈપણ ડિક્રિપ્ટ કરવામાં આવતું નથી, વિના `--force`. કોઈપણ પ્લેઇનટેક્સ્ટ ઉત્પન્ન થાય તે પહેલાં હંમેશા stderr ચેતવણી બેનર છાપે છે. `STORAGE_ENCRYPTION_KEY` સેટ કરવું જરૂરી છે. એક ક્ષેત્ર જે ડિક્રિપ્ટ કરવામાં નિષ્ફળ જાય છે (જૂનો કી, ખોટી ciphertext) તે તરીકે રિપોર્ટ કરવામાં આવે છે
`<field>DecryptFailed: true` સમગ્ર નિકાસને બંધ કરવાનો બદલે અથવા આધારભૂત ભૂલને લીક કરવાનો બદલે.
### અન્ય ઉપઆદેશો
આઓમ્નીરૂટ સર્વર ચલાવવાની ધારણા કરે છે, જો અન્યથા નોંધાયેલ ન હોય:
```bash
omniroute status # વ્યાપક રનટાઇમ સ્થિતિ
omniroute logs # વિનંતી લોગ્સ સ્ટ્રીમ (--json, --search, --follow)
omniroute config show # વર્તમાન કન્ફિગ્યુરેશન દર્શાવો
omniroute provider list # ઉપલબ્ધ પ્રદાતાઓની યાદી (પ્રદાતાઓની યાદીનું ઉપનામ)
omniroute provider add # એક સાધન પર ઓમ્નીરૂટને પ્રદાતા તરીકે નોંધણી કરો
omniroute keys add | list | remove # API કી વ્યવસ્થાપન
omniroute models [provider] # મોડલની યાદી (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # કન્ફિગ + DB નું સ્નેપશોટ
omniroute restore # અગાઉના સ્નેપશોટમાંથી પુનઃપ્રાપ્તિ
omniroute health # વિગતવાર આરોગ્ય (બ્રેકર્સ, કેશ, મેમરી)
omniroute quota # પ્રદાતા ક્વોટનો ઉપયોગ
omniroute cache # કેશની સ્થિતિ
omniroute cache clear # સેમેન્ટિક + સહી કેશને સાફ કરો
omniroute mcp status | restart # MCP સર્વર સ્થિતિ / પુનઃપ્રારંભ
omniroute a2a status | card # A2A સર્વર સ્થિતિ / એજન્ટ કાર્ડ
omniroute tunnel list | create | stop # ટનલ્સનું વ્યવસ્થાપન (ક્લાઉડફ્લેર/ટેઇલસ્કેલ/ngrok)
omniroute env show | get <k> | set <k> <v> # પર્યાવરણ ચલ તપાસો / સેટ કરો (તાત્કાલિક)
omniroute test # પ્રદાતા કનેક્ટિવિટી સ્મોક ટેસ્ટ
omniroute update # અપડેટ્સ માટે તપાસો
omniroute completion # શેલ પૂર્ણતા જનરેટ કરો
```
### સામાન્ય ફ્લેગ્સ
| ફ્લેગ | વર્ણન |
| ------------------- | ---------------------------------------------------------- |
| `--no-open` | શરૂ થતાં બ્રાઉઝર ઓટોમેટિક ખોલવા નથી |
| `--port <n>` | API પોર્ટને ઓવરરાઈડ કરો (ડિફોલ્ટ 20128) |
| `--mcp` | stdio પર MCP સર્વર તરીકે ચલાવો (IDE માટે) |
| `--non-interactive` | CI મોડ (કોઈ પ્રોમ્પ્ટ નથી; પર્યાવરણ/ફ્લેગ્સમાંથી વાંચે છે) |
| `--json` | મશીન-વાંચનક્ષમ JSON આઉટપુટ (ડોક્ટર, પ્રદાતાઓ, વગેરે) |
| `--help`, `-h` | આદેશ-વિશિષ્ટ મદદ બતાવો |
| `--version`, `-v` | સ્થાપિત સંસ્કરણ છાપો |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## ઉપલબ્ધ API એન્ડપોઈન્ટ્સ
## Built-in Agents: Droid & OpenClaw
| એન્ડપોઈન્ટ | વર્ણન | ઉપયોગ માટે |
| -------------------------- | ----------------------------- | --------------------------------------- |
| `/v1/chat/completions` | માનક ચેટ (બધા પ્રદાતાઓ) | તમામ આધુનિક સાધનો |
| `/v1/responses` | પ્રતિસાદ API (OpenAI ફોર્મેટ) | કોડેક્સ, એજન્ટિક વર્કફ્લો |
| `/v1/completions` | વારસાગત ટેક્સ્ટ પૂર્ણતાઓ | જૂના સાધનો જે `prompt:` નો ઉપયોગ કરે છે |
| `/v1/embeddings` | ટેક્સ્ટ એમ્બેડિંગ્સ | RAG, શોધ |
| `/v1/images/generations` | છબી જનરેશન | GPT-Image, Flux, વગેરે |
| `/v1/audio/speech` | ટેક્સ્ટ-થી-સ્પીચ | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | સ્પીચ-થી-ટેક્સ્ટ | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
ટોકનાઇઝ્ડ ઓમ્નીરૂટ URL સાથે તૈયાર-થી-પેસ્ટ ઉદાહરણો:
```txt
ટોકન ઉદાહરણ: sk-a3ab3c080beaee3a-69f4a4-070d71af
માનક OpenAI આધાર: http://localhost:20128/v1
VS Code મોડેલ્સ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code ચેટ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code પ્રતિસાદ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama ટેગ્સ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama ચેટ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## સમસ્યાઓનું નિરાકરણ
## Available API Endpoints
| ભૂલ | કારણ | સુધારો |
| --------------------------------------------- | -------------------------- | ---------------------------------------------------------------- |
| `Connection refused` | OmniRoute ચલાવી રહ્યું નથી | `omniroute serve` |
| `401 Unauthorized` | ખોટો API કી | `/dashboard/api-manager` માં તપાસો |
| `No combo configured` | કોઈ સક્રિય રૂટિંગ કોમ્બો | `/dashboard/combos` માં સેટ કરો |
| CLI "not installed" બતાવે છે | બાયનરી PATH માં નથી | `which <command>` તપાસો |
| ડેશબોર્ડ ઇન્સ્ટોલ પછી "not detected" બતાવે છે | કેશ જૂનો | ડેશબોર્ડમાં "⟳ Refresh detection" પર ક્લિક કરો |
| જૂનો લિંક `/dashboard/cli-tools` | Pre-v3.8.6 બુકમાર્ક | `/dashboard/cli-code` (308) પર આપોઆપ રીડાયરેક્ટ કરવામાં આવ્યું |
| જૂનો લિંક `/dashboard/agents` | Pre-v3.8.6 બુકમાર્ક | `/dashboard/acp-agents` (308) પર આપોઆપ રીડાયરેક્ટ કરવામાં આવ્યું |
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Solución de Problemas
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,309 +0,0 @@
# CLI-INTEGRATIONS (עברית)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "אינטגרציות CLI — הפנה כל CLI קוד ל-OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# אינטגרציות CLI
OmniRoute מספקת משפחה של פקודות `setup-*` שמגדירות CLI קוד (Codex, Claude Code, OpenCode, Cline, …) להשתמש ב-OmniRoute כ-backend שלה — כך שהכלי מדבר עם **נקודת קצה אחת** ו-OmniRoute מנתבת לספק הנכון עם חזרה אוטומטית. כל פקודה קוראת את הקטלוג של המודל **החי** מ-OmniRoute פועל (מקומי או מרוחק) וכותבת את קובץ הקונפיגורציה של הכלי על **המחשב שלך**. מפתח ה-API מתייחס על ידי משתנה סביבה בכל מקום שהכלי תומך בו. פקודות ששומרות קובץ סביבה מקומי של הכלי מצוינות למטה.
יש גם מפעיל כללי — `omniroute run <target>` — שמפעיל `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` או `gemini` עם הסביבה הנכונה מוזרקת, מבלי לכתוב שום קונפיגורציה בכלל. היעדים והכינויים שלהם מגיעים מהמניפסט הקנוני `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), ו-`omniroute completion` מציע את
אותן מילים נגזרות מהמניפסט. המפעילים הישנים לכל כלי —
`omniroute launch` (Claude Code) ו-`omniroute launch-codex` (Codex) — נשארים
זמינים.
הכנסת ספקים זמינה מאותו הקשר מקומי/מרוחק. הפקודות API-first למטה שומרות על אימות ניהול בנפרד מהאישורים של הספקים ואינן מדפיסות אישור בפלט מובנה:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
לסקריפטים, העדיף `--credential-stdin` או `--credential-env`; `--credential`
נשמר לשימוש מקומי מבוקר. `providers remove` דורש `--yes` בטרמינל שאינו אינטראקטיבי, וכל חמש הפקודות מכבדות את ההקשר הפעיל או את האפשרויות הגלובליות `--base-url`/`--api-key`.
להגדרה חד פעמית, כתובה ביד של שתי האינטגרציות העשירות ביותר, ראה את
העומק של כל כלי:
- [הגדרת Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [הגדרת Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [מצב מרוחק](./REMOTE-MODE.md) — הפעל OmniRoute מרוחק (VPS / Tailnet) מהמחשב הנייד שלך
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — תוסף OmniCopilot; הוא יכול גם להריץ את הפקודות
`setup-*` עבורך מתוך העורך
---
## טבלת מאסטר
כל פקודה מכבדת את **ההקשר הפעיל** (מוגדר עם `omniroute connect`, ראה
[מצב מרוחק](./REMOTE-MODE.md)) או את הדגלים המפורשים `--remote <url> --api-key <key>`.
"מקומי מול מרוחק" למטה פירושו: ללא דגלים זה מכוון ל-`http://localhost:20128`;
עם `--remote` (או הקשר מרוחק פעיל) זה שולף את הקטלוג מהשרת ההוא וכותב את הקונפיגורציה מקומית.
| פקודה | כלי | מה היא כותבת | דגלים מרכזיים | מקומי מול מרוחק |
| -------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — פרופיל אחד לכל מודל טקסט תואם (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | שניהם |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — פרופיל אחד לכל מודל תואם (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | שניהם |
| `omniroute setup-opencode` | OpenCode (תואם ל-openai) | `~/.config/opencode/opencode.json` — ספק `omniroute` עם כל מודל בקטלוג (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | שניהם |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (מצב CLI) + מדפיס הגדרות תוסף VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | שניהם |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + ממזג `kilocode.*` לתוך `settings.json` של VS Code אם קיים | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | שניהם |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — מודלים `provider: openai`, מפתח דרך `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | שניהם |
| `omniroute setup-cursor` | Cursor | כלום — מדפיס את הצעדים באפליקציה (הגדרת Cursor היא SQLite אטומה) | `--remote` `--api-key` `--only` `--port` | שניהם |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (מסמך ייבוא) + קובע `roo-cline.autoImportSettingsPath` אם קיים `settings.json` של VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | שניהם |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — ספק תואם ל-openai, מפתח דרך `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | שניהם |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + מדפיס מתכון סביבה | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | שניהם |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + מדפיס מתכון סביבה | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | שניהם |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — מערך `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` ב-`~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | שניהם |
| `omniroute run <target>` | הפעלת זמן ריצה (כללית) | כלום — מפעיל `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` עם הסביבה והארגומנטים הנכונים; Qwen ו-Gemini משתמשים בבית מבודד זמני | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | שניהם |
| `omniroute launch` | Claude Code | כלום — מפעיל `claude` עם `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` מוזרקים | `--remote` `--api-key` `--token` `--profile` `--port` | שניהם |
| `omniroute launch-codex` | OpenAI Codex CLI | כלום — מפעיל `codex` עם ספק `omniroute` מוזרק דרך דגלי `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | שניהם |
הערות על דגלים (מאומתים במקור הפקודה):
- `--remote <url>` — שולף את הקטלוג מ-OmniRoute מרוחק (מחליף את `--port`
ואת ההקשר הפעיל). `--api-key <key>` מספק את האישור עבור השרת
(ברירת מחדל היא משתנה הסביבה `OMNIROUTE_API_KEY`, או הטוקן של ההקשר הפעיל).
- `--only <patterns>` — תתי מחרוזות מופרדות בפסיקים; שומר רק על מזהי המודלים שמתאימים
(למשל `--only glm,kimi`). זמינה על `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — מדפיס בדיוק מה ייכתב מבלי לגעת ב
מערכת הקבצים. זמינה על כל פקודות `setup-*` **מלבד** `setup-cursor`
(שלעולם אינה כותבת קובץ).
- `--model <id>` — דרוש (או נבחר אינטראקטיבית) עבור הכלים שאין להם
גילוי אוטומטי של מודלים: Cline, Kilo, Roo, Goose, Qwen, Aider. כלים אלה
גם מקבלים `--yes` עבור ריצות לא אינטראקטיביות (שאז דורשות `--model`).
`setup-opencode` לוקחת `--model` כדי לקבוע את המודל העליון ברירת המחדל.
- `--model <id>` על `omniroute run` עוקבת אחרי החיווט לפי המניפסט
(`bin/cli/cli-manifest.mjs`): **aider** מקבלת `--model openai/<id>` ו
**opencode** `--model omniroute/<id>` (הקידומת מתווספת רק כאשר ה-id
אינו נושא אותה כבר); **qwen** ו**gemini** מקבלות את ה-id כפי שהוא;
**claude** מקבלת אותו דרך `ANTHROPIC_MODEL`, **goose** דרך `GOOSE_MODEL`, ו
**codex** דרך `-c model_providers.omniroute.*` args. **Qwen הוא היעד היחיד
שדורש באופן מוחלט `--model`** — `omniroute run qwen` בלעדיו יוצא
`2` עם שגיאה מפורשת.
- `--port <port>` — פורט OmniRoute מקומי (ברירת מחדל `20128`, מתעלם כאשר `--remote`
מוגדר). נוכח על כל `setup-*` ועל שני המפעילים.
- קודי יציאה של `omniroute run`: קוד היציאה של ה-CLI הילד מועבר
כפי שהוא; `2` = ארגומנטים לא חוקיים (יעד לא נתמך, חסר `--model` נדרש,
שמירה על מיכל); `127` = הבינארי של היעד אינו ב-`PATH`;
`130`/`143`/`129` כאשר ההפעלה מסתיימת על ידי `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = כישלון אחר בהפעלה.
- שני המפעילים (`launch`, `launch-codex`) מקבלים `--profile <name>` כדי לבחור
פרופיל שנכתב על ידי `setup-claude` / `setup-codex`, בנוסף לארגומנטים להעברה עבור
הבינארי הבסיסי `claude` / `codex`.
הבוחר האינטראקטיבי משותף גם למתכוני ההגדרה:
```bash
# בחר מתוך הקטלוג המקומי או המרוחק הפעיל והגדר את היעד.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` כרגע מפנה למתכונים שנבדקו עבור `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, ו`kilo`. רשומות קטלוג
שמיועדות רק ל-IDE, MITM, ומדריך נשארות זרימות `setup-*`/ידניות מפורשות ואינן מוצגות
כיעדים שניתן להפעיל.
> `setup-opencode` היא האינטגרציה **הקלה התואמת ל-openai** של OpenCode.
> יש גם אינטגרציה עשירה יותר של תוסף — `omniroute setup opencode` — שמתקינה
> `@omniroute/opencode-plugin`. אלו פקודות שונות; הטבלה
> למעלה מתעדת את `setup-opencode`.
---
## שימוש מקומי
עם OmniRoute פועל על `localhost:20128`, פשוט הרץ את פקודת ההגדרה עבור הכלי שלך. הקטלוג נמשך מהשרת המקומי.
```bash
# Codex: כתוב פרופיל עבור מודל תואם לתוך ~/.codex/
omniroute setup-codex
codex --profile glm52 # השתמש בפרופיל שנוצר
# Claude Code: כתוב פרופילים לפי מודל, ואז השק את אחד
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: כתוב את הספק התואם ל-openai עם כל מודלי הקטלוג
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # מתייחס דרך {env:OMNIROUTE_API_KEY}, אף פעם לא על דיסק
opencode -m omniroute/glm/glm-5.2 "..."
# כלים ללא גילוי אוטומטי זקוקים למודל מפורש:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# תצוגה מקדימה ללא כתיבה של שום דבר:
omniroute setup-continue --dry-run
```
השק ללא כתיבה של שום קונפיגורציה בכלל (הזרקת env בלבד):
```bash
omniroute launch # Claude Code → OmniRoute המקומי
omniroute launch-codex # Codex CLI → OmniRoute המקומי
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# נתיב פקודה מפורש: העבר כל מה שבא אחרי --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## שימוש מרחוק
כוון כל פקודת הגדרה ל-OmniRoute מרחוק עם `--remote` + `--api-key`. הקטלוג נמשך מהמרחוק; הקונפיגורציה נכתבת במחשב המקומי שלך.
```bash
# OpenCode נגד VPS מרחוק, שמור רק מודלים glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # ייצא קודם את OMNIROUTE_API_KEY
# פרופילי Codex מקטלוג מרחוק
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# השקת CLI ישירות נגד המרחק
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
במקום להעביר `--remote`/`--api-key` בכל פעם, התחבר פעם אחת ותן ל
**הקשר הפעיל** לספק אותם אוטומטית:
```bash
omniroute connect 192.168.0.15 # מייצר טוקן עם טווח, שומר את ההקשר
omniroute setup-codex # ← עכשיו משתמש בקטלוג המרוחק
omniroute setup-opencode # ← אותו דבר
omniroute launch # ← Claude Code נגד המרוחק
```
ראה [מצב מרוחק](./REMOTE-MODE.md) עבור הקשרים, טווחים, וניהול טוקנים.
---
## מסורות URL בסיסיות (אילו כלים רוצים `/v1`)
OmniRoute מציע את הממשק של OpenAI ב-`/v1`, את הממשק של Anthropic בשורש,
ואת הממשק של Gemini ב-`/v1beta`. כל אינטגרציה מחוברת לצורתה
שהכלי מצפה (מאומת במקור הפקודה):
| אינטגרציה | URL בסיסי שנכתב | `/v1`? |
| -------------------------------------------------------------------------- | --------------- | ----------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | שורש | לא — Cline מוסיף `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | שורש | לא — Goose מוסיף את הנתיב |
| `setup-aider` (`OPENAI_API_BASE`) | שורש | לא — LiteLLM מוסיף `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | עם `/v1` | כן |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | שורש | לא — Claude Code מוסיף `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | עם `/v1` | כן |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | עם `/v1` | כן |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | שורש | לא — ה-SDK מוסיף `/v1beta/models/…` |
---
## שמירה על תלותים מקומיים בעדכון: `--include=optional`
כאשר אתה מעדכן עם `omniroute update` (לאחר אישור, או עם `--apply`),
OmniRoute מריץ את ההתקנה עם `--include=optional` כלול:
```bash
npm install -g omniroute@latest --include=optional
```
זה **לא** דגל שאתה מעביר ל`omniroute update` — הוא תמיד מוחל על ידי
המעדכן. זה מבטיח שה`optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, ערכת LLMLingua SLM) שורדות את העדכון גם אם הגדרות ה-npm שלך
מכילות `omit=optional`, מה שהיה אחרת משאיר בשקט את מנהל ההתקנה SQLite
המקומי ואת חיבור ה-OS-keyring. כדי להציג את הפקודה המדויקת מבלי להחיל:
```bash
omniroute update --dry-run
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
דגלים אחרים של `omniroute update` (מאומתים במקור): `--check` (יוצא 1 אם
מעודכן), `--apply` (מתקין מבלי לבקש אישור), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI דרך `omniroute run gemini`
החוזה מאומת מול `@google/gemini-cli` 0.50.0: ה-CLI מכבד את
`GOOGLE_GEMINI_BASE_URL` ומנפיק `POST /v1beta/models/<model>:generateContent`
(וגם `:streamGenerateContent?alt=sse`) נגדו — בדיוק כמו הממשק המקומי של OmniRoute
(`/v1beta`). `omniroute run gemini` מחבר את זה אוטומטית:
- `GOOGLE_GEMINI_BASE_URL` → ה-URL הבסיסי הפעיל של OmniRoute (שורש, ללא `/v1`);
- `GEMINI_API_KEY` → האישור שנפתר של OmniRoute (אפשרות/סביבה/הקשר);
- **`GEMINI_CLI_HOME` מבודד זמני** שבו `.gemini/settings.json`
בוחר באימות `gemini-api-key`, כך שסשן OAuth של Google מאוחסן (Code Assist)
לא יחליף את ההשקה המנוהלת על ידי OmniRoute — נמחק לאחר היציאה;
- **היגיינת סביבה**: הסביבה של הילד מנוקה מ`GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` ו`GOOGLE_GENAI_USE_GCA` (שיכוונו את
האימות ל-Vortex/Code Assist), ו`GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` מוגדר
כהגנה נוספת — שאר היעדים של `run` מקבלים את אותו טיפול עבור המשתנים המנוגדים שלהם;
- הזרקת `--model <id>` מ`--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
שומר האמון של Gemini עדיין חל במצב ללא ראש — העבר
`--skip-trust` (או סמוך על התיקייה באופן אינטראקטיבי) בעצמך; המפעיל
בכוונה לא עוקף את זה. מפעיל זה שונה מ**הרישום ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), אשר נשאר האינטגרציה של פרוטוקול הסוכן עבור `/dashboard/acp-agents`.
---
## סוויפ עשן אמיתי (אופציה)
הרצת תכנית השקה דטרמיניסטית מתבצעת ב-CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). כדי לאמת את הבינארים האמיתיים מול שרת
OmniRoute אמיתי, קיים מנגנון אופציה ב
`tests/integration/upstream-cli-smoke.int.test.ts`. הוא אף פעם לא רץ אוטומטית
(כל תת-מבחן מדלג אלא אם `RUN_CLI_SMOKE=1`), מעביר את האישור דרך משתנה סביבה
NAME (לעולם לא לפי ערך), מסנן מחרוזות בצורת מפתח מכל פלט מוקלט, מדלג
על יעדים שהבינארי שלהם לא מותקן, ומסווג כישלונות כ
אימות / עליון / הגדרה במקום בוליאני פשוט:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
אופציונלי: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` מגביל את הסוויפ;
`OMNIROUTE_SMOKE_TIMEOUT_MS` עוקף את מגבלת הזמן של 120 שניות לכל יעד.
## ראה גם
- [הגדרת קוד קלוד](./CLAUDE-CODE-CONFIGURATION.md) — המדריך העמוק יותר לקוד קלוד
- [הגדרת CLI של קודקס](./CODEX-CLI-CONFIGURATION.md) — ההגדרה הבסיסית של `[model_providers.omniroute]` פעם אחת
- [מצב מרוחק](./REMOTE-MODE.md) — הקשרים, אסימוני גישה עם טווח, הפעלת שרת מרוחק
- [הפניה לכלי CLI](../reference/CLI-TOOLS.md) — הקטלוג המלא של כלים נתמכים + דפי לוח מחוונים
- [מדריך התקנה](./SETUP_GUIDE.md) — שיטות התקנה והדרכה לריצה ראשונה

View File

@@ -1,318 +1,86 @@
# CLI-TOOLS (עברית)
# CLI Tools Setup Guide — OmniRoute (עברית)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "כלי CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# כלי CLI — OmniRoute
עודכן לאחרונה: 2026-08-18
OmniRoute משתלב עם שלוש קטגוריות של כלי CLI המפוזרים על פני שלוש דפי לוח מחוונים ייעודיים:
| דף | מסלול | רעיון | מספר |
| ------------- | ----------------------- | ------------------------------------------------------------------- | --------- |
| **קוד CLI** | `/dashboard/cli-code` | כלים לקידוד שאתה מפנה ל-OmniRoute (לקוח → CLI → OmniRoute → ספק) | 26 |
| **סוכני CLI** | `/dashboard/cli-agents` | סוכנים אוטונומיים שאתה מפנה ל-OmniRoute (אותו זרימה, טווח רחב יותר) | 8 |
| **סוכני ACP** | `/dashboard/acp-agents` | CLIs ש-OmniRoute מפעיל כ-backend דרך stdio/ACP (זרימה הפוכה) | ראה רישום |
מסלולים ישנים מפנים דרך 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## איך זה עובד
## How It Works
```
קוד CLI / סוכני CLI (זרימת צריכה):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (כולם מפנים ל-OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute מפנה לספק הנכון)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
סוכני ACP (זרימת הפעלה הפוכה):
בקשת לקוח → OmniRoute → מפעיל CLI דרך stdio/ACP → תגובה
```
**יתרונות:**
**Benefits:**
- מפתח API אחד לניהול כל הכלים
- מעקב על עלויות בכל ה-CLIs בלוח המחוונים
- החלפת מודלים ללא צורך בהגדרת כל כלי מחדש
- עובד מקומית ובשרתים מרוחקים (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## קונפיגורציה אוטומטית עם `setup-*`
## Supported Tools (Dashboard Source of Truth)
אינך צריך לכתוב את הקונפיגורציה של כל כלי ביד. OmniRoute מספקת פקודת `setup-*`
לכל CLI נתמך שקוראת את קטלוג המודלים **החי** מ-OmniRoute פועל (מקומי או מרוחק) וכותבת את הקונפיגורציה של הכלי שלך במחשב שלך:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
כל אחת מקבלת `--remote <url> --api-key <key>` (להגדיר כלי מקומי מול OmniRoute מרוחק), `--dry-run` (תצוגה מקדימה ללא כתיבה), ו-`--port`. כלים ללא גילוי אוטומטי של מודלים (Cline, Kilo, Roo, Goose, Aider, Qwen) לוקחים
`--model <id>` (ו-`--yes` להרצות לא אינטראקטיביות). כדי להפעיל CLI עם הסביבה הנכונה מוזרקת וללא קונפיגורציה שנכתבה כלל, השתמש במפעיל הכללי
`omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — מטרות וכינויים מגיעים מ-`bin/cli/cli-manifest.mjs`); המפעילים הישנים לכל כלי `omniroute launch` (Claude Code) ו-`omniroute launch-codex`
(Codex) נשארים זמינים. CLI של Gemini הוא רק להפעלה: הוא יעד של `omniroute run`
אבל אין לו מתכון `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **הפניה מלאה:** הטבלה הראשית — מה כל פקודה כותבת, כל דגל,
> מקומי מול מרוחק, ואילו כלים רוצים סיומת `/v1` — נמצאת ב
> **[אינטגרציות CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### הרצת אלה בתוך מיכל
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
פקודת `setup-*` המבוצעת בתוך מיכל OmniRoute כותבת לתוך הבית של המיכל עצמו, שאף CLI מארח לא קורא אליו ונעלמת עם המיכל. OmniRoute מזהה זאת ויוצאת `2` עם הוראות במקום לכתוב. שתי דרכים נתמכות קדימה — התקן את ה-CLI על המחשב המארח ו
`omniroute connect` למיכל, או חיבור-הרכבה של תיקי הקונפיגורציה והגדרת
`CLI_CONFIG_HOME` (פרופיל המארח של ההרכבה). כל פקודת `setup-*`, בנוסף ל-`omniroute configure` ו-`omniroute config set`, מקבלת
`--allow-container-write` כאשר הכוונה שלך היא להגדיר את ה-CLIs של המיכל; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` עושה את אותו הדבר עבור השרת. ראה
[מדריך Docker → קונפיגורציה של כלי CLI מארח](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
נקודת היישום של לוח המחוונים **(`POST /api/cli-tools/apply`)** אוכפת את
אותו שומר: במיכל, כתיבה שהמטרה שלה אינה מחוברת מהמארח עונה **`422`** עם `containerEphemeralTarget: true`, טקסט השגיאה הבטוח ו — עבור הכלים עם מתכון מארח (claude, codex, opencode, cline,
kilo, continue) — פקודת `hostSetupCommand` (למשל `omniroute setup-opencode`) להרצה על המארח במקום; שום דבר לא נכתב. `dryRun: true` ממשיך לעבוד במצב מיכל
ומחזיר את התוכן שנוצר + נתיב היעד מבלי לגעת בדיסק, כך שתוכל להציג מלוח המחוונים וליישם על המארח. התנהגות זו היא מכוונת ומוגנת רגרסיה על ידי
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — אל תנסה "לתקן" 422 על ידי הסרת השומר.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## מקור האמת
## Step 1 — Get an OmniRoute API Key
הקטלוג המאוחד נמצא ב-`src/shared/constants/cliTools.ts` כ-`CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
כל רשומה מכילה את השדות הבאים (מוגדרים ב-`src/shared/schemas/cliCatalog.ts`):
| שדה | סוג | תיאור |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
| `category` | `"code" \| "agent"` | באיזו דף הכלי מופיע |
| `vendor` | `string` | מקור הכלי ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ניתן גם להשתמש בו כ-Agent של ACP (סמל מוצג) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | רמת תמיכה בנקודת קצה מותאמת. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | מנגנון קונפיגורציה |
| `id`, `name`, `color`, `description`, `docsUrl` | סטנדרטי | שדות תצוגה מרכזיים |
רשומות עם `baseUrlSupport: "none"` **אינן מוצגות** בדפי הלוח — הן רשומות ב-MITM backlog עבור תכנית 11 (ראה `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### רמות יכולת (מקטלגות × ניתנות לזיהוי × ניתנות לקונפיגורציה × ניתנות להשקה)
לא כל כלי מקטלגי ניתן לזיהוי, קונפיגורציה או השקה. כל רמה יש לה מקור המצהיר, ובדיקת סטייה שומרת עליהם מסונכרנים:
| רמה | משמעות | מצהיר ב |
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| **מקטלג** | מופיע בקטלוג הלוח (שם, ספק, מסמכים, סוג קונפיגורציה) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **ניתן לזיהוי** | זיהוי בינארי/קונפיגורציה, בדיקות בריאות, נתיבי קונפיגורציה | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **ניתן לקונפיגורציה** | נתמך על ידי `omniroute configure <cli>` (מתכון הגדרה קיים) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **ניתן להשקה** | נתמך על ידי `omniroute run <target>` (הזרקת env/args מוגדרת) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` הוא המניפסט ההפעלה הקנוני עבור פקודת ה-CLI: `run`, `configure` ומחוללי השלמת-shell כולם שואבים את רשימות היעדים שלהם, פתרון כינויים (למשל `kilocode`/`kilo-code`/`kilo_cli``kilo`) וחיווט דגל `--model` ממנו. שומר הסטייה `tests/unit/cli/cli-manifest-drift.test.ts` מאמת שהמניפסט, הקטלוג בזמן ריצה, הקטלוג של ה-UI וכל משטח צרכן נשארים מסונכרנים — יעד שנוסף למשטח אחד ללא האחרים נכשל את המבחן במקום לסטות בשקט.
## 1. קטלוג קוד CLI (26 כלים)
כל הכלים שמופיעים ב-`/dashboard/cli-code`. אלו עם `baseUrlSupport: none` מחוברים דרך MITM או מדריך ידני במקום כתובת URL מותאמת אישית:
| id | שם | ספק | תמיכה בכתובת בסיס | סוג קונפיגורציה | acpSpawnable |
| ------------ | ------------------------ | ------------------- | ----------------- | --------------- | ------------ |
| claude | קוד קלוד | אנתרופיק | מלא | env | true |
| codex | CLI של OpenAI Codex | OpenAI | מלא | מותאם אישית | true |
| zcode | ZCode (תוכנית קידוד GLM) | Z.ai | אין | מותאם אישית | false |
| cline | קלין | OSS (מפתחי קלוד) | מלא | מותאם אישית | true |
| kilo | קוד קילו | Kilo-Org | מלא | מותאם אישית | false |
| roo | קוד Roo | Roo (OSS) | מלא | מדריך | false |
| continue | Continue | continue.dev | מלא | מדריך | false |
| aider | Aider | OSS (פ. גוטייה) | מלא | מדריך | true |
| forge | ForgeCode | Antinomy HQ | מלא | מותאם אישית | true |
| jcode | jcode | 1jehuang (OSS) | מלא | מותאם אישית | false |
| deepseek-tui | DeepSeek TUI | האנטר בואן (OSS) | מלא | מותאם אישית | false |
| codewhale | CodeWhale | Hmbown (OSS) | מלא | מותאם אישית | false |
| opencode | OpenCode | Anomaly (לשעבר SST) | מלא | מדריך | true |
| droid | Factory Droid | Factory AI | חלקי | מדריך | false |
| copilot | CLI של GitHub Copilot | GitHub/MS | מלא | מותאם אישית | false |
| cursor-cli | CLI של Cursor | Anysphere | חלקי | מדריך | true |
| smelt | Smelt | leonardcser (OSS) | מלא | מותאם אישית | false |
| pi | Pi (סוכן קידוד pi) | M. Zechner (OSS) | מלא | מותאם אישית | false |
| grok-build | Grok Build | xAI | מלא | מותאם אישית | false |
| crush | Crush | OSS (Charm) | מלא | מותאם אישית | false |
| qwen | קוד Qwen | Alibaba | מלא | מדריך | true |
| cursor | Cursor | Anysphere | אין | מדריך | false |
| antigravity | אנטיגרביטי | Google | אין | mitm | false |
| hermes | הרמס | Nous Research | אין | מדריך | false |
| kiro | Kiro AI | Amazon | אין | mitm | false |
| custom | CLI מותאם אישית | — | מלא | custom-builder | false |
כלים עם `baseUrlSupport: "partial"` מציגים תג "⚠ כתובת בסיס חלקית" בכרטיס הלוח.
## 2. קטלוג סוכני CLI (8 כלים)
סוכנים אוטונומיים המופיעים ב-`/dashboard/cli-agents`:
| id | שם | ספק | תמיכה ב-BaseUrl | ניתן להפעיל ACP |
| ------------ | ---------------- | ------------------------ | --------------- | --------------- |
| hermes-agent | סוכן הרמס | Nous Research | מלא | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | מלא | true |
| goose | Goose | Block / Linux Foundation | מלא | true |
| interpreter | Open Interpreter | OSS | מלא | true |
| warp | Warp AI | Warp Inc. | חלקי | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | מלא | false |
| omp | Oh My Pi | OSS | מלא | true |
| letta | Letta CLI | Letta | מלא | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. סוכני ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
דף זה (ששונה מ-`/dashboard/agents`) מציג CLI ש-OminiRoute יכול **להפעיל** כמנועי ביצוע אחוריים דרך פרוטוקול stdio/ACP. הקטלוג מתוחזק בנפרד ב-`src/lib/acp/registry.ts` ואינו זהה ל-`CLI_TOOLS`.
---
## 4. backlog של MITM (לא מוצג בלוח המחוונים)
ה-CLI הבאים אינם תומכים ב-Base URL מותאם אישית באופן מקורי ואינם **מופיעים** בדפי קוד CLI או דפי סוכני CLI. הם מועמדים להפרעה של MITM בתוכנית 11:
| CLI | סיבה |
| ------------------- | ------------------------------------------------------ |
| windsurf | BYOK מוגבל למודלים נבחרים של Claude + URL/token ארגוני |
| amp | אקוסיסטם סגור (Sourcegraph) |
| amazon-q / kiro-cli | אימות AWS SSO, אין URL מותאם אישית |
| cowork | Anthropic Desktop, אין נקודת קצה ניתנת להגדרה |
ראה `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` עבור הצלב המלא.
---
## 5. API לזיהוי קבוצות
כל זיהוי הכלים מאוגד דרך נקודת קצה אחת:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (כמו בשאר הנתיבים של `/api/cli-tools/`)
- מחזיר: `Record<toolId, ToolBatchStatus>` (סוג: `src/shared/types/cliBatchStatus.ts`)
- אסטרטגיה: `Promise.all` על פני כל הכלים, 5 שניות זמן קצוב לכל כלי
- מטמון: בזיכרון LRU ממוין לפי קובץ קונפיגורציה `mtime`. המטמון מתבטל כאשר mtime משתנה. מתאפס בהפעלה מחדש של השרת.
צורת התגובה לכל כלי:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // מנוקה, ללא עקבות שגיאה
}
```
## 6. מנהלי הגדרות עבור כלים חדשים
כלים חדשים עם `configType: "custom"` יש להם מסלולי API ייעודיים להגדרות:
| מסלול | כלי |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedicated `.env` key) |
כל המסלולים משתמשים ב-`sanitizeErrorMessage()` עבור תגובות שגיאה (כלל קשה #12).
---
## 7. ארכיטקטורת דפי לוח מחוונים
### קוד CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — רכיב שרת
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — רשת לקוח
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — דף פרטי כלי
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 כרטיסי כלי מיוחדים + `ToolDetailClient.tsx`
### סוכני CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — רכיב שרת
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — רשת לקוח
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — עושה שימוש חוזר ב-`ToolDetailClient`
### סוכני ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — רכיב שרת (הועבר מ-`agents/`)
### רכיבי UI משותפים (`src/shared/components/cli/`)
| קובץ | מטרה |
| ----------------------- | --------------------------------------------- |
| `CliToolCard.tsx` | כרטיס מצב חכם (זיהוי + הגדרה + נקודת קצה) |
| `CliConceptCard.tsx` | כרטיס הסבר על מושג לדף |
| `CliComparisonCard.tsx` | השוואה בשלוש עמודות בין סוגי CLI |
| `BaseUrlSelect.tsx` | תפריט נפתח לנקודת קצה (מקומי/ענן/מותאם אישית) |
| `ApiKeySelect.tsx` | בורר מפתח API |
| `ManualConfigModal.tsx` | מודל קטע קוד שניתן להעתקה |
### חיבור משותף (`src/shared/hooks/cli/`)
| קובץ | מטרה |
| ------------------------- | ----------------------------------------------------------- |
| `useToolBatchStatuses.ts` | מביא את `/api/cli-tools/all-statuses`, מנהל מצב טעינה/רענון |
---
## 8. i18n
מרחבים חדשים נוספו בתוכנית 14 F9:
| Namespace | מטרה |
| ----------- | --------------------------------------------------------------------------- |
| `cliCommon` | מיתוגים משותפים (תוויות כרטיסים, טקסטים של מושגים/השוואות, תוויות דף פרטים) |
| `cliCode` | מיתוגים של דף CLI Code |
| `cliAgents` | מיתוגים של דף CLI Agents |
| `acpAgents` | מיתוגים של דף ACP Agents |
תרגומים מלאים לפורטוגזית ברזילאית ואנגלית מסופקים. 39 מקומות אחרים נופלים חזרה לאנגלית אוטומטית דרך מיזוג ברמת המרחב ב- `src/i18n/request.ts`.
---
## 9. התחלה מהירה
### שלב 1 — קבלת מפתח API של OmniRoute
1. פתחו את `/dashboard/api-manager`**צור מפתח API**
2. תן לו שם (למשל `cli-tools`) ובחר את כל ההרשאות
3. העתק את המפתח — תצטרך אותו עבור כל CLI למטה
> המפתח שלך נראה כך: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### שלב 2 — התקנת כלים של CLI
כל הכלים המבוססים על npm דורשים Node.js 22.22.2+ או 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -330,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (ניתן להשקה דרך `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # מבוסס Rust
# סוכן קידוד Pi
# ראה https://github.com/zechnerj/pi-coding-agent להתקנה
# jcode
# ראה https://github.com/1jehuang/jcode להתקנה
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### שלב 3 — קונפיגורציה דרך לוח המחוונים
## Step 3 — Set Global Environment Variables
1. עבור ל- `http://localhost:20128/dashboard/cli-code`
2. מצא את הכלי שלך ברשת
3. לחץ על הכרטיס כדי לפתוח את דף פרטי הכלי
4. בחר את מפתח ה-API שלך ואת כתובת ה-URL הבסיסית
5. לחץ על **החל קונפיגורציה** או העתק את קטע הקונפיגורציה הידני
---
### שלב 4 — הגדרת משתני סביבה גלובליים
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# נקודת קצה אוניברסלית של OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI קורא GOOGLE_GEMINI_BASE_URL ב- ROOT (ה-SDK שלו מוסיף /v1beta/... בעצמו)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> עבור **שרת מרוחק** החלף `localhost:20128` עם כתובת ה-IP או הדומיין של השרת,
> למשל `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### שלב 4 — קונפיגורציה של כל כלי
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# צור ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
השתמש בשורש שער אנתרופיק המאוחד עבור Claude Code. אל תוסיף `/v1` כאן.
**בדיקה:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Codex המודרני (v0.137+) קורא רק את `~/.codex/config.toml` — הישן
`config.yaml` שייך ל-CLI npm הישן ומוזנח בשקט. מפתח ה-API נשאר במשתנה הסביבה `OMNIROUTE_API_KEY` (`env_key`), אף פעם
לא בתוך הקובץ:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
הפניה מלאה (פרופילים, `wire_api`, חלונות הקשר): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**בדיקה:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**בדיקה:** `opencode`
> השתמש ב- `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> כדי לשלוח וריאנטים של חשיבה.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI או VS Code)
### OpenCode
**מצב CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -472,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**מצב VS Code:**
הגדרות הרחבת Cline → ספק API: `OpenAI Compatible`כתובת URL בסיסית: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
או השתמש בלוח המחוונים של OmniRoute → **כלי CLI → Cline → החל קונפיגורציה**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI או VS Code)
### KiloCode (CLI or VS Code)
**מצב CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**הגדרות VS Code:**
**VS Code settings:**
```json
{
@@ -496,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
או השתמש בלוח המחוונים של OmniRoute → **כלי CLI → KiloCode → החל קונפיגורציה**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (הרחבת VS Code)
### Continue (VS Code Extension)
ערוך את `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -514,255 +241,158 @@ models:
default: true
```
אתחל מחדש את VS Code לאחר העריכה.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
השתמש בזה כאשר VS Code Insiders מוגדר עבור מודלים של נקודות קצה מותאמות ואתה רוצה ש-OmniRoute יעבוד ללא שדה כותרת מותאם.
**מיקום מומלץ:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**דוגמה באמצעות הכינוי המוטבע של OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**הערות:**
- החלף `sk-your-omniroute-key` עם מפתח API שנוצר ב-OmniRoute.
- שדה ה-`url` צריך להצביע על `/api/v1/vscode/{token}/chat/completions`.
- שדה ה-`modelsUrl` צריך להצביע על `/api/v1/vscode/{token}/models`.
- העדף את הזרימה הרגילה של `/v1` + כותרת Bearer כאשר הלקוח תומך בכותרות מותאמות.
- טוקנים מוטבעים ב-URL הם פתרון תאימות ועשויים להופיע ביומני עורך או בהיסטוריית פרוקסי.
---
#### Kiro CLI (אמזון)
### Kiro CLI (Amazon)
```bash
# התחבר לחשבון AWS/Kiro שלך:
# Login to your AWS/Kiro account:
kiro-cli login
# ה-CLI משתמש באותנטיקציה משלו — OmniRoute לא נדרשת כ-backend עבור Kiro CLI עצמו.
# השתמש ב-kiro-cli לצד OmniRoute עבור כלים אחרים.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
עבור אפליקציית שולחן העבודה **Kiro IDE**, השתמש בנקודת הקצה MITM שנחשפת על ידי OmniRoute
מתחת ל- `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. OmniRoute CLI פנימי
## Dashboard Auto-Configuration
הבינארי `omniroute` מספק פקודות עבור מחזור חיי השרת, התקנה, אבחון, וניהול ספקים. נקודת כניסה: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # הפעל את השרת (פורט ברירת מחדל 20128)
omniroute setup # אשף התקנה אינטראקטיבי
omniroute doctor # בדוק קונפיגורציה, DB, פורטים, זמן ריצה
omniroute providers list # חיבורים לספקים שהוגדרו
omniroute providers test-all # בדוק כל חיבור פעיל
omniroute reset-password # אפס את סיסמת המנהל
omniroute logs # זרם יומני בקשות
omniroute health # בריאות מפורטת (מפסקי זרם, מטמון, זיכרון)
omniroute --version # הדפס גרסה
omniroute --help # הצג את כל הפקודות
```
### התקנה והתחלה
```bash
omniroute setup # אשף התקנה אינטראקטיבי
omniroute setup --non-interactive # מצב CI/אוטומציה (קורא משתני סביבה + דגלים)
omniroute setup --password '<value>' # הגדר סיסמת מנהל ישירות
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # הוסף ובדוק ספק במכה אחת
```
משתני סביבה מוכרים עבור התקנה לא אינטראקטיבית:
| Var | מטרה |
| ------------------- | ------------------------------------------------------------ |
| `OMNIROUTE_API_KEY` | מפתח API של הספק (מחובר ל`--api-key` דרך Commander `.env()`) |
| `DATA_DIR` | החלף את תיקיית הנתונים של OmniRoute |
כל שאר הקלטים הלא אינטראקטיביים מועברים כדגלים, לא משתני סביבה:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(ראה את אפשרויות `omniroute setup` למעלה).
### אבחון
```bash
omniroute doctor # בדוק קונפיגורציה, DB, פורטים, זמן ריצה, זיכרון, חיות
omniroute doctor --json # JSON קריא למכונה
omniroute doctor --no-liveness # דלג על בדיקת בריאות HTTP
omniroute doctor --host 0.0.0.0 # החלף את מארח החיות
omniroute doctor --liveness-url <url> # החלף את כתובת ה-URL של נקודת הבריאות המלאה
```
הדוקטור מבצע את הבדיקות הללו: `קונפיגורציה`, `מסד נתונים`, `אחסון/הצפנה`,
`זמינות פורטים`, `זמן ריצה של Node`, `בינארי מקורי` (better-sqlite3),
`זיכרון`, ו`חיות השרת`. הוא יוצא עם קוד שגיאה אם כל בדיקה היא `נכשל`.
### ניהול ספקים
```bash
omniroute providers available # קטלוג ספקי OmniRoute
omniroute providers available --search openai # סנן קטלוג לפי id/name/alias/category
omniroute providers available --category api-key # סנן לפי קטגוריה (api-key, oauth, free, ...)
omniroute providers available --json # JSON קריא למכונה
omniroute providers list # חיבורים לספקים שהוגדרו
omniroute providers list --json
omniroute providers test <id|name> # בדוק חיבור אחד שהוגדר
omniroute providers test-all # בדוק כל חיבור פעיל
omniroute providers validate # אימות מבני מקומי בלבד
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # זרימת OAuth קיימת
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` הם API-first ולכן פועלים נגד
ההקשר המקומי או המרוחק הפעיל. קלט ההסמכה צריך להשתמש ב
`--credential-stdin` או `--credential-env`; `--dry-run --json` מדווח רק על
נוכחות/צורה מחוקה. `providers available` קורא את קטלוג OmniRoute;
`providers list/test/test-all/validate` שומרים על ההתנהגות המקומית של SQLite שלהם ואינם דורשים שהשרת יהיה פועל.
### שחזור ואיפוס
```bash
omniroute reset-password # אפס את סיסמת המנהל (גם: omniroute-reset-password)
omniroute reset-encrypted-columns # הצג אזהרה + דלג עבור איפוס הסמכה מוצפנת
omniroute reset-encrypted-columns --force # באמת נעל את ההסמכות המוצפנות ב-SQLite
```
### ייצוא הסמכה (⚠ יש לטפל בזה בזהירות)
```bash
omniroute auth export # הצג אזהרה + שער אישור — אין גישה ל-DB
omniroute auth export --force # ייצא את כל ההסמכות המפוענחות של כל החיבורים ל-stdout כ-JSON
omniroute auth export --force --id <id> # ייצא רק את החיבור התואם
omniroute auth export --force --format env # פלט OMNIROUTE_<PROVIDER>_<FIELD>=<value> שורות
omniroute auth export --force --out creds.json # כתוב לקובץ (נוצר עם הרשאות 0600)
```
`auth export` הוא **מקומי בלבד** (קריאה ישירה מ-SQLite, ללא נתיב HTTP) ומדפיס/כותב
**טקסט ברור** של ערכי `apiKey`/`accessToken`/`refreshToken`/`idToken` — זו התכונה, לא
באג. שום דבר לא נקרא מהמסד נתונים, ושום דבר לא מפוענח, ללא `--force`. תמיד מודפס דגל אזהרה ב-stderr לפני כל פלט טקסט ברור. נדרש להגדיר את `STORAGE_ENCRYPTION_KEY`.
שדה שנכשל לפענח (מפתח ישן, טקסט מוצפן פגום) מדווח כ
`<field>DecryptFailed: true` במקום להפסיק את כל הייצוא או לדלוף את השגיאה הבסיסית.
### פקודות משנה אחרות
אלו מניחות ששרת OmniRoute פועל, אלא אם כן צוין אחרת:
```bash
omniroute status # מצב ריצה מקיף
omniroute logs # זרם יומני בקשות (--json, --search, --follow)
omniroute config show # הצג קונפיגורציה נוכחית
omniroute provider list # רשום ספקים זמינים (כינוי של providers list)
omniroute provider add # רשם את OmniRoute כספק על כלי
omniroute keys add | list | remove # ניהול מפתחות API
omniroute models [provider] # רשום מודלים (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # צלם קונפיגורציה + DB
omniroute restore # שחזר מצילום קודם
omniroute health # בריאות מפורטת (מפסקי זרם, מטמון, זיכרון)
omniroute quota # שימוש במכסה של הספק
omniroute cache # מצב המטמון
omniroute cache clear # נקה את המטמון הסמנטי + החתימות
omniroute mcp status | restart # מצב שרת MCP / הפעלה מחדש
omniroute a2a status | card # מצב שרת A2A / כרטיס סוכן
omniroute tunnel list | create | stop # ניהול מנהרות (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # בדוק / הגדר משתני סביבה (זמני)
omniroute test # בדיקת חיבוריות ספק
omniroute update # בדוק אם יש עדכונים
omniroute completion # צור השלמה של shell
```
### דגלים נפוצים
| דגל | תיאור |
| ------------------- | ---------------------------------------------- |
| `--no-open` | אל תפתח אוטומטית את הדפדפן בהפעלה |
| `--port <n>` | החלף את פורט ה-API (ברירת מחדל 20128) |
| `--mcp` | פעל כשרת MCP דרך stdio (עבור IDEs) |
| `--non-interactive` | מצב CI (ללא הנחיות; קורא ממשתני סביבה/דגלים) |
| `--json` | פלט JSON קריא למכונה (doctor, providers, וכו') |
| `--help`, `-h` | הצג עזרה ספציפית לפקודה |
| `--version`, `-v` | הדפס את הגרסה המותקנת |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## נקודות קצה זמינות של API
## Built-in Agents: Droid & OpenClaw
| נקודת קצה | תיאור | שימוש עבור |
| -------------------------- | ------------------------- | ------------------------------ |
| `/v1/chat/completions` | צ'אט סטנדרטי (כל הספקים) | כל הכלים המודרניים |
| `/v1/responses` | API תגובות (פורמט OpenAI) | Codex, זרימות עבודה אגנטיות |
| `/v1/completions` | השלמות טקסט ישנות | כלים ישנים המשתמשים ב`prompt:` |
| `/v1/embeddings` | הטמעות טקסט | RAG, חיפוש |
| `/v1/images/generations` | יצירת תמונות | GPT-Image, Flux, וכו' |
| `/v1/audio/speech` | טקסט לדיבור | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | דיבור לטקסט | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
דוגמאות מוכנות להדבקה עם URL של OmniRoute עם טוקנים:
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Standard OpenAI base: http://localhost:20128/v1
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## פתרון בעיות
| שגיאה | סיבה | תיקון |
| -------------------------------------------- | ------------------- | --------------------------------------------- |
| `Connection refused` | OmniRoute לא פועל | `omniroute serve` |
| `401 Unauthorized` | מפתח API שגוי | בדוק ב`/dashboard/api-manager` |
| `No combo configured` | אין קומבינציה פעילה | הגדר ב`/dashboard/combos` |
| CLI shows "not installed" | בינארי לא ב-PATH | בדוק `which <command>` |
| Dashboard shows "not detected" after install | מטמון ישן | לחץ על "⟳ רענן גילוי" בלוח המחוונים |
| Old link `/dashboard/cli-tools` | סימניה לפני v3.8.6 | מופנה אוטומטית ל`/dashboard/cli-code` (308) |
| Old link `/dashboard/agents` | סימניה לפני v3.8.6 | מופנה אוטומטית ל`/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,315 +0,0 @@
# CLI-INTEGRATIONS (हिन्दी)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI इंटीग्रेशन — किसी भी कोडिंग CLI को OmniRoute पर पॉइंट करें"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI इंटीग्रेशन
OmniRoute एक परिवार के `setup-*` कमांड्स के साथ आता है जो एक कोडिंग
CLI (Codex, Claude Code, OpenCode, Cline, …) को OmniRoute को उसके बैकएंड के रूप में उपयोग करने के लिए कॉन्फ़िगर करता है — ताकि
उपकरण **एक** एंडपॉइंट से बात करे और OmniRoute सही प्रदाता की ओर रूट करता है
ऑटो-फॉलबैक के साथ। प्रत्येक कमांड एक चल रहे
OmniRoute (स्थानीय या दूरस्थ) से **लाइव** मॉडल कैटलॉग पढ़ता है और **आपके**
मशीन पर उपकरण की अपनी कॉन्फ़िग फ़ाइल लिखता है। API कुंजी को एक पर्यावरण चर द्वारा संदर्भित किया जाता है जहाँ भी उपकरण
इसे समर्थन करता है। उपकरण-स्थानीय पर्यावरण फ़ाइल को बनाए रखने वाले कमांड नीचे नोट किए गए हैं।
एक सामान्य लॉन्चर भी है — `omniroute run <target>` — जो
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` या `gemini` को सही वातावरण के साथ इंजेक्ट करता है, बिना किसी कॉन्फ़िगरेशन को लिखे। लक्ष्यों और उनके
उपनामों को मानक मैनिफेस्ट `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`) से प्राप्त किया जाता है, और `omniroute completion` वही मैनिफेस्ट-व्युत्पन्न लक्ष्य शब्द प्रदान करता है। पुराने प्रति-उपकरण लॉन्चर —
`omniroute launch` (Claude Code) और `omniroute launch-codex` (Codex) — उपलब्ध रहते हैं।
प्रदाता ऑनबोर्डिंग उसी स्थानीय/दूरस्थ संदर्भ से उपलब्ध है। नीचे दिए गए
API-प्रथम कमांड प्रबंधन प्रमाणीकरण को प्रदाता
क्रेडेंशियल्स से अलग रखते हैं और कभी भी संरचित आउटपुट में क्रेडेंशियल नहीं प्रिंट करते हैं:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
स्क्रिप्ट के लिए, `--credential-stdin` या `--credential-env` को प्राथमिकता दें; `--credential`
नियंत्रित स्थानीय उपयोग के लिए बनाए रखा गया है। `providers remove` को एक
गैर-इंटरैक्टिव टर्मिनल पर `--yes` की आवश्यकता होती है, और सभी पांच कमांड सक्रिय संदर्भ या वैश्विक `--base-url`/`--api-key` विकल्पों का सम्मान करते हैं।
दो सबसे समृद्ध इंटीग्रेशनों की एक बार की, हाथ से लिखी गई बेस सेटअप के लिए, प्रति-उपकरण गहरे डाइव देखें:
- [Claude Code कॉन्फ़िगरेशन](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI कॉन्फ़िगरेशन](./CODEX-CLI-CONFIGURATION.md)
- [दूरस्थ मोड](./REMOTE-MODE.md) — अपने लैपटॉप से एक दूरस्थ OmniRoute (VPS / Tailnet) चलाएं
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot एक्सटेंशन; यह आपके लिए संपादक के अंदर से भी इन
`setup-*` कमांड्स को चला सकता है
---
## मास्टर तालिका
हर कमांड **सक्रिय संदर्भ** का सम्मान करता है (जिसे `omniroute connect` के साथ सेट किया गया है, देखें
[दूरस्थ मोड](./REMOTE-MODE.md)) या स्पष्ट `--remote <url> --api-key <key>` फ्लैग। "स्थानीय बनाम दूरस्थ" का अर्थ है: बिना किसी फ्लैग के यह `http://localhost:20128` को लक्षित करता है;
`--remote` (या एक सक्रिय दूरस्थ संदर्भ) के साथ यह उस सर्वर से कैटलॉग लाता है और कॉन्फ़िगरेशन को स्थानीय रूप से लिखता है।
| कमांड | उपकरण | यह क्या लिखता | प्रमुख फ्लैग्स | स्थानीय बनाम दूरस्थ |
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — एक संगत पाठ मॉडल के लिए एक प्रोफ़ाइल (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | दोनों |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — एक मेल खाने वाले मॉडल के लिए एक प्रोफ़ाइल (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | दोनों |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json``omniroute` प्रदाता के साथ हर कैटलॉग मॉडल (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | दोनों |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI मोड) + VS Code एक्सटेंशन सेटिंग्स प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | दोनों |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + यदि मौजूद हो तो VS Code `settings.json` में `kilocode.*` को मर्ज करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | दोनों |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` मॉडल, कुंजी के माध्यम से `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोनों |
| `omniroute setup-cursor` | Cursor | कुछ नहीं — ऐप में चरणों को प्रिंट करता है (Cursor कॉन्फ़िगरेशन अपारदर्शी SQLite है) | `--remote` `--api-key` `--only` `--port` | दोनों |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (आयात दस्तावेज़) + यदि एक VS Code `settings.json` मौजूद है तो `roo-cline.autoImportSettingsPath` सेट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | दोनों |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` प्रदाता, कुंजी के माध्यम से `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोनों |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + पर्यावरण नुस्खा प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोनों |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + पर्यावरण नुस्खा प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोनों |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` ऐरे + `OMNIROUTE_API_KEY` `~/.qwen/.env` में | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | दोनों |
| `omniroute run <target>` | रनटाइम लॉन्च (सामान्य) | कुछ नहीं — सही वातावरण और तर्कों के साथ `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` को स्पॉन करता है; Qwen और Gemini अस्थायी अलग घर का उपयोग करते हैं | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | दोनों |
| `omniroute launch` | Claude Code | कुछ नहीं — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` को इंजेक्ट करके `claude` को स्पॉन करता है | `--remote` `--api-key` `--token` `--profile` `--port` | दोनों |
| `omniroute launch-codex` | OpenAI Codex CLI | कुछ नहीं — `-c` फ्लैग्स के माध्यम से `omniroute` प्रदाता को इंजेक्ट करके `codex` को स्पॉन करता है | `--remote` `--api-key` `--profile` (`-p`) `--port` | दोनों |
फ्लैग्स पर नोट्स (कमांड स्रोत में सत्यापित):
- `--remote <url>` — एक दूरस्थ OmniRoute से कैटलॉग लाता है (यह `--port`
और सक्रिय संदर्भ को ओवरराइड करता है)। `--api-key <key>` उस
सर्वर के लिए क्रेडेंशियल प्रदान करता है (डिफ़ॉल्ट रूप से `OMNIROUTE_API_KEY` पर्यावरण चर, या सक्रिय संदर्भ के टोकन पर)।
- `--only <patterns>` — अल्पविराम से अलग उपस्ट्रिंग्स; केवल उन मॉडल आईडी को रखें जो मेल खाते हैं
(जैसे `--only glm,kimi`)। `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` पर उपलब्ध है।
- `--dry-run` — फ़ाइल सिस्टम को छुए बिना ठीक वही प्रिंट करें जो लिखा जाएगा। हर `setup-*` कमांड पर उपलब्ध है **सिवाय** `setup-cursor`
(जो कभी भी फ़ाइल नहीं लिखता)।
- `--model <id>` — आवश्यक (या इंटरैक्टिव रूप से चुना गया) उन उपकरणों के लिए जिनमें कोई
मॉडल ऑटो-डिस्कवरी नहीं है: Cline, Kilo, Roo, Goose, Qwen, Aider। उन उपकरणों को
गैर-इंटरैक्टिव रन के लिए `--yes` भी स्वीकार करते हैं (जिसके लिए फिर `--model` की आवश्यकता होती है)।
`setup-opencode` डिफ़ॉल्ट शीर्ष-स्तरीय मॉडल सेट करने के लिए `--model` लेता है।
- `--model <id>` पर `omniroute run` मैनिफेस्ट के प्रति-लक्ष्य वायरिंग का पालन करता है
(`bin/cli/cli-manifest.mjs`): **aider** को `--model openai/<id>` प्राप्त होता है और
**opencode** को `--model omniroute/<id>` (प्रिफिक्स केवल तब जोड़ा जाता है जब आईडी
पहले से ही इसे नहीं ले जाती); **qwen** और **gemini** को आईडी वर्बटिम प्राप्त होता है;
**claude** को `ANTHROPIC_MODEL` के माध्यम से मिलता है, **goose** को `GOOSE_MODEL` के माध्यम से, और
**codex** को `-c model_providers.omniroute.*` तर्कों के माध्यम से। **Qwen एकमात्र रन
लक्ष्य है जिसे `--model` की सख्त आवश्यकता है** — `omniroute run qwen` इसके बिना `2` के साथ
स्पष्ट त्रुटि के साथ समाप्त होता है।
- `--port <port>` — स्थानीय OmniRoute पोर्ट (डिफ़ॉल्ट `20128`, जब `--remote`
सेट होता है तो अनदेखा किया जाता है)। सभी `setup-*` और दोनों लॉन्चरों पर मौजूद है।
- `omniroute run` निकासी कोड: बच्चे CLI का अपना निकासी कोड वर्बटिम प्रकट होता है;
`2` = अमान्य तर्क (असमर्थित लक्ष्य, आवश्यक `--model` गायब, कंटेनर गार्ड); `127` = लक्ष्य बाइनरी `PATH` में नहीं है;
`130`/`143`/`129` जब लॉन्च को `SIGINT`/`SIGTERM`/`SIGHUP` द्वारा समाप्त किया जाता है;
`1` = अन्य रनटाइम लॉन्च विफलता।
- दोनों लॉन्चर (`launch`, `launch-codex`) `--profile <name>` को स्वीकार करते हैं ताकि
`setup-claude` / `setup-codex` द्वारा लिखी गई प्रोफ़ाइल का चयन किया जा सके, साथ ही
अंतर्निहित `claude` / `codex` बाइनरी के लिए पास-थ्रू तर्क।
इंटरएक्टिव पिकर सेटअप व्यंजनों द्वारा भी साझा किया गया है:
```bash
# सक्रिय स्थानीय या दूरस्थ मॉडल कैटलॉग से चुनें और लक्ष्य को कॉन्फ़िगर करें।
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` वर्तमान में `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, और `kilo` के लिए परीक्षण किए गए व्यंजनों को सौंपता है। IDE-केवल,
MITM, और गाइड-केवल कैटलॉग प्रविष्टियाँ स्पष्ट `setup-*`/मैनुअल प्रवाह के रूप में बनी रहती हैं और लॉन्च करने योग्य लक्ष्यों के रूप में प्रस्तुत नहीं की जाती हैं।
> `setup-opencode` **हल्का openai-संगत** OpenCode इंटीग्रेशन है।
> एक समृद्ध प्लगइन इंटीग्रेशन भी है — `omniroute setup opencode` — जो
> `@omniroute/opencode-plugin` स्थापित करता है। ये अलग-अलग कमांड हैं; ऊपर की तालिका
> `setup-opencode` का दस्तावेजीकरण करती है।
---
## स्थानीय उपयोग
जब OmniRoute `localhost:20128` पर चल रहा हो, तो बस अपने टूल के लिए सेटअप कमांड चलाएँ। कैटलॉग स्थानीय सर्वर से लाया जाता है।
```bash
# Codex: मेल खाने वाले मॉडल के लिए ~/.codex/ में एक प्रोफ़ाइल लिखें
omniroute setup-codex
codex --profile glm52 # एक उत्पन्न प्रोफ़ाइल का उपयोग करें
# Claude Code: प्रति-मॉडल प्रोफ़ाइल लिखें, फिर एक लॉन्च करें
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: सभी कैटलॉग मॉडलों के साथ openai-संगत प्रदाता लिखें
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} के माध्यम से संदर्भित, कभी भी डिस्क पर नहीं
opencode -m omniroute/glm/glm-5.2 "..."
# ऑटो-डिस्कवरी के बिना टूल को एक स्पष्ट मॉडल की आवश्यकता होती है:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# कुछ भी लिखे बिना पूर्वावलोकन करें:
omniroute setup-continue --dry-run
```
बिल्कुल भी कॉन्फ़िगरेशन लिखे बिना लॉन्च करें (केवल env-injection):
```bash
omniroute launch # Claude Code → स्थानीय OmniRoute
omniroute launch-codex # Codex CLI → स्थानीय OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# स्पष्ट कमांड पथ: जो भी -- के बाद आता है उसे पास करें
omniroute run claude -- --print-system-prompt "इस अंतर की समीक्षा करें"
```
---
## दूरस्थ उपयोग
किसी भी सेटअप कमांड को `--remote` + `--api-key` के साथ एक दूरस्थ OmniRoute पर इंगित करें। कैटलॉग दूरस्थ से लाया जाता है; कॉन्फ़िगरेशन आपके स्थानीय मशीन पर लिखा जाता है।
```bash
# एक दूरस्थ VPS के खिलाफ OpenCode, केवल glm/kimi मॉडल रखें
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # पहले OMNIROUTE_API_KEY निर्यात करें
# एक दूरस्थ कैटलॉग से Codex प्रोफ़ाइल
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# सीधे दूरस्थ के खिलाफ एक CLI लॉन्च करें
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
हर बार `--remote`/`--api-key` पास करने के बजाय, एक बार लॉगिन करें और **सक्रिय संदर्भ** उन्हें स्वचालित रूप से प्रदान करने दें:
```bash
omniroute connect 192.168.0.15 # एक स्कोप्ड टोकन बनाता है, संदर्भ को संग्रहीत करता है
omniroute setup-codex # ← अब दूरस्थ कैटलॉग का उपयोग करता है
omniroute setup-opencode # ← वही
omniroute launch # ← Claude Code दूरस्थ के खिलाफ
```
संदर्भ, स्कोप और टोकन प्रबंधन के लिए [दूरस्थ मोड](./REMOTE-MODE.md) देखें।
---
## बेस URL परंपराएँ (जो टूल `/v1` चाहते हैं)
OmniRoute OpenAI सतह को `/v1` पर, एंथ्रोपिक सतह को रूट पर, और एक मूल जेमिनी सतह को `/v1beta` पर उजागर करता है। प्रत्येक एकीकरण उस रूप में वायर्ड है जिसकी इसकी टूल अपेक्षा करती है (कमांड स्रोत में सत्यापित):
| एकीकरण | बेस URL लिखा गया | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ----------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | रूट | नहीं — Cline `/v1/chat/completions` जोड़ता है |
| `setup-goose` (`OPENAI_HOST`) | रूट | नहीं — Goose पथ जोड़ता है |
| `setup-aider` (`OPENAI_API_BASE`) | रूट | नहीं — LiteLLM `/v1/chat/completions` जोड़ता है |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` के साथ | हाँ |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | रूट | नहीं — Claude Code `/v1/messages` जोड़ता है |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` के साथ | हाँ |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` के साथ | हाँ |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | रूट | नहीं — SDK `/v1beta/models/…` जोड़ता है |
---
## अपडेट पर स्थानीय निर्भरताएँ बनाए रखना: `--include=optional`
जब आप `omniroute update` के साथ अपडेट करते हैं (पुष्टि करने के बाद, या `--apply` के साथ),
OmniRoute `--include=optional` के साथ इंस्टॉल चलाता है:
```bash
npm install -g omniroute@latest --include=optional
```
यह **नहीं** है एक ध्वज जिसे आप `omniroute update` को पास करते हैं — यह हमेशा
अपडेटर द्वारा लागू किया जाता है। यह सुनिश्चित करता है कि `optionalDependencies`
(`better-sqlite3`, `keytar`, `tls-client`, LLMLingua SLM स्टैक) अपडेट के दौरान जीवित
रहें, भले ही आपकी npm कॉन्फ़िगरेशन में `omit=optional` सेट हो, जो अन्यथा
स्थानीय SQLite ड्राइवर और OS-keyring बाइंडिंग को चुपचाप हटा देगा। बिना लागू किए
सटीक कमांड का पूर्वावलोकन करने के लिए:
```bash
omniroute update --dry-run
# [DRY RUN] चलाएगा: npm install -g omniroute@latest --include=optional
```
अन्य `omniroute update` ध्वज (स्रोत में सत्यापित): `--check` (यदि पुराना है तो
एक्ज़िट 1), `--apply` (बिना संकेत के इंस्टॉल करें), `--changelog`, `--no-backup`,
`--yes`
---
## Google Gemini CLI के माध्यम से `omniroute run gemini`
`@google/gemini-cli` 0.50.0 के खिलाफ अनुबंध सत्यापित: CLI
`GOOGLE_GEMINI_BASE_URL` का सम्मान करता है और `POST /v1beta/models/<model>:generateContent`
(और `:streamGenerateContent?alt=sse`) इसके खिलाफ जारी करता है — बिल्कुल OmniRoute का
स्थानीय Gemini सतह (`/v1beta`)। `omniroute run gemini` इसे स्वचालित रूप से कनेक्ट करता है:
- `GOOGLE_GEMINI_BASE_URL` → सक्रिय OmniRoute बेस URL (रूट, कोई `/v1` नहीं);
- `GEMINI_API_KEY` → हल किया गया OmniRoute क्रेडेंशियल (विकल्प/पर्यावरण/संदर्भ);
- एक **अस्थायी अलग `GEMINI_CLI_HOME`** जिसका `.gemini/settings.json`
`gemini-api-key` प्रमाणीकरण का चयन करता है, ताकि एक संग्रहीत Google OAuth सत्र
(कोड सहायता) कभी भी OmniRoute-निर्देशित लॉन्च को ओवरराइड न करे — निकासी के बाद हटा दिया जाता है;
- **पर्यावरण स्वच्छता**: बच्चे का पर्यावरण `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` और `GOOGLE_GENAI_USE_GCA` से साफ किया गया है (जो
प्रमाणीकरण को Vertex/Code Assist पर पुनर्निर्देशित करेगा), और `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` को
बेल्ट-और-सस्पेंडर्स बैकअप के रूप में सेट किया गया है — अन्य `run` लक्ष्य अपने
स्वयं के संघर्षशील चर के लिए समान उपचार प्राप्त करते हैं;
- `--model <id>` का इंजेक्शन `--provider`/`--model` से।
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini का कार्यक्षेत्र-विश्वास गार्ड अभी भी हेडलेस मोड में लागू होता है —
`--skip-trust` पास करें (या इंटरैक्टिव रूप से निर्देशिका पर विश्वास करें); लॉन्चर
जानबूझकर इसे बायपास नहीं करता है। यह लॉन्चर **ACP पंजीकरण** (`src/lib/acp/registry.ts`, `gemini --acp`) से भिन्न है,
जो `/dashboard/acp-agents` के लिए एजेंट-प्रोटोकॉल एकीकरण बना रहता है।
---
## वास्तविक धुआँ स्वेप (ऑप्ट-इन)
निर्धारणीय लॉन्च-प्लान रिग्रेशन CI में चलता है (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`)। एक वास्तविक OmniRoute सर्वर के खिलाफ वास्तविक
बाइनरी को मान्य करने के लिए, एक ऑप्ट-इन हार्नेस है
`tests/integration/upstream-cli-smoke.int.test.ts` पर। यह स्वचालित रूप से कभी नहीं चलता
(हर उप-परीक्षण छोड़ दिया जाता है जब तक `RUN_CLI_SMOKE=1` न हो), क्रेडेंशियल को
पर्यावरण-चर नाम द्वारा पास करता है (कभी भी मान द्वारा नहीं), किसी भी रिकॉर्ड किए गए
आउटपुट से कुंजी-आकार की स्ट्रिंग को छुपाता है, उन लक्ष्यों को छोड़ देता है जिनका
बाइनरी स्थापित नहीं है, और विफलताओं को प्रमाणीकरण / अपस्ट्रीम / कॉन्फ़िगरेशन के रूप में वर्गीकृत करता है
न कि एक साधारण बूलियन के रूप में:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
वैकल्पिक: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` स्वेप को सीमित करता है;
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120 सेकंड प्रति-लक्ष्य टाइमआउट को ओवरराइड करता है।
---
## अन्य देखें
- [Claude Code कॉन्फ़िगरेशन](./CLAUDE-CODE-CONFIGURATION.md) — गहरे Claude Code गाइड
- [Codex CLI कॉन्फ़िगरेशन](./CODEX-CLI-CONFIGURATION.md) — एक बार का `[model_providers.omniroute]` बेस सेटअप
- [Remote Mode](./REMOTE-MODE.md) — संदर्भ, स्कोप्ड एक्सेस टोकन, एक दूरस्थ सर्वर को चलाना
- [CLI Tools संदर्भ](../reference/CLI-TOOLS.md) — समर्थित उपकरणों + डैशबोर्ड पृष्ठों की पूरी सूची
- [सेटअप गाइड](./SETUP_GUIDE.md) — इंस्टॉलेशन विधियाँ और पहले रन का ऑनबोर्डिंग

View File

@@ -1,313 +1,86 @@
# CLI-TOOLS (हिन्दी)
# CLI Tools Setup Guide — OmniRoute (हिन्दी)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI उपकरण — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI उपकरण — OmniRoute
अंतिम अपडेट: 2026-08-18
OmniRoute तीन श्रेणियों के CLI उपकरणों के साथ एकीकृत होता है जो तीन समर्पित डैशबोर्ड पृष्ठों में फैले होते हैं:
| पृष्ठ | मार्ग | अवधारणा | संख्या |
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------ | --------------- |
| **CLI कोड** | `/dashboard/cli-code` | कोडिंग उपकरण जिन्हें आप OmniRoute पर इंगित करते हैं (क्लाइंट → CLI → OmniRoute → प्रदाता) | 26 |
| **CLI एजेंट** | `/dashboard/cli-agents` | स्वायत्त एजेंट जिन्हें आप OmniRoute पर इंगित करते हैं (समान प्रवाह, व्यापक दायरा) | 8 |
| **ACP एजेंट** | `/dashboard/acp-agents` | CLIs जो OmniRoute stdio/ACP के माध्यम से बैकएंड के रूप में उत्पन्न करता है (विपरीत प्रवाह) | रजिस्ट्रि देखें |
विरासत मार्ग 308 के माध्यम से पुनर्निर्देशित होते हैं: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## यह कैसे काम करता है
## How It Works
```
CLI कोड / CLI एजेंट (उपभोग प्रवाह):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (सभी OmniRoute पर इंगित करते हैं)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute सही प्रदाता की ओर मार्ग करता है)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP एजेंट (विपरीत उत्पन्न प्रवाह):
क्लाइंट अनुरोध → OmniRoute → stdio/ACP के माध्यम से CLI उत्पन्न करता है → प्रतिक्रिया
```
**लाभ:**
**Benefits:**
- सभी उपकरणों को प्रबंधित करने के लिए एक API कुंजी
- डैशबोर्ड में सभी CLIs के बीच लागत ट्रैकिंग
- हर उपकरण को फिर से कॉन्फ़िगर किए बिना मॉडल स्विचिंग
- स्थानीय और दूरस्थ सर्वरों (VPS, Docker, Akamai, Cloudflare Tunnel) पर काम करता है
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*` के साथ स्वचालित कॉन्फ़िगर करें
## Supported Tools (Dashboard Source of Truth)
आपको प्रत्येक उपकरण की कॉन्फ़िगरेशन हाथ से लिखने की आवश्यकता नहीं है। OmniRoute एक `setup-*`
कमांड प्रदान करता है जो एक चल रहे OmniRoute (स्थानीय या दूरस्थ) से **लाइव** मॉडल कैटलॉग पढ़ता है
और आपके मशीन पर उपकरण की अपनी कॉन्फ़िगरेशन लिखता है:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
प्रत्येक `--remote <url> --api-key <key>` स्वीकार करता है (एक दूरस्थ OmniRoute के खिलाफ एक स्थानीय उपकरण कॉन्फ़िगर करें), `--dry-run` (लिखे बिना पूर्वावलोकन), और `--port`। मॉडल स्वचालित खोज के बिना उपकरण (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` लेते हैं (और गैर-इंटरैक्टिव रन के लिए `--yes`)। CLI को सही वातावरण के साथ लॉन्च करने के लिए और बिना किसी कॉन्फ़िगरेशन के, सामान्य `omniroute run <target>` लॉन्चर का उपयोग करें (claude, codex, aider, goose, opencode, qwen, gemini — लक्ष्य और उपनाम `bin/cli/cli-manifest.mjs` से आते हैं); विरासत प्रति-उपकरण लॉन्चर `omniroute launch` (Claude Code) और `omniroute launch-codex` (Codex) उपलब्ध रहते हैं। Gemini CLI केवल लॉन्च-केवल है: यह एक `omniroute run` लक्ष्य है लेकिन इसका कोई `setup-*`/`configure` नुस्खा नहीं है।
### CLI fingerprint sync (Agents + Settings)
> **पूर्ण संदर्भ:** मास्टर तालिका — प्रत्येक कमांड क्या लिखता है, हर ध्वज,
> स्थानीय बनाम दूरस्थ, और कौन से उपकरण `/v1` उपसर्ग चाहते हैं —
> **[CLI Integrations](../guides/CLI-INTEGRATIONS.md)** में उपलब्ध है।
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### कंटेनर के अंदर इन्हें चलाना
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute कंटेनर के अंदर निष्पादित `setup-*` कमांड कंटेनर के अपने होम में लिखता है, जिसे कोई होस्ट CLI नहीं पढ़ता है और जो कंटेनर के साथ गायब हो जाता है। OmniRoute इसे पहचानता है और लिखने के बजाय निर्देशों के साथ `2` के साथ बाहर निकलता है। आगे बढ़ने के दो समर्थित तरीके हैं — होस्ट पर CLI स्थापित करें और कंटेनर से `omniroute connect` करें, या कॉन्फ़िगरेशन डायरियों को बाइंड-माउंट करें और `CLI_CONFIG_HOME` सेट करें (कॉम्पोज़ `host` प्रोफ़ाइल)। प्रत्येक `setup-*` कमांड, साथ ही `omniroute configure` और `omniroute config set`, `--allow-container-write` स्वीकार करता है जब आप वास्तव में कंटेनर के अपने CLIs को कॉन्फ़िगर करना चाहते थे; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` सर्वर के लिए वही करता है। देखें
[Docker Guide → होस्ट CLI उपकरणों को कॉन्फ़िगर करना](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker)।
डैशबोर्ड का **apply endpoint** (`POST /api/cli-tools/apply`) वही सुरक्षा लागू करता है: एक कंटेनर में, एक लिखना जिसका लक्ष्य होस्ट से बाइंड-माउंट नहीं किया गया है, **`422`** के साथ उत्तर देता है जिसमें `containerEphemeralTarget: true`, सुरक्षित त्रुटि पाठ और — उन उपकरणों के लिए जिनका होस्ट नुस्खा है (claude, codex, opencode, cline, kilo, continue) — एक `hostSetupCommand` (जैसे `omniroute setup-opencode`) जो होस्ट पर चलाने के लिए है; कुछ भी नहीं लिखा गया है। `dryRun: true` कंटेनर मोड में काम करता रहता है और उत्पन्न सामग्री + लक्ष्य पथ को बिना डिस्क को छुए लौटाता है, ताकि आप डैशबोर्ड से पूर्वावलोकन कर सकें और होस्ट पर लागू कर सकें। यह व्यवहार जानबूझकर है और
`tests/unit/api/cli-tools/apply-container-guard.test.ts` द्वारा पुनरावृत्ति-रक्षा की गई है — कभी भी "फिक्स" न करें 422 को सुरक्षा को हटाकर।
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## सत्य का स्रोत
## Step 1 — Get an OmniRoute API Key
एकीकृत कैटलॉग `src/shared/constants/cliTools.ts` में `CLI_TOOLS: Record<string, CliCatalogEntry>` के रूप में स्थित है।
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
प्रत्येक प्रविष्टि में ये फ़ील्ड होते हैं (जो `src/shared/schemas/cliCatalog.ts` में परिभाषित हैं):
| फ़ील्ड | प्रकार | विवरण |
| ----------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | उपकरण किस पृष्ठ पर दिखाई देता है |
| `vendor` | `string` | उपकरण का मूल ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP एजेंट के रूप में भी उपयोग किया जा सकता है (बैज दिखाया गया) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | कस्टम एंडपॉइंट समर्थन स्तर। `"none"` = MITM बैकलॉग |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | कॉन्फ़िगरेशन तंत्र |
| `id`, `name`, `color`, `description`, `docsUrl` | मानक | मुख्य प्रदर्शन फ़ील्ड |
जिन प्रविष्टियों में `baseUrlSupport: "none"` है, वे **डैशबोर्ड पृष्ठों** में **नहीं दिखाई देती** हैं — वे योजना 11 के लिए MITM बैकलॉग में पंजीकृत हैं (देखें `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`)।
### क्षमता स्तर (कैटलॉग किए गए × पता लगाने योग्य × कॉन्फ़िगर करने योग्य × लॉन्च करने योग्य)
हर कैटलॉग किए गए उपकरण को पता लगाया जा सकता है, कॉन्फ़िगर किया जा सकता है या लॉन्च किया जा सकता है। प्रत्येक स्तर में एक
घोषित स्रोत होता है, और एक ड्रिफ्ट परीक्षण उन्हें संरेखित रखता है:
| स्तर | अर्थ | घोषित किया गया |
| ------------------------ | ----------------------------------------------------------------------------- | --------------------------------------------------------------- |
| **कैटलॉग किए गए** | डैशबोर्ड कैटलॉग में दिखाई देता है (नाम, विक्रेता, दस्तावेज़, कॉन्फ़िग प्रकार) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **पता लगाने योग्य** | बाइनरी/कॉन्फ़िगरेशन पहचान, स्वास्थ्य जांच, कॉन्फ़िग पथ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` रनटाइम कैटलॉग) |
| **कॉन्फ़िगर करने योग्य** | `omniroute configure <cli>` द्वारा समर्थित (सेटअप नुस्खा मौजूद है) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **लॉन्च करने योग्य** | `omniroute run <target>` द्वारा समर्थित (env/args इंजेक्शन परिभाषित) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` CLI कमांड के लिए मानक निष्पादन योग्य मैनिफेस्ट है
सतहें: `run`, `configure` और शेल-पूर्णता जनरेटर सभी अपने
लक्ष्य सूचियों, उपनाम समाधान (उदाहरण के लिए `kilocode`/`kilo-code`/`kilo_cli``kilo`)
और `--model` ध्वज वायरिंग से इसे प्राप्त करते हैं। ड्रिफ्ट गार्ड
`tests/unit/cli/cli-manifest-drift.test.ts` यह सुनिश्चित करता है कि मैनिफेस्ट, रनटाइम
कैटलॉग, UI कैटलॉग और प्रत्येक उपभोक्ता सतह समन्वय में रहें — एक लक्ष्य जो
एक सतह में जोड़ा गया है, बिना अन्य के विफलता की श्रृंखला को चुपचाप नहीं छोड़ता।
## 1. CLI कोड का कैटलॉग (26 उपकरण)
सभी उपकरण जो `/dashboard/cli-code` में दिखाई देते हैं। जिनके पास `baseUrlSupport: none` है, वे MITM या एक मैनुअल गाइड के माध्यम से जुड़े हुए हैं, न कि एक कस्टम बेस URL के माध्यम से:
| id | नाम | विक्रेता | baseUrlSupport | configType | acpSpawnable |
| ------------ | ------------------------ | ------------------------ | -------------- | ------------ | ------------ |
| claude | क्लॉड कोड | एंथ्रोपिक | पूर्ण | env | सच |
| codex | OpenAI Codex CLI | OpenAI | पूर्ण | कस्टम | सच |
| zcode | ZCode (GLM कोडिंग योजना) | Z.ai | कोई नहीं | कस्टम | झूठ |
| cline | क्लाइन | OSS (पूर्व- क्लॉड डेवलप) | पूर्ण | कस्टम | सच |
| kilo | किलो कोड | किलो-ऑर्ग | पूर्ण | कस्टम | झूठ |
| roo | रू कोड | रू (OSS) | पूर्ण | गाइड | झूठ |
| continue | कंटिन्यू | continue.dev | पूर्ण | गाइड | झूठ |
| aider | आइडर | OSS (P. गॉथियर) | पूर्ण | गाइड | सच |
| forge | फोर्जकोड | एंटिनोमी HQ | पूर्ण | कस्टम | सच |
| jcode | jcode | 1jehuang (OSS) | पूर्ण | कस्टम | झूठ |
| deepseek-tui | डीपसीक TUI | हंटर बाउन (OSS) | पूर्ण | कस्टम | झूठ |
| codewhale | कोडव्हेल | एचएमबॉउन (OSS) | पूर्ण | कस्टम | झूठ |
| opencode | ओपनकोड | एनामली (पूर्व-SST) | पूर्ण | गाइड | सच |
| droid | फैक्ट्री ड्रॉइड | फैक्ट्री एआई | आंशिक | गाइड | झूठ |
| copilot | GitHub Copilot CLI | GitHub/MS | पूर्ण | कस्टम | झूठ |
| cursor-cli | कर्सर CLI | एनिस्फीयर | आंशिक | गाइड | सच |
| smelt | स्मेल्ट | लियोनार्डसीसर (OSS) | पूर्ण | कस्टम | झूठ |
| pi | पाई (pi-coding-agent) | M. ज़ेच्नर (OSS) | पूर्ण | कस्टम | झूठ |
| grok-build | ग्रोक बिल्ड | xAI | पूर्ण | कस्टम | झूठ |
| crush | क्रश | OSS (चार्म) | पूर्ण | कस्टम | झूठ |
| qwen | क्यूवेन कोड | अलीबाबा | पूर्ण | गाइड | सच |
| cursor | कर्सर | एनिस्फीयर | कोई नहीं | गाइड | झूठ |
| antigravity | एंटीग्रेविटी | गूगल | कोई नहीं | mitm | झूठ |
| hermes | हर्मेस | नॉस रिसर्च | कोई नहीं | गाइड | झूठ |
| kiro | कीरो एआई | अमेज़न | कोई नहीं | mitm | झूठ |
| custom | कस्टम CLI | — | पूर्ण | कस्टम-बिल्डर | झूठ |
जिन उपकरणों में `baseUrlSupport: "partial"` है, वे डैशबोर्ड कार्ड में "⚠ बेस URL आंशिक" बैज दिखाते हैं।
## 2. CLI एजेंटों की सूची (8 उपकरण)
स्वायत्त एजेंट जो `/dashboard/cli-agents` में दिखाई देते हैं:
| id | नाम | विक्रेता | baseUrlSupport | acpSpawnable |
| ------------ | -------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | हर्मेस एजेंट | Nous Research | पूर्ण | झूठा |
| openclaw | ओपनक्लॉ | OSS (P. Steinberger) | पूर्ण | सच |
| goose | गूज | Block / Linux Foundation | पूर्ण | सच |
| interpreter | ओपन इंटरप्रेटर | OSS | पूर्ण | सच |
| warp | वार्प एआई | Warp Inc. | आंशिक | सच |
| agent-deck | एजेंट डेक | asheshgoplani (OSS) | पूर्ण | झूठा |
| omp | ओह माय पाई | OSS | पूर्ण | सच |
| letta | लेटा CLI | लेटा | पूर्ण | झूठा |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP एजेंट (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
यह पृष्ठ (जिसका नाम `/dashboard/agents` से बदला गया है) CLIs को दिखाता है जिन्हें OmniRoute **स्पॉन** कर सकता है बैकएंड निष्पादन इंजन के रूप में stdio/ACP प्रोटोकॉल के माध्यम से। सूची को `src/lib/acp/registry.ts` में अलग से बनाए रखा गया है और यह `CLI_TOOLS` के समान **नहीं** है।
---
## 4. MITM बैकलॉग (डैशबोर्ड में नहीं दिखाया गया)
निम्नलिखित CLIs स्वदेशी रूप से कस्टम बेस URL का समर्थन नहीं करते हैं और CLI कोड या CLI एजेंटों के पृष्ठों में **सूचीबद्ध नहीं** हैं। ये योजना 11 में MITM इंटरसेप्शन के लिए उम्मीदवार हैं:
| CLI | कारण |
| ------------------- | ---------------------------------------------------------- |
| windsurf | BYOK केवल चयनित क्लॉड मॉडल + कॉर्पोरेट URL/token |
| amp | बंद पारिस्थितिकी तंत्र (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO प्रमाणीकरण, कोई कस्टम URL नहीं |
| cowork | एंथ्रोपिक डेस्कटॉप, कोई कॉन्फ़िगर करने योग्य एंडपॉइंट नहीं |
पूर्ण क्रॉस-रेफरेंस के लिए `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` देखें।
---
## 5. बैच डिटेक्शन API
सभी उपकरण पहचान एकल एंडपॉइंट के माध्यम से एकत्रित की जाती है:
**`GET /api/cli-tools/all-statuses`**
- प्रमाणीकरण: `requireCliToolsAuth(request)` (अन्य `/api/cli-tools/` मार्गों के समान)
- लौटाता है: `Record<toolId, ToolBatchStatus>` (प्रकार: `src/shared/types/cliBatchStatus.ts`)
- रणनीति: सभी उपकरणों पर `Promise.all`, प्रति उपकरण 5 सेकंड का टाइमआउट
- कैश: इन-मेमोरी LRU कॉन्फ़िग फ़ाइल `mtime` द्वारा अनुक्रमित। जब mtime बदलता है तो कैश अमान्य हो जाता है। सर्वर पुनः आरंभ पर रीसेट होता है।
प्रत्येक उपकरण के लिए प्रतिक्रिया आकार:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // साफ किया गया, कोई स्टैक ट्रेस नहीं
}
```
## 6. नए उपकरणों के लिए सेटिंग हैंडलर
`configType: "custom"` वाले नए उपकरणों के लिए समर्पित सेटिंग्स API रूट हैं:
| रूट | उपकरण |
| ------------------------------------------- | -------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url फ्लैग) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, विरासती) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, प्राथमिक + विरासती `~/.deepseek` समन्वय) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi कोडिंग एजेंट |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + समर्पित `.env` कुंजी) |
सभी रूट्स त्रुटि प्रतिक्रियाओं के लिए `sanitizeErrorMessage()` का उपयोग करते हैं (कठोर नियम #12)।
---
## 7. डैशबोर्ड पृष्ठों की वास्तुकला
### CLI कोड (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — सर्वर घटक
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — क्लाइंट ग्रिड
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — उपकरण विवरण पृष्ठ
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 विशेष उपकरण कार्ड + `ToolDetailClient.tsx`
### CLI एजेंट (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — सर्वर घटक
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — क्लाइंट ग्रिड
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` का पुन: उपयोग करता है
### ACP एजेंट (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — सर्वर घटक ( `agents/` से स्थानांतरित)
### साझा UI घटक (`src/shared/components/cli/`)
| फ़ाइल | उद्देश्य |
| ----------------------- | ------------------------------------------------------ |
| `CliToolCard.tsx` | स्मार्ट स्थिति कार्ड (पता लगाना + कॉन्फ़िग + एंडपॉइंट) |
| `CliConceptCard.tsx` | प्रति-पृष्ठ अवधारणा व्याख्या कार्ड |
| `CliComparisonCard.tsx` | CLI प्रकारों के बीच तीन-स्तंभ तुलना |
| `BaseUrlSelect.tsx` | एंडपॉइंट ड्रॉपडाउन (स्थानीय/क्लाउड/कस्टम) |
| `ApiKeySelect.tsx` | API कुंजी चयनकर्ता |
| `ManualConfigModal.tsx` | कॉपी करने योग्य कॉन्फ़िग स्निपेट मोडल |
### साझा हुक (`src/shared/hooks/cli/`)
| फ़ाइल | उद्देश्य |
| ------------------------- | ----------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` लाता है, लोडिंग/रीफ्रेश स्थिति प्रबंधित करता है |
## 8. i18n
योजना 14 F9 में नए नामस्थान जोड़े गए:
| Namespace | Purpose |
| ----------- | ----------------------------------------------------------------- |
| `cliCommon` | साझा स्ट्रिंग्स (कार्ड लेबल, अवधारणा/तुलना पाठ, विवरण पृष्ठ लेबल) |
| `cliCode` | CLI कोड के पृष्ठ स्ट्रिंग्स |
| `cliAgents` | CLI एजेंट्स पृष्ठ स्ट्रिंग्स |
| `acpAgents` | ACP एजेंट्स पृष्ठ स्ट्रिंग्स |
पूर्ण PT-BR और EN अनुवाद प्रदान किए गए हैं। 39 अन्य स्थानीयताएँ स्वचालित रूप से `src/i18n/request.ts` में नामस्थान-स्तरीय मर्ज के माध्यम से EN पर वापस जाती हैं।
---
## 9. त्वरित प्रारंभ
### चरण 1 — OmniRoute API कुंजी प्राप्त करें
1. `/dashboard/api-manager` खोलें → **API कुंजी बनाएँ**
2. इसे एक नाम दें (जैसे `cli-tools`) और सभी अनुमतियाँ चुनें
3. कुंजी कॉपी करें — आपको नीचे दिए गए हर CLI के लिए इसकी आवश्यकता होगी
> आपकी कुंजी इस तरह दिखती है: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### चरण 2 — CLI उपकरण स्थापित करें
सभी npm-आधारित उपकरणों के लिए Node.js 22.22.2+ या 24.x की आवश्यकता है:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -325,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-आधारित
# Pi coding agent
# स्थापना के लिए https://github.com/zechnerj/pi-coding-agent देखें
# jcode
# स्थापना के लिए https://github.com/1jehuang/jcode देखें
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### चरण 3 — डैशबोर्ड के माध्यम से कॉन्फ़िगर करें
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code` पर जाएं
2. ग्रिड में अपने उपकरण को खोजें
3. उपकरण विवरण पृष्ठ खोलने के लिए कार्ड पर क्लिक करें
4. अपनी API कुंजी और बेस URL चुनें
5. **कॉन्फ़िग लागू करें** पर क्लिक करें या मैनुअल कॉन्फ़िग स्निपेट कॉपी करें
---
### चरण 4 — वैश्विक पर्यावरण चर सेट करें
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute यूनिवर्सल एंडपॉइंट
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI ROOT पर GOOGLE_GEMINI_BASE_URL पढ़ता है (इसका SDK स्वयं /v1beta/... जोड़ता है)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **दूरस्थ सर्वर** के लिए `localhost:20128` को सर्वर IP या डोमेन से बदलें,
> जैसे `http://<your-server-ip>:20128`
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### चरण 4 — प्रत्येक उपकरण को कॉन्फ़िगर करें
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# ~/.claude/settings.json बनाएँ:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code के लिए एकीकृत Anthropic गेटवे रूट का उपयोग करें। यहाँ `/v1` न जोड़ें।
**परीक्षण:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
आधुनिक Codex (v0.137+) केवल `~/.codex/config.toml` पढ़ता है — पुराना
`config.yaml` विरासती npm CLI का है और चुपचाप अनदेखा किया जाता है। API
कुंजी `OMNIROUTE_API_KEY` पर्यावरण चर (`env_key`) में रहती है, कभी भी
फाइल के अंदर नहीं:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
पूर्ण संदर्भ (प्रोफाइल, `wire_api`, संदर्भ विंडो): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**परीक्षण:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**परीक्षण:** `opencode`
> सोचने के वेरिएंट भेजने के लिए `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` का उपयोग करें।
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI या VS कोड)
### OpenCode
**CLI मोड:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -467,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS कोड मोड:**
Cline एक्सटेंशन सेटिंग्स → API प्रदाता: `OpenAI Compatible`बेस URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
या OmniRoute डैशबोर्ड का उपयोग करें**CLI Tools → Cline → Apply Config**
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI या VS कोड)
### KiloCode (CLI or VS Code)
**CLI मोड:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS कोड सेटिंग्स:**
**VS Code settings:**
```json
{
@@ -491,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
या OmniRoute डैशबोर्ड का उपयोग करें**CLI Tools → KiloCode → Apply Config**
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS कोड एक्सटेंशन)
### Continue (VS Code Extension)
`~/.continue/config.yaml` संपादित करें:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -509,244 +241,158 @@ models:
default: true
```
संपादन के बाद VS कोड को पुनः प्रारंभ करें।
Restart VS Code after editing.
---
#### VS कोड इंसाइडर्स (`chatLanguageModels.json`)
जब VS कोड इंसाइडर्स को कस्टम एंडपॉइंट मॉडल के लिए कॉन्फ़िगर किया गया है और आप OmniRoute को बिना कस्टम हेडर फ़ील्ड के काम करना चाहते हैं, तो इसका उपयोग करें।
**सिफारिश की गई स्थान:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**टोकनयुक्त OmniRoute उपनाम का उपयोग करते हुए उदाहरण:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**नोट्स:**
- `sk-your-omniroute-key` को OmniRoute में बनाई गई API कुंजी से बदलें।
- `url` फ़ील्ड को `/api/v1/vscode/{token}/chat/completions` की ओर इंगित करना चाहिए।
- `modelsUrl` फ़ील्ड को `/api/v1/vscode/{token}/models` की ओर इंगित करना चाहिए।
- जब क्लाइंट कस्टम हेडर का समर्थन करता है, तो सामान्य `/v1` + Bearer हेडर प्रवाह को प्राथमिकता दें।
- URL-embedded टोकन संगतता बैकफॉल हैं और संपादक लॉग या प्रॉक्सी इतिहास में दिखाई दे सकते हैं।
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# अपने AWS/Kiro खाते में लॉगिन करें:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI अपनी स्वयं की प्रमाणीकरण का उपयोग करता है — Kiro CLI के लिए OmniRoute की आवश्यकता नहीं है।
# अन्य उपकरणों के लिए OmniRoute के साथ kiro-cli का उपयोग करें।
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** डेस्कटॉप ऐप के लिए, OmniRoute द्वारा `/dashboard/cli-tools → Kiro` के तहत प्रदर्शित MITM एंडपॉइंट का उपयोग करें।
---
## 10. आंतरिक OmniRoute CLI
### Qwen Code (Alibaba)
`omniroute` बाइनरी सर्वर जीवनचक्र, सेटअप, डायग्नोस्टिक्स, और प्रदाता प्रबंधन के लिए कमांड प्रदान करता है। प्रवेश बिंदु: `bin/omniroute.mjs`
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
omniroute # सर्वर शुरू करें (डिफ़ॉल्ट पोर्ट 20128)
omniroute setup # इंटरैक्टिव सेटअप विज़ार्ड
omniroute doctor # कॉन्फ़िग, DB, पोर्ट, रनटाइम की जांच करें
omniroute providers list # कॉन्फ़िगर किए गए प्रदाता कनेक्शन
omniroute providers test-all # हर सक्रिय कनेक्शन का परीक्षण करें
omniroute reset-password # व्यवस्थापक पासवर्ड रीसेट करें
omniroute logs # अनुरोध लॉग स्ट्रीम करें
omniroute health # विस्तृत स्वास्थ्य (ब्रेकर्स, कैश, मेमोरी)
omniroute --version # संस्करण प्रिंट करें
omniroute --help # सभी कमांड दिखाएं
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
### सेटअप और प्रारंभिककरण
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
omniroute setup # इंटरैक्टिव सेटअप विज़ार्ड
omniroute setup --non-interactive # CI/स्वचालन मोड (env vars + फ्लैग पढ़ता है)
omniroute setup --password '<value>' # सीधे व्यवस्थापक पासवर्ड सेट करें
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # एक ही बार में प्रदाता जोड़ें और परीक्षण करें
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
गैर-इंटरैक्टिव सेटअप के लिए मान्यता प्राप्त पर्यावरण चर:
> For a **remote server** replace `localhost:20128` with the server IP or domain.
| Var | उद्देश्य |
| ------------------- | -------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | प्रदाता API कुंजी (कमांडर `.env()` के माध्यम से `--api-key` से बंधी) |
| `DATA_DIR` | OmniRoute डेटा निर्देशिका को ओवरराइड करें |
**Test:** `qwen "say hello"`
अन्य सभी गैर-इंटरैक्टिव इनपुट को फ्लैग के रूप में पास किया जाता है, पर्यावरण चर के रूप में नहीं:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(ऊपर `omniroute setup` विकल्प देखें)।
### Cursor (Desktop App)
### डायग्नोस्टिक्स
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
```bash
omniroute doctor # कॉन्फ़िग, DB, पोर्ट, रनटाइम, मेमोरी, जीवितता की जांच करें
omniroute doctor --json # मशीन-पठनीय JSON
omniroute doctor --no-liveness # HTTP स्वास्थ्य जांच छोड़ें
omniroute doctor --host 0.0.0.0 # जीवितता होस्ट को ओवरराइड करें
omniroute doctor --liveness-url <url> # पूर्ण स्वास्थ्य एंडपॉइंट URL ओवरराइड
```
Via GUI: **Settings → Models → OpenAI API Key**
डॉक्टर ये जांच करता है: `कॉन्फ़िग`, `डेटाबेस`, `स्टोरेज/एन्क्रिप्शन`,
`पोर्ट उपलब्धता`, `नोड रनटाइम`, `नेटिव बाइनरी` (better-sqlite3),
`मेमोरी`, और `सर्वर जीवितता`। यदि कोई जांच `फेल` है तो यह गैर-शून्य पर समाप्त होता है।
### प्रदाता प्रबंधन
```bash
omniroute providers available # OmniRoute प्रदाता कैटलॉग
omniroute providers available --search openai # आईडी/नाम/उपनाम/श्रेणी द्वारा कैटलॉग को फ़िल्टर करें
omniroute providers available --category api-key # श्रेणी द्वारा फ़िल्टर करें (api-key, oauth, free, ...)
omniroute providers available --json # मशीन-पठनीय JSON
omniroute providers list # कॉन्फ़िगर किए गए प्रदाता कनेक्शन
omniroute providers list --json
omniroute providers test <id|name> # एक कॉन्फ़िगर किए गए कनेक्शन का परीक्षण करें
omniroute providers test-all # हर सक्रिय कनेक्शन का परीक्षण करें
omniroute providers validate # स्थानीय-केवल संरचनात्मक मान्यता
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # मौजूदा OAuth प्रवाह
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` API-प्रथम हैं और इसलिए सक्रिय स्थानीय या दूरस्थ संदर्भ के खिलाफ काम करते हैं। क्रेडेंशियल इनपुट को `--credential-stdin` या `--credential-env` का उपयोग करना चाहिए; `--dry-run --json` केवल छिपी हुई उपस्थिति/आकार की रिपोर्ट करता है। `providers available` OmniRoute कैटलॉग को पढ़ता है; `providers list/test/test-all/validate` अपनी स्थानीय SQLite व्यवहार को बनाए रखते हैं और सर्वर के चलने की आवश्यकता नहीं होती है।
### पुनर्प्राप्ति और रीसेट
```bash
omniroute reset-password # व्यवस्थापक पासवर्ड रीसेट करें (अन्य: omniroute-reset-password)
omniroute reset-encrypted-columns # एन्क्रिप्टेड क्रेडेंशियल रीसेट के लिए चेतावनी + ड्राई-रन दिखाएं
omniroute reset-encrypted-columns --force # वास्तव में SQLite में एन्क्रिप्टेड क्रेडेंशियल को शून्य करें
```
### क्रेडेंशियल निर्यात (⚠ सावधानी से संभालें)
```bash
omniroute auth export # चेतावनी + पुष्टि गेट दिखाएं — कोई DB एक्सेस नहीं
omniroute auth export --force # सभी कनेक्शनों के DECRYPTED क्रेडेंशियल को stdout पर JSON के रूप में निर्यात करें
omniroute auth export --force --id <id> # केवल मिलान करने वाले कनेक्शन को निर्यात करें
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> पंक्तियाँ उत्पन्न करें
omniroute auth export --force --out creds.json # एक फ़ाइल में लिखें (0600 अनुमतियों के साथ बनाई गई)
```
`auth export` **स्थानीय-केवल** है (प्रत्यक्ष SQLite पढ़ें, कोई HTTP मार्ग नहीं) और जानबूझकर **प्लेनटेक्स्ट** `apiKey`/`accessToken`/`refreshToken`/`idToken` मानों को प्रिंट/लिखता है — यह विशेषता है, बग नहीं। बिना `--force` के कुछ भी डेटाबेस से नहीं पढ़ा जाता है, और कुछ भी डिक्रिप्ट नहीं किया जाता है। किसी भी प्लेनटेक्स्ट को उत्पन्न करने से पहले हमेशा एक stderr चेतावनी बैनर प्रिंट होता है। `STORAGE_ENCRYPTION_KEY` सेट होना आवश्यक है। एक फ़ील्ड जो डिक्रिप्ट करने में विफल होती है (पुराना कुंजी, भ्रष्ट ciphertext) को `"<field>DecryptFailed: true"` के रूप में रिपोर्ट किया जाता है, न कि पूरे निर्यात को रोकने या अंतर्निहित त्रुटि को लीक करने के लिए।
### अन्य उपकमांड
ये एक चल रहे OmniRoute सर्वर को मानते हैं, जब तक कि अन्यथा नोट न किया गया हो:
```bash
omniroute status # व्यापक रनटाइम स्थिति
omniroute logs # अनुरोध लॉग स्ट्रीम करें (--json, --search, --follow)
omniroute config show # वर्तमान कॉन्फ़िगरेशन प्रदर्शित करें
omniroute provider list # उपलब्ध प्रदाताओं की सूची (providers list का उपनाम)
omniroute provider add # एक उपकरण पर प्रदाता के रूप में OmniRoute को पंजीकृत करें
omniroute keys add | list | remove # API कुंजी प्रबंधित करें
omniroute models [provider] # मॉडल सूचीबद्ध करें (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # कॉन्फ़िग + DB का स्नैपशॉट
omniroute restore # पिछले स्नैपशॉट से पुनर्स्थापित करें
omniroute health # विस्तृत स्वास्थ्य (ब्रेकर्स, कैश, मेमोरी)
omniroute quota # प्रदाता कोटा उपयोग
omniroute cache # कैश स्थिति
omniroute cache clear # सेमांटिक + सिग्नेचर कैश साफ करें
omniroute mcp status | restart # MCP सर्वर स्थिति / पुनः प्रारंभ
omniroute a2a status | card # A2A सर्वर स्थिति / एजेंट कार्ड
omniroute tunnel list | create | stop # टनल प्रबंधित करें (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # env vars का निरीक्षण / सेट करें (अस्थायी)
omniroute test # प्रदाता कनेक्टिविटी स्मोक टेस्ट
omniroute update # अपडेट के लिए जांचें
omniroute completion # शेल पूर्णता उत्पन्न करें
```
### सामान्य फ्लैग
| फ्लैग | विवरण |
| ------------------- | ---------------------------------------------------------- |
| `--no-open` | प्रारंभ पर ब्राउज़र को स्वचालित रूप से न खोलें |
| `--port <n>` | API पोर्ट को ओवरराइड करें (डिफ़ॉल्ट 20128) |
| `--mcp` | stdio के माध्यम से MCP सर्वर के रूप में चलाएँ (IDE के लिए) |
| `--non-interactive` | CI मोड (कोई संकेत नहीं; env/flags से पढ़ता है) |
| `--json` | मशीन-पठनीय JSON आउटपुट (doctor, providers, आदि) |
| `--help`, `-h` | कमांड-विशिष्ट सहायता दिखाएं |
| `--version`, `-v` | स्थापित संस्करण प्रिंट करें |
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## उपलब्ध API एंडपॉइंट्स
## Dashboard Auto-Configuration
| एंडपॉइंट | विवरण | उपयोग के लिए |
| -------------------------- | ---------------------------------- | ------------------------------------------- |
| `/v1/chat/completions` | मानक चैट (सभी प्रदाता) | सभी आधुनिक उपकरण |
| `/v1/responses` | प्रतिक्रियाएँ API (OpenAI प्रारूप) | कोडेक्स, एजेंटिक वर्कफ़्लो |
| `/v1/completions` | विरासत टेक्स्ट पूर्णताएँ | पुराने उपकरण जो `prompt:` का उपयोग करते हैं |
| `/v1/embeddings` | टेक्स्ट एम्बेडिंग | RAG, खोज |
| `/v1/images/generations` | छवि निर्माण | GPT-Image, फ्लक्स, आदि |
| `/v1/audio/speech` | टेक्स्ट-से-भाषण | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | भाषण-से-टेक्स्ट | Deepgram, AssemblyAI |
The OmniRoute dashboard automates configuration for most tools:
पेस्ट करने के लिए तैयार उदाहरणों के साथ एक टोकनयुक्त OmniRoute URL:
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
```txt
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Standard OpenAI base: http://localhost:20128/v1
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Built-in Agents: Droid & OpenClaw
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## समस्या निवारण
| त्रुटि | कारण | समाधान |
| -------------------------------------------- | ------------------------ | ------------------------------------------------------------------------ |
| `Connection refused` | OmniRoute चल नहीं रहा | `omniroute serve` |
| `401 Unauthorized` | गलत API कुंजी | `/dashboard/api-manager` में जांचें |
| `No combo configured` | कोई सक्रिय रूटिंग कॉम्बो | `/dashboard/combos` में सेट करें |
| CLI shows "not installed" | बाइनरी PATH में नहीं है | `which <command>` में जांचें |
| Dashboard shows "not detected" after install | कैश पुराना | डैशबोर्ड में "⟳ Refresh detection" पर क्लिक करें |
| पुराना लिंक `/dashboard/cli-tools` | Pre-v3.8.6 बुकमार्क | स्वचालित रूप से `/dashboard/cli-code` (308) पर पुनर्निर्देशित किया गया |
| पुराना लिंक `/dashboard/agents` | Pre-v3.8.6 बुकमार्क | स्वचालित रूप से `/dashboard/acp-agents` (308) पर पुनर्निर्देशित किया गया |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,271 +0,0 @@
# CLI-INTEGRATIONS (Magyar)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integrációk — bármilyen kódoló CLI irányítása az OmniRoute-ra"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integrációk
Az OmniRoute egy sor `setup-*` parancsot kínál, amelyek egy kódoló CLI-t (Codex, Claude Code, OpenCode, Cline, …) konfigurálnak, hogy az OmniRoute-ot használja háttérként — így az eszköz **egy** végponthoz kapcsolódik, és az OmniRoute a megfelelő szolgáltatóhoz irányít automatikus visszaeséssel. Minden parancs a **valós idejű** modell katalógust olvassa egy futó OmniRoute-ból (helyi vagy távoli), és a saját konfigurációs fájlját írja a **te** gépedre. Az API kulcsot egy környezeti változó hivatkozza, ahol az eszköz támogatja azt. Az alábbiakban a helyi környezeti fájlt megőrző parancsok találhatók.
Van egy általános indító is — `omniroute run <target>` — amely elindítja a `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` vagy `gemini` eszközöket a megfelelő környezettel, anélkül, hogy bármilyen konfigurációt írna. A célok és azok aliasai a kanonikus manifestből származnak `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), és az `omniroute completion` ugyanazokat a manifestből származó cél szavakat kínálja. A régi, eszközspecifikus indítók — `omniroute launch` (Claude Code) és `omniroute launch-codex` (Codex) — továbbra is elérhetők.
A szolgáltatók bevezetése ugyanabból a helyi/távoli kontextusból elérhető. Az alábbi API-első parancsok elkülönítik a kezelési hitelesítést a szolgáltató hitelesítő adataitól, és soha nem nyomtatnak ki hitelesítő adatokat strukturált kimenetben:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
A szkriptekhez a `--credential-stdin` vagy `--credential-env` használatát javasoljuk; a `--credential` a helyi, kontrollált használatra marad meg. A `providers remove` parancs `--yes`-t igényel nem interaktív terminálon, és mind az öt parancs tiszteletben tartja az aktív kontextust vagy a globális `--base-url`/`--api-key` opciókat.
A két leggazdagabb integráció egyszeri, kézzel írt alapbeállításához lásd az eszközspecifikus mélymerüléseket:
- [Claude Code konfiguráció](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI konfiguráció](./CODEX-CLI-CONFIGURATION.md)
- [Távoli Mód](./REMOTE-MODE.md) — vezérelj egy távoli OmniRoute-ot (VPS / Tailnet) a laptopodról
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — az OmniCopilot kiterjesztés; ez is képes futtatni ezeket a `setup-*` parancsokat az editoron belül
---
## Fő táblázat
Minden parancs tiszteletben tartja az **aktív kontextust** (amelyet az `omniroute connect`-tel állítanak be, lásd [Távoli Mód](./REMOTE-MODE.md)) vagy az explicit `--remote <url> --api-key <key>` zászlókat. Az alábbi "Helyi vs távoli" azt jelenti: zászlók nélkül a `http://localhost:20128` címet célozza meg; `--remote` (vagy egy aktív távoli kontextus) esetén a katalógust onnan szerzi be, és helyben írja a konfigurációt.
| Parancs | Eszköz | Amit ír | Kulcs zászlók | Helyi vs távoli |
| -------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — egy profil minden kompatibilis szövegmintához (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Mindkettő |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — egy profil minden egyező modellhez (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Mindkettő |
| `omniroute setup-opencode` | OpenCode (openai-kompatibilis) | `~/.config/opencode/opencode.json``omniroute` szolgáltató minden katalógus modellel (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Mindkettő |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI mód) + nyomtatja a VS Code kiterjesztés beállításait | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Mindkettő |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + egyesíti a `kilocode.*` fájlokat a VS Code `settings.json`-ba, ha létezik | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Mindkettő |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modellek, kulcs a `${{ secrets.OMNIROUTE_API_KEY }}` által | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Mindkettő |
| `omniroute setup-cursor` | Cursor | Semmi — nyomtatja az alkalmazáson belüli lépéseket (Cursor konfigurációja átláthatatlan SQLite) | `--remote` `--api-key` `--only` `--port` | Mindkettő |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + beállítja a `roo-cline.autoImportSettingsPath`-t, ha létezik egy VS Code `settings.json` fájl | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Mindkettő |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` szolgáltató, kulcs a `$OMNIROUTE_API_KEY` által | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Mindkettő |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + nyomtatja a környezeti receptet | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Mindkettő |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + nyomtatja a környezeti receptet | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Mindkettő |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` tömb + `OMNIROUTE_API_KEY` a `~/.qwen/.env` fájlban | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Mindkettő |
| `omniroute run <target>` | Futási indítás (általános) | Semmi — elindítja a `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` eszközöket a megfelelő környezettel és argumentumokkal; a Qwen és a Gemini ideiglenes, elszigetelt otthont használnak | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Mindkettő |
| `omniroute launch` | Claude Code | Semmi — elindítja a `claude`-t az `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injektálásával | `--remote` `--api-key` `--token` `--profile` `--port` | Mindkettő |
| `omniroute launch-codex` | OpenAI Codex CLI | Semmi — elindítja a `codex`-t az `omniroute` szolgáltató injektálásával `-c` zászlók segítségével | `--remote` `--api-key` `--profile` (`-p`) `--port` | Mindkettő |
Zászlók megjegyzései (ellenőrizve a parancs forrásában):
- `--remote <url>` — a katalógust egy távoli OmniRoute-ból szerzi be (felülírja a `--port`-ot és az aktív kontextust). A `--api-key <key>` biztosítja a hitelesítő adatokat a szerverhez (alapértelmezés szerint az `OMNIROUTE_API_KEY` környezeti változót, vagy az aktív kontextus tokenjét használja).
- `--only <patterns>` — vesszővel elválasztott részstringek; csak azokat a modell azonosítókat tartja meg, amelyek egyeznek (pl. `--only glm,kimi`). Elérhető a `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` parancsoknál.
- `--dry-run` — pontosan azt nyomtatja ki, ami íródna, anélkül, hogy a fájlrendszert megérintené. Minden `setup-*` parancsnál elérhető **kivéve** a `setup-cursor`-t (amely soha nem ír fájlt).
- `--model <id>` — kötelező (vagy interaktívan kiválasztott) azoknál az eszközöknél, amelyek nem rendelkeznek automatikus modell felfedezéssel: Cline, Kilo, Roo, Goose, Qwen, Aider. Ezek az eszközök a `--yes`-t is elfogadják nem interaktív futtatásokhoz (ami akkor `--model`-t igényel). A `setup-opencode` a `--model`-t használja az alapértelmezett legfelső szintű modell beállításához.
- A `--model <id>` az `omniroute run` parancsnál követi a manifest per-cél vezetékezését (`bin/cli/cli-manifest.mjs`): **aider** a `--model openai/<id>`-t, **opencode** a `--model omniroute/<id>`-t kap (a prefix csak akkor kerül hozzáadásra, ha az azonosító nem tartalmazza azt); **qwen** és **gemini** az azonosítót szó szerint kapja; **claude** az `ANTHROPIC_MODEL`-on keresztül, **goose** a `GOOSE_MODEL`-on keresztül, és **codex** a `-c model_providers.omniroute.*` argumentumokon keresztül. **A Qwen az egyetlen futási cél, amely kifejezetten megköveteli a `--model`-t** — az `omniroute run qwen` nélküle `2`-t ad vissza egy explicit hibával.
- `--port <port>` — helyi OmniRoute port (alapértelmezett `20128`, figyelmen kívül hagyva, ha a `--remote` be van állítva). Minden `setup-*` és mindkét indító esetén jelen van.
- Az `omniroute run` kilépési kódok: a gyermek CLI saját kilépési kódja verbatim módon propagálódik; `2` = érvénytelen argumentumok (támogatott cél hiánya, kötelező `--model` hiánya, konténer őr); `127` = a cél bináris nem található a `PATH`-ban; `130`/`143`/`129` amikor a launch-t a `SIGINT`/`SIGTERM`/`SIGHUP` zárja le; `1` = egyéb futási indítási hiba.
- A két indító (`launch`, `launch-codex`) elfogadja a `--profile <name>`-t, hogy kiválasszon egy profilt, amelyet a `setup-claude` / `setup-codex` írt, plusz átjáró argumentumokat az alapul szolgáló `claude` / `codex` bináris számára.
Az interaktív választó a beállítási receptekhez is megosztott:
```bash
# Válassz az aktív helyi vagy távoli modell katalógusból, és konfiguráld a célt.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
A `configure` jelenleg a tesztelt receptekhez delegál a `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, és `kilo` esetében. Az IDE-hez tartozó, MITM, és csak útmutató katalógus bejegyzések továbbra is explicit `setup-*`/kézi folyamatok, és nem jelennek meg indítható célokként.
> A `setup-opencode` a **könnyű openai-kompatibilis** OpenCode integráció.
> Van egy gazdagabb plugin integráció is — `omniroute setup opencode` — amely
> telepíti az `@omniroute/opencode-plugin`-t. Ezek különböző parancsok; a fenti táblázat a `setup-opencode`-t dokumentálja.
---
## Helyi használat
Az OmniRoute `localhost:20128` címen fut, csak futtasd a beállító parancsot az eszközödhöz. A katalógus a helyi szerverről kerül lekérésre.
```bash
# Codex: írj egy profilt a megfelelő modellhez a ~/.codex/ könyvtárba
omniroute setup-codex
codex --profile glm52 # használd a generált profilt
# Claude Code: írj modellenkénti profilokat, majd indíts egyet
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: írd az openai-kompatibilis szolgáltatót az összes katalógusmodellel
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # hivatkozva {env:OMNIROUTE_API_KEY}, soha nem lemezen
opencode -m omniroute/glm/glm-5.2 "..."
# Az automatikus felfedezéssel nem rendelkező eszközöknek explicit modell szükséges:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Előnézet írás nélkül:
omniroute setup-continue --dry-run
```
Indítás írás nélkül (csak környezeti injekció):
```bash
omniroute launch # Claude Code → helyi OmniRoute
omniroute launch-codex # Codex CLI → helyi OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "válasz OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "válasz OK"
omniroute run qwen --model glm/glm-5.2 -- -p "válasz OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "válasz OK"
# Explicit parancs útvonal: átad minden, ami a -- után jön
omniroute run claude -- --print-system-prompt "ellenőrizd ezt a diffet"
```
---
## Távoli használat
Bármely beállító parancsot irányíts egy távoli OmniRoute-ra `--remote` + `--api-key` használatával. A katalógus a távoli szerverről kerül lekérésre; a konfiguráció a helyi gépeden kerül írásra.
```bash
# OpenCode távoli VPS ellen, csak glm/kimi modellek megtartása
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # először exportáld az OMNIROUTE_API_KEY-t
# Codex profilok egy távoli katalógusból
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# CLI indítása közvetlenül a távoli ellen
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
A `--remote`/`--api-key` átadása helyett egyszer jelentkezz be, és hagyd, hogy az **aktív kontextus** automatikusan biztosítsa őket:
```bash
omniroute connect 192.168.0.15 # létrehoz egy hatókörös tokent, tárolja a kontextust
omniroute setup-codex # ← most a távoli katalógust használja
omniroute setup-opencode # ← ugyanaz
omniroute launch # ← Claude Code a távoli ellen
```
Lásd a [Távoli Mód](./REMOTE-MODE.md) dokumentációt a kontextusok, hatókörök és token kezelésről.
---
## Alap URL konvenciók (mely eszközök akarják a `/v1`-et)
Az OmniRoute az OpenAI felületet a `/v1`-en, az Anthropic felületet a gyökérnél, és egy natív Gemini felületet a `/v1beta`-n kínál. Minden integráció a formátumhoz van kötve, amit az eszköz elvár (ellenőrizve a parancs forrásában):
| Integráció | Alap URL írása | `/v1`? |
| -------------------------------------------------------------------------- | -------------- | -------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | gyökér | Nem — Cline hozzáfűzi a `/v1/chat/completions`-t |
| `setup-goose` (`OPENAI_HOST`) | gyökér | Nem — Goose hozzáfűzi az útvonalat |
| `setup-aider` (`OPENAI_API_BASE`) | gyökér | Nem — LiteLLM hozzáfűzi a `/v1/chat/completions`-t |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1`-el | Igen |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | gyökér | Nem — Claude Code hozzáfűzi a `/v1/messages`-t |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1`-el | Igen |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1`-el | Igen |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | gyökér | Nem — az SDK hozzáfűzi a `/v1beta/models/…`-t |
---
## A natív függőségek frissítése: `--include=optional`
Amikor frissítesz az `omniroute update` paranccsal (miután megerősítetted, vagy a `--apply` használatával),
az OmniRoute a frissítést `--include=optional` opcióval futtatja:
```bash
npm install -g omniroute@latest --include=optional
```
Ez **nem** egy olyan zászló, amelyet az `omniroute update` parancshoz adsz — ez mindig alkalmazásra kerül a
frissítő által. Garantálja, hogy az `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, az LLMLingua SLM stack) megmarad a frissítés során, még akkor is, ha az npm konfigurációd
`omit=optional` beállítással rendelkezik, ami egyébként csendben eltávolítaná a natív SQLite
illesztőt és az OS-kulcstartó kötést. Az pontos parancs előnézetéhez anélkül, hogy alkalmaznád:
```bash
omniroute update --dry-run
# [DRY RUN] Futna: npm install -g omniroute@latest --include=optional
```
Más `omniroute update` zászlók (forrásban ellenőrizve): `--check` (1-es kilépés, ha
elavult), `--apply` (telepítés kérdés nélkül), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI az `omniroute run gemini` segítségével
A szerződés ellenőrizve az `@google/gemini-cli` 0.50.0 verzióval: a CLI tiszteletben tartja
`GOOGLE_GEMINI_BASE_URL`-t, és `POST /v1beta/models/<model>:generateContent`
(és `:streamGenerateContent?alt=sse`) kéréseket küld rá — pontosan az OmniRoute natív
Gemini felületének (`/v1beta`) megfelelően. Az `omniroute run gemini` ezt automatikusan összeköti:
- `GOOGLE_GEMINI_BASE_URL` → az aktív OmniRoute alap URL (gyökér, nincs `/v1`);
- `GEMINI_API_KEY` → a megoldott OmniRoute hitelesítő (opció/env/környezet);
- egy **ideiglenes elszigetelt `GEMINI_CLI_HOME`**, amelynek `.gemini/settings.json`
a `gemini-api-key` hitelesítést választja, így egy tárolt Google OAuth munkamenet (Code Assist)
soha nem írja felül az OmniRoute által irányított indítást — a kilépés után eltávolítva;
- **környezeti higiénia**: a gyermek környezetből eltávolítva a `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` és `GOOGLE_GENAI_USE_GCA` (amelyek az
auth-ot a Vertex/Code Assist-ra irányítanák), és a `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
beállítva van, mint egy biztonsági mentés — a többi `run` cél ugyanazt a kezelést kapja
a saját ellentmondó változóikra;
- `--model <id>` injekció a `--provider`/`--model`-ből.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
A Gemini munkaterület-bizalom védelme továbbra is érvényes a fej nélküli módban — add meg
a `--skip-trust`-ot (vagy bízz a könyvtárban interaktívan); az indító szándékosan nem kerüli meg ezt. Ez az indító különbözik a **ACP
regisztrációtól** (`src/lib/acp/registry.ts`, `gemini --acp`), amely továbbra is az
ügynök-protokoll integráció a `/dashboard/acp-agents` számára.
---
## Valódi füst teszt (opcionális)
Determinista indítási terv regressziós tesztek a CI-ben (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). A VALÓDI binárisok érvényesítéséhez egy VALÓDI
OmniRoute szerverrel, egy opcionális keretrendszer létezik a
`tests/integration/upstream-cli-smoke.int.test.ts` fájlban. Ez soha nem fut automatikusan
(minden al-teszt átugrik, hacsak `RUN_CLI_SMOKE=1` nincs beállítva), a hitelesítőt környezeti változó
NÉV-en keresztül adja át (soha nem értéken), eltávolítja a kulcsformájú karakterláncokat a rögzített kimenetből, átugorja
azokat a célokat, amelyek binárisa nincs telepítve, és a hibákat auth / upstream / config
kategóriákba sorolja, nem pedig egy egyszerű logikai értékként:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opcionális: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` korlátozza a tesztelést;
`OMNIROUTE_SMOKE_TIMEOUT_MS` felülírja a 120 másodperces célonkénti időkorlátot.
---
## Lásd még
- [Claude Code konfiguráció](./CLAUDE-CODE-CONFIGURATION.md) — a mélyebb Claude Code útmutató
- [Codex CLI konfiguráció](./CODEX-CLI-CONFIGURATION.md) — az egyszeri `[model_providers.omniroute]` alapbeállítás
- [Távvezérlő mód](./REMOTE-MODE.md) — kontextusok, terjedelmi hozzáférési tokenek, távoli szerver vezérlése
- [CLI Eszközök hivatkozás](../reference/CLI-TOOLS.md) — a támogatott eszközök teljes katalógusa + irányítópult oldalak
- [Telepítési útmutató](./SETUP_GUIDE.md) — telepítési módszerek és első indítási onboarding

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,318 +0,0 @@
# CLI-INTEGRATIONS (Bahasa Indonesia)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrasi CLI — arahkan CLI pengkodean ke OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrasi CLI
OmniRoute menyediakan serangkaian perintah `setup-*` yang mengonfigurasi CLI pengkodean
(Codex, Claude Code, OpenCode, Cline, …) untuk menggunakan OmniRoute sebagai backend-nya — sehingga
alat tersebut berbicara ke **satu** endpoint dan OmniRoute mengarahkan ke penyedia yang tepat dengan
fallback otomatis. Setiap perintah membaca katalog model **langsung** dari OmniRoute yang berjalan
(lokal atau jarak jauh) dan menulis file konfigurasi alat itu sendiri di **mesin Anda**. Kunci API dirujuk oleh variabel lingkungan di mana pun alat tersebut mendukungnya. Perintah yang mempertahankan file lingkungan lokal alat dicatat di bawah.
Ada juga peluncur generik — `omniroute run <target>` — yang memunculkan
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` atau `gemini` dengan
lingkungan yang tepat disuntikkan, tanpa menulis konfigurasi sama sekali. Target dan aliasnya berasal dari manifest kanonik `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), dan `omniroute completion` menawarkan
kata target yang sama yang berasal dari manifest. Peluncur per-alat yang lama —
`omniroute launch` (Claude Code) dan `omniroute launch-codex` (Codex) — tetap
tersedia.
Onboarding penyedia tersedia dari konteks lokal/remote yang sama. Perintah
API-first di bawah ini menjaga otentikasi manajemen terpisah dari kredensial penyedia
dan tidak pernah mencetak kredensial dalam output terstruktur:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Untuk skrip, lebih baik menggunakan `--credential-stdin` atau `--credential-env`; `--credential`
dipertahankan untuk penggunaan lokal yang terkontrol. `providers remove` memerlukan `--yes` pada terminal
non-interaktif, dan semua lima perintah menghormati konteks aktif atau opsi global `--base-url`/`--api-key`.
Untuk pengaturan dasar satu kali yang ditulis tangan dari dua integrasi terkaya, lihat
penjelasan mendalam per-alat:
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Mode Jarak Jauh](./REMOTE-MODE.md) — mengendalikan OmniRoute jarak jauh (VPS / Tailnet) dari laptop Anda
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ekstensi OmniCopilot; ini juga dapat menjalankan perintah
`setup-*` ini untuk Anda dari dalam editor
---
## Tabel Master
Setiap perintah menghormati **konteks aktif** (diatur dengan `omniroute connect`, lihat
[Mode Jarak Jauh](./REMOTE-MODE.md)) atau bendera eksplisit `--remote <url> --api-key <key>`.
"Local vs remote" di bawah ini berarti: tanpa bendera, itu menargetkan `http://localhost:20128`;
dengan `--remote` (atau konteks jarak jauh yang aktif) itu mengambil katalog dari server tersebut dan menulis konfigurasi secara lokal.
| Perintah | Alat | Apa yang ditulis | Bendera kunci | Local vs remote |
| -------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — satu profil per model teks yang kompatibel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Keduanya |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — satu profil per model yang cocok (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Keduanya |
| `omniroute setup-opencode` | OpenCode (kompatibel dengan openai) | `~/.config/opencode/opencode.json` — penyedia `omniroute` dengan setiap model katalog (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Keduanya |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mode CLI) + mencetak pengaturan ekstensi VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Keduanya |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + menggabungkan `kilocode.*` ke dalam `settings.json` VS Code jika ada | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Keduanya |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — model `provider: openai`, kunci melalui `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-cursor` | Cursor | Tidak ada — mencetak langkah-langkah dalam aplikasi (konfigurasi Cursor tidak transparan SQLite) | `--remote` `--api-key` `--only` `--port` | Keduanya |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dokumen impor) + mengatur `roo-cline.autoImportSettingsPath` jika ada `settings.json` VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Keduanya |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — penyedia `openai-compat`, kunci melalui `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` di `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Keduanya |
| `omniroute run <target>` | Peluncuran runtime (generik) | Tidak ada — memunculkan `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` dengan lingkungan dan argumen yang tepat; Qwen dan Gemini menggunakan rumah sementara yang terisolasi | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Keduanya |
| `omniroute launch` | Claude Code | Tidak ada — memunculkan `claude` dengan `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` disuntikkan | `--remote` `--api-key` `--token` `--profile` `--port` | Keduanya |
| `omniroute launch-codex` | OpenAI Codex CLI | Tidak ada — memunculkan `codex` dengan penyedia `omniroute` disuntikkan melalui bendera `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Keduanya |
Catatan tentang bendera (diverifikasi dalam sumber perintah):
- `--remote <url>` — mengambil katalog dari OmniRoute jarak jauh (mengganti `--port`
dan konteks aktif). `--api-key <key>` menyediakan kredensial untuk server tersebut
(default ke variabel lingkungan `OMNIROUTE_API_KEY`, atau token konteks aktif).
- `--only <patterns>` — substring yang dipisahkan koma; hanya menyimpan ID model yang cocok
(misalnya `--only glm,kimi`). Tersedia pada `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — mencetak persis apa yang akan ditulis tanpa menyentuh
sistem file. Tersedia pada setiap perintah `setup-*` **kecuali** `setup-cursor`
(yang tidak pernah menulis file).
- `--model <id>` — diperlukan (atau dipilih secara interaktif) untuk alat yang tidak memiliki
penemuan model otomatis: Cline, Kilo, Roo, Goose, Qwen, Aider. Alat-alat tersebut
juga menerima `--yes` untuk eksekusi non-interaktif (yang kemudian memerlukan `--model`).
`setup-opencode` mengambil `--model` untuk mengatur model tingkat atas default.
- `--model <id>` pada `omniroute run` mengikuti pengkabelan per-target dari manifest
(`bin/cli/cli-manifest.mjs`): **aider** menerima `--model openai/<id>` dan
**opencode** `--model omniroute/<id>` (awalan hanya ditambahkan ketika id
tidak sudah membawanya); **qwen** dan **gemini** menerima id apa adanya;
**claude** mendapatkannya melalui `ANTHROPIC_MODEL`, **goose** melalui `GOOSE_MODEL`, dan
**codex** melalui argumen `-c model_providers.omniroute.*`. **Qwen adalah satu-satunya target run
yang secara keras memerlukan `--model`** — `omniroute run qwen` tanpa itu keluar
`2` dengan kesalahan eksplisit.
- `--port <port>` — port OmniRoute lokal (default `20128`, diabaikan saat `--remote`
diatur). Tersedia pada semua `setup-*` dan kedua peluncur.
- Kode keluar `omniroute run`: kode keluar CLI anak disebarkan
apa adanya; `2` = argumen tidak valid (target tidak didukung, `--model` yang diperlukan hilang, penjaga kontainer); `127` = biner target tidak ada di `PATH`;
`130`/`143`/`129` ketika peluncuran diakhiri oleh `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = kegagalan peluncuran runtime lainnya.
- Kedua peluncur (`launch`, `launch-codex`) menerima `--profile <name>` untuk memilih
profil yang ditulis oleh `setup-claude` / `setup-codex`, plus argumen pass-through untuk
biner `claude` / `codex` yang mendasarinya.
Pemilih interaktif juga dibagikan oleh resep pengaturan:
```bash
# Pilih dari katalog model lokal atau jarak jauh yang aktif dan konfigurasikan target.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` saat ini mendelegasikan ke resep yang diuji untuk `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, dan `kilo`. Entri katalog yang hanya untuk IDE,
MITM, dan panduan tetap menjadi alur `setup-*`/manual yang eksplisit dan
tidak disajikan sebagai target yang dapat diluncurkan.
> `setup-opencode` adalah integrasi OpenCode **ringan yang kompatibel dengan openai**.
> Ada juga integrasi plugin yang lebih kaya — `omniroute setup opencode` — yang
> menginstal `@omniroute/opencode-plugin`. Mereka adalah perintah yang berbeda; tabel
> di atas mendokumentasikan `setup-opencode`.
---
## Penggunaan lokal
Dengan OmniRoute berjalan di `localhost:20128`, cukup jalankan perintah setup untuk alat Anda. Katalog diambil dari server lokal.
```bash
# Codex: tulis profil per model yang cocok ke ~/.codex/
omniroute setup-codex
codex --profile glm52 # gunakan profil yang dihasilkan
# Claude Code: tulis profil per model, lalu luncurkan satu
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: tulis penyedia yang kompatibel dengan openai dengan semua model katalog
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # dirujuk melalui {env:OMNIROUTE_API_KEY}, tidak pernah di disk
opencode -m omniroute/glm/glm-5.2 "..."
# Alat tanpa penemuan otomatis memerlukan model eksplisit:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Prabaca tanpa menulis apa pun:
omniroute setup-continue --dry-run
```
Luncurkan tanpa menulis konfigurasi sama sekali (hanya injeksi-env):
```bash
omniroute launch # Claude Code → OmniRoute lokal
omniroute launch-codex # Codex CLI → OmniRoute lokal
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Jalur perintah eksplisit: lewati apa pun yang datang setelah --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Penggunaan jarak jauh
Arahkan perintah setup apa pun ke OmniRoute jarak jauh dengan `--remote` + `--api-key`. Katalog diambil dari jarak jauh; konfigurasi ditulis di mesin lokal Anda.
```bash
# OpenCode terhadap VPS jarak jauh, simpan hanya model glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # ekspor OMNIROUTE_API_KEY terlebih dahulu
# Profil Codex dari katalog jarak jauh
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Luncurkan CLI langsung terhadap jarak jauh
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Alih-alih melewatkan `--remote`/`--api-key` setiap kali, masuk sekali dan biarkan **konteks aktif** menyediakannya secara otomatis:
```bash
omniroute connect 192.168.0.15 # membuat token terikat, menyimpan konteks
omniroute setup-codex # ← sekarang menggunakan katalog jarak jauh
omniroute setup-opencode # ← sama
omniroute launch # ← Claude Code terhadap jarak jauh
```
Lihat [Mode Jarak Jauh](./REMOTE-MODE.md) untuk konteks, cakupan, dan manajemen token.
---
## Konvensi URL Dasar (alat mana yang menginginkan `/v1`)
OmniRoute mengekspos permukaan OpenAI di `/v1`, permukaan Anthropic di root, dan permukaan Gemini asli di `/v1beta`. Setiap integrasi terhubung ke bentuk yang diharapkan alatnya (diverifikasi dalam sumber perintah):
| Integrasi | URL Dasar yang ditulis | `/v1`? |
| -------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | root | Tidak — Cline menambahkan `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | root | Tidak — Goose menambahkan jalur |
| `setup-aider` (`OPENAI_API_BASE`) | root | Tidak — LiteLLM menambahkan `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | dengan `/v1` | Ya |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Tidak — Claude Code menambahkan `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | dengan `/v1` | Ya |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | dengan `/v1` | Ya |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Tidak — SDK menambahkan `/v1beta/models/…` |
---
## Menjaga dependensi native saat pembaruan: `--include=optional`
Saat Anda memperbarui dengan `omniroute update` (setelah mengonfirmasi, atau dengan `--apply`),
OmniRoute menjalankan instalasi dengan `--include=optional` yang sudah terintegrasi:
```bash
npm install -g omniroute@latest --include=optional
```
Ini **bukan** sebuah flag yang Anda berikan ke `omniroute update` — ini selalu diterapkan oleh
updater. Ini menjamin bahwa `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, tumpukan LLMLingua SLM) bertahan setelah pembaruan meskipun konfigurasi npm Anda
memiliki `omit=optional` yang akan secara diam-diam menghapus driver SQLite native
dan binding OS-keyring. Untuk melihat perintah yang tepat tanpa menerapkannya:
```bash
omniroute update --dry-run
# [DRY RUN] Akan menjalankan: npm install -g omniroute@latest --include=optional
```
Flag `omniroute update` lainnya (terverifikasi dalam sumber): `--check` (keluar 1 jika
kadaluwarsa), `--apply` (instal tanpa meminta), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI melalui `omniroute run gemini`
Kontrak diverifikasi terhadap `@google/gemini-cli` 0.50.0: CLI menghormati
`GOOGLE_GEMINI_BASE_URL` dan mengeluarkan `POST /v1beta/models/<model>:generateContent`
(dan `:streamGenerateContent?alt=sse`) terhadapnya — persis seperti permukaan
Gemini native OmniRoute (`/v1beta`). `omniroute run gemini` menghubungkan itu secara otomatis:
- `GOOGLE_GEMINI_BASE_URL` → URL dasar OmniRoute yang aktif (root, tanpa `/v1`);
- `GEMINI_API_KEY` → kredensial OmniRoute yang terpecahkan (opsi/env/konteks);
- **sebuah `GEMINI_CLI_HOME` yang terisolasi sementara** yang `.gemini/settings.json`
memilih otentikasi `gemini-api-key`, sehingga sesi Google OAuth yang disimpan (Code Assist)
tidak pernah menggantikan peluncuran yang diarahkan oleh OmniRoute — dihapus setelah keluar;
- **kebersihan env**: lingkungan anak dibersihkan dari `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` dan `GOOGLE_GENAI_USE_GCA` (yang akan mengalihkan
otentikasi ke Vertex/Code Assist), dan `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` diatur
sebagai cadangan — target `run` lainnya mendapatkan perlakuan yang sama untuk variabel yang
bertentangan;
- injeksi `--model <id>` dari `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Pengaman kepercayaan workspace Gemini masih berlaku dalam mode headless — berikan
`--skip-trust` (atau percayakan direktori secara interaktif) sendiri; peluncur
dengan sengaja tidak melewatinya. Peluncur ini berbeda dari **registrasi ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), yang tetap menjadi
integrasi protokol agen untuk `/dashboard/acp-agents`.
---
## Pembersihan asap nyata (opt-in)
Regresi rencana peluncuran deterministik berjalan di CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Untuk memvalidasi biner REAL terhadap server
OmniRoute yang REAL, terdapat harness opt-in di
`tests/integration/upstream-cli-smoke.int.test.ts`. Ini tidak pernah berjalan secara otomatis
(setiap sub-tes dilewati kecuali `RUN_CLI_SMOKE=1`), meneruskan kredensial melalui variabel-env
NAMA (tidak pernah melalui nilai), menyensor string berbentuk kunci dari output yang tercatat,
melewati target yang biner-nya tidak terinstal, dan mengklasifikasikan kegagalan sebagai
otentikasi / upstream / konfigurasi alih-alih boolean kosong:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opsional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` membatasi pembersihan;
`OMNIROUTE_SMOKE_TIMEOUT_MS` menggantikan batas waktu 120 detik per-target.
---
## Lihat juga
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — panduan mendalam tentang Claude Code
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md) — pengaturan dasar `[model_providers.omniroute]` sekali saja
- [Mode Jarak Jauh](./REMOTE-MODE.md) — konteks, token akses terbatas, mengendalikan server jarak jauh
- [Referensi Alat CLI](../reference/CLI-TOOLS.md) — katalog lengkap alat yang didukung + halaman dasbor
- [Panduan Pengaturan](./SETUP_GUIDE.md) — metode instalasi dan onboarding saat pertama kali menjalankan

View File

@@ -1,332 +1,86 @@
# CLI-TOOLS (Bahasa Indonesia)
# Panduan Pengaturan Alat CLI — OmniRoute (Bahasa Indonesia)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "Alat CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Alat CLI — OmniRoute
Terakhir diperbarui: 2026-08-18
OmniRoute terintegrasi dengan tiga kategori alat CLI yang tersebar di tiga halaman dasbor khusus:
| Halaman | Rute | Konsep | Jumlah |
| ------------ | ----------------------- | ----------------------------------------------------------------------------------- | -------------- |
| **Kode CLI** | `/dashboard/cli-code` | Alat pengkodean yang Anda arahkan ke OmniRoute (Klien → CLI → OmniRoute → Penyedia) | 26 |
| **Agen CLI** | `/dashboard/cli-agents` | Agen otonom yang Anda arahkan ke OmniRoute (alur yang sama, cakupan lebih luas) | 8 |
| **Agen ACP** | `/dashboard/acp-agents` | CLI yang diluncurkan OmniRoute sebagai backend melalui stdio/ACP (alur terbalik) | lihat registri |
Rute warisan mengalihkan melalui 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
Panduan ini menjelaskan cara menginstal dan mengonfigurasi semua alat CLI coding AI yang didukung
untuk menggunakan **OmniRoute** sebagai backend terpadu, memberikan manajemen kunci terpusat,
pelacakan biaya, pergantian model, dan pencatatan permintaan di semua alat.
---
## Cara Kerjanya
```
Kode CLI / Agen CLI (alur konsumsi):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (semua mengarah ke OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute mengarahkan ke penyedia yang tepat)
▼ (OmniRoute meneruskan ke penyedia yang tepat)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Agen ACP (alur peluncuran terbalik):
Permintaan Klien → OmniRoute → meluncurkan CLI melalui stdio/ACP → respons
```
**Manfaat:**
- Satu kunci API untuk mengelola semua alat
- Pelacakan biaya di seluruh CLI di dasbor
- Satu API key untuk mengelola semua alat
- Pelacakan biaya di semua CLI melalui dashboard
- Pergantian model tanpa mengonfigurasi ulang setiap alat
- Bekerja secara lokal dan di server jarak jauh (VPS, Docker, Akamai, Cloudflare Tunnel)
- Berjalan secara lokal maupun di server jarak jauh (VPS)
---
## Konfigurasi otomatis dengan `setup-*`
## Alat yang Didukung (Sumber Kebenaran Dashboard)
Anda tidak perlu menulis konfigurasi setiap alat dengan tangan. OmniRoute menyediakan perintah `setup-*`
untuk setiap CLI yang didukung yang membaca katalog model **langsung** dari OmniRoute yang berjalan
(lokal atau jarak jauh) dan menulis konfigurasi alat itu sendiri di mesin Anda:
Kartu dashboard di `/dashboard/cli-tools` dibuat dari `src/shared/constants/cliTools.ts`.
Daftar saat ini (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Alat | ID | Perintah | Mode Pengaturan | Metode Instalasi |
| ------------------ | ------------- | ---------- | --------------- | ---------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Setiap perintah menerima `--remote <url> --api-key <key>` (mengonfigurasi alat lokal terhadap
OmniRoute jarak jauh), `--dry-run` (prabaca tanpa menulis), dan `--port`. Alat
tanpa penemuan model otomatis (Cline, Kilo, Roo, Goose, Aider, Qwen) menggunakan
`--model <id>` (dan `--yes` untuk eksekusi non-interaktif). Untuk meluncurkan CLI dengan
lingkungan yang tepat disuntikkan dan tanpa konfigurasi yang ditulis sama sekali, gunakan
peluncur generik `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — target dan alias berasal dari `bin/cli/cli-manifest.mjs`); peluncur per-alat warisan
`omniroute launch` (Claude Code) dan `omniroute launch-codex`
(Codex) tetap tersedia. CLI Gemini hanya untuk peluncuran: itu adalah target `omniroute run`
tetapi tidak memiliki resep `setup-*`/`configure`.
### Sinkronisasi fingerprint CLI (Agents + Pengaturan)
> **Referensi lengkap:** tabel utama — apa yang ditulis setiap perintah, setiap flag,
> lokal vs jarak jauh, dan alat mana yang memerlukan akhiran `/v1` — ada di
> **[Integrasi CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` dan `Settings > CLI Fingerprint` menggunakan `src/shared/constants/cliCompatProviders.ts`.
Ini menjaga ID penyedia tetap selaras dengan kartu CLI dan ID lama.
### Menjalankan ini di dalam kontainer
| CLI ID | ID Penyedia Fingerprint |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Perintah `setup-*` yang dieksekusi di dalam kontainer OmniRoute menulis ke
rumah kontainer itu sendiri, yang tidak dibaca oleh CLI host dan yang menghilang bersama
kontainer. OmniRoute mendeteksi itu dan keluar dengan kode `2` dengan instruksi daripada
menulis. Dua cara yang didukung untuk melanjutkan — instal CLI di host dan
`omniroute connect` ke kontainer, atau bind-mount direktori konfigurasi dan set
`CLI_CONFIG_HOME` (profil `host` compose). Setiap perintah `setup-*`, ditambah
`omniroute configure` dan `omniroute config set`, menerima
`--allow-container-write` ketika mengonfigurasi CLI kontainer itu sendiri adalah apa yang sebenarnya Anda maksud; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` melakukan hal yang sama untuk
server. Lihat
[Panduan Docker → Mengonfigurasi alat CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
**Titik akhir apply** di dasbor (`POST /api/cli-tools/apply`) menerapkan
pengaman yang sama: di dalam kontainer, penulisan yang targetnya tidak bind-mounted dari
host menjawab **`422`** dengan `containerEphemeralTarget: true`, teks kesalahan yang aman
dan — untuk alat dengan resep host (claude, codex, opencode, cline,
kilo, continue) — sebuah `hostSetupCommand` (misalnya `omniroute setup-opencode`) untuk dijalankan
di host sebagai gantinya; tidak ada yang ditulis. `dryRun: true` tetap berfungsi dalam
mode kontainer dan mengembalikan konten yang dihasilkan + jalur target tanpa menyentuh disk, sehingga
Anda dapat prabaca dari dasbor dan menerapkan di host. Perilaku ini
sengaja dan dilindungi regresi oleh
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — jangan pernah "memperbaiki" 422
dengan menghapus pengaman.
ID lama yang masih diterima untuk kompatibilitas: `copilot`, `kimi-coding`, `qwen`.
---
## Sumber Kebenaran
## Langkah 1 — Dapatkan API Key OmniRoute
Katalog terpadu berada di `src/shared/constants/cliTools.ts` sebagai `CLI_TOOLS: Record<string, CliCatalogEntry>`.
Setiap entri memiliki bidang-bidang berikut (didefinisikan di `src/shared/schemas/cliCatalog.ts`):
| Bidang | Tipe | Deskripsi |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Halaman mana alat tersebut muncul |
| `vendor` | `string` | Asal alat ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Juga dapat digunakan sebagai ACP Agent (badge ditampilkan) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tingkat dukungan endpoint kustom. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mekanisme konfigurasi |
| `id`, `name`, `color`, `description`, `docsUrl` | standar | Bidang tampilan inti |
Entri dengan `baseUrlSupport: "none"` **tidak ditampilkan** di halaman dasbor — mereka terdaftar di backlog MITM untuk rencana 11 (lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Tingkatan Kapabilitas (tercatalog × terdeteksi × dapat dikonfigurasi × dapat diluncurkan)
Tidak semua alat yang tercatalog dapat terdeteksi, dapat dikonfigurasi, atau dapat diluncurkan. Setiap tingkatan memiliki satu sumber deklarasi, dan tes drift menjaga agar mereka tetap selaras:
| Tingkatan | Arti | Dideklarasikan di |
| ---------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Cataloged** | Muncul di katalog dasbor (nama, vendor, dokumen, tipe konfigurasi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detectable** | Deteksi biner/konfigurasi, pemeriksaan kesehatan, jalur konfigurasi | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **Configurable** | Didukung oleh `omniroute configure <cli>` (resep pengaturan ada) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Launchable** | Didukung oleh `omniroute run <target>` (injeksi env/args didefinisikan) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` adalah manifest eksekusi kanonik untuk perintah CLI yang muncul: `run`, `configure` dan generator penyelesaian shell semuanya mengambil daftar target, resolusi alias (misalnya `kilocode`/`kilo-code`/`kilo_cli``kilo`) dan pengkabelan flag `--model` darinya. Penjaga drift `tests/unit/cli/cli-manifest-drift.test.ts` memastikan bahwa manifest, katalog runtime, katalog UI, dan setiap permukaan konsumen tetap sinkron — target yang ditambahkan ke satu permukaan tanpa yang lainnya akan gagal dalam suite alih-alih mengalir diam-diam.
## 1. Katalog Kode CLI (26 alat)
Semua alat yang muncul di `/dashboard/cli-code`. Alat yang memiliki `baseUrlSupport: none` terhubung melalui MITM atau panduan manual alih-alih URL dasar kustom:
| id | nama | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | -------------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | penuh | env | true |
| codex | OpenAI Codex CLI | OpenAI | penuh | kustom | true |
| zcode | ZCode (Rencana Koding GLM) | Z.ai | tidak ada | kustom | false |
| cline | Cline | OSS (ex-Claude Dev) | penuh | kustom | true |
| kilo | Kilo Code | Kilo-Org | penuh | kustom | false |
| roo | Roo Code | Roo (OSS) | penuh | panduan | false |
| continue | Continue | continue.dev | penuh | panduan | false |
| aider | Aider | OSS (P. Gauthier) | penuh | panduan | true |
| forge | ForgeCode | Antinomy HQ | penuh | kustom | true |
| jcode | jcode | 1jehuang (OSS) | penuh | kustom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | penuh | kustom | false |
| codewhale | CodeWhale | Hmbown (OSS) | penuh | kustom | false |
| opencode | OpenCode | Anomaly (ex-SST) | penuh | panduan | true |
| droid | Factory Droid | Factory AI | sebagian | panduan | false |
| copilot | GitHub Copilot CLI | GitHub/MS | penuh | kustom | false |
| cursor-cli | Cursor CLI | Anysphere | sebagian | panduan | true |
| smelt | Smelt | leonardcser (OSS) | penuh | kustom | false |
| pi | Pi (agen-koding-pi) | M. Zechner (OSS) | penuh | kustom | false |
| grok-build | Grok Build | xAI | penuh | kustom | false |
| crush | Crush | OSS (Charm) | penuh | kustom | false |
| qwen | Qwen Code | Alibaba | penuh | panduan | true |
| cursor | Cursor | Anysphere | tidak ada | panduan | false |
| antigravity | Antigravity | Google | tidak ada | mitm | false |
| hermes | Hermes | Nous Research | tidak ada | panduan | false |
| kiro | Kiro AI | Amazon | tidak ada | mitm | false |
| custom | Custom CLI | — | penuh | pembuat-kustom | false |
Alat dengan `baseUrlSupport: "partial"` menunjukkan lencana "⚠ Base URL parcial" di kartu dasbor.
## 2. Katalog Agen CLI (8 alat)
Agen otonom yang muncul di `/dashboard/cli-agents`:
| id | nama | vendor | dukunganBaseUrl | dapatDibuatACP |
| ------------ | ---------------- | ------------------------ | --------------- | -------------- |
| hermes-agent | Hermes Agent | Nous Research | penuh | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | penuh | true |
| goose | Goose | Block / Linux Foundation | penuh | true |
| interpreter | Open Interpreter | OSS | penuh | true |
| warp | Warp AI | Warp Inc. | sebagian | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | penuh | false |
| omp | Oh My Pi | OSS | penuh | true |
| letta | Letta CLI | Letta | penuh | false |
---
## 3. Agen ACP (/dashboard/acp-agents)
Halaman ini (yang diubah namanya dari `/dashboard/agents`) menunjukkan CLI yang dapat **dibuat** oleh OmniRoute sebagai mesin eksekusi backend melalui protokol stdio/ACP. Katalog ini dikelola secara terpisah di `src/lib/acp/registry.ts` dan **tidak** sama dengan `CLI_TOOLS`.
---
## 4. Daftar Tugas MITM (tidak ditampilkan di dashboard)
CLI berikut tidak mendukung URL dasar kustom secara native dan **tidak terdaftar** di halaman Kode CLI atau Agen CLI. Mereka adalah kandidat untuk intersepsi MITM dalam rencana 11:
| CLI | Alasan |
| ------------------- | ----------------------------------------------------------------- |
| windsurf | BYOK terbatas pada model Claude tertentu + URL/token perusahaan |
| amp | Ekosistem tertutup (Sourcegraph) |
| amazon-q / kiro-cli | Autentikasi AWS SSO, tidak ada URL kustom |
| cowork | Anthropic Desktop, tidak ada titik akhir yang dapat dikonfigurasi |
Lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` untuk referensi silang lengkap.
---
## 5. API Deteksi Batch
Semua deteksi alat digabungkan melalui satu titik akhir:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (sama seperti rute `/api/cli-tools/` lainnya)
- Mengembalikan: `Record<toolId, ToolBatchStatus>` (tipe: `src/shared/types/cliBatchStatus.ts`)
- Strategi: `Promise.all` untuk semua alat, batas waktu 5 detik per alat
- Cache: LRU dalam memori yang diindeks oleh file konfigurasi `mtime`. Cache tidak valid ketika mtime berubah. Reset saat server di-restart.
Bentuk respons per alat:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // disanitasi, tanpa jejak tumpukan
}
```
## 6. Pengatur Pengaturan untuk Alat Baru
Alat baru dengan `configType: "custom"` memiliki rute API pengaturan khusus:
| Rute | Alat |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Agen pemrograman Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + kunci `.env` khusus) |
Semua rute menggunakan `sanitizeErrorMessage()` untuk respons kesalahan (Aturan Keras #12).
---
## 7. Arsitektur Halaman Dasbor
### Kode CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponen server
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — halaman detail alat
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 kartu alat khusus + `ToolDetailClient.tsx`
### Agen CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponen server
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — menggunakan kembali `ToolDetailClient`
### Agen ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponen server (dipindahkan dari `agents/`)
### Komponen UI Bersama (`src/shared/components/cli/`)
| File | Tujuan |
| ----------------------- | ------------------------------------------------------ |
| `CliToolCard.tsx` | Kartu status pintar (deteksi + konfigurasi + endpoint) |
| `CliConceptCard.tsx` | Kartu penjelasan konsep per halaman |
| `CliComparisonCard.tsx` | Perbandingan tiga kolom antar jenis CLI |
| `BaseUrlSelect.tsx` | Dropdown endpoint (Lokal/Awan/Kustom) |
| `ApiKeySelect.tsx` | Pemilih kunci API |
| `ManualConfigModal.tsx` | Modal cuplikan konfigurasi yang dapat disalin |
### Hook Bersama (`src/shared/hooks/cli/`)
| File | Tujuan |
| ------------------------- | --------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Mengambil `/api/cli-tools/all-statuses`, mengelola status pemuatan/segarkan |
## 8. i18n
Namespace baru ditambahkan dalam rencana 14 F9:
| Namespace | Tujuan |
| ----------- | ----------------------------------------------------------------------------------- |
| `cliCommon` | String yang dibagikan (label kartu, teks konsep/perbandingan, label halaman detail) |
| `cliCode` | String halaman CLI Code |
| `cliAgents` | String halaman CLI Agents |
| `acpAgents` | String halaman ACP Agents |
Terjemahan lengkap PT-BR dan EN disediakan. 39 lokalitas lainnya secara otomatis menggunakan EN melalui penggabungan tingkat namespace di `src/i18n/request.ts`.
---
## 9. Memulai dengan Cepat
### Langkah 1 — Dapatkan Kunci API OmniRoute
1. Buka `/dashboard/api-manager`**Buat Kunci API**
2. Beri nama (misalnya `cli-tools`) dan pilih semua izin
3. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah ini
1. Buka dashboard OmniRoute → **API Manager** (`/dashboard/api-manager`)
2. Klik **Create API Key**
3. Beri nama (misalnya `cli-tools`) dan pilih semua izin
4. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah
> Kunci Anda terlihat seperti: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Langkah 2 — Instal Alat CLI
## Langkah 2 — Instal Alat CLI
Semua alat berbasis npm memerlukan Node.js 22.22.2+ atau 24.x:
Semua alat berbasis npm memerlukan Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -344,133 +98,94 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (dapat diluncurkan melalui `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verifikasi:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Berbasis Rust
# Agen pemrograman Pi
# lihat https://github.com/zechnerj/pi-coding-agent untuk instalasi
# jcode
# lihat https://github.com/1jehuang/jcode untuk instalasi
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Langkah 3 — Konfigurasi melalui Dashboard
## Langkah 3 — Tetapkan Variabel Lingkungan Global
1. Pergi ke `http://localhost:20128/dashboard/cli-code`
2. Temukan alat Anda di grid
3. Klik kartu untuk membuka halaman detail alat
4. Pilih kunci API dan URL dasar Anda
5. Klik **Terapkan Konfigurasi** atau salin cuplikan konfigurasi manual
---
### Langkah 4 — Atur Variabel Lingkungan Global
Tambahkan ke `~/.bashrc` (atau `~/.zshrc`), lalu jalankan `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI membaca GOOGLE_GEMINI_BASE_URL di ROOT (SDK-nya menambahkan /v1beta/... sendiri)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Untuk **server jarak jauh** ganti `localhost:20128` dengan IP atau domain server,
> misalnya `http://<your-server-ip>:20128`.
> Untuk **server jarak jauh**, ganti `localhost:20128` dengan IP atau domain server,
> misalnya `http://192.168.0.15:20128`.
---
### Langkah 4 — Konfigurasi Setiap Alat
## Langkah 4 — Konfigurasi Setiap Alat
#### Claude Code
### Claude Code
```bash
# Buat ~/.claude/settings.json:
# Melalui CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Atau buat ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Gunakan root gateway Anthropic yang bersatu untuk Claude Code. Jangan tambahkan `/v1` di sini.
**Uji:** `claude "say hello"`
---
#### OpenAI Codex
Codex modern (v0.137+) hanya membaca `~/.codex/config.toml``config.yaml` lama milik CLI npm warisan dan diabaikan tanpa suara. Kunci API tetap di variabel lingkungan `OMNIROUTE_API_KEY` (`env_key`), tidak pernah di dalam file:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Referensi lengkap (profil, `wire_api`, jendela konteks): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Uji:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Uji:** `opencode`
> Gunakan `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> untuk mengirim varian berpikir.
---
#### Cline (CLI atau VS Code)
### Cline (CLI atau VS Code)
**Mode CLI:**
@@ -485,13 +200,13 @@ EOF
```
**Mode VS Code:**
Pengaturan ekstensi Cline → Penyedia API: `OpenAI Compatible`URL Dasar: `http://localhost:20128/v1`
Pengaturan ekstensi Cline → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Terapkan Konfigurasi**.
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI atau VS Code)
### KiloCode (CLI atau VS Code)
**Mode CLI:**
@@ -508,11 +223,11 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Terapkan Konfigurasi**.
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Ekstensi VS Code)
### Continue (Ekstensi VS Code)
Edit `~/.continue/config.yaml`:
@@ -526,255 +241,158 @@ models:
default: true
```
Restart VS Code setelah mengedit.
Mulai ulang VS Code setelah mengedit.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Gunakan ini ketika VS Code Insiders dikonfigurasi untuk model endpoint kustom dan Anda ingin OmniRoute berfungsi tanpa bidang header kustom.
**Lokasi yang Disarankan:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Contoh menggunakan alias OmniRoute yang ditokenisasi:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Catatan:**
- Ganti `sk-your-omniroute-key` dengan kunci API yang dibuat di OmniRoute.
- Bidang `url` harus mengarah ke `/api/v1/vscode/{token}/chat/completions`.
- Bidang `modelsUrl` harus mengarah ke `/api/v1/vscode/{token}/models`.
- Utamakan alur normal `/v1` + header Bearer ketika klien mendukung header kustom.
- Token yang tertanam dalam URL adalah fallback kompatibilitas dan mungkin muncul dalam log editor atau riwayat proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Masuk ke akun AWS/Kiro Anda:
# Login ke akun AWS/Kiro Anda:
kiro-cli login
# CLI menggunakan otentikasi sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
# Gunakan kiro-cli bersamaan dengan OmniRoute untuk alat lainnya.
# CLI ini menggunakan autentikasinya sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
# Gunakan kiro-cli bersama OmniRoute untuk alat lainnya.
kiro-cli status
```
Untuk aplikasi desktop **Kiro IDE**, gunakan endpoint MITM yang diekspos oleh OmniRoute
di bawah `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code mendukung endpoint API yang kompatibel dengan OpenAI melalui variabel lingkungan atau `settings.json`.
**Opsi 1: Variabel lingkungan (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Opsi 2: `settings.json` dengan penyedia model**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Opsi 3: Flag CLI langsung**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> Untuk **server jarak jauh**, ganti `localhost:20128` dengan IP atau domain server.
**Uji:** `qwen "say hello"`
### Cursor (Aplikasi Desktop)
> **Catatan:** Cursor merutekan permintaan melalui cloudnya sendiri. Untuk integrasi OmniRoute,
> aktifkan **Cloud Endpoint** di Pengaturan OmniRoute dan gunakan URL domain publik Anda.
Melalui GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: kunci OmniRoute Anda
---
## 10. Internal OmniRoute CLI
## Konfigurasi Otomatis Dashboard
Biner `omniroute` menyediakan perintah untuk siklus hidup server, pengaturan, diagnostik, dan manajemen penyedia. Titik masuk: `bin/omniroute.mjs`.
Dashboard OmniRoute mengotomatiskan konfigurasi untuk sebagian besar alat:
```bash
omniroute # Mulai server (port default 20128)
omniroute setup # Wizard pengaturan interaktif
omniroute doctor # Periksa konfigurasi, DB, port, runtime
omniroute providers list # Koneksi penyedia yang dikonfigurasi
omniroute providers test-all # Uji setiap koneksi aktif
omniroute reset-password # Atur ulang kata sandi admin
omniroute logs # Streaming log permintaan
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
omniroute --version # Cetak versi
omniroute --help # Tampilkan semua perintah
```
1. Buka `http://localhost:20128/dashboard/cli-tools`
2. Perluas kartu alat mana pun
3. Pilih API key Anda dari menu tarik-turun
4. Klik **Apply Config** (jika alat terdeteksi telah terinstal)
5. Atau salin cuplikan konfigurasi yang dihasilkan secara manual
### Pengaturan & Inisialisasi
---
```bash
omniroute setup # Wizard pengaturan interaktif
omniroute setup --non-interactive # Mode CI/automasi (membaca variabel env + flag)
omniroute setup --password '<value>' # Atur kata sandi admin langsung
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Tambah dan uji penyedia dalam satu langkah
```
## Agen Bawaan: Droid & OpenClaw
Variabel lingkungan yang dikenali untuk pengaturan non-interaktif:
**Droid** dan **OpenClaw** adalah agen AI yang dibangun langsung ke dalam OmniRoute — tidak perlu instalasi.
Keduanya berjalan sebagai rute internal dan menggunakan perutean model OmniRoute secara otomatis.
| Var | Tujuan |
| ------------------- | ---------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Kunci API penyedia (terikat ke `--api-key` melalui Commander `.env()`) |
| `DATA_DIR` | Ganti direktori data OmniRoute |
- Akses: `http://localhost:20128/dashboard/agents`
- Konfigurasi: combo dan penyedia yang sama seperti semua alat lainnya
- Tidak memerlukan API key atau instalasi CLI
Semua input non-interaktif lainnya diteruskan sebagai flag, bukan variabel lingkungan:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(lihat opsi `omniroute setup` di atas).
### Diagnostik
```bash
omniroute doctor # Periksa konfigurasi, DB, port, runtime, memori, kelangsungan
omniroute doctor --json # JSON yang dapat dibaca mesin
omniroute doctor --no-liveness # Lewati probe kesehatan HTTP
omniroute doctor --host 0.0.0.0 # Ganti host kelangsungan
omniroute doctor --liveness-url <url> # Ganti URL endpoint kesehatan penuh
```
Dokter menjalankan pemeriksaan ini: `Konfigurasi`, `Database`, `Penyimpanan/enkripsi`,
`Ketersediaan Port`, `Runtime Node`, `Biner asli` (better-sqlite3),
`Memori`, dan `Kelangsungan Server`. Ia keluar dengan status non-nol jika ada pemeriksaan yang `gagal`.
### Manajemen Penyedia
```bash
omniroute providers available # Katalog penyedia OmniRoute
omniroute providers available --search openai # Filter katalog berdasarkan id/nama/alias/kategori
omniroute providers available --category api-key # Filter berdasarkan kategori (api-key, oauth, gratis, ...)
omniroute providers available --json # JSON yang dapat dibaca mesin
omniroute providers list # Koneksi penyedia yang dikonfigurasi
omniroute providers list --json
omniroute providers test <id|name> # Uji satu koneksi yang dikonfigurasi
omniroute providers test-all # Uji setiap koneksi aktif
omniroute providers validate # Validasi struktural hanya lokal
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Alur OAuth yang ada
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` adalah API-first dan oleh karena itu bekerja terhadap
konteks lokal atau jarak jauh yang aktif. Input kredensial harus menggunakan
`--credential-stdin` atau `--credential-env`; `--dry-run --json` hanya melaporkan
keberadaan/bentuk yang disunting. `providers available` membaca katalog OmniRoute;
`providers list/test/test-all/validate` mempertahankan perilaku SQLite lokal mereka dan
tidak memerlukan server untuk berjalan.
### Pemulihan & Atur Ulang
```bash
omniroute reset-password # Atur ulang kata sandi admin (juga: omniroute-reset-password)
omniroute reset-encrypted-columns # Tampilkan peringatan + dry-run untuk atur ulang kredensial terenkripsi
omniroute reset-encrypted-columns --force # Benar-benar menghapus kredensial terenkripsi di SQLite
```
### Ekspor Kredensial (⚠ tangani dengan hati-hati)
```bash
omniroute auth export # Tampilkan peringatan + gerbang konfirmasi — tidak ada akses DB
omniroute auth export --force # Ekspor SEMUA kredensial DECRYPTED koneksi ke stdout sebagai JSON
omniroute auth export --force --id <id> # Ekspor hanya koneksi yang cocok
omniroute auth export --force --format env # Emit OMNIROUTE_<PROVIDER>_<FIELD>=<value> baris
omniroute auth export --force --out creds.json # Tulis ke file (dibuat dengan izin 0600)
```
`auth export` adalah **hanya lokal** (baca SQLite langsung, tidak ada rute HTTP) dan dengan sengaja mencetak/menulis
nilai **plaintext** `apiKey`/`accessToken`/`refreshToken`/`idToken` — itu adalah fitur, bukan
bug. Tidak ada yang dibaca dari database, dan tidak ada yang didekripsi, tanpa `--force`. Sebuah banner peringatan stderr
selalu dicetak sebelum ada plaintext yang dikeluarkan. Memerlukan `STORAGE_ENCRYPTION_KEY` untuk
diatur. Sebuah field yang gagal untuk didekripsi (kunci kadaluarsa, ciphertext rusak) dilaporkan sebagai
`<field>DecryptFailed: true` alih-alih menghentikan seluruh ekspor atau membocorkan kesalahan yang mendasarinya.
### Subperintah Lainnya
Ini mengasumsikan server OmniRoute yang berjalan, kecuali dinyatakan sebaliknya:
```bash
omniroute status # Status runtime yang komprehensif
omniroute logs # Streaming log permintaan (--json, --search, --follow)
omniroute config show # Tampilkan konfigurasi saat ini
omniroute provider list # Daftar penyedia yang tersedia (alias dari providers list)
omniroute provider add # Daftarkan OmniRoute sebagai penyedia di alat
omniroute keys add | list | remove # Kelola kunci API
omniroute models [provider] # Daftar model (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfigurasi + DB
omniroute restore # Pulihkan dari snapshot sebelumnya
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
omniroute quota # Penggunaan kuota penyedia
omniroute cache # Status cache
omniroute cache clear # Hapus cache semantik + tanda tangan
omniroute mcp status | restart # Status server MCP / restart
omniroute a2a status | card # Status server A2A / kartu agen
omniroute tunnel list | create | stop # Kelola terowongan (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Periksa / atur variabel env (sementara)
omniroute test # Uji konektivitas penyedia
omniroute update # Periksa pembaruan
omniroute completion # Hasilkan penyelesaian shell
```
### Flag Umum
| Flag | Deskripsi |
| ------------------- | ------------------------------------------------------------- |
| `--no-open` | Jangan otomatis membuka browser saat mulai |
| `--port <n>` | Ganti port API (default 20128) |
| `--mcp` | Jalankan sebagai server MCP melalui stdio (untuk IDE) |
| `--non-interactive` | Mode CI (tanpa prompt; membaca dari env/flags) |
| `--json` | Output JSON yang dapat dibaca mesin (doctor, providers, dll.) |
| `--help`, `-h` | Tampilkan bantuan spesifik perintah |
| `--version`, `-v` | Cetak versi yang terinstal |
---
## Endpoint API yang Tersedia
| Endpoint | Deskripsi | Digunakan Untuk |
| -------------------------- | -------------------------------- | ------------------------------------ |
| `/v1/chat/completions` | Obrolan standar (semua penyedia) | Semua alat modern |
| `/v1/responses` | API Respons (format OpenAI) | Codex, alur kerja agentik |
| `/v1/completions` | Penyelesaian teks warisan | Alat lama yang menggunakan `prompt:` |
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
| `/v1/images/generations` | Generasi gambar | GPT-Image, Flux, dll. |
| `/v1/audio/speech` | Teks-ke-suara | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Suara-ke-teks | Deepgram, AssemblyAI |
Contoh siap-tempel dengan URL OmniRoute yang ter-tokenisasi:
```txt
Token contoh: sk-a3ab3c080beaee3a-69f4a4-070d71af
Basis OpenAI standar: http://localhost:20128/v1
Model VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Obrolan VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Respons VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Obrolan Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
| Endpoint | Deskripsi | Digunakan Untuk |
| -------------------------- | --------------------------------- | --------------------------- |
| `/v1/chat/completions` | Chat standar (semua penyedia) | Semua alat modern |
| `/v1/responses` | Responses API (format OpenAI) | Codex, alur kerja agentik |
| `/v1/completions` | Penyelesaian teks lama | Alat lama yang menggunakan `prompt:` |
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
| `/v1/images/generations` | Pembuatan gambar | GPT-Image, Flux, dll. |
| `/v1/audio/speech` | Teks ke ucapan | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Ucapan ke teks | Deepgram, AssemblyAI |
---
## Pemecahan Masalah
| Kesalahan | Penyebab | Perbaikan |
| ------------------------------------------------------ | --------------------------------- | ---------------------------------------------------------- |
| `Connection refused` | OmniRoute tidak berjalan | `omniroute serve` |
| `401 Unauthorized` | Kunci API salah | Periksa di `/dashboard/api-manager` |
| `No combo configured` | Tidak ada kombinasi routing aktif | Siapkan di `/dashboard/combos` |
| CLI menunjukkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
| Dashboard menunjukkan "not detected" setelah instalasi | Cache usang | Klik "⟳ Refresh detection" di dashboard |
| Tautan lama `/dashboard/cli-tools` | Bookmark pra-v3.8.6 | Dialihkan secara otomatis ke `/dashboard/cli-code` (308) |
| Tautan lama `/dashboard/agents` | Bookmark pra-v3.8.6 | Dialihkan secara otomatis ke `/dashboard/acp-agents` (308) |
| Error | Penyebab | Solusi |
| ------------------------- | --------------------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute tidak berjalan | `pm2 start omniroute` |
| `401 Unauthorized` | API key salah | Periksa di `/dashboard/api-manager` |
| `No combo configured` | Tidak ada combo perutean aktif | Atur di `/dashboard/combos` |
| `invalid model` | Model tidak ada dalam katalog | Gunakan `auto` atau periksa `/dashboard/providers` |
| CLI menampilkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
| `kiro-cli: not found` | Tidak ada di PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Skrip Pengaturan Cepat (Satu Perintah)
```bash
# Instal semua CLI dan konfigurasi untuk OmniRoute (ganti dengan kunci dan URL server Anda)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Tulis konfigurasi
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,315 +0,0 @@
# CLI-INTEGRATIONS (Bahasa Indonesia (Alt))
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrasi CLI — arahkan CLI pengkodean ke OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrasi CLI
OmniRoute menyediakan serangkaian perintah `setup-*` yang mengonfigurasi CLI pengkodean
(Codex, Claude Code, OpenCode, Cline, …) untuk menggunakan OmniRoute sebagai backend-nya — sehingga
alat tersebut berkomunikasi dengan **satu** endpoint dan OmniRoute mengarahkan ke penyedia yang tepat dengan
fallback otomatis. Setiap perintah membaca katalog model **langsung** dari OmniRoute yang sedang berjalan
(lokal atau jarak jauh) dan menulis file konfigurasi alat itu sendiri di **mesin Anda**. Kunci API dirujuk oleh variabel lingkungan di mana pun alat tersebut mendukungnya. Perintah yang mempertahankan file lingkungan lokal alat dicatat di bawah.
Ada juga peluncur generik — `omniroute run <target>` — yang memunculkan
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` atau `gemini` dengan
lingkungan yang tepat disuntikkan, tanpa menulis konfigurasi sama sekali. Target dan aliasnya berasal dari manifest kanonik `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), dan `omniroute completion` menawarkan
kata target yang sama yang berasal dari manifest. Peluncur per-alat yang lama —
`omniroute launch` (Claude Code) dan `omniroute launch-codex` (Codex) — tetap
tersedia.
Onboarding penyedia tersedia dari konteks lokal/remote yang sama. Perintah
API-first di bawah ini menjaga autentikasi manajemen terpisah dari kredensial penyedia
dan tidak pernah mencetak kredensial dalam output terstruktur:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Untuk skrip, lebih baik menggunakan `--credential-stdin` atau `--credential-env`; `--credential`
dipertahankan untuk penggunaan lokal yang terkontrol. `providers remove` memerlukan `--yes` pada terminal
non-interaktif, dan kelima perintah menghormati konteks aktif atau opsi global `--base-url`/`--api-key`.
Untuk pengaturan dasar satu kali yang ditulis tangan dari dua integrasi terkaya, lihat
penjelasan mendalam per-alat:
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Konfigurasi CLI Codex](./CODEX-CLI-CONFIGURATION.md)
- [Mode Jarak Jauh](./REMOTE-MODE.md) — mengendalikan OmniRoute jarak jauh (VPS / Tailnet) dari laptop Anda
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ekstensi OmniCopilot; ini juga dapat menjalankan
perintah `setup-*` ini untuk Anda dari dalam editor
---
## Tabel Master
Setiap perintah menghormati **konteks aktif** (diatur dengan `omniroute connect`, lihat
[Mode Jarak Jauh](./REMOTE-MODE.md)) atau bendera eksplisit `--remote <url> --api-key <key>`.
"Local vs remote" di bawah ini berarti: tanpa bendera, itu menargetkan `http://localhost:20128`;
dengan `--remote` (atau konteks jarak jauh yang aktif) itu mengambil katalog dari server tersebut dan menulis konfigurasi secara lokal.
| Perintah | Alat | Apa yang ditulis | Bendera kunci | Local vs remote |
| -------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — satu profil per model teks yang kompatibel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Keduanya |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — satu profil per model yang cocok (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Keduanya |
| `omniroute setup-opencode` | OpenCode (kompatibel dengan openai) | `~/.config/opencode/opencode.json` — penyedia `omniroute` dengan setiap model katalog (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Keduanya |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mode CLI) + mencetak pengaturan ekstensi VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Keduanya |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + menggabungkan `kilocode.*` ke dalam `settings.json` VS Code jika ada | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Keduanya |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — model `provider: openai`, kunci melalui `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-cursor` | Cursor | Tidak ada — mencetak langkah-langkah dalam aplikasi (konfigurasi Cursor tidak terlihat) | `--remote` `--api-key` `--only` `--port` | Keduanya |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dokumen impor) + mengatur `roo-cline.autoImportSettingsPath` jika ada `settings.json` VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Keduanya |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — penyedia `openai-compat`, kunci melalui `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` di `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Keduanya |
| `omniroute run <target>` | Peluncuran runtime (generik) | Tidak ada — memunculkan `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` dengan env dan argumen yang tepat; Qwen dan Gemini menggunakan home terisolasi sementara | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Keduanya |
| `omniroute launch` | Claude Code | Tidak ada — memunculkan `claude` dengan `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` disuntikkan | `--remote` `--api-key` `--token` `--profile` `--port` | Keduanya |
| `omniroute launch-codex` | OpenAI Codex CLI | Tidak ada — memunculkan `codex` dengan penyedia `omniroute` disuntikkan melalui bendera `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Keduanya |
Catatan tentang bendera (diverifikasi dalam sumber perintah):
- `--remote <url>` — mengambil katalog dari OmniRoute jarak jauh (mengganti `--port`
dan konteks aktif). `--api-key <key>` menyediakan kredensial untuk server tersebut
(default ke variabel lingkungan `OMNIROUTE_API_KEY`, atau token konteks aktif).
- `--only <patterns>` — substring yang dipisahkan koma; hanya menyimpan ID model yang cocok
(misalnya `--only glm,kimi`). Tersedia pada `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — mencetak persis apa yang akan ditulis tanpa menyentuh
sistem file. Tersedia pada setiap perintah `setup-*` **kecuali** `setup-cursor`
(yang tidak pernah menulis file).
- `--model <id>` — diperlukan (atau dipilih secara interaktif) untuk alat yang tidak memiliki
penemuan model otomatis: Cline, Kilo, Roo, Goose, Qwen, Aider. Alat-alat tersebut
juga menerima `--yes` untuk penggunaan non-interaktif (yang kemudian memerlukan `--model`).
`setup-opencode` mengambil `--model` untuk mengatur model tingkat atas default.
- `--model <id>` pada `omniroute run` mengikuti pengkabelan per-target manifest
(`bin/cli/cli-manifest.mjs`): **aider** menerima `--model openai/<id>` dan
**opencode** `--model omniroute/<id>` (awalan hanya ditambahkan ketika id
tidak sudah membawanya); **qwen** dan **gemini** menerima id secara verbatim;
**claude** mendapatkannya melalui `ANTHROPIC_MODEL`, **goose** melalui `GOOSE_MODEL`, dan
**codex** melalui argumen `-c model_providers.omniroute.*`. **Qwen adalah satu-satunya target run
yang secara keras memerlukan `--model`** — `omniroute run qwen` tanpa itu keluar
`2` dengan kesalahan eksplisit.
- `--port <port>` — port OmniRoute lokal (default `20128`, diabaikan saat `--remote`
diatur). Tersedia pada semua `setup-*` dan kedua peluncur.
- Kode keluar `omniroute run`: kode keluar CLI anak disebarkan
secara verbatim; `2` = argumen tidak valid (target tidak didukung, `--model` yang diperlukan hilang, penjaga kontainer); `127` = biner target tidak ada di `PATH`;
`130`/`143`/`129` ketika peluncuran diakhiri oleh `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = kegagalan peluncuran runtime lainnya.
- Kedua peluncur (`launch`, `launch-codex`) menerima `--profile <name>` untuk memilih
profil yang ditulis oleh `setup-claude` / `setup-codex`, ditambah argumen pass-through untuk
biner `claude` / `codex` yang mendasarinya.
Pemilih interaktif juga dibagikan oleh resep pengaturan:
```bash
# Pilih dari katalog model lokal atau jarak jauh yang aktif dan konfigurasikan target.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` saat ini mendelegasikan ke resep yang diuji untuk `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, dan `kilo`. Entri katalog yang hanya untuk IDE,
MITM, dan hanya panduan tetap sebagai alur `setup-*`/manual yang eksplisit dan
tidak disajikan sebagai target yang dapat diluncurkan.
> `setup-opencode` adalah integrasi OpenCode **ringan yang kompatibel dengan openai**.
> Ada juga integrasi plugin yang lebih kaya — `omniroute setup opencode` — yang
> menginstal `@omniroute/opencode-plugin`. Mereka adalah perintah yang berbeda; tabel
> di atas mendokumentasikan `setup-opencode`.
---
## Penggunaan Lokal
Dengan OmniRoute berjalan di `localhost:20128`, cukup jalankan perintah setup untuk alat Anda. Katalog diambil dari server lokal.
```bash
# Codex: tulis profil per model yang cocok ke ~/.codex/
omniroute setup-codex
codex --profile glm52 # gunakan profil yang dihasilkan
# Claude Code: tulis profil per-model, lalu luncurkan satu
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: tulis penyedia yang kompatibel dengan openai dengan semua model katalog
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # dirujuk melalui {env:OMNIROUTE_API_KEY}, tidak pernah di disk
opencode -m omniroute/glm/glm-5.2 "..."
# Alat tanpa penemuan otomatis memerlukan model eksplisit:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Prabaca tanpa menulis apa pun:
omniroute setup-continue --dry-run
```
Luncurkan tanpa menulis konfigurasi sama sekali (hanya injeksi-env):
```bash
omniroute launch # Claude Code → OmniRoute lokal
omniroute launch-codex # Codex CLI → OmniRoute lokal
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Jalur perintah eksplisit: teruskan apa pun yang datang setelah --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Penggunaan Jarak Jauh
Arahkan perintah setup apa pun ke OmniRoute jarak jauh dengan `--remote` + `--api-key`. Katalog diambil dari jarak jauh; konfigurasi ditulis di mesin lokal Anda.
```bash
# OpenCode terhadap VPS jarak jauh, simpan hanya model glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # ekspor OMNIROUTE_API_KEY terlebih dahulu
# Profil Codex dari katalog jarak jauh
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Luncurkan CLI langsung terhadap jarak jauh
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Alih-alih melewatkan `--remote`/`--api-key` setiap kali, masuk sekali dan biarkan **konteks aktif** menyediakannya secara otomatis:
```bash
omniroute connect 192.168.0.15 # menciptakan token terikat, menyimpan konteks
omniroute setup-codex # ← sekarang menggunakan katalog jarak jauh
omniroute setup-opencode # ← sama
omniroute launch # ← Claude Code terhadap jarak jauh
```
Lihat [Mode Jarak Jauh](./REMOTE-MODE.md) untuk konteks, ruang lingkup, dan manajemen token.
---
## Konvensi URL Dasar (alat yang menginginkan `/v1`)
OmniRoute mengekspos permukaan OpenAI di `/v1`, permukaan Anthropic di root, dan permukaan Gemini asli di `/v1beta`. Setiap integrasi terhubung ke bentuk yang diharapkan alatnya (diverifikasi di sumber perintah):
| Integrasi | URL Dasar yang ditulis | `/v1`? |
| -------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | root | Tidak — Cline menambahkan `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | root | Tidak — Goose menambahkan jalur |
| `setup-aider` (`OPENAI_API_BASE`) | root | Tidak — LiteLLM menambahkan `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | dengan `/v1` | Ya |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Tidak — Claude Code menambahkan `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | dengan `/v1` | Ya |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | dengan `/v1` | Ya |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Tidak — SDK menambahkan `/v1beta/models/…` |
---
## Menjaga dependensi native saat pembaruan: `--include=optional`
Saat Anda memperbarui dengan `omniroute update` (setelah mengonfirmasi, atau dengan `--apply`),
OmniRoute menjalankan instalasi dengan `--include=optional` yang sudah terintegrasi:
```bash
npm install -g omniroute@latest --include=optional
```
Ini **bukan** sebuah flag yang Anda berikan ke `omniroute update` — ini selalu diterapkan oleh
updater. Ini menjamin bahwa `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, tumpukan LLMLingua SLM) tetap ada setelah pembaruan meskipun konfigurasi npm Anda
memiliki `omit=optional` yang akan menghapus driver SQLite native dan binding OS-keyring secara diam-diam. Untuk melihat perintah yang tepat tanpa menerapkannya:
```bash
omniroute update --dry-run
# [DRY RUN] Akan menjalankan: npm install -g omniroute@latest --include=optional
```
Flag `omniroute update` lainnya (terverifikasi dalam sumber): `--check` (keluar 1 jika
ketinggalan), `--apply` (instal tanpa meminta), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI melalui `omniroute run gemini`
Kontrak diverifikasi terhadap `@google/gemini-cli` 0.50.0: CLI menghormati
`GOOGLE_GEMINI_BASE_URL` dan mengeluarkan `POST /v1beta/models/<model>:generateContent`
(dan `:streamGenerateContent?alt=sse`) terhadapnya — persis seperti permukaan Gemini native OmniRoute (`/v1beta`). `omniroute run gemini` menghubungkan itu secara otomatis:
- `GOOGLE_GEMINI_BASE_URL` → URL dasar OmniRoute yang aktif (root, tanpa `/v1`);
- `GEMINI_API_KEY` → kredensial OmniRoute yang terpecahkan (opsi/env/konteks);
- **`GEMINI_CLI_HOME` sementara yang terisolasi** yang `.gemini/settings.json`
memilih otentikasi `gemini-api-key`, sehingga sesi OAuth Google yang disimpan (Code Assist)
tidak pernah menimpa peluncuran yang diarahkan oleh OmniRoute — dihapus setelah keluar;
- **kebersihan env**: lingkungan anak dibersihkan dari `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` dan `GOOGLE_GENAI_USE_GCA` (yang akan mengalihkan
otentikasi ke Vertex/Code Assist), dan `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` diatur sebagai
cadangan — target `run` lainnya mendapatkan perlakuan yang sama untuk variabel yang bertentangan;
- injeksi `--model <id>` dari `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Pengaman kepercayaan workspace Gemini masih berlaku dalam mode headless — berikan
`--skip-trust` (atau percayakan direktori secara interaktif) sendiri; peluncur
dengan sengaja tidak melewatinya. Peluncur ini berbeda dari **registrasi ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), yang tetap menjadi
integrasi protokol agen untuk `/dashboard/acp-agents`.
---
## Pembersihan asap nyata (opt-in)
Regresi rencana peluncuran deterministik berjalan di CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Untuk memvalidasi biner REAL terhadap server
OmniRoute yang REAL, ada harness opt-in di
`tests/integration/upstream-cli-smoke.int.test.ts`. Ini tidak pernah berjalan secara otomatis
(setiap sub-tes dilewati kecuali `RUN_CLI_SMOKE=1`), meneruskan kredensial melalui variabel-env
NAMA (tidak pernah melalui nilai), menyensor string berbentuk kunci dari output yang tercatat,
melewati target yang biner-nya tidak terinstal, dan mengklasifikasikan kegagalan sebagai
otentikasi / upstream / konfigurasi alih-alih boolean kosong:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opsional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` membatasi pembersihan;
`OMNIROUTE_SMOKE_TIMEOUT_MS` menggantikan batas waktu 120 detik per-target.
---
## Lihat juga
- [Konfigurasi Kode Claude](./CLAUDE-CODE-CONFIGURATION.md) — panduan lebih dalam tentang Kode Claude
- [Konfigurasi CLI Codex](./CODEX-CLI-CONFIGURATION.md) — pengaturan dasar `[model_providers.omniroute]` sekali saja
- [Mode Jarak Jauh](./REMOTE-MODE.md) — konteks, token akses terbatas, mengendalikan server jarak jauh
- [Referensi Alat CLI](../reference/CLI-TOOLS.md) — katalog lengkap alat yang didukung + halaman dasbor
- [Panduan Pengaturan](./SETUP_GUIDE.md) — metode instalasi dan onboarding saat pertama kali menjalankan

View File

@@ -1,330 +1,86 @@
# CLI-TOOLS (Bahasa Indonesia (Alt))
# CLI Tools Setup Guide — OmniRoute (हिन्दी (IN))
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇮🇳 [in](../../in/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md)
---
---
title: "Alat CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Alat CLI — OmniRoute
Terakhir diperbarui: 2026-08-18
OmniRoute terintegrasi dengan tiga kategori alat CLI yang tersebar di tiga halaman dasbor khusus:
| Halaman | Rute | Konsep | Jumlah |
| ------------ | ----------------------- | ----------------------------------------------------------------------------------- | -------------- |
| **Kode CLI** | `/dashboard/cli-code` | Alat pengkodean yang Anda arahkan ke OmniRoute (Klien → CLI → OmniRoute → Penyedia) | 26 |
| **Agen CLI** | `/dashboard/cli-agents` | Agen otonom yang Anda arahkan ke OmniRoute (alur yang sama, cakupan lebih luas) | 8 |
| **Agen ACP** | `/dashboard/acp-agents` | CLI yang diluncurkan OmniRoute sebagai backend melalui stdio/ACP (alur terbalik) | lihat registri |
Rute warisan mengalihkan melalui 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Cara Kerjanya
## How It Works
```
Kode CLI / Agen CLI (alur konsumsi):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (semua mengarah ke OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute mengarahkan ke penyedia yang tepat)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Agen ACP (alur peluncuran terbalik):
Permintaan Klien → OmniRoute → meluncurkan CLI melalui stdio/ACP → respons
```
**Manfaat:**
**Benefits:**
- Satu kunci API untuk mengelola semua alat
- Pelacakan biaya di semua CLI di dasbor
- Pergantian model tanpa mengonfigurasi ulang setiap alat
- Bekerja secara lokal dan di server jarak jauh (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Konfigurasi otomatis dengan `setup-*`
## Supported Tools (Dashboard Source of Truth)
Anda tidak perlu menulis konfigurasi setiap alat dengan tangan. OmniRoute menyediakan perintah `setup-*`
untuk setiap CLI yang didukung yang membaca katalog model **langsung** dari OmniRoute yang berjalan
(lokal atau jarak jauh) dan menulis konfigurasi alat itu sendiri di mesin Anda:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Setiap perintah menerima `--remote <url> --api-key <key>` (mengonfigurasi alat lokal terhadap
OmniRoute jarak jauh), `--dry-run` (prabaca tanpa menulis), dan `--port`. Alat
tanpa penemuan model otomatis (Cline, Kilo, Roo, Goose, Aider, Qwen) menggunakan
`--model <id>` (dan `--yes` untuk eksekusi non-interaktif). Untuk meluncurkan CLI dengan
lingkungan yang tepat disuntikkan dan tanpa konfigurasi yang ditulis sama sekali, gunakan
peluncur generik `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — target dan alias berasal dari `bin/cli/cli-manifest.mjs`); peluncur per-alat warisan
`omniroute launch` (Claude Code) dan `omniroute launch-codex`
(Codex) tetap tersedia. CLI Gemini hanya untuk peluncuran: ini adalah target `omniroute run`
tetapi tidak memiliki resep `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **Referensi lengkap:** tabel master — apa yang ditulis setiap perintah, setiap bendera,
> lokal vs jarak jauh, dan alat mana yang memerlukan akhiran `/v1` — ada di
> **[Integrasi CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Menjalankan ini di dalam kontainer
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Perintah `setup-*` yang dieksekusi di dalam kontainer OmniRoute menulis ke
rumah kontainer itu sendiri, yang tidak dibaca oleh CLI host dan yang menghilang dengan
kontainer. OmniRoute mendeteksi hal itu dan keluar dengan `2` dengan instruksi daripada
menulis. Dua cara yang didukung untuk melanjutkan — instal CLI di host dan
`omniroute connect` ke kontainer, atau bind-mount direktori konfigurasi dan set
`CLI_CONFIG_HOME` (profil `host` compose). Setiap perintah `setup-*`, ditambah
`omniroute configure` dan `omniroute config set`, menerima
`--allow-container-write` ketika mengonfigurasi CLI kontainer itu sendiri adalah yang sebenarnya Anda maksud; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` melakukan hal yang sama untuk
server. Lihat
[Panduan Docker → Mengonfigurasi alat CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
**Endpoint terapkan** di dasbor (`POST /api/cli-tools/apply`) menerapkan
penjagaan yang sama: di dalam kontainer, penulisan yang targetnya tidak bind-mounted dari
host menjawab **`422`** dengan `containerEphemeralTarget: true`, teks kesalahan yang aman
dan — untuk alat dengan resep host (claude, codex, opencode, cline,
kilo, continue) — sebuah `hostSetupCommand` (misalnya `omniroute setup-opencode`) untuk dijalankan
di host sebagai gantinya; tidak ada yang ditulis. `dryRun: true` tetap berfungsi dalam mode
kontainer dan mengembalikan konten yang dihasilkan + jalur target tanpa menyentuh disk, sehingga
Anda dapat prabaca dari dasbor dan menerapkan di host. Perilaku ini
sengaja dan dilindungi regresi oleh
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — jangan pernah "memperbaiki" 422
dengan menghapus penjagaan.
## Sumber Kebenaran
Katalog terpadu berada di `src/shared/constants/cliTools.ts` sebagai `CLI_TOOLS: Record<string, CliCatalogEntry>`.
Setiap entri memiliki bidang-bidang berikut (didefinisikan di `src/shared/schemas/cliCatalog.ts`):
| Bidang | Tipe | Deskripsi |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | Halaman mana alat tersebut muncul |
| `vendor` | `string` | Asal alat ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Juga dapat digunakan sebagai ACP Agent (lencana ditampilkan) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tingkat dukungan endpoint kustom. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mekanisme konfigurasi |
| `id`, `name`, `color`, `description`, `docsUrl` | standar | Bidang tampilan inti |
Entri dengan `baseUrlSupport: "none"` **tidak ditampilkan** di halaman dasbor — mereka terdaftar di backlog MITM untuk rencana 11 (lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Tingkatan Kapabilitas (tercatalog × terdeteksi × terkonfigurasi × dapat diluncurkan)
Tidak setiap alat yang tercatalog dapat terdeteksi, terkonfigurasi, atau dapat diluncurkan. Setiap tingkatan memiliki satu sumber deklarasi, dan tes drift menjaga mereka tetap selaras:
| Tingkatan | Arti | Dideklarasikan di |
| ---------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Cataloged** | Muncul di katalog dasbor (nama, vendor, dokumen, tipe konfigurasi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detectable** | Deteksi biner/konfigurasi, pemeriksaan kesehatan, jalur konfigurasi | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **Configurable** | Didukung oleh `omniroute configure <cli>` (resep pengaturan ada) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Launchable** | Didukung oleh `omniroute run <target>` (injeksi env/args didefinisikan) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` adalah manifest eksekusi kanonik untuk perintah CLI yang muncul: `run`, `configure` dan generator penyelesaian shell semuanya mengambil daftar target, resolusi alias (misalnya `kilocode`/`kilo-code`/`kilo_cli``kilo`) dan pengkabelan flag `--model` darinya. Penjaga drift `tests/unit/cli/cli-manifest-drift.test.ts` memastikan bahwa manifest, katalog runtime, katalog UI, dan setiap permukaan konsumen tetap sinkron — target yang ditambahkan ke satu permukaan tanpa yang lainnya akan gagal dalam suite alih-alih mengalir diam-diam.
## 1. Katalog Kode CLI (26 alat)
Semua alat yang muncul di `/dashboard/cli-code`. Alat yang memiliki `baseUrlSupport: none` terhubung melalui MITM atau panduan manual alih-alih URL dasar kustom:
| id | nama | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | -------------------------- | ------------------------------ | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | penuh | env | true |
| codex | OpenAI Codex CLI | OpenAI | penuh | kustom | true |
| zcode | ZCode (Rencana Koding GLM) | Z.ai | tidak ada | kustom | false |
| cline | Cline | OSS (mantan-Pengembang Claude) | penuh | kustom | true |
| kilo | Kilo Code | Kilo-Org | penuh | kustom | false |
| roo | Roo Code | Roo (OSS) | penuh | panduan | false |
| continue | Continue | continue.dev | penuh | panduan | false |
| aider | Aider | OSS (P. Gauthier) | penuh | panduan | true |
| forge | ForgeCode | Antinomy HQ | penuh | kustom | true |
| jcode | jcode | 1jehuang (OSS) | penuh | kustom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | penuh | kustom | false |
| codewhale | CodeWhale | Hmbown (OSS) | penuh | kustom | false |
| opencode | OpenCode | Anomaly (mantan-SST) | penuh | panduan | true |
| droid | Factory Droid | Factory AI | sebagian | panduan | false |
| copilot | GitHub Copilot CLI | GitHub/MS | penuh | kustom | false |
| cursor-cli | Cursor CLI | Anysphere | sebagian | panduan | true |
| smelt | Smelt | leonardcser (OSS) | penuh | kustom | false |
| pi | Pi (agen-koding-pi) | M. Zechner (OSS) | penuh | kustom | false |
| grok-build | Grok Build | xAI | penuh | kustom | false |
| crush | Crush | OSS (Charm) | penuh | kustom | false |
| qwen | Qwen Code | Alibaba | penuh | panduan | true |
| cursor | Cursor | Anysphere | tidak ada | panduan | false |
| antigravity | Antigravity | Google | tidak ada | mitm | false |
| hermes | Hermes | Nous Research | tidak ada | panduan | false |
| kiro | Kiro AI | Amazon | tidak ada | mitm | false |
| custom | Custom CLI | — | penuh | pembuat-kustom | false |
Alat dengan `baseUrlSupport: "partial"` menunjukkan lencana "⚠ Base URL parcial" di kartu dasbor.
## 2. Katalog Agen CLI (8 alat)
Agen otonom yang muncul di `/dashboard/cli-agents`:
| id | nama | vendor | dukunganBaseUrl | dapatDibuatACP |
| ------------ | ---------------- | ------------------------ | --------------- | -------------- |
| hermes-agent | Hermes Agent | Nous Research | penuh | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | penuh | true |
| goose | Goose | Block / Linux Foundation | penuh | true |
| interpreter | Open Interpreter | OSS | penuh | true |
| warp | Warp AI | Warp Inc. | sebagian | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | penuh | false |
| omp | Oh My Pi | OSS | penuh | true |
| letta | Letta CLI | Letta | penuh | false |
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## 3. Agen ACP (/dashboard/acp-agents)
## Step 1 — Get an OmniRoute API Key
Halaman ini (yang diganti namanya dari `/dashboard/agents`) menunjukkan CLI yang dapat **dibuat** oleh OmniRoute sebagai mesin eksekusi backend melalui protokol stdio/ACP. Katalog ini dikelola secara terpisah di `src/lib/acp/registry.ts` dan **tidak** sama dengan `CLI_TOOLS`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 4. Daftar Tugas MITM (tidak ditampilkan di dasbor)
## Step 2 — Install CLI Tools
CLI berikut tidak mendukung URL dasar kustom secara native dan **tidak terdaftar** di halaman Kode CLI atau Agen CLI. Mereka adalah kandidat untuk intersepsi MITM dalam rencana 11:
| CLI | Alasan |
| ------------------- | ----------------------------------------------------------------- |
| windsurf | BYOK terbatas pada model Claude tertentu + URL/token perusahaan |
| amp | Ekosistem tertutup (Sourcegraph) |
| amazon-q / kiro-cli | Autentikasi AWS SSO, tidak ada URL kustom |
| cowork | Anthropic Desktop, tidak ada titik akhir yang dapat dikonfigurasi |
Lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` untuk referensi silang lengkap.
---
## 5. API Deteksi Batch
Semua deteksi alat digabungkan melalui satu titik akhir:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (sama seperti rute `/api/cli-tools/` lainnya)
- Mengembalikan: `Record<toolId, ToolBatchStatus>` (tipe: `src/shared/types/cliBatchStatus.ts`)
- Strategi: `Promise.all` untuk semua alat, timeout 5s per alat
- Cache: dalam memori LRU yang diindeks oleh file konfigurasi `mtime`. Cache tidak valid ketika mtime berubah. Reset saat server di-restart.
Bentuk respons per alat:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // disanitasi, tidak ada jejak tumpukan
}
```
## 6. Pengatur Pengaturan untuk Alat Baru
Alat baru dengan `configType: "custom"` memiliki rute API pengaturan yang didedikasikan:
| Rute | Alat |
| ------------------------------------------- | --------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Agen pengkodean Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + kunci `.env` yang didedikasikan) |
Semua rute menggunakan `sanitizeErrorMessage()` untuk respons kesalahan (Aturan Keras #12).
---
## 7. Arsitektur Halaman Dasbor
### Kode CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponen server
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — halaman detail alat
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 kartu alat khusus + `ToolDetailClient.tsx`
### Agen CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponen server
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — menggunakan kembali `ToolDetailClient`
### Agen ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponen server (dipindahkan dari `agents/`)
### Komponen UI Bersama (`src/shared/components/cli/`)
| File | Tujuan |
| ----------------------- | ------------------------------------------------------ |
| `CliToolCard.tsx` | Kartu status pintar (deteksi + konfigurasi + endpoint) |
| `CliConceptCard.tsx` | Kartu penjelasan konsep per halaman |
| `CliComparisonCard.tsx` | Perbandingan tiga kolom di berbagai jenis CLI |
| `BaseUrlSelect.tsx` | Dropdown endpoint (Lokal/Awan/Kustom) |
| `ApiKeySelect.tsx` | Pemilih kunci API |
| `ManualConfigModal.tsx` | Modal cuplikan konfigurasi yang dapat disalin |
### Hook Bersama (`src/shared/hooks/cli/`)
| File | Tujuan |
| ------------------------- | ------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Mengambil `/api/cli-tools/all-statuses`, mengelola status loading/refresh |
## 8. i18n
Namespace baru ditambahkan dalam rencana 14 F9:
| Namespace | Tujuan |
| ----------- | ----------------------------------------------------------------------------------- |
| `cliCommon` | String yang dibagikan (label kartu, teks konsep/perbandingan, label halaman detail) |
| `cliCode` | String halaman CLI Code |
| `cliAgents` | String halaman CLI Agents |
| `acpAgents` | String halaman ACP Agents |
Terjemahan lengkap PT-BR dan EN disediakan. 39 lokal lainnya secara otomatis menggunakan EN melalui penggabungan tingkat namespace di `src/i18n/request.ts`.
---
## 9. Memulai dengan Cepat
### Langkah 1 — Dapatkan Kunci API OmniRoute
1. Buka `/dashboard/api-manager`**Buat Kunci API**
2. Beri nama (misalnya `cli-tools`) dan pilih semua izin
3. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah ini
> Kunci Anda terlihat seperti: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Langkah 2 — Instal Alat CLI
Semua alat berbasis npm memerlukan Node.js 22.22.2+ atau 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -342,135 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (dapat diluncurkan melalui `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Berbasis Rust
# Agen pemrograman Pi
# lihat https://github.com/zechnerj/pi-coding-agent untuk instalasi
# jcode
# lihat https://github.com/1jehuang/jcode untuk instalasi
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Langkah 3 — Konfigurasi melalui Dashboard
## Step 3 — Set Global Environment Variables
1. Pergi ke `http://localhost:20128/dashboard/cli-code`
2. Temukan alat Anda di grid
3. Klik kartu untuk membuka halaman detail alat
4. Pilih kunci API dan URL dasar Anda
5. Klik **Terapkan Konfigurasi** atau salin potongan konfigurasi manual
---
### Langkah 4 — Atur Variabel Lingkungan Global
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI membaca GOOGLE_GEMINI_BASE_URL di ROOT (SDK-nya menambahkan /v1beta/... sendiri)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Untuk **server jarak jauh** ganti `localhost:20128` dengan IP atau domain server,
> misalnya `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Langkah 4 — Konfigurasi Setiap Alat
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Buat ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Gunakan root gateway Anthropic yang terpadu untuk Claude Code. Jangan tambahkan `/v1` di sini.
**Uji:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Codex modern (v0.137+) hanya membaca `~/.codex/config.toml``config.yaml` lama milik CLI npm warisan dan diabaikan tanpa suara. Kunci API tetap di variabel lingkungan `OMNIROUTE_API_KEY` (`env_key`), tidak pernah di dalam file:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Referensi lengkap (profil, `wire_api`, jendela konteks): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Uji:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**Uji:** `opencode`
> Gunakan `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> untuk mengirim varian berpikir.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI atau VS Code)
### OpenCode
**Mode CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -482,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Mode VS Code:**
Pengaturan ekstensi Cline → Penyedia API: `OpenAI Compatible`URL Dasar: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Terapkan Konfigurasi**.
Or use the OmniRoute dashboard **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI atau VS Code)
### KiloCode (CLI or VS Code)
**Mode CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Pengaturan VS Code:**
**VS Code settings:**
```json
{
@@ -506,11 +223,11 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Terapkan Konfigurasi**.
Or use the OmniRoute dashboard **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Ekstensi VS Code)
### Continue (VS Code Extension)
Edit `~/.continue/config.yaml`:
@@ -524,255 +241,158 @@ models:
default: true
```
Mulai ulang VS Code setelah mengedit.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Gunakan ini ketika VS Code Insiders dikonfigurasi untuk model endpoint kustom dan Anda ingin OmniRoute berfungsi tanpa bidang header kustom.
**Lokasi yang Disarankan:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Contoh menggunakan alias OmniRoute yang ditokenisasi:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Catatan:**
- Ganti `sk-your-omniroute-key` dengan kunci API yang dibuat di OmniRoute.
- Bidang `url` harus mengarah ke `/api/v1/vscode/{token}/chat/completions`.
- Bidang `modelsUrl` harus mengarah ke `/api/v1/vscode/{token}/models`.
- Utamakan alur normal `/v1` + header Bearer ketika klien mendukung header kustom.
- Token yang tertanam dalam URL adalah fallback kompatibilitas dan mungkin muncul dalam log editor atau riwayat proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Masuk ke akun AWS/Kiro Anda:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI menggunakan otentikasi sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
# Gunakan kiro-cli bersamaan dengan OmniRoute untuk alat lainnya.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Untuk aplikasi desktop **Kiro IDE**, gunakan endpoint MITM yang diekspos oleh OmniRoute
di bawah `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. Internal OmniRoute CLI
## Dashboard Auto-Configuration
Biner `omniroute` menyediakan perintah untuk siklus hidup server, pengaturan, diagnostik, dan manajemen penyedia. Titik masuk: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Mulai server (port default 20128)
omniroute setup # Wizard pengaturan interaktif
omniroute doctor # Periksa konfigurasi, DB, port, runtime
omniroute providers list # Koneksi penyedia yang dikonfigurasi
omniroute providers test-all # Uji setiap koneksi aktif
omniroute reset-password # Atur ulang kata sandi admin
omniroute logs # Streaming log permintaan
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
omniroute --version # Cetak versi
omniroute --help # Tampilkan semua perintah
```
### Pengaturan & Inisialisasi
```bash
omniroute setup # Wizard pengaturan interaktif
omniroute setup --non-interactive # Mode CI/automasi (membaca variabel env + flag)
omniroute setup --password '<value>' # Atur kata sandi admin langsung
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Tambah dan uji penyedia dalam satu langkah
```
Variabel lingkungan yang dikenali untuk pengaturan non-interaktif:
| Var | Tujuan |
| ------------------- | ---------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Kunci API penyedia (terikat ke `--api-key` melalui Commander `.env()`) |
| `DATA_DIR` | Ganti direktori data OmniRoute |
Semua input non-interaktif lainnya diteruskan sebagai flag, bukan variabel lingkungan:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(lihat opsi `omniroute setup` di atas).
### Diagnostik
```bash
omniroute doctor # Periksa konfigurasi, DB, port, runtime, memori, keberlangsungan
omniroute doctor --json # JSON yang dapat dibaca mesin
omniroute doctor --no-liveness # Lewati probe kesehatan HTTP
omniroute doctor --host 0.0.0.0 # Ganti host keberlangsungan
omniroute doctor --liveness-url <url> # Ganti URL endpoint kesehatan penuh
```
Dokter menjalankan pemeriksaan ini: `Konfigurasi`, `Database`, `Penyimpanan/enkripsi`,
`Ketersediaan Port`, `Runtime Node`, `Biner asli` (better-sqlite3),
`Memori`, dan `Keberlangsungan Server`. Ia keluar dengan status non-nol jika ada pemeriksaan yang `gagal`.
### Manajemen Penyedia
```bash
omniroute providers available # Katalog penyedia OmniRoute
omniroute providers available --search openai # Filter katalog berdasarkan id/nama/alias/kategori
omniroute providers available --category api-key # Filter berdasarkan kategori (api-key, oauth, gratis, ...)
omniroute providers available --json # JSON yang dapat dibaca mesin
omniroute providers list # Koneksi penyedia yang dikonfigurasi
omniroute providers list --json
omniroute providers test <id|name> # Uji satu koneksi yang dikonfigurasi
omniroute providers test-all # Uji setiap koneksi aktif
omniroute providers validate # Validasi struktural lokal saja
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Alur OAuth yang ada
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` bersifat API-first dan oleh karena itu bekerja terhadap
konteks lokal atau jarak jauh yang aktif. Input kredensial harus menggunakan
`--credential-stdin` atau `--credential-env`; `--dry-run --json` hanya melaporkan
keberadaan/bentuk yang disunting. `providers available` membaca katalog OmniRoute;
`providers list/test/test-all/validate` mempertahankan perilaku SQLite lokal mereka dan
tidak memerlukan server untuk berjalan.
### Pemulihan & Atur Ulang
```bash
omniroute reset-password # Atur ulang kata sandi admin (juga: omniroute-reset-password)
omniroute reset-encrypted-columns # Tampilkan peringatan + dry-run untuk atur ulang kredensial terenkripsi
omniroute reset-encrypted-columns --force # Benar-benar menghapus kredensial terenkripsi di SQLite
```
### Ekspor Kredensial (⚠ tangani dengan hati-hati)
```bash
omniroute auth export # Tampilkan peringatan + gerbang konfirmasi — tidak ada akses DB
omniroute auth export --force # Ekspor SEMUA kredensial KONEKSI yang DECRYPTED ke stdout sebagai JSON
omniroute auth export --force --id <id> # Ekspor hanya koneksi yang cocok
omniroute auth export --force --format env # Emit OMNIROUTE_<PROVIDER>_<FIELD>=<value> baris
omniroute auth export --force --out creds.json # Tulis ke file (dibuat dengan izin 0600)
```
`auth export` bersifat **lokal saja** (baca SQLite langsung, tidak ada rute HTTP) dan sengaja mencetak/menulis
nilai **plaintext** `apiKey`/`accessToken`/`refreshToken`/`idToken` — itu adalah fitur, bukan
bug. Tidak ada yang dibaca dari database, dan tidak ada yang didekripsi, tanpa `--force`. Sebuah banner peringatan stderr
selalu dicetak sebelum ada plaintext yang dikeluarkan. Memerlukan `STORAGE_ENCRYPTION_KEY` untuk
diatur. Sebuah field yang gagal didekripsi (kunci kadaluarsa, ciphertext rusak) dilaporkan sebagai
`<field>DecryptFailed: true` alih-alih menghentikan seluruh ekspor atau membocorkan kesalahan yang mendasarinya.
### Subperintah Lainnya
Ini mengasumsikan server OmniRoute yang berjalan, kecuali dinyatakan sebaliknya:
```bash
omniroute status # Status runtime yang komprehensif
omniroute logs # Streaming log permintaan (--json, --search, --follow)
omniroute config show # Tampilkan konfigurasi saat ini
omniroute provider list # Daftar penyedia yang tersedia (alias dari providers list)
omniroute provider add # Daftarkan OmniRoute sebagai penyedia di alat
omniroute keys add | list | remove # Kelola kunci API
omniroute models [provider] # Daftar model (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfigurasi + DB
omniroute restore # Pulihkan dari snapshot sebelumnya
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
omniroute quota # Penggunaan kuota penyedia
omniroute cache # Status cache
omniroute cache clear # Hapus cache semantik + tanda tangan
omniroute mcp status | restart # Status server MCP / restart
omniroute a2a status | card # Status server A2A / kartu agen
omniroute tunnel list | create | stop # Kelola terowongan (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Periksa / atur variabel env (sementara)
omniroute test # Uji konektivitas penyedia
omniroute update # Periksa pembaruan
omniroute completion # Hasilkan penyelesaian shell
```
### Flag Umum
| Flag | Deskripsi |
| ------------------- | ------------------------------------------------------------ |
| `--no-open` | Jangan otomatis membuka browser saat mulai |
| `--port <n>` | Ganti port API (default 20128) |
| `--mcp` | Jalankan sebagai server MCP melalui stdio (untuk IDE) |
| `--non-interactive` | Mode CI (tanpa prompt; membaca dari env/flags) |
| `--json` | Output JSON yang dapat dibaca mesin (dokter, penyedia, dll.) |
| `--help`, `-h` | Tampilkan bantuan spesifik perintah |
| `--version`, `-v` | Cetak versi yang terinstal |
## Endpoint API yang Tersedia
| Endpoint | Deskripsi | Digunakan Untuk |
| -------------------------- | -------------------------------- | ------------------------------------ |
| `/v1/chat/completions` | Obrolan standar (semua penyedia) | Semua alat modern |
| `/v1/responses` | API respons (format OpenAI) | Codex, alur kerja agentik |
| `/v1/completions` | Penyelesaian teks warisan | Alat lama yang menggunakan `prompt:` |
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
| `/v1/images/generations` | Generasi gambar | GPT-Image, Flux, dll. |
| `/v1/audio/speech` | Teks-ke-suara | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Suara-ke-teks | Deepgram, AssemblyAI |
Contoh siap-tempel dengan URL OmniRoute yang ter-tokenisasi:
```txt
Token contoh: sk-a3ab3c080beaee3a-69f4a4-070d71af
Basis OpenAI standar: http://localhost:20128/v1
Model VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Obrolan VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Respons VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Obrolan Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Pemecahan Masalah
## Built-in Agents: Droid & OpenClaw
| Kesalahan | Penyebab | Perbaikan |
| ------------------------------------------------------ | --------------------------------- | --------------------------------------------------- |
| `Connection refused` | OmniRoute tidak berjalan | `omniroute serve` |
| `401 Unauthorized` | Kunci API salah | Periksa di `/dashboard/api-manager` |
| `No combo configured` | Tidak ada kombinasi routing aktif | Atur di `/dashboard/combos` |
| CLI menunjukkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
| Dashboard menunjukkan "not detected" setelah instalasi | Cache usang | Klik "⟳ Refresh detection" di dashboard |
| Tautan lama `/dashboard/cli-tools` | Bookmark sebelum v3.8.6 | Dialihkan otomatis ke `/dashboard/cli-code` (308) |
| Tautan lama `/dashboard/agents` | Bookmark sebelum v3.8.6 | Dialihkan otomatis ke `/dashboard/acp-agents` (308) |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## समस्या निवारण
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,321 +0,0 @@
# CLI-INTEGRATIONS (Italiano)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrazioni CLI — punta qualsiasi CLI di codifica a OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrazioni CLI
OmniRoute include una serie di comandi `setup-*` che configurano una CLI di codifica
(Codex, Claude Code, OpenCode, Cline, …) per utilizzare OmniRoute come backend — in modo che
lo strumento comunichi con **un** endpoint e OmniRoute instradi verso il fornitore giusto con
fallback automatico. Ogni comando legge il catalogo del modello **live** da un OmniRoute in esecuzione
(locale o remoto) e scrive il file di configurazione dello strumento sulla **tua**
macchina. La chiave API è referenziata da una variabile d'ambiente ovunque lo strumento
lo supporti. I comandi che persistono un file di ambiente locale per lo strumento sono annotati di seguito.
C'è anche un launcher generico — `omniroute run <target>` — che avvia
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` o `gemini` con
l'ambiente giusto iniettato, senza scrivere alcuna configurazione. I target e i loro
alias provengono dal manifesto canonico `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), e `omniroute completion` offre le
stesse parole chiave derivate dal manifesto. I launcher legacy per strumento —
`omniroute launch` (Claude Code) e `omniroute launch-codex` (Codex) — rimangono
disponibili.
L'onboarding del fornitore è disponibile dallo stesso contesto locale/remoto. I
comandi API-first qui sotto mantengono l'autenticazione di gestione separata dalle credenziali
del fornitore e non stampano mai una credenziale in output strutturato:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Per gli script, preferisci `--credential-stdin` o `--credential-env`; `--credential`
è mantenuto per uso locale controllato. `providers remove` richiede `--yes` su un
terminale non interattivo, e tutti e cinque i comandi rispettano il contesto attivo o le
opzioni globali `--base-url`/`--api-key`.
Per la configurazione iniziale scritta a mano delle due integrazioni più ricche, vedere i
deep dive per strumento:
- [Configurazione di Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Configurazione di Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Modalità Remota](./REMOTE-MODE.md) — controlla un OmniRoute remoto (VPS / Tailnet) dal tuo laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — l'estensione OmniCopilot; può anche eseguire questi
comandi `setup-*` per te dall'interno dell'editor
---
## Tabella principale
Ogni comando onora il **contesto attivo** (impostato con `omniroute connect`, vedi
[Modalità Remota](./REMOTE-MODE.md)) o espliciti flag `--remote <url> --api-key <key>`.
"Locale vs remoto" qui sotto significa: senza flag si punta a `http://localhost:20128`;
con `--remote` (o un contesto remoto attivo) si recupera il catalogo da quel
server e si scrive la configurazione localmente.
| Comando | Strumento | Cosa scrive | Flag chiave | Locale vs remoto |
| -------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — un profilo per ogni modello di testo compatibile (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Entrambi |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — un profilo per ogni modello corrispondente (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Entrambi |
| `omniroute setup-opencode` | OpenCode (compatibile con openai) | `~/.config/opencode/opencode.json` — fornitore `omniroute` con ogni modello del catalogo (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Entrambi |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (modalità CLI) + stampa le impostazioni dell'estensione VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Entrambi |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + unisce `kilocode.*` in `settings.json` di VS Code se presente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Entrambi |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modelli `provider: openai`, chiave tramite `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Entrambi |
| `omniroute setup-cursor` | Cursor | Niente — stampa i passaggi in-app (la configurazione di Cursor è opaca SQLite) | `--remote` `--api-key` `--only` `--port` | Entrambi |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + imposta `roo-cline.autoImportSettingsPath` se esiste un `settings.json` di VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Entrambi |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — fornitore `openai-compat`, chiave tramite `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Entrambi |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + stampa la ricetta dell'ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Entrambi |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + stampa la ricetta dell'ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Entrambi |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `V4 modelProviders.openai` + `OMNIROUTE_API_KEY` in `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Entrambi |
| `omniroute run <target>` | Lancio runtime (generico) | Niente — avvia `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` con l'ambiente e gli argomenti giusti; Qwen e Gemini usano una home isolata temporanea | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Entrambi |
| `omniroute launch` | Claude Code | Niente — avvia `claude` con `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` iniettati | `--remote` `--api-key` `--token` `--profile` `--port` | Entrambi |
| `omniroute launch-codex` | OpenAI Codex CLI | Niente — avvia `codex` con il fornitore `omniroute` iniettato tramite flag `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Entrambi |
Note sui flag (verificati nella sorgente del comando):
- `--remote <url>` — recupera il catalogo da un OmniRoute remoto (sovrascrive `--port`
e il contesto attivo). `--api-key <key>` fornisce la credenziale per quel
server (di default alla variabile d'ambiente `OMNIROUTE_API_KEY`, o al token del contesto attivo).
- `--only <patterns>` — sottostringhe separate da virgola; mantiene solo gli ID dei modelli che corrispondono
(ad esempio `--only glm,kimi`). Disponibile su `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — stampa esattamente ciò che verrebbe scritto senza toccare il
filesystem. Disponibile su ogni comando `setup-*` **eccetto** `setup-cursor`
(che non scrive mai un file).
- `--model <id>` — richiesto (o scelto interattivamente) per gli strumenti che non hanno
auto-scoperta del modello: Cline, Kilo, Roo, Goose, Qwen, Aider. Quegli strumenti
accettano anche `--yes` per esecuzioni non interattive (che richiedono quindi `--model`).
`setup-opencode` accetta `--model` per impostare il modello predefinito di alto livello.
- `--model <id>` su `omniroute run` segue il wiring per target del manifesto
(`bin/cli/cli-manifest.mjs`): **aider** riceve `--model openai/<id>` e
**opencode** `--model omniroute/<id>` (il prefisso viene aggiunto solo quando l'id
non lo porta già); **qwen** e **gemini** ricevono l'id letteralmente;
**claude** lo ottiene tramite `ANTHROPIC_MODEL`, **goose** tramite `GOOSE_MODEL`, e
**codex** tramite argomenti `-c model_providers.omniroute.*`. **Qwen è l'unico target di esecuzione
che richiede assolutamente `--model`** — `omniroute run qwen` senza di esso esce
`2` con un errore esplicito.
- `--port <port>` — porta locale di OmniRoute (default `20128`, ignorato quando `--remote`
è impostato). Presente su tutti i comandi `setup-*` e su entrambi i launcher.
- Codici di uscita di `omniroute run`: il codice di uscita della CLI figlia è propagato
letteralmente; `2` = argomenti non validi (target non supportato, `--model` richiesto mancante, guardia del contenitore); `127` = il binario target non è in `PATH`;
`130`/`143`/`129` quando il lancio è terminato da `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = altro fallimento di lancio runtime.
- I due launcher (`launch`, `launch-codex`) accettano `--profile <name>` per selezionare
un profilo scritto da `setup-claude` / `setup-codex`, oltre a passare argomenti per
il binario sottostante `claude` / `codex`.
Il selettore interattivo è condiviso anche dalle ricette di configurazione:
```bash
# Scegli dal catalogo di modelli locale o remoto attivo e configura il target.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` attualmente delega alle ricette testate per `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, e `kilo`. Le voci del catalogo solo IDE,
MITM e solo guida rimangono flussi espliciti `setup-*`/manuali e non sono presentate come target lanciabili.
> `setup-opencode` è l'integrazione **leggera compatibile con openai** di OpenCode.
> C'è anche un'integrazione plugin più ricca — `omniroute setup opencode` — che
> installa `@omniroute/opencode-plugin`. Sono comandi diversi; la tabella
> sopra documenta `setup-opencode`.
---
## Utilizzo locale
Con OmniRoute in esecuzione su `localhost:20128`, esegui semplicemente il comando di configurazione per il tuo strumento. Il catalogo viene recuperato dal server locale.
```bash
# Codex: scrivi un profilo per ogni modello corrispondente in ~/.codex/
omniroute setup-codex
codex --profile glm52 # usa un profilo generato
# Claude Code: scrivi profili per modello, poi avvia uno
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: scrivi il provider compatibile con openai con tutti i modelli del catalogo
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # referenziato tramite {env:OMNIROUTE_API_KEY}, mai su disco
opencode -m omniroute/glm/glm-5.2 "..."
# Gli strumenti senza auto-scoperta necessitano di un modello esplicito:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Anteprima senza scrivere nulla:
omniroute setup-continue --dry-run
```
Avvia senza scrivere alcuna configurazione (solo iniezione di variabili d'ambiente):
```bash
omniroute launch # Claude Code → OmniRoute locale
omniroute launch-codex # Codex CLI → OmniRoute locale
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Percorso del comando esplicito: passa tutto ciò che viene dopo --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Utilizzo remoto
Punta qualsiasi comando di configurazione a un OmniRoute remoto con `--remote` + `--api-key`. Il catalogo viene recuperato da remoto; la configurazione viene scritta sulla tua macchina locale.
```bash
# OpenCode contro un VPS remoto, mantieni solo i modelli glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # esporta prima OMNIROUTE_API_KEY
# Profili Codex da un catalogo remoto
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Avvia una CLI direttamente contro il remoto
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Invece di passare `--remote`/`--api-key` ogni volta, accedi una volta e lascia che il **contesto attivo** li fornisca automaticamente:
```bash
omniroute connect 192.168.0.15 # genera un token limitato, memorizza il contesto
omniroute setup-codex # ← ora utilizza il catalogo remoto
omniroute setup-opencode # ← stesso
omniroute launch # ← Claude Code contro il remoto
```
Vedi [Modalità Remota](./REMOTE-MODE.md) per contesti, ambiti e gestione dei token.
---
## Convenzioni dell'URL di base (quali strumenti vogliono `/v1`)
OmniRoute espone la superficie OpenAI a `/v1`, la superficie Anthropic alla radice, e una superficie nativa Gemini a `/v1beta`. Ogni integrazione è collegata alla forma che il suo strumento si aspetta (verificato nella sorgente del comando):
| Integrazione | URL di base scritto | `/v1`? |
| -------------------------------------------------------------------------- | ------------------- | -------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | radice | No — Cline aggiunge `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | radice | No — Goose aggiunge il percorso |
| `setup-aider` (`OPENAI_API_BASE`) | radice | No — LiteLLM aggiunge `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | con `/v1` | Sì |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | radice | No — Claude Code aggiunge `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | con `/v1` | Sì |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | con `/v1` | Sì |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | radice | No — l'SDK aggiunge `/v1beta/models/…` |
---
## Mantenere le dipendenze native all'aggiornamento: `--include=optional`
Quando aggiorni con `omniroute update` (dopo aver confermato, o con `--apply`),
OmniRoute esegue l'installazione con `--include=optional` integrato:
```bash
npm install -g omniroute@latest --include=optional
```
Questo **non** è un flag che passi a `omniroute update` — viene sempre applicato dall'
aggiornamento. Garantisce che le `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, lo stack LLMLingua SLM) sopravvivano all'aggiornamento anche se la tua configurazione npm
ha `omit=optional` impostato, il che altrimenti eliminerebbe silenziosamente il driver SQLite
nativo e il binding del keyring di sistema. Per visualizzare il comando esatto senza applicarlo:
```bash
omniroute update --dry-run
# [DRY RUN] Eseguirebbe: npm install -g omniroute@latest --include=optional
```
Altri flag di `omniroute update` (verificati nel sorgente): `--check` (esci con 1 se
obsoleto), `--apply` (installa senza chiedere), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI tramite `omniroute run gemini`
Contratto verificato contro `@google/gemini-cli` 0.50.0: la CLI rispetta
`GOOGLE_GEMINI_BASE_URL` e invia `POST /v1beta/models/<model>:generateContent`
(e `:streamGenerateContent?alt=sse`) contro di esso — esattamente la superficie nativa di
Gemini di OmniRoute (`/v1beta`). `omniroute run gemini` collega automaticamente:
- `GOOGLE_GEMINI_BASE_URL` → l'URL base attivo di OmniRoute (root, senza `/v1`);
- `GEMINI_API_KEY` → le credenziali risolte di OmniRoute (opzione/env/context);
- un **`GEMINI_CLI_HOME`** isolato temporaneamente il cui `.gemini/settings.json`
seleziona l'autenticazione `gemini-api-key`, quindi una sessione OAuth di Google memorizzata (Code Assist)
non sovrascrive mai il lancio diretto da OmniRoute — rimosso dopo l'uscita;
- **igiene dell'ambiente**: l'ambiente figlio è ripulito da `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` e `GOOGLE_GENAI_USE_GCA` (che reindirizzerebbero
l'autenticazione a Vertex/Code Assist), e `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` è
impostato come fallback di sicurezza — gli altri target `run` ricevono lo stesso
trattamento per le loro variabili in conflitto;
- iniezione di `--model <id>` da `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
La guardia di fiducia dello spazio di lavoro di Gemini si applica ancora in modalità headless — passa
`--skip-trust` (o fidati della directory interattivamente) tu stesso; il lanciatore
non lo bypassa deliberatamente. Questo lanciatore è distinto dalla **registrazione ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), che rimane l'integrazione del protocollo agente per `/dashboard/acp-agents`.
---
## Verifica reale del fumo (opt-in)
Le esecuzioni di regressione del piano di lancio deterministico avvengono in CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Per convalidare i binari REALI contro un server REAL
di OmniRoute, esiste un harness opt-in in
`tests/integration/upstream-cli-smoke.int.test.ts`. Non viene mai eseguito automaticamente
(tutti i sottotest saltano a meno che `RUN_CLI_SMOKE=1`), passa la credenziale tramite la variabile d'ambiente
NAME (mai per valore), redige le stringhe a forma di chiave da qualsiasi output registrato, salta
i target il cui binario non è installato e classifica i fallimenti come
auth / upstream / config invece di un semplice booleano:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opzionale: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` restringe la verifica;
`OMNIROUTE_SMOKE_TIMEOUT_MS` sovrascrive il timeout di 120s per target.
---
## Vedi anche
- [Configurazione di Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — la guida approfondita su Claude Code
- [Configurazione di Codex CLI](./CODEX-CLI-CONFIGURATION.md) — la configurazione di base `[model_providers.omniroute]` una tantum
- [Modalità Remota](./REMOTE-MODE.md) — contesti, token di accesso scopi, gestione di un server remoto
- [Riferimento Strumenti CLI](../reference/CLI-TOOLS.md) — il catalogo completo degli strumenti supportati + pagine del dashboard
- [Guida all'Installazione](./SETUP_GUIDE.md) — metodi di installazione e onboarding al primo avvio

View File

@@ -1,338 +1,86 @@
# CLI-TOOLS (Italiano)
# CLI Tools Setup Guide — OmniRoute (Italiano)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "Strumenti CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Strumenti CLI — OmniRoute
Ultimo aggiornamento: 2026-08-18
OmniRoute si integra con tre categorie di strumenti CLI distribuiti su tre pagine di dashboard dedicate:
| Pagina | Percorso | Concetto | Conteggio |
| -------------- | ----------------------- | --------------------------------------------------------------------------------- | ------------- |
| **CLI Code's** | `/dashboard/cli-code` | Strumenti di codifica che punti a OmniRoute (Client → CLI → OmniRoute → Provider) | 26 |
| **CLI Agents** | `/dashboard/cli-agents` | Agenti autonomi che punti a OmniRoute (stesso flusso, ambito più ampio) | 8 |
| **ACP Agents** | `/dashboard/acp-agents` | CLI che OmniRoute genera come backend tramite stdio/ACP (flusso inverso) | vedi registro |
I percorsi legacy reindirizzano tramite 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Come Funziona
## How It Works
```
CLI Code's / CLI Agents (flusso di consumo):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (tutti puntano a OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute instrada al provider giusto)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agents (flusso di generazione inverso):
Richiesta del client → OmniRoute → genera CLI tramite stdio/ACP → risposta
```
**Vantaggi:**
**Benefits:**
- Una chiave API per gestire tutti gli strumenti
- Monitoraggio dei costi su tutte le CLI nella dashboard
- Cambio di modello senza riconfigurare ogni strumento
- Funziona localmente e su server remoti (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Configurazione automatica con `setup-*`
## Supported Tools (Dashboard Source of Truth)
Non è necessario scrivere a mano la configurazione di ogni strumento. OmniRoute fornisce un comando `setup-*`
per ogni CLI supportata che legge il catalogo di modelli **live** da un OmniRoute in esecuzione
(locale o remoto) e scrive la configurazione dello strumento sulla tua macchina:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Ognuno accetta `--remote <url> --api-key <key>` (configura uno strumento locale contro un
OmniRoute remoto), `--dry-run` (anteprima senza scrivere), e `--port`. Gli strumenti
senza auto-scoperta del modello (Cline, Kilo, Roo, Goose, Aider, Qwen) richiedono
`--model <id>` (e `--yes` per esecuzioni non interattive). Per avviare una CLI con
l'ambiente corretto iniettato e senza alcuna configurazione scritta, utilizza il generico
lanciatore `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — i target e gli alias provengono da `bin/cli/cli-manifest.mjs`); i lanciatori
legacy per ogni strumento `omniroute launch` (Claude Code) e `omniroute launch-codex`
(Codex) rimangono disponibili. La CLI di Gemini è solo per il lancio: è un target di
`omniroute run` ma non ha ricetta `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **Riferimento completo:** la tabella principale — cosa scrive ogni comando, ogni flag,
> locale vs remoto, e quali strumenti richiedono un suffisso `/v1` — si trova in
> **[Integrazioni CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Esecuzione di questi all'interno di un contenitore
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Un comando `setup-*` eseguito all'interno del contenitore OmniRoute scrive nella
home del contenitore stesso, che nessuna CLI host legge e che scompare con il
contenitore. OmniRoute rileva ciò e termina con `2` fornendo istruzioni piuttosto che
scrivere. Due modi supportati per procedere: installare la CLI sull'host e
`omniroute connect` al contenitore, oppure montare in binding le directory di configurazione e impostare
`CLI_CONFIG_HOME` (il profilo `host` di compose). Ogni comando `setup-*`, più
`omniroute configure` e `omniroute config set`, accetta
`--allow-container-write` quando configurare le CLI del contenitore è ciò che intendevi;
`OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` fa lo stesso per il server. Vedi
[Guida Docker → Configurazione degli strumenti CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
L'**endpoint di applicazione** della dashboard (`POST /api/cli-tools/apply`) applica la
stessa protezione: in un contenitore, una scrittura il cui target non è montato in binding dall'
host risponde **`422`** con `containerEphemeralTarget: true`, il testo di errore sicuro e — per gli strumenti con una ricetta host (claude, codex, opencode, cline,
kilo, continue) — un `hostSetupCommand` (ad esempio `omniroute setup-opencode`) da eseguire
sull'host invece; nulla viene scritto. `dryRun: true` continua a funzionare in modalità contenitore
e restituisce il contenuto generato + il percorso target senza toccare il disco, quindi
puoi visualizzare dalla dashboard e applicare sull'host. Questo comportamento è
intenzionale e protetto da regressione da
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — non "correggere" mai un 422
rimuovendo la protezione.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Fonte di Verità
## Step 1 — Get an OmniRoute API Key
Il catalogo unificato si trova in `src/shared/constants/cliTools.ts` come `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Ogni voce ha questi campi (definiti in `src/shared/schemas/cliCatalog.ts`):
| Campo | Tipo | Descrizione |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | In quale pagina appare lo strumento |
| `vendor` | `string` | Origine dello strumento ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Utilizzabile anche come ACP Agent (badge mostrato) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Livello di supporto per endpoint personalizzati. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Meccanismo di configurazione |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Campi di visualizzazione principali |
Le voci con `baseUrlSupport: "none"` **non vengono mostrate** nelle pagine del dashboard — sono registrate nel backlog MITM per il piano 11 (vedi `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Livelli di capacità (catalogati × rilevabili × configurabili × avviabili)
Non tutti gli strumenti catalogati sono rilevabili, configurabili o avviabili. Ogni livello ha una
fonte dichiarativa, e un test di drift li mantiene allineati:
| Livello | Significato | Dichiarato in |
| ----------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Catalogato** | Appare nel catalogo del dashboard (nome, fornitore, documentazione, tipo di configurazione) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Rilevabile** | Rilevamento binario/configurazione, controlli di salute, percorsi di configurazione | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **Configurabile** | Supportato da `omniroute configure <cli>` (esiste una ricetta di configurazione) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Avviabile** | Supportato da `omniroute run <target>` (iniezione di env/args definita) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` è il manifesto eseguibile canonico per i comandi CLI
superfici: `run`, `configure` e i generatori di completamento della shell derivano tutti le loro
liste di destinazione, risoluzione degli alias (ad esempio `kilocode`/`kilo-code`/`kilo_cli``kilo`)
e wiring del flag `--model` da esso. Il guardiano del drift
`tests/unit/cli/cli-manifest-drift.test.ts` afferma che il manifesto, il catalogo runtime,
il catalogo UI e ogni superficie consumatrice rimangano sincronizzati — una destinazione aggiunta
a una superficie senza le altre fa fallire il suite invece di driftare silenziosamente.
## 1. Catalogo del Codice CLI (26 strumenti)
Tutti gli strumenti che appaiono in `/dashboard/cli-code`. Quelli con `baseUrlSupport: none` sono collegati tramite MITM o una guida manuale invece di un URL di base personalizzato:
| id | nome | fornitore | supportoBaseUrl | tipoConfig | acpSpawnable |
| ------------ | ----------------------------- | ------------------- | --------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | completo | env | true |
| codex | OpenAI Codex CLI | OpenAI | completo | custom | true |
| zcode | ZCode (Piano di Codifica GLM) | Z.ai | nessuno | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | completo | custom | true |
| kilo | Kilo Code | Kilo-Org | completo | custom | false |
| roo | Roo Code | Roo (OSS) | completo | guida | false |
| continue | Continue | continue.dev | completo | guida | false |
| aider | Aider | OSS (P. Gauthier) | completo | guida | true |
| forge | ForgeCode | Antinomy HQ | completo | custom | true |
| jcode | jcode | 1jehuang (OSS) | completo | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | completo | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | completo | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | completo | guida | true |
| droid | Factory Droid | Factory AI | parziale | guida | false |
| copilot | GitHub Copilot CLI | GitHub/MS | completo | custom | false |
| cursor-cli | Cursor CLI | Anysphere | parziale | guida | true |
| smelt | Smelt | leonardcser (OSS) | completo | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | completo | custom | false |
| grok-build | Grok Build | xAI | completo | custom | false |
| crush | Crush | OSS (Charm) | completo | custom | false |
| qwen | Qwen Code | Alibaba | completo | guida | true |
| cursor | Cursor | Anysphere | nessuno | guida | false |
| antigravity | Antigravity | Google | nessuno | mitm | false |
| hermes | Hermes | Nous Research | nessuno | guida | false |
| kiro | Kiro AI | Amazon | nessuno | mitm | false |
| custom | Custom CLI | — | completo | custom-builder | false |
Gli strumenti con `baseUrlSupport: "parziale"` mostrano un badge "⚠ Base URL parziale" nella scheda del dashboard.
## 2. Catalogo degli Agenti CLI (8 strumenti)
Agenti autonomi che appaiono in `/dashboard/cli-agents`:
| id | nome | fornitore | supportoBaseUrl | acpSpawnable |
| ------------ | ---------------- | ------------------------ | --------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | completo | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | completo | true |
| goose | Goose | Block / Linux Foundation | completo | true |
| interpreter | Open Interpreter | OSS | completo | true |
| warp | Warp AI | Warp Inc. | parziale | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | completo | false |
| omp | Oh My Pi | OSS | completo | true |
| letta | Letta CLI | Letta | completo | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. Agenti ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Questa pagina (rinominata da `/dashboard/agents`) mostra le CLI che OmniRoute può **generare** come motori di esecuzione backend tramite il protocollo stdio/ACP. Il catalogo è mantenuto separatamente in `src/lib/acp/registry.ts` e **non** è lo stesso di `CLI_TOOLS`.
---
## 4. Backlog MITM (non mostrato nel dashboard)
Le seguenti CLI non supportano nativamente URL base personalizzati e **non sono elencate** nelle pagine di CLI Code o CLI Agents. Sono candidati per l'intercettazione MITM nel piano 11:
| CLI | Motivo |
| ------------------- | ---------------------------------------------------------------- |
| windsurf | BYOK limitato a selezionati modelli Claude + URL/token aziendale |
| amp | Ecosistema chiuso (Sourcegraph) |
| amazon-q / kiro-cli | Autenticazione AWS SSO, nessun URL personalizzato |
| cowork | Anthropic Desktop, nessun endpoint configurabile |
Vedi `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` per il riferimento incrociato completo.
---
## 5. API di Rilevamento Batch
Tutti i rilevamenti degli strumenti sono aggregati tramite un singolo endpoint:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (stesso delle altre rotte `/api/cli-tools/`)
- Restituisce: `Record<toolId, ToolBatchStatus>` (tipo: `src/shared/types/cliBatchStatus.ts`)
- Strategia: `Promise.all` su tutti gli strumenti, timeout di 5s per strumento
- Cache: in memoria LRU indicizzata dal file di configurazione `mtime`. Cache invalidata quando mtime cambia. Ripristinata al riavvio del server.
Forma della risposta per strumento:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitizzato, nessun trace dello stack
}
```
## 6. Gestori delle Impostazioni per Nuovi Strumenti
I nuovi strumenti con `configType: "custom"` hanno percorsi API di impostazioni dedicati:
| Percorso | Strumento |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Agente di codifica Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + chiave `.env` dedicata) |
Tutti i percorsi utilizzano `sanitizeErrorMessage()` per le risposte di errore (Regola Ferrea #12).
---
## 7. Architettura delle Pagine del Dashboard
### Codice CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — componente server
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — griglia client
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — pagina di dettaglio dello strumento
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 schede di strumenti specializzati + `ToolDetailClient.tsx`
### Agenti CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — componente server
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — griglia client
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — riutilizza `ToolDetailClient`
### Agenti ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — componente server (spostato da `agents/`)
### Componenti UI Condivisi (`src/shared/components/cli/`)
| File | Scopo |
| ----------------------- | ---------------------------------------------------------------------- |
| `CliToolCard.tsx` | Scheda di stato intelligente (rilevamento + configurazione + endpoint) |
| `CliConceptCard.tsx` | Scheda di spiegazione del concetto per pagina |
| `CliComparisonCard.tsx` | Confronto a tre colonne tra tipi di CLI |
| `BaseUrlSelect.tsx` | Menu a discesa per endpoint (Locale/Cloud/Personalizzato) |
| `ApiKeySelect.tsx` | Selettore della chiave API |
| `ManualConfigModal.tsx` | Modale per frammento di configurazione copiabile |
### Hook Condiviso (`src/shared/hooks/cli/`)
| File | Scopo |
| ------------------------- | -------------------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Recupera `/api/cli-tools/all-statuses`, gestisce lo stato di caricamento/aggiornamento |
## 8. i18n
Nuovi spazi dei nomi aggiunti nel piano 14 F9:
| Namespace | Scopo |
| ----------- | ---------------------------------------------------------------------------------------------------------------- |
| `cliCommon` | Stringhe condivise (etichette delle schede, testi di concetto/comparazione, etichette delle pagine di dettaglio) |
| `cliCode` | Stringhe della pagina del codice CLI |
| `cliAgents` | Stringhe della pagina degli agenti CLI |
| `acpAgents` | Stringhe della pagina degli agenti ACP |
Traduzioni complete in PT-BR e EN sono fornite. 39 altre lingue ricadono automaticamente su EN tramite la fusione a livello di spazio dei nomi in `src/i18n/request.ts`.
---
## 9. Guida Rapida
### Passo 1 — Ottieni una Chiave API OmniRoute
1. Apri `/dashboard/api-manager`**Crea Chiave API**
2. Dagli un nome (es. `cli-tools`) e seleziona tutte le autorizzazioni
3. Copia la chiave — ne avrai bisogno per ogni CLI qui sotto
> La tua chiave appare così: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Passo 2 — Installa gli Strumenti CLI
Tutti gli strumenti basati su npm richiedono Node.js 22.22.2+ o 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -350,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (lanciabile tramite `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Basato su Rust
# Pi coding agent
# vedere https://github.com/zechnerj/pi-coding-agent per l'installazione
# jcode
# vedere https://github.com/1jehuang/jcode per l'installazione
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Passo 3 — Configura tramite Dashboard
## Step 3 — Set Global Environment Variables
1. Vai a `http://localhost:20128/dashboard/cli-code`
2. Trova il tuo strumento nella griglia
3. Clicca sulla scheda per aprire la pagina di dettaglio dello strumento
4. Seleziona la tua chiave API e l'URL di base
5. Clicca su **Applica Config** o copia il frammento di configurazione manuale
---
### Passo 4 — Imposta Variabili Ambientali Globali
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI legge GOOGLE_GEMINI_BASE_URL alla RADICE (il suo SDK aggiunge /v1beta/... da solo)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Per un **server remoto** sostituisci `localhost:20128` con l'IP o il dominio del server,
> es. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Passo 4 — Configura Ogni Strumento
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Crea ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Usa la radice del gateway unificato di Anthropic per Claude Code. Non aggiungere `/v1` qui.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Il Codex moderno (v0.137+) legge solo `~/.codex/config.toml` — il vecchio
`config.yaml` appartiene al CLI npm legacy ed è silenziosamente ignorato. La chiave API
rimane nella variabile ambientale `OMNIROUTE_API_KEY` (`env_key`), mai
all'interno del file:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Riferimento completo (profili, `wire_api`, finestre di contesto): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Usa `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> per inviare varianti di pensiero.
---
#### Cline (CLI o VS Code)
### Cline (CLI or VS Code)
**Modalità CLI:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -493,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Modalità VS Code:**
Impostazioni dell'estensione Cline → Fornitore API: `OpenAI Compatible`URL di base: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Oppure usa il dashboard di OmniRoute**CLI Tools → Cline → Applica Config**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI o VS Code)
### KiloCode (CLI or VS Code)
**Modalità CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Impostazioni VS Code:**
**VS Code settings:**
```json
{
@@ -517,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Oppure usa il dashboard di OmniRoute**CLI Tools → KiloCode → Applica Config**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Estensione VS Code)
### Continue (VS Code Extension)
Modifica `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -535,257 +241,158 @@ models:
default: true
```
Riavvia VS Code dopo la modifica.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Usa questo quando VS Code Insiders è configurato per modelli di endpoint personalizzati e desideri che OmniRoute funzioni senza un campo di intestazione personalizzato.
**Posizione consigliata:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Esempio usando l'alias tokenizzato di OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Note:**
- Sostituisci `sk-your-omniroute-key` con una chiave API creata in OmniRoute.
- Il campo `url` dovrebbe puntare a `/api/v1/vscode/{token}/chat/completions`.
- Il campo `modelsUrl` dovrebbe puntare a `/api/v1/vscode/{token}/models`.
- Preferisci il normale flusso `/v1` + intestazione Bearer quando il client supporta intestazioni personalizzate.
- I token incorporati nell'URL sono un fallback di compatibilità e possono apparire nei log dell'editor o nella cronologia del proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Accedi al tuo account AWS/Kiro:
# Login to your AWS/Kiro account:
kiro-cli login
# Il CLI utilizza la propria autenticazione — OmniRoute non è necessario come backend per il Kiro CLI stesso.
# Usa kiro-cli insieme a OmniRoute per altri strumenti.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Per l'app desktop **Kiro IDE**, usa l'endpoint MITM esposto da OmniRoute
sotto `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. OmniRoute CLI Interno
## Dashboard Auto-Configuration
Il binario `omniroute` fornisce comandi per il ciclo di vita del server, configurazione, diagnostica e gestione dei provider. Punto di ingresso: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Avvia il server (porta predefinita 20128)
omniroute setup # Procedura guidata di configurazione interattiva
omniroute doctor # Controlla configurazione, DB, porte, runtime
omniroute providers list # Connessioni ai provider configurati
omniroute providers test-all # Testa ogni connessione attiva
omniroute reset-password # Reimposta la password dell'amministratore
omniroute logs # Flusso dei log delle richieste
omniroute health # Salute dettagliata (interruttori, cache, memoria)
omniroute --version # Stampa la versione
omniroute --help # Mostra tutti i comandi
```
### Configurazione e Inizializzazione
```bash
omniroute setup # Procedura guidata di configurazione interattiva
omniroute setup --non-interactive # Modalità CI/automazione (legge variabili d'ambiente + flag)
omniroute setup --password '<value>' # Imposta direttamente la password dell'amministratore
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Aggiungi e testa un provider in un colpo solo
```
Variabili d'ambiente riconosciute per la configurazione non interattiva:
| Var | Scopo |
| ------------------- | ---------------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Chiave API del provider (collegata a `--api-key` tramite Commander `.env()`) |
| `DATA_DIR` | Sovrascrivi la directory dei dati di OmniRoute |
Tutti gli altri input non interattivi sono passati come flag, non come variabili d'ambiente:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(vedi le opzioni `omniroute setup` sopra).
### Diagnostica
```bash
omniroute doctor # Controlla configurazione, DB, porte, runtime, memoria, liveness
omniroute doctor --json # JSON leggibile dalla macchina
omniroute doctor --no-liveness # Salta il probe di salute HTTP
omniroute doctor --host 0.0.0.0 # Sovrascrivi l'host di liveness
omniroute doctor --liveness-url <url> # Sovrascrivi l'URL dell'endpoint di salute completo
```
Il doctor esegue questi controlli: `Configurazione`, `Database`, `Storage/crittografia`,
`Disponibilità della porta`, `Runtime del nodo`, `Binario nativo` (better-sqlite3),
`Memoria`, e `Liveness del server`. Esce con un codice non zero se uno dei controlli fallisce.
### Gestione dei Provider
```bash
omniroute providers available # Catalogo dei provider di OmniRoute
omniroute providers available --search openai # Filtra il catalogo per id/nome/alias/categoria
omniroute providers available --category api-key # Filtra per categoria (api-key, oauth, free, ...)
omniroute providers available --json # JSON leggibile dalla macchina
omniroute providers list # Connessioni ai provider configurati
omniroute providers list --json
omniroute providers test <id|name> # Testa una connessione configurata
omniroute providers test-all # Testa ogni connessione attiva
omniroute providers validate # Validazione strutturale solo locale
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Flusso OAuth esistente
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` sono API-first e quindi funzionano contro
il contesto locale o remoto attivo. L'input delle credenziali dovrebbe utilizzare
`--credential-stdin` o `--credential-env`; `--dry-run --json` riporta solo
la presenza/forma redatta. `providers available` legge il catalogo di OmniRoute;
`providers list/test/test-all/validate` mantengono il loro comportamento locale SQLite e
non richiedono che il server sia in esecuzione.
### Recupero e Ripristino
```bash
omniroute reset-password # Reimposta la password dell'amministratore (anche: omniroute-reset-password)
omniroute reset-encrypted-columns # Mostra avviso + dry-run per il ripristino delle credenziali crittografate
omniroute reset-encrypted-columns --force # Annulla effettivamente le credenziali crittografate in SQLite
```
### Esportazione delle Credenziali (⚠ maneggiare con cura)
```bash
omniroute auth export # Mostra avviso + gate di conferma — nessun accesso al DB
omniroute auth export --force # Esporta TUTTE le credenziali DECRITTOGRAFATE delle connessioni su stdout come JSON
omniroute auth export --force --id <id> # Esporta solo la connessione corrispondente
omniroute auth export --force --format env # Emmette righe OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # Scrive in un file (creato con permessi 0600)
```
`auth export` è **solo locale** (lettura diretta di SQLite, nessun percorso HTTP) e stampa/scrive
**in chiaro** i valori `apiKey`/`accessToken`/`refreshToken`/`idToken` — questa è la funzionalità, non un
bug. Niente viene letto dal database e niente viene decrittografato, senza `--force`. Un banner di avviso su stderr
viene sempre stampato prima che venga emesso qualsiasi testo in chiaro. Richiede che `STORAGE_ENCRYPTION_KEY` sia
impostato. Un campo che non riesce a decrittografare (chiave obsoleta, ciphertext corrotto) viene riportato come
`<field>DecryptFailed: true` invece di interrompere l'intera esportazione o di rivelare l'errore sottostante.
### Altri sottocomandi
Questi presuppongono un server OmniRoute in esecuzione, a meno che non sia indicato diversamente:
```bash
omniroute status # Stato completo del runtime
omniroute logs # Flusso dei log delle richieste (--json, --search, --follow)
omniroute config show # Mostra la configurazione attuale
omniroute provider list # Elenca i provider disponibili (alias di providers list)
omniroute provider add # Registra OmniRoute come provider su uno strumento
omniroute keys add | list | remove # Gestisci le chiavi API
omniroute models [provider] # Elenca i modelli (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot della configurazione + DB
omniroute restore # Ripristina da uno snapshot precedente
omniroute health # Salute dettagliata (interruttori, cache, memoria)
omniroute quota # Utilizzo del quota del provider
omniroute cache # Stato della cache
omniroute cache clear # Pulisci le cache semantiche + di firma
omniroute mcp status | restart # Stato del server MCP / riavvio
omniroute a2a status | card # Stato del server A2A / scheda agente
omniroute tunnel list | create | stop # Gestisci i tunnel (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Ispeziona / imposta variabili d'ambiente (temporanee)
omniroute test # Test di connettività del provider
omniroute update # Controlla gli aggiornamenti
omniroute completion # Genera completamento della shell
```
### Flag comuni
| Flag | Descrizione |
| ------------------- | -------------------------------------------------------------- |
| `--no-open` | Non aprire automaticamente il browser all'avvio |
| `--port <n>` | Sovrascrivi la porta API (predefinita 20128) |
| `--mcp` | Esegui come server MCP su stdio (per IDE) |
| `--non-interactive` | Modalità CI (nessun prompt; legge da env/flags) |
| `--json` | Output JSON leggibile dalla macchina (doctor, providers, ecc.) |
| `--help`, `-h` | Mostra aiuto specifico per il comando |
| `--version`, `-v` | Stampa la versione installata |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Endpoint API Disponibili
## Built-in Agents: Droid & OpenClaw
| Endpoint | Descrizione | Utilizzo per |
| -------------------------- | ----------------------------------- | ---------------------------------------- |
| `/v1/chat/completions` | Chat standard (tutti i provider) | Tutti gli strumenti moderni |
| `/v1/responses` | API delle risposte (formato OpenAI) | Codex, flussi agentici |
| `/v1/completions` | Completamenti di testo legacy | Strumenti più vecchi che usano `prompt:` |
| `/v1/embeddings` | Embedding di testo | RAG, ricerca |
| `/v1/images/generations` | Generazione di immagini | GPT-Image, Flux, ecc. |
| `/v1/audio/speech` | Da testo a voce | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Da voce a testo | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
Esempi pronti per essere incollati con un URL OmniRoute tokenizzato:
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
Esempio di token: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Base standard OpenAI: http://localhost:20128/v1
Modelli VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Chat VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Risposte VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Chat Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Risoluzione dei Problemi
| Errore | Causa | Soluzione |
| ------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------- |
| `Connection refused` | OmniRoute non in esecuzione | `omniroute serve` |
| `401 Unauthorized` | Chiave API errata | Controlla in `/dashboard/api-manager` |
| `No combo configured` | Nessun combo di routing attivo | Configura in `/dashboard/combos` |
| CLI mostra "not installed" | Binario non nel PATH | Controlla `which <command>` |
| Il dashboard mostra "not detected" dopo l'installazione | Cache obsoleta | Clicca "⟳ Aggiorna rilevamento" nel dashboard |
| Link vecchio `/dashboard/cli-tools` | Segnalibro pre-v3.8.6 | Reindirizzato automaticamente a `/dashboard/cli-code` (308) |
| Link vecchio `/dashboard/agents` | Segnalibro pre-v3.8.6 | Reindirizzato automaticamente a `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,243 +0,0 @@
# CLI-INTEGRATIONS (日本語)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI統合 — OmniRouteに任意のコーディングCLIをポイントする"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI統合
OmniRouteは、コーディングCLICodex、Claude Code、OpenCode、ClineなどをOmniRouteをバックエンドとして使用するように設定する`setup-*`コマンドのファミリーを提供します。これにより、ツールは**1つの**エンドポイントと通信し、OmniRouteが自動的に適切なプロバイダーにルーティングします。各コマンドは、実行中のOmniRouteローカルまたはリモートから**ライブ**モデルカタログを読み取り、**あなたの**マシン上にツール自身の設定ファイルを書き込みます。APIキーは、ツールがサポートする場所で環境変数によって参照されます。ツールローカルの環境ファイルを永続化するコマンドは、以下に記載されています。
また、`omniroute run <target>`という汎用ランチャーもあり、適切な環境を注入して`claude``codex``aider``goose``opencode``qwen`、または`gemini`を起動します。設定ファイルは一切書き込まれません。ターゲットとそのエイリアスは、標準的なマニフェスト`bin/cli/cli-manifest.mjs`から取得されます(`claude-code|cc|anthropic``codex-cli|openai-codex|openai``goose-cli``open-code``qwen-code``gemini-cli`)、`omniroute completion`は同じマニフェストから派生したターゲットワードを提供します。レガシーのツールごとのランチャーである`omniroute launch`Claude Code`omniroute launch-codex`Codexは引き続き利用可能です。
プロバイダーのオンボーディングは、同じローカル/リモートコンテキストから利用可能です。以下のAPIファーストコマンドは、管理認証をプロバイダーの資格情報から分離し、構造化された出力に資格情報を決して表示しません
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
スクリプトの場合は、`--credential-stdin`または`--credential-env`を優先してください;`--credential`は制御されたローカル使用のために保持されています。`providers remove`は非対話型ターミナルで`--yes`を必要とし、すべての5つのコマンドはアクティブなコンテキストまたはグローバルな`--base-url`/`--api-key`オプションを尊重します。
2つの最もリッチな統合のための一度きりの手書きの基本設定については、ツールごとの詳細を参照してください
- [Claude Code設定](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI設定](./CODEX-CLI-CONFIGURATION.md)
- [リモートモード](./REMOTE-MODE.md) — ラップトップからリモートOmniRouteVPS / Tailnetを操作する
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot拡張機能エディタ内からこれらの`setup-*`コマンドを実行することもできます
---
## マスターテーブル
すべてのコマンドは、**アクティブなコンテキスト**`omniroute connect`で設定、[リモートモード](./REMOTE-MODE.md)を参照)または明示的な`--remote <url> --api-key <key>`フラグを尊重します。以下の「ローカル対リモート」とは、フラグなしで`http://localhost:20128`をターゲットにし、`--remote`(またはアクティブなリモートコンテキスト)でそのサーバーからカタログを取得し、ローカルに設定を書き込むことを意味します。
| コマンド | ツール | 書き込む内容 | 主要フラグ | ローカル対リモート |
| -------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — 互換性のあるテキストモデルごとに1つのプロファイル`codex --profile <name>` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | 両方 |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — 一致するモデルごとに1つのプロファイル`CLAUDE_CONFIG_DIR` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | 両方 |
| `omniroute setup-opencode` | OpenCodeopenai互換 | `~/.config/opencode/opencode.json` — すべてのカタログモデルを持つ`omniroute`プロバイダー(`opencode -m omniroute/<model>` | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | 両方 |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json`CLIモード + VS Code拡張設定を印刷 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | 両方 |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json`CLI + 存在する場合は`kilocode.*`をVS Code `settings.json`にマージ | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | 両方 |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai`モデル、キーは`${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | 両方 |
| `omniroute setup-cursor` | Cursor | 何も書き込まない — アプリ内の手順を印刷Cursorの設定は不透明なSQLite | `--remote` `--api-key` `--only` `--port` | 両方 |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json`(インポートドキュメント) + VS Codeの`settings.json`が存在する場合は`roo-cline.autoImportSettingsPath`を設定 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | 両方 |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat`プロバイダー、キーは`$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | 両方 |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml``GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL` + 環境レシピを印刷 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | 両方 |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml``openai-api-base` + `model: openai/<id>` + 環境レシピを印刷 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | 両方 |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai`配列 + `OMNIROUTE_API_KEY``~/.qwen/.env`に | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | 両方 |
| `omniroute run <target>` | ランタイム起動(汎用) | 何も書き込まない — 適切な環境と引数で`claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini`を起動QwenとGeminiは一時的な隔離されたホームを使用 | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | 両方 |
| `omniroute launch` | Claude Code | 何も書き込まない — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN`を注入して`claude`を起動 | `--remote` `--api-key` `--token` `--profile` `--port` | 両方 |
| `omniroute launch-codex` | OpenAI Codex CLI | 何も書き込まない — `-c`フラグを介して`omniroute`プロバイダーを注入して`codex`を起動 | `--remote` `--api-key` `--profile` (`-p`) `--port` | 両方 |
フラグに関する注意事項(コマンドソースで確認済み):
- `--remote <url>` — リモートOmniRouteからカタログを取得します`--port`およびアクティブなコンテキストをオーバーライドします)。`--api-key <key>`はそのサーバーの資格情報を提供します(デフォルトは`OMNIROUTE_API_KEY`環境変数、またはアクティブなコンテキストのトークンです)。
- `--only <patterns>` — カンマ区切りの部分文字列一致するモデルIDのみを保持します`--only glm,kimi`)。`setup-codex``setup-claude``setup-opencode``setup-continue``setup-cursor``setup-crush`で利用可能です。
- `--dry-run` — ファイルシステムに触れずに、正確に何が書き込まれるかを印刷します。すべての`setup-*`コマンドで利用可能ですが、`setup-cursor`(ファイルを書き込まない)を除きます。
- `--model <id>` — モデルの自動検出がないツールに必要または対話的に選択Cline、Kilo、Roo、Goose、Qwen、Aider。これらのツールは、非対話型実行のために`--yes`も受け入れます(その場合は`--model`が必要です)。`setup-opencode`はデフォルトのトップレベルモデルを設定するために`--model`を受け入れます。
- `--model <id>``omniroute run`でマニフェストのターゲットごとの配線に従います(`bin/cli/cli-manifest.mjs`**aider**は`--model openai/<id>`を受け取り、**opencode**は`--model omniroute/<id>`を受け取りますプレフィックスはIDがすでにそれを持っていない場合にのみ追加されます**qwen**と**gemini**はIDをそのまま受け取り、**claude**は`ANTHROPIC_MODEL`を介して、**goose**は`GOOSE_MODEL`を介して、**codex**は`-c model_providers.omniroute.*`引数を介して受け取ります。**Qwenは唯一の実行ターゲットで、`--model`が必須です** — `omniroute run qwen`はそれなしでは`2`で明示的なエラーで終了します。
- `--port <port>` — ローカルOmniRouteポートデフォルトは`20128``--remote`が設定されている場合は無視されます)。すべての`setup-*`および両方のランチャーに存在します。
- `omniroute run`の終了コード子CLIの独自の終了コードがそのまま伝播されます`2` = 無効な引数(サポートされていないターゲット、必要な`--model`が欠如、コンテナガード);`127` = ターゲットバイナリが`PATH`に存在しない;`130`/`143`/`129``SIGINT`/`SIGTERM`/`SIGHUP`によって起動が終了されたとき;`1` = その他のランタイム起動失敗。
- 2つのランチャー`launch``launch-codex`)は、`setup-claude` / `setup-codex`によって書き込まれたプロファイルを選択するために`--profile <name>`を受け入れ、基盤となる`claude` / `codex`バイナリのための引き継ぎ引数を渡します。
インタラクティブピッカーは、設定レシピでも共有されています:
```bash
# アクティブなローカルまたはリモートモデルカタログから選択し、ターゲットを設定します。
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure`は現在、`codex``claude``opencode``qwen``aider``goose``cline``continue`、および`kilo`のテストされたレシピに委任しています。IDE専用、MITM、およびガイド専用のカタログエントリは、明示的な`setup-*`/手動フローとして残り、起動可能なターゲットとしては提示されません。
> `setup-opencode`は**軽量なopenai互換**のOpenCode統合です。
> よりリッチなプラグイン統合もあります — `omniroute setup opencode` — これは`@omniroute/opencode-plugin`をインストールします。これらは異なるコマンドです;上のテーブルは`setup-opencode`を文書化しています。
---
## ローカル使用法
`localhost:20128` で OmniRoute が実行されている場合、ツールのセットアップコマンドを実行するだけです。カタログはローカルサーバーから取得されます。
```bash
# Codex: 一致したモデルごとに ~/.codex/ にプロファイルを書き込む
omniroute setup-codex
codex --profile glm52 # 生成されたプロファイルを使用
# Claude Code: モデルごとのプロファイルを書き込み、その後一つを起動
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: すべてのカタログモデルを持つ openai 互換プロバイダーを書き込む
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} 経由で参照、ディスク上には保存しない
opencode -m omniroute/glm/glm-5.2 "..."
# 自動検出がないツールには明示的なモデルが必要です:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# 何も書き込まずにプレビュー:
omniroute setup-continue --dry-run
```
全く設定を書き込まずに起動する(環境注入のみ):
```bash
omniroute launch # Claude Code → ローカル OmniRoute
omniroute launch-codex # Codex CLI → ローカル OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# 明示的なコマンドパス: -- の後に続くものを通過させる
omniroute run claude -- --print-system-prompt "この差分をレビュー"
```
---
## リモート使用法
リモート OmniRoute に対してセットアップコマンドを `--remote` + `--api-key` で指定します。カタログはリモートから取得され、設定はローカルマシンに書き込まれます。
```bash
# リモート VPS に対する OpenCode、glm/kimi モデルのみを保持
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # まず OMNIROUTE_API_KEY をエクスポート
# リモートカタログからの Codex プロファイル
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# リモートに対して CLI を直接起動
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
毎回 `--remote`/`--api-key` を渡す代わりに、一度ログインして **アクティブコンテキスト** が自動的にそれらを供給するようにします:
```bash
omniroute connect 192.168.0.15 # スコープ付きトークンを生成し、コンテキストを保存
omniroute setup-codex # ← 現在リモートカタログを使用
omniroute setup-opencode # ← 同じ
omniroute launch # ← リモートに対する Claude Code
```
コンテキスト、スコープ、およびトークン管理については [リモートモード](./REMOTE-MODE.md) を参照してください。
---
## ベース URL 規約(ツールが `/v1` を要求する場合)
OmniRoute は `/v1` で OpenAI サーフェスを公開し、ルートで Anthropic サーフェスを、`/v1beta` でネイティブ Gemini サーフェスを公開します。各統合は、そのツールが期待する形式に接続されています(コマンドソースで確認済み):
| 統合 | 書き込まれたベース URL | `/v1`? |
| -------------------------------------------------------------------------- | ---------------------- | ------------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | ルート | いいえ — Cline は `/v1/chat/completions` を追加します |
| `setup-goose` (`OPENAI_HOST`) | ルート | いいえ — Goose はパスを追加します |
| `setup-aider` (`OPENAI_API_BASE`) | ルート | いいえ — LiteLLM は `/v1/chat/completions` を追加します |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` 付き | はい |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | ルート | いいえ — Claude Code は `/v1/messages` を追加します |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` 付き | はい |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` 付き | はい |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | ルート | いいえ — SDK は `/v1beta/models/…` を追加します |
---
## ネイティブ依存関係の更新を維持する: `--include=optional`
`omniroute update` を使用して更新する際(確認後、または `--apply` を使用して、OmniRoute は `--include=optional` を組み込んでインストールを実行します:
```bash
npm install -g omniroute@latest --include=optional
```
これは `omniroute update` に渡すフラグではありません — 常にアップデーターによって適用されます。これにより、`optionalDependencies``better-sqlite3``keytar``tls-client`、LLMLingua SLM スタック)が更新後も生き残ることが保証されます。たとえ npm 設定に `omit=optional` が設定されていても、そうでなければネイティブ SQLite ドライバーと OS キーリングバインディングが静かに削除されてしまいます。適用せずに正確なコマンドをプレビューするには:
```bash
omniroute update --dry-run
# [DRY RUN] 実行されるコマンド: npm install -g omniroute@latest --include=optional
```
他の `omniroute update` フラグ(ソースで確認済み): `--check`(古い場合は 1 で終了)、`--apply`(プロンプトなしでインストール)、`--changelog``--no-backup``--yes`
---
## `omniroute run gemini` を介した Google Gemini CLI
契約は `@google/gemini-cli` 0.50.0 に対して確認済み: CLI は `GOOGLE_GEMINI_BASE_URL` を尊重し、`POST /v1beta/models/<model>:generateContent`(および `:streamGenerateContent?alt=sse`)を発行します — まさに OmniRoute のネイティブ Gemini サーフェス(`/v1beta`)です。`omniroute run gemini` はそれを自動的に接続します:
- `GOOGLE_GEMINI_BASE_URL` → アクティブな OmniRoute ベース URLルート、`/v1` は含まない);
- `GEMINI_API_KEY` → 解決された OmniRoute 資格情報(オプション/環境/コンテキスト);
- **一時的な隔離された `GEMINI_CLI_HOME`** その `.gemini/settings.json``gemini-api-key` 認証を選択し、保存された Google OAuth セッションCode Assistが OmniRoute 指向の起動を上書きしないようにします — 終了後に削除されます;
- **環境の衛生**: 子環境は `GOOGLE_API_KEY``GOOGLE_GENAI_USE_VERTEXAI``GOOGLE_GENAI_USE_GCA` を削除します(これらは認証を Vertex/Code Assist にリダイレクトします)、そして `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` がベルトとサスペンダーのバックアップとして設定されます — 他の `run` ターゲットもそれぞれの競合する変数に対して同様の処理を受けます;
- `--model <id>` の注入は `--provider`/`--model` から行われます。
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini のワークスペース信頼ガードはヘッドレスモードでも適用されます — `--skip-trust` を渡すか(またはディレクトリをインタラクティブに信頼する)必要があります; ランチャーは故意にそれをバイパスしません。このランチャーは **ACP 登録**`src/lib/acp/registry.ts``gemini --acp`)とは異なり、`/dashboard/acp-agents` のエージェントプロトコル統合として残ります。
---
## 実際のスモークスイープ(オプトイン)
決定論的なランプラン回帰が CI で実行されます(`tests/unit/cli/run-command.test.ts``tests/unit/cli/run-execution.test.ts`。REAL バイナリを REAL OmniRoute サーバーに対して検証するために、オプトインハーネスが存在します `tests/integration/upstream-cli-smoke.int.test.ts`。これは自動的には実行されず(`RUN_CLI_SMOKE=1` でない限り、すべてのサブテストはスキップされます)、環境変数 NAME で資格情報を渡し(値ではなく)、記録された出力からキー状の文字列を隠し、インストールされていないバイナリのターゲットをスキップし、失敗を認証 / アップストリーム / 設定として分類します(単なるブール値ではありません):
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
オプション: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` はスイープを制限します; `OMNIROUTE_SMOKE_TIMEOUT_MS` は 120 秒のターゲットごとのタイムアウトをオーバーライドします。
---
## 参照
- [Claude Code 設定](./CLAUDE-CODE-CONFIGURATION.md) — より深い Claude Code ガイド
- [Codex CLI 設定](./CODEX-CLI-CONFIGURATION.md) — 一度だけの `[model_providers.omniroute]` 基本設定
- [リモートモード](./REMOTE-MODE.md) — コンテキスト、スコープ付きアクセストークン、リモートサーバーの操作
- [CLI ツールリファレンス](../reference/CLI-TOOLS.md) — サポートされているツール + ダッシュボードページの完全カタログ
- [セットアップガイド](./SETUP_GUIDE.md) — インストール方法と初回オンボーディング

View File

@@ -1,301 +1,86 @@
# CLI-TOOLS (日本語)
# CLI Tools Setup Guide — OmniRoute (日本語)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLIツール — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLIツール — OmniRoute
最終更新日: 2026-08-18
OmniRouteは、3つの専用ダッシュボードページに分かれた3つのカテゴリのCLIツールと統合されています
| ページ | ルート | 概念 | カウント |
| ------------------- | ----------------------- | ---------------------------------------------------------------------------------- | ---------------- |
| **CLIコード** | `/dashboard/cli-code` | OmniRouteを指すコーディングツールクライアント → CLI → OmniRoute → プロバイダー) | 26 |
| **CLIエージェント** | `/dashboard/cli-agents` | OmniRouteを指す自律エージェント同じフロー、より広範な範囲 | 8 |
| **ACPエージェント** | `/dashboard/acp-agents` | OmniRouteがstdio/ACPを介してバックエンドとして生成するCLI逆流 | レジストリを参照 |
レガシールートは308でリダイレクトされます`/dashboard/cli-tools``/dashboard/cli-code``/dashboard/agents``/dashboard/acp-agents`
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## 仕組み
## How It Works
```
CLIコード / CLIエージェント消費フロー:
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (すべてOmniRouteを指す)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRouteが適切なプロバイダーにルーティング)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACPエージェント逆生成フロー:
クライアントリクエスト → OmniRoute → stdio/ACPを介してCLIを生成 → レスポンス
```
**利点:**
**Benefits:**
- すべてのツールを管理するための1つのAPIキー
- ダッシュボード内のすべてのCLIにわたるコスト追跡
- すべてのツールを再構成せずにモデル切り替え
- ローカルおよびリモートサーバーVPS、Docker、Akamai、Cloudflare Tunnelで動作
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*`による自動構成
## Supported Tools (Dashboard Source of Truth)
各ツールの設定を手動で書く必要はありません。OmniRouteは、実行中のOmniRouteローカルまたはリモートから**ライブ**モデルカタログを読み取り、ツール自身の設定をあなたのマシンに書き込むための`setup-*`コマンドをサポートするCLIごとに提供します
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
各コマンドは`--remote <url> --api-key <key>`リモートOmniRouteに対してローカルツールを構成`--dry-run`(書き込まずにプレビュー)、および`--port`を受け入れます。モデルの自動検出がないツールCline、Kilo、Roo、Goose、Aider、Qwen`--model <id>`(および非対話型実行のための`--yes`を受け取ります。適切な環境が注入され、全く設定が書き込まれないCLIを起動するには、一般的な`omniroute run <target>`ランチャーclaude、codex、aider、goose、opencode、qwen、gemini — ターゲットとエイリアスは`bin/cli/cli-manifest.mjs`から取得)を使用します。レガシーな各ツールのランチャー`omniroute launch`Claude Codeおよび`omniroute launch-codex`Codexは引き続き利用可能です。Gemini CLIは起動専用であり、`omniroute run`ターゲットですが、`setup-*`/`configure`レシピはありません。
### CLI fingerprint sync (Agents + Settings)
> **完全なリファレンス:** マスターテーブル — 各コマンドが書き込む内容、すべてのフラグ、ローカル対リモート、およびどのツールが`/v1`サフィックスを必要とするか — は**[CLI統合](../guides/CLI-INTEGRATIONS.md)**にあります。
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### コンテナ内での実行
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRouteコンテナ内で実行された`setup-*`コマンドは、コンテナ自身のホームに書き込まれ、ホストCLIが読み取ることはなく、コンテナとともに消えます。OmniRouteはそれを検出し、書き込むのではなく、指示とともに`2`で終了します。前進するための2つのサポートされた方法 — ホストにCLIをインストールし、`omniroute connect`でコンテナに接続するか、設定ディレクトリをバインドマウントし、`CLI_CONFIG_HOME`を設定しますcomposeの`host`プロファイル)。すべての`setup-*`コマンド、さらに`omniroute configure`および`omniroute config set`は、コンテナ自身のCLIを構成することが実際に意味する場合に`--allow-container-write`を受け入れます;`OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true`はサーバーに対して同じことを行います。詳細は
[Dockerガイド → ホストCLIツールの構成](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker)を参照してください。
ダッシュボードの**適用エンドポイント**`POST /api/cli-tools/apply`)は同じガードを強制します:コンテナ内では、ホストからバインドマウントされていないターゲットへの書き込みは**`422`**で応答し、`containerEphemeralTarget: true`という安全なエラーテキストと、ホストレシピを持つツールclaude、codex、opencode、cline、kilo、continueに対しては、代わりにホストで実行するための`hostSetupCommand`(例:`omniroute setup-opencode`)が提供されます;何も書き込まれません。`dryRun: true`はコンテナモードでも機能し、ディスクに触れずに生成されたコンテンツとターゲットパスを返すため、ダッシュボードからプレビューし、ホストで適用できます。この動作は意図的であり、`tests/unit/api/cli-tools/apply-container-guard.test.ts`によって回帰ガードされています — 422を「修正」するためにガードを削除しないでください。
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## 真実の源
## Step 1 — Get an OmniRoute API Key
統一カタログは `src/shared/constants/cliTools.ts``CLI_TOOLS: Record<string, CliCatalogEntry>` として存在します。
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
各エントリには以下のフィールドがあります(`src/shared/schemas/cliCatalog.ts` で定義されています):
| フィールド | 型 | 説明 |
| ----------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | ツールが表示されるページ |
| `vendor` | `string` | ツールの出所("Anthropic", "OSS (P. Gauthier)" |
| `acpSpawnable` | `boolean` | ACPエージェントとしても使用可能バッジ表示 |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | カスタムエンドポイントのサポートレベル。`"none"` = MITMバックログ |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | 設定メカニズム |
| `id`, `name`, `color`, `description`, `docsUrl` | 標準 | コア表示フィールド |
`baseUrlSupport: "none"` のエントリは **ダッシュボードページに表示されません** — それらはプラン11のMITMバックログに登録されています`_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` を参照)。
### 機能ティア(カタログ化 × 検出可能 × 設定可能 × 起動可能)
すべてのカタログ化されたツールが検出可能、設定可能、または起動可能であるわけではありません。各ティアには1つの宣言ソースがあり、ドリフトテストがそれらを整合させます
| ティア | 意味 | 宣言場所 |
| -------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| **カタログ化** | ダッシュボードカタログに表示される(名前、ベンダー、ドキュメント、設定タイプ) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **検出可能** | バイナリ/設定の検出、ヘルスチェック、設定パス | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` ランタイムカタログ) |
| **設定可能** | `omniroute configure <cli>` によってサポートされる(セットアップレシピが存在) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **起動可能** | `omniroute run <target>` によってサポートされるenv/argsの注入が定義されている | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` はCLIコマンドの標準実行可能マニフェストであり、`run``configure` およびシェル補完ジェネレーターはすべてそのターゲットリスト、エイリアス解決(例えば `kilocode`/`kilo-code`/`kilo_cli``kilo`)および `--model` フラグの配線をそこから派生させます。ドリフトガード `tests/unit/cli/cli-manifest-drift.test.ts` は、マニフェスト、ランタイムカタログ、UIカタログ、およびすべてのコンシューマサーフェスが同期していることを確認します — 1つのサーフェスに追加されたターゲットが他のサーフェスにない場合、スイートは静かにドリフトするのではなく失敗します。
## 1. CLIコードのカタログ (26ツール)
`/dashboard/cli-code`に表示されるすべてのツール。`baseUrlSupport: none`のものは、カスタムベースURLの代わりにMITMまたは手動ガイドを通じて接続されています
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | カスタムCLI | — | full | custom-builder | false |
`baseUrlSupport: "partial"`のツールは、ダッシュボードカードに「⚠ Base URL parcial」というバッジを表示します。
## 2. CLIエージェントカタログ (8ツール)
`/dashboard/cli-agents`に表示される自律エージェント:
| id | name | vendor | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | full | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | full | true |
| goose | Goose | Block / Linux Foundation | full | true |
| interpreter | Open Interpreter | OSS | full | true |
| warp | Warp AI | Warp Inc. | partial | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | full | false |
| omp | Oh My Pi | OSS | full | true |
| letta | Letta CLI | Letta | full | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACPエージェント (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
このページ(`/dashboard/agents`から名前変更は、OmniRouteが**スパーン**できるCLIを表示します。これらはバックエンド実行エンジンとしてstdio/ACPプロトコルを介して使用されます。カタログは`src/lib/acp/registry.ts`で別途管理されており、`CLI_TOOLS`とは**異なります**。
---
## 4. MITMバックログダッシュボードには表示されません
以下のCLIは、ネイティブにカスタムベースURLをサポートしておらず、CLIコードやCLIエージェントページには**リストされていません**。これらはプラン11でのMITMインターセプションの候補です
| CLI | 理由 |
| ------------------- | ----------------------------------------------------- |
| windsurf | BYOKは特定のClaudeモデルと企業のURL/tokenに限定される |
| amp | クローズドエコシステムSourcegraph |
| amazon-q / kiro-cli | AWS SSO認証、カスタムURLなし |
| cowork | Anthropic Desktop、構成可能なエンドポイントなし |
完全なクロスリファレンスについては、`_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`を参照してください。
---
## 5. バッチ検出API
すべてのツール検出は、単一のエンドポイントを介して集約されます:
**`GET /api/cli-tools/all-statuses`**
- 認証: `requireCliToolsAuth(request)`(他の`/api/cli-tools/`ルートと同じ)
- 戻り値: `Record<toolId, ToolBatchStatus>`(型: `src/shared/types/cliBatchStatus.ts`
- 戦略: すべてのツールに対して`Promise.all`、ツールごとに5秒のタイムアウト
- キャッシュ: 設定ファイル`mtime`によってインデックス付けされたメモリ内LRU。mtimeが変更されるとキャッシュが無効化されます。サーバー再起動時にリセットされます。
ツールごとのレスポンス形状:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // サニタイズ済み、スタックトレースなし
}
```
## 6. 新しいツールの設定ハンドラー
`configType: "custom"` の新しいツールには、専用の設定APIルートがあります
| ルート | ツール |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url フラグ) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi コーディングエージェント |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + 専用の `.env` キー) |
すべてのルートは、エラー応答に `sanitizeErrorMessage()` を使用します(ハードルール #12)。
---
## 7. ダッシュボードページのアーキテクチャ
### CLI コード (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — サーバーコンポーネント
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — クライアントグリッド
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — ツール詳細ページ
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12の専門ツールカード + `ToolDetailClient.tsx`
### CLI エージェント (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — サーバーコンポーネント
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — クライアントグリッド
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` を再利用
### ACP エージェント (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — サーバーコンポーネント(`agents/` から移動)
### 共有 UI コンポーネント (`src/shared/components/cli/`)
| ファイル | 目的 |
| ----------------------- | ---------------------------------------------------------- |
| `CliToolCard.tsx` | スマートステータスカード(検出 + 設定 + エンドポイント) |
| `CliConceptCard.tsx` | ページごとの概念説明カード |
| `CliComparisonCard.tsx` | CLI タイプ間の三列比較 |
| `BaseUrlSelect.tsx` | エンドポイントドロップダウン(ローカル/クラウド/カスタム) |
| `ApiKeySelect.tsx` | API キーセレクター |
| `ManualConfigModal.tsx` | コピー可能な設定スニペットモーダル |
### 共有フック (`src/shared/hooks/cli/`)
| ファイル | 目的 |
| ------------------------- | ----------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` を取得し、読み込み/リフレッシュ状態を管理 |
## 8. i18n
プラン14 F9で追加された新しい名前空間
| 名前空間 | 目的 |
| ----------- | --------------------------------------------------------------- |
| `cliCommon` | 共有文字列(カードラベル、概念/比較テキスト、詳細ページラベル) |
| `cliCode` | CLIコードのページ文字列 |
| `cliAgents` | CLIエージェントのページ文字列 |
| `acpAgents` | ACPエージェントのページ文字列 |
完全なPT-BRおよびENの翻訳が提供されています。39の他のロケールは、`src/i18n/request.ts`での名前空間レベルのマージを介して自動的にENにフォールバックします。
---
## 9. クイックスタート
### ステップ1 — OmniRoute APIキーを取得する
1. `/dashboard/api-manager`を開く → **APIキーを作成**
2. 名前を付ける(例:`cli-tools`)とすべての権限を選択
3. キーをコピーする — 以下のすべてのCLIで必要になります
> あなたのキーは次のようになります: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### ステップ2 — CLIツールをインストールする
すべてのnpmベースのツールはNode.js 22.22.2+または24.xを必要とします
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -313,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rustベース
# Pi coding agent
# インストールについては https://github.com/zechnerj/pi-coding-agent を参照
# jcode
# インストールについては https://github.com/1jehuang/jcode を参照
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### ステップ3 — ダッシュボードから設定する
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code`に移動
2. グリッドでツールを見つける
3. カードをクリックしてツールの詳細ページを開く
4. APIキーとベースURLを選択
5. **設定を適用**をクリックするか、手動設定スニペットをコピーする
---
### ステップ4 — グローバル環境変数を設定する
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRouteユニバーサルエンドポイント
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLIはROOTでGOOGLE_GEMINI_BASE_URLを読み取りますそのSDKは/v1beta/...を自動的に追加します)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **リモートサーバー**の場合、`localhost:20128`をサーバーのIPまたはドメインに置き換えてください、
> 例:`http://<your-server-ip>:20128`
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### ステップ4 — 各ツールを設定する
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# ~/.claude/settings.jsonを作成
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Codeには統一されたAnthropicゲートウェイのルートを使用します。ここに`/v1`を追加しないでください。
**テスト:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
モダンCodex (v0.137+)は`~/.codex/config.toml`のみを読み取ります — 古い
`config.yaml`はレガシーnpm CLIに属し、静かに無視されます。API
キーは`OMNIROUTE_API_KEY`環境変数(`env_key`)に保持され、ファイル内には決して含まれません:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
完全なリファレンス(プロファイル、`wire_api`、コンテキストウィンドウ): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md)。
**テスト:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**テスト:** `opencode`
> `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`を使用して
> 思考バリアントを送信します。
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLIまたはVS Code)
### OpenCode
**CLIモード**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -455,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Codeモード:**
Cline拡張設定 → APIプロバイダー`OpenAI Compatible`ベースURL`http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
またはOmniRouteダッシュボードを使用**CLIツール → Cline → 設定を適用**
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLIまたはVS Code)
### KiloCode (CLI or VS Code)
**CLIモード:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code設定:**
**VS Code settings:**
```json
{
@@ -479,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
またはOmniRouteダッシュボードを使用**CLIツール → KiloCode → 設定を適用**
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code拡張)
### Continue (VS Code Extension)
`~/.continue/config.yaml`を編集:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -497,248 +241,158 @@ models:
default: true
```
編集後にVS Codeを再起動します。
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
VS Code Insidersがカスタムエンドポイントモデルに設定されていて、カスタムヘッダーフィールドなしでOmniRouteを機能させたい場合に使用します。
**推奨される場所:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**トークン化されたOmniRouteエイリアスを使用した例**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**注意:**
- `sk-your-omniroute-key`をOmniRouteで作成したAPIキーに置き換えてください。
- `url`フィールドは`/api/v1/vscode/{token}/chat/completions`を指す必要があります。
- `modelsUrl`フィールドは`/api/v1/vscode/{token}/models`を指す必要があります。
- クライアントがカスタムヘッダーをサポートしている場合は、通常の`/v1` + Bearerヘッダーフローを優先してください。
- URLに埋め込まれたトークンは互換性のためのフォールバックであり、エディタのログやプロキシ履歴に表示されることがあります。
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# AWS/Kiroアカウントにログイン
# Login to your AWS/Kiro account:
kiro-cli login
# CLIは独自の認証を使用します — Kiro CLI自体のバックエンドとしてOmniRouteは必要ありません。
# 他のツールのためにOmniRouteと一緒にkiro-cliを使用します。
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE**デスクトップアプリの場合、OmniRouteが提供するMITMエンドポイントを使用します
`/dashboard/cli-tools → Kiro`の下で。
---
## 10. 内部 OmniRoute CLI
### Qwen Code (Alibaba)
`omniroute` バイナリは、サーバーのライフサイクル、セットアップ、診断、およびプロバイダー管理のためのコマンドを提供します。エントリーポイント: `bin/omniroute.mjs`
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
omniroute # サーバーを起動 (デフォルトポート 20128)
omniroute setup # インタラクティブなセットアップウィザード
omniroute doctor # 設定、DB、ポート、ランタイムをチェック
omniroute providers list # 設定されたプロバイダー接続
omniroute providers test-all # すべてのアクティブな接続をテスト
omniroute reset-password # 管理者パスワードをリセット
omniroute logs # リクエストログをストリーム
omniroute health # 詳細なヘルスチェック (ブレーカー、キャッシュ、メモリ)
omniroute --version # バージョンを表示
omniroute --help # すべてのコマンドを表示
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
### セットアップと初期化
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
omniroute setup # インタラクティブなセットアップウィザード
omniroute setup --non-interactive # CI/自動化モード (環境変数 + フラグを読み取る)
omniroute setup --password '<value>' # 管理者パスワードを直接設定
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # プロバイダーを追加してテストを一度に実行
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
非インタラクティブなセットアップ用に認識された環境変数:
> For a **remote server** replace `localhost:20128` with the server IP or domain.
| Var | 目的 |
| ------------------- | -------------------------------------------------- |
| `OMNIROUTE_API_KEY` | プロバイダーAPIキー (`--api-key` にバインドされる) |
| `DATA_DIR` | OmniRouteデータディレクトリをオーバーライド |
**Test:** `qwen "say hello"`
その他の非インタラクティブな入力はフラグとして渡され、環境変数ではありません:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(上記の `omniroute setup` オプションを参照)。
### Cursor (Desktop App)
### 診断
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
```bash
omniroute doctor # 設定、DB、ポート、ランタイム、メモリ、稼働状況をチェック
omniroute doctor --json # 機械可読なJSON
omniroute doctor --no-liveness # HTTPヘルスプローブをスキップ
omniroute doctor --host 0.0.0.0 # 稼働状況ホストをオーバーライド
omniroute doctor --liveness-url <url> # 完全なヘルスエンドポイントURLのオーバーライド
```
Via GUI: **Settings → Models → OpenAI API Key**
ドクターは以下のチェックを実行します: `設定`, `データベース`, `ストレージ/暗号化`,
`ポートの可用性`, `ノードランタイム`, `ネイティブバイナリ` (better-sqlite3),
`メモリ`, および `サーバーの稼働状況`。いずれかのチェックが `失敗` の場合、非ゼロで終了します。
### プロバイダー管理
```bash
omniroute providers available # OmniRouteプロバイダーのカタログ
omniroute providers available --search openai # ID/名前/エイリアス/カテゴリでカタログをフィルタリング
omniroute providers available --category api-key # カテゴリでフィルタリング (api-key, oauth, free, ...)
omniroute providers available --json # 機械可読なJSON
omniroute providers list # 設定されたプロバイダー接続
omniroute providers list --json
omniroute providers test <id|name> # 1つの設定された接続をテスト
omniroute providers test-all # すべてのアクティブな接続をテスト
omniroute providers validate # ローカル専用の構造検証
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # 既存のOAuthフロー
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` はAPIファーストであり、アクティブなローカルまたはリモートコンテキストに対して機能します。認証情報の入力は
`--credential-stdin` または `--credential-env` を使用する必要があります; `--dry-run --json`
赤actedされた存在/形状のみを報告します。`providers available` はOmniRouteカタログを読み取り、
`providers list/test/test-all/validate` はローカルSQLiteの動作を保持し、サーバーが実行されている必要はありません。
### 回復とリセット
```bash
omniroute reset-password # 管理者パスワードをリセット (別名: omniroute-reset-password)
omniroute reset-encrypted-columns # 警告を表示 + 暗号化された認証情報リセットのためのドライラン
omniroute reset-encrypted-columns --force # SQLite内の暗号化された認証情報を実際に無効にする
```
### 認証情報のエクスポート (⚠ 注意して取り扱う)
```bash
omniroute auth export # 警告 + 確認ゲートを表示 — DBアクセスなし
omniroute auth export --force # すべての接続の復号化された認証情報をstdoutにJSONとしてエクスポート
omniroute auth export --force --id <id> # 一致する接続のみをエクスポート
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> 行を出力
omniroute auth export --force --out creds.json # ファイルに書き込む (0600の権限で作成)
```
`auth export`**ローカル専用** (直接SQLite読み取り、HTTPルートなし) であり、意図的に **プレーンテキスト**`apiKey`/`accessToken`/`refreshToken`/`idToken` 値を印刷/書き込みます — それが機能です、バグではありません。`--force` なしではデータベースから何も読み取られず、何も復号化されません。プレーンテキストが出力される前に、常にstderrに警告バナーが印刷されます。`STORAGE_ENCRYPTION_KEY` を設定する必要があります。復号化に失敗したフィールド (古いキー、破損した暗号文) は、全体のエクスポートを中止したり、基礎となるエラーを漏らすのではなく、`<field>DecryptFailed: true` として報告されます。
### その他のサブコマンド
これらは、特に記載がない限り、実行中のOmniRouteサーバーを前提としています:
```bash
omniroute status # 包括的なランタイムステータス
omniroute logs # リクエストログをストリーム (--json, --search, --follow)
omniroute config show # 現在の設定を表示
omniroute provider list # 利用可能なプロバイダーのリスト (providers listのエイリアス)
omniroute provider add # ツールにOmniRouteをプロバイダーとして登録
omniroute keys add | list | remove # APIキーを管理
omniroute models [provider] # モデルのリスト (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # 設定 + DBのスナップショット
omniroute restore # 前のスナップショットから復元
omniroute health # 詳細なヘルスチェック (ブレーカー、キャッシュ、メモリ)
omniroute quota # プロバイダーのクォータ使用状況
omniroute cache # キャッシュの状態
omniroute cache clear # セマンティック + シグネチャキャッシュをクリア
omniroute mcp status | restart # MCPサーバーの状態 / 再起動
omniroute a2a status | card # A2Aサーバーの状態 / エージェントカード
omniroute tunnel list | create | stop # トンネルを管理 (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # 環境変数を検査 / 設定 (一時的)
omniroute test # プロバイダー接続のスモークテスト
omniroute update # 更新を確認
omniroute completion # シェルの補完を生成
```
### 一般的なフラグ
| フラグ | 説明 |
| ------------------- | -------------------------------------------------- |
| `--no-open` | 起動時にブラウザを自動的に開かない |
| `--port <n>` | APIポートをオーバーライド (デフォルト 20128) |
| `--mcp` | IDE用にstdio経由でMCPサーバーとして実行 |
| `--non-interactive` | CIモード (プロンプトなし; 環境/フラグから読み取る) |
| `--json` | 機械可読なJSON出力 (doctor, providersなど) |
| `--help`, `-h` | コマンド固有のヘルプを表示 |
| `--version`, `-v` | インストールされたバージョンを表示 |
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 利用可能なAPIエンドポイント
## Dashboard Auto-Configuration
| エンドポイント | 説明 | 使用目的 |
| -------------------------- | ------------------------------------ | ------------------------------- |
| `/v1/chat/completions` | 標準チャット(すべてのプロバイダー) | すべての最新ツール |
| `/v1/responses` | レスポンスAPIOpenAI形式 | Codex、エージェントワークフロー |
| `/v1/completions` | レガシーテキスト補完 | `prompt:`を使用する古いツール |
| `/v1/embeddings` | テキスト埋め込み | RAG、検索 |
| `/v1/images/generations` | 画像生成 | GPT-Image、Fluxなど |
| `/v1/audio/speech` | テキストから音声へ | ElevenLabs、OpenAI TTS |
| `/v1/audio/transcriptions` | 音声からテキストへ | Deepgram、AssemblyAI |
The OmniRoute dashboard automates configuration for most tools:
貼り付け可能なトークン化されたOmniRoute URLの例:
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
```txt
トークン例: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
標準OpenAIベース: http://localhost:20128/v1
VS Codeモデル: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Codeチャット: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Codeレスポンス: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollamaタグ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollamaチャット: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Built-in Agents: Droid & OpenClaw
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## トラブルシューティング
| エラー | 原因 | 修正 |
| ------------------------------------------------------------ | ------------------------------------ | ------------------------------------------------ |
| `Connection refused` | OmniRouteが実行されていない | `omniroute serve` |
| `401 Unauthorized` | APIキーが間違っている | `/dashboard/api-manager`で確認 |
| `No combo configured` | アクティブなルーティングコンボがない | `/dashboard/combos`で設定 |
| CLIが「not installed」と表示される | バイナリがPATHにない | `which <command>`で確認 |
| インストール後にダッシュボードが「not detected」と表示される | キャッシュが古い | ダッシュボードで「⟳ 検出を更新」をクリック |
| 古いリンク `/dashboard/cli-tools` | v3.8.6以前のブックマーク | `/dashboard/cli-code`に自動リダイレクト308 |
| 古いリンク `/dashboard/agents` | v3.8.6以前のブックマーク | `/dashboard/acp-agents`に自動リダイレクト308 |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,273 +0,0 @@
# CLI-INTEGRATIONS (한국어)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI 통합 — OmniRoute에 모든 코딩 CLI 연결하기"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI 통합
OmniRoute는 코딩 CLI(Codex, Claude Code, OpenCode, Cline 등)를 OmniRoute의 백엔드로 사용하도록 구성하는 `setup-*` 명령어 모음을 제공합니다. 이를 통해 도구는 **하나**의 엔드포인트와 통신하고 OmniRoute는 자동으로 적절한 제공자로 라우팅합니다. 각 명령어는 실행 중인 OmniRoute(로컬 또는 원격)에서 **실시간** 모델 카탈로그를 읽고 **당신의** 머신에 도구의 구성 파일을 작성합니다. API 키는 도구가 지원하는 곳에서 환경 변수로 참조됩니다. 도구 로컬 환경 파일을 지속하는 명령어는 아래에 명시되어 있습니다.
또한, `omniroute run <target>`이라는 일반 실행기가 있어, `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` 또는 `gemini`를 적절한 환경 변수를 주입하여 구성 파일을 작성하지 않고 실행할 수 있습니다. 타겟과 그 별칭은 정식 매니페스트 `bin/cli/cli-manifest.mjs`에서 가져오며(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), `omniroute completion`은 동일한 매니페스트에서 파생된 타겟 단어를 제공합니다. 구식 도구별 실행기인 `omniroute launch`(Claude Code)와 `omniroute launch-codex`(Codex)도 여전히 사용 가능합니다.
제공자 온보딩은 동일한 로컬/원격 컨텍스트에서 가능합니다. 아래의 API 우선 명령어는 관리 인증을 제공자 자격 증명과 분리하여 구조화된 출력에 자격 증명을 절대 출력하지 않습니다:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
스크립트의 경우 `--credential-stdin` 또는 `--credential-env`를 선호하세요; `--credential`은 제어된 로컬 사용을 위해 유지됩니다. `providers remove`는 비대화형 터미널에서 `--yes`를 요구하며, 모든 다섯 개의 명령어는 활성 컨텍스트 또는 전역 `--base-url`/`--api-key` 옵션을 존중합니다.
두 가지 가장 풍부한 통합의 일회성 수동 기본 설정에 대해서는 도구별 심층 분석을 참조하세요:
- [Claude Code 구성](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI 구성](./CODEX-CLI-CONFIGURATION.md)
- [원격 모드](./REMOTE-MODE.md) — 노트북에서 원격 OmniRoute(VPS / Tailnet) 제어
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot 확장; 편집기 내에서 이러한 `setup-*` 명령어를 실행할 수도 있습니다.
---
## 마스터 테이블
모든 명령어는 **활성 컨텍스트**( `omniroute connect`로 설정, [원격 모드](./REMOTE-MODE.md) 참조) 또는 명시적 `--remote <url> --api-key <key>` 플래그를 존중합니다. 아래의 "로컬 vs 원격"은 플래그가 없을 경우 `http://localhost:20128`을 대상으로 하며, `--remote`(또는 활성 원격 컨텍스트)가 설정되면 해당 서버에서 카탈로그를 가져와 로컬에 구성을 작성합니다.
| 명령어 | 도구 | 작성하는 내용 | 주요 플래그 | 로컬 vs 원격 |
| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------ |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — 호환 가능한 텍스트 모델당 하나의 프로필 (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | 둘 다 |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — 일치하는 모델당 하나의 프로필 (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | 둘 다 |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json` — 모든 카탈로그 모델을 가진 `omniroute` 제공자 (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | 둘 다 |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI 모드) + VS Code 확장 설정 출력 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | 둘 다 |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + 존재할 경우 `kilocode.*`를 VS Code `settings.json`에 병합 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | 둘 다 |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` 모델, 키는 `${{ secrets.OMNIROUTE_API_KEY }}`를 통해 제공 | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | 둘 다 |
| `omniroute setup-cursor` | Cursor | 없음 — 앱 내 단계 출력 (Cursor 구성은 불투명한 SQLite) | `--remote` `--api-key` `--only` `--port` | 둘 다 |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (문서 가져오기) + VS Code `settings.json`이 존재할 경우 `roo-cline.autoImportSettingsPath` 설정 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | 둘 다 |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` 제공자, 키는 `$OMNIROUTE_API_KEY`를 통해 제공 | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | 둘 다 |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + 환경 레시피 출력 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | 둘 다 |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + 환경 레시피 출력 | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | 둘 다 |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` 배열 + `~/.qwen/.env``OMNIROUTE_API_KEY` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | 둘 다 |
| `omniroute run <target>` | 런타임 실행 (일반) | 없음 — 적절한 환경과 인수로 `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini`를 생성; Qwen과 Gemini는 임시 격리된 홈을 사용 | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | 둘 다 |
| `omniroute launch` | Claude Code | 없음 — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN`이 주입된 `claude`를 생성 | `--remote` `--api-key` `--token` `--profile` `--port` | 둘 다 |
| `omniroute launch-codex` | OpenAI Codex CLI | 없음 — `-c` 플래그를 통해 `omniroute` 제공자가 주입된 `codex`를 생성 | `--remote` `--api-key` `--profile` (`-p`) `--port` | 둘 다 |
플래그에 대한 주의 사항(명령어 소스에서 확인됨):
- `--remote <url>` — 원격 OmniRoute에서 카탈로그를 가져옵니다( `--port` 및 활성 컨텍스트를 무시합니다). `--api-key <key>`는 해당 서버에 대한 자격 증명을 제공합니다(기본값은 `OMNIROUTE_API_KEY` 환경 변수 또는 활성 컨텍스트의 토큰입니다).
- `--only <patterns>` — 쉼표로 구분된 하위 문자열; 일치하는 모델 ID만 유지합니다(예: `--only glm,kimi`). `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`에서 사용 가능합니다.
- `--dry-run` — 파일 시스템을 건드리지 않고 작성될 내용을 정확히 출력합니다. 모든 `setup-*` 명령어에서 사용 가능하지만 `setup-cursor`에서는 사용할 수 없습니다(파일을 작성하지 않기 때문입니다).
- `--model <id>` — 모델 자동 검색이 없는 도구에 대해 필수(또는 대화형으로 선택됨): Cline, Kilo, Roo, Goose, Qwen, Aider. 이러한 도구는 비대화형 실행을 위해 `--yes`도 수용합니다(이 경우 `--model`이 필요합니다). `setup-opencode`는 기본 최상위 모델을 설정하기 위해 `--model`을 사용합니다.
- `--model <id>``omniroute run`에서 매니페스트의 타겟별 연결을 따릅니다(`bin/cli/cli-manifest.mjs`): **aider**는 `--model openai/<id>`를 받고, **opencode**는 `--model omniroute/<id>`를 받습니다(접두사는 ID가 이미 포함되어 있지 않을 때만 추가됨); **qwen**과 **gemini**는 ID를 그대로 받으며; **claude**는 `ANTHROPIC_MODEL`을 통해, **goose**는 `GOOSE_MODEL`을 통해, **codex**는 `-c model_providers.omniroute.*` 인수를 통해 받습니다. **Qwen은 유일하게 `--model`을 강제로 요구하는 실행 타겟입니다**`omniroute run qwen` 없이 실행하면 `2`와 함께 명시적 오류가 발생합니다.
- `--port <port>` — 로컬 OmniRoute 포트(기본값 `20128`, `--remote`가 설정되면 무시됨). 모든 `setup-*` 및 두 실행기에서 사용 가능합니다.
- `omniroute run` 종료 코드: 자식 CLI의 종료 코드는 그대로 전파됩니다; `2` = 잘못된 인수(지원되지 않는 타겟, 필수 `--model` 누락, 컨테이너 보호); `127` = 타겟 바이너리가 `PATH`에 없음; `130`/`143`/`129``SIGINT`/`SIGTERM`/`SIGHUP`에 의해 실행이 종료됨; `1` = 기타 런타임 실행 실패.
- 두 개의 실행기(`launch`, `launch-codex`)는 `setup-claude` / `setup-codex`에 의해 작성된 프로필을 선택하기 위해 `--profile <name>`을 수용하며, 기본 `claude` / `codex` 바이너리에 대한 전달 인수를 추가로 전달합니다.
대화형 선택기는 설정 레시피와도 공유됩니다:
```bash
# 활성 로컬 또는 원격 모델 카탈로그에서 선택하고 타겟을 구성합니다.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure`는 현재 `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, `kilo`에 대한 테스트된 레시피에 위임됩니다. IDE 전용, MITM 및 가이드 전용 카탈로그 항목은 명시적 `setup-*`/수동 흐름으로 남아 있으며 실행 가능한 타겟으로 제시되지 않습니다.
> `setup-opencode`는 **경량 openai 호환** OpenCode 통합입니다.
> 더 풍부한 플러그인 통합도 있으며 — `omniroute setup opencode` — `@omniroute/opencode-plugin`을 설치합니다. 이들은 서로 다른 명령어이며, 위의 테이블은 `setup-opencode`를 문서화합니다.
---
## 로컬 사용
`localhost:20128`에서 OmniRoute가 실행 중인 경우, 도구에 대한 설정 명령을 실행하기만 하면 됩니다. 카탈로그는 로컬 서버에서 가져옵니다.
```bash
# Codex: 일치하는 모델마다 프로필을 ~/.codex/에 작성합니다.
omniroute setup-codex
codex --profile glm52 # 생성된 프로필 사용
# Claude Code: 모델별 프로필을 작성한 후 하나를 실행합니다.
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: 모든 카탈로그 모델과 함께 openai 호환 제공자를 작성합니다.
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY}를 통해 참조, 디스크에는 저장되지 않음
opencode -m omniroute/glm/glm-5.2 "..."
# 자동 검색이 없는 도구는 명시적인 모델이 필요합니다:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# 아무것도 작성하지 않고 미리보기:
omniroute setup-continue --dry-run
```
구성을 전혀 작성하지 않고 실행합니다 (환경 주입만):
```bash
omniroute launch # Claude Code → 로컬 OmniRoute
omniroute launch-codex # Codex CLI → 로컬 OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# 명시적인 명령 경로: -- 다음에 오는 모든 것을 전달합니다.
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## 원격 사용
모든 설정 명령을 `--remote` + `--api-key`와 함께 원격 OmniRoute에 지정합니다. 카탈로그는 원격에서 가져오며, 구성은 로컬 머신에 작성됩니다.
```bash
# 원격 VPS에 대한 OpenCode, glm/kimi 모델만 유지
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # 먼저 OMNIROUTE_API_KEY를 내보내세요
# 원격 카탈로그에서 Codex 프로필
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# 원격에 직접 CLI 실행
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
매번 `--remote`/`--api-key`를 전달하는 대신, 한 번 로그인하고 **활성 컨텍스트**가 자동으로 제공하도록 합니다:
```bash
omniroute connect 192.168.0.15 # 범위가 지정된 토큰을 발급하고 컨텍스트를 저장합니다
omniroute setup-codex # ← 이제 원격 카탈로그를 사용합니다
omniroute setup-opencode # ← 동일
omniroute launch # ← 원격에 대한 Claude Code
```
컨텍스트, 범위 및 토큰 관리에 대한 내용은 [원격 모드](./REMOTE-MODE.md)를 참조하세요.
---
## 기본 URL 규칙 (어떤 도구가 `/v1`을 원하는지)
OmniRoute는 `/v1`에서 OpenAI 인터페이스를 노출하고, 루트에서 Anthropic 인터페이스를, `/v1beta`에서 네이티브 Gemini 인터페이스를 제공합니다. 각 통합은 도구가 기대하는 형식에 맞게 연결됩니다 (명령 소스에서 확인됨):
| 통합 | 작성된 기본 URL | `/v1`? |
| -------------------------------------------------------------------------- | --------------- | ------------------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | 루트 | 아니요 — Cline은 `/v1/chat/completions`를 추가합니다 |
| `setup-goose` (`OPENAI_HOST`) | 루트 | 아니요 — Goose는 경로를 추가합니다 |
| `setup-aider` (`OPENAI_API_BASE`) | 루트 | 아니요 — LiteLLM은 `/v1/chat/completions`를 추가합니다 |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` 포함 | 예 |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | 루트 | 아니요 — Claude Code는 `/v1/messages`를 추가합니다 |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` 포함 | 예 |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` 포함 | 예 |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | 루트 | 아니요 — SDK는 `/v1beta/models/…`를 추가합니다 |
---
## 네이티브 의존성 업데이트 유지: `--include=optional`
`omniroute update`로 업데이트할 때 (확인 후 또는 `--apply`와 함께),
OmniRoute는 `--include=optional`을 포함하여 설치를 실행합니다:
```bash
npm install -g omniroute@latest --include=optional
```
이것은 `omniroute update`에 전달하는 플래그가 **아닙니다** — 항상
업데이트 프로그램에 의해 적용됩니다. 이는 `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM 스택)가 업데이트 중에도 살아남도록 보장합니다.
만약 npm 설정에 `omit=optional`이 설정되어 있다면, 이는 네이티브 SQLite
드라이버와 OS-keyring 바인딩을 조용히 제거할 수 있습니다. 적용하지 않고
정확한 명령을 미리 보려면:
```bash
omniroute update --dry-run
# [DRY RUN] 실행할 것: npm install -g omniroute@latest --include=optional
```
다른 `omniroute update` 플래그 (소스에서 확인됨): `--check` (구버전일 경우 1로 종료), `--apply` (프롬프트 없이 설치), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
`@google/gemini-cli` 0.50.0에 대해 계약이 검증되었습니다: CLI는
`GOOGLE_GEMINI_BASE_URL`을 존중하며 `POST /v1beta/models/<model>:generateContent`
(및 `:streamGenerateContent?alt=sse`)를 발행합니다 — 이는 OmniRoute의 네이티브
Gemini 인터페이스 (`/v1beta`)와 정확히 일치합니다. `omniroute run gemini`는 이를 자동으로 연결합니다:
- `GOOGLE_GEMINI_BASE_URL` → 활성 OmniRoute 기본 URL (루트, `/v1` 없음);
- `GEMINI_API_KEY` → 해결된 OmniRoute 자격 증명 (옵션/환경/컨텍스트);
- **임시 격리된 `GEMINI_CLI_HOME`**의 `.gemini/settings.json`
`gemini-api-key` 인증을 선택하므로 저장된 Google OAuth 세션 (Code Assist)
가 OmniRoute 지시의 실행을 덮어쓰지 않도록 합니다 — 종료 후 제거됩니다;
- **환경 위생**: 자식 환경에서 `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI``GOOGLE_GENAI_USE_GCA`가 제거됩니다
(이는 인증을 Vertex/Code Assist로 리디렉션할 수 있음), 그리고 `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
벨트와 suspenders의 백업으로 설정됩니다 — 다른 `run` 대상도
자신의 충돌하는 변수에 대해 동일한 처리를 받습니다;
- `--model <id>` 주입은 `--provider`/`--model`에서 가져옵니다.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini의 작업 공간 신뢰 보호는 헤드리스 모드에서도 적용됩니다 —
`--skip-trust`를 전달하거나 디렉토리를 대화식으로 신뢰하십시오;
런처는 의도적으로 이를 우회하지 않습니다. 이 런처는 **ACP 등록**
(`src/lib/acp/registry.ts`, `gemini --acp`)과는 다릅니다. ACP 등록은
`/dashboard/acp-agents`에 대한 에이전트 프로토콜 통합을 유지합니다.
---
## 실제 스모크 스윕 (옵트인)
결정론적 실행 계획 회귀 테스트가 CI에서 실행됩니다
(`tests/unit/cli/run-command.test.ts`, `tests/unit/cli/run-execution.test.ts`).
REAL 바이너리를 REAL OmniRoute 서버에 대해 검증하기 위해,
옵트인 하네스가 존재합니다
`tests/integration/upstream-cli-smoke.int.test.ts`. 이는 자동으로 실행되지 않으며
(모든 하위 테스트는 `RUN_CLI_SMOKE=1`이 아닌 경우 건너뜁니다),
자격 증명을 환경 변수 NAME으로 전달합니다 (값으로는 전달하지 않음),
기록된 출력에서 키 모양의 문자열을 삭제하고, 바이너리가 설치되지 않은
대상은 건너뛰며, 실패를 인증 / 업스트림 / 구성으로 분류합니다
(단순한 불리언이 아님):
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
선택 사항: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"`는 스윕을 제한합니다;
`OMNIROUTE_SMOKE_TIMEOUT_MS`는 120초의 각 대상 타임아웃을 재정의합니다.
---
## 참조
- [Claude Code 구성](./CLAUDE-CODE-CONFIGURATION.md) — 심층 Claude Code 가이드
- [Codex CLI 구성](./CODEX-CLI-CONFIGURATION.md) — 일회성 `[model_providers.omniroute]` 기본 설정
- [원격 모드](./REMOTE-MODE.md) — 컨텍스트, 범위가 지정된 액세스 토큰, 원격 서버 구동
- [CLI 도구 참조](../reference/CLI-TOOLS.md) — 지원되는 도구 + 대시보드 페이지의 전체 카탈로그
- [설치 가이드](./SETUP_GUIDE.md) — 설치 방법 및 첫 실행 온보딩

View File

@@ -1,304 +1,86 @@
# CLI-TOOLS (한국어)
# CLI Tools Setup Guide — OmniRoute (한국어)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI 도구 — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI 도구 — OmniRoute
마지막 업데이트: 2026-08-18
OmniRoute는 세 가지 전용 대시보드 페이지에 걸쳐 세 가지 범주의 CLI 도구와 통합됩니다:
| 페이지 | 경로 | 개념 | 수량 |
| ---------------- | ----------------------- | ---------------------------------------------------------------------- | --------------- |
| **CLI 코드** | `/dashboard/cli-code` | OmniRoute를 가리키는 코딩 도구 (클라이언트 → CLI → OmniRoute → 공급자) | 26 |
| **CLI 에이전트** | `/dashboard/cli-agents` | OmniRoute를 가리키는 자율 에이전트 (같은 흐름, 더 넓은 범위) | 8 |
| **ACP 에이전트** | `/dashboard/acp-agents` | OmniRoute가 stdio/ACP를 통해 백엔드로 생성하는 CLI (역방향 흐름) | 레지스트리 참조 |
레거시 경로는 308을 통해 리디렉션됩니다: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## 작동 방식
## How It Works
```
CLI 코드 / CLI 에이전트 (소비 흐름):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (모두 OmniRoute를 가리킴)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute가 올바른 공급자로 라우팅)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP 에이전트 (역방향 생성 흐름):
클라이언트 요청 → OmniRoute → stdio/ACP를 통해 CLI 생성 → 응답
```
**장점:**
**Benefits:**
- 모든 도구를 관리할 수 있는 하나의 API 키
- 대시보드에서 모든 CLI의 비용 추적
- 모든 도구를 재구성하지 않고 모델 전환
- 로컬 및 원격 서버(VPS, Docker, Akamai, Cloudflare Tunnel)에서 작동
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*`로 자동 구성
## Supported Tools (Dashboard Source of Truth)
각 도구의 구성을 수동으로 작성할 필요가 없습니다. OmniRoute는 실행 중인 OmniRoute(로컬 또는 원격)에서 **실시간** 모델 카탈로그를 읽고 도구의 자체 구성을 귀하의 머신에 작성하는 `setup-*` 명령을 제공합니다:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
각 명령은 `--remote <url> --api-key <key>` (원격 OmniRoute에 대해 로컬 도구 구성), `--dry-run` (작성하지 않고 미리보기), 및 `--port`를 수용합니다. 모델 자동 검색이 없는 도구(Cline, Kilo, Roo, Goose, Aider, Qwen)는 `--model <id>` (비대화형 실행을 위한 `--yes`)를 사용합니다. 올바른 환경이 주입되고 전혀 구성되지 않은 CLI를 실행하려면 일반적인 `omniroute run <target>` 실행기를 사용하십시오 (claude, codex, aider, goose, opencode, qwen, gemini — 대상 및 별칭은 `bin/cli/cli-manifest.mjs`에서 가져옵니다); 레거시 도구별 실행기 `omniroute launch` (Claude Code) 및 `omniroute launch-codex` (Codex)도 사용할 수 있습니다. Gemini CLI는 실행 전용입니다: `omniroute run` 대상이지만 `setup-*`/`configure` 레시피가 없습니다.
### CLI fingerprint sync (Agents + Settings)
> **전체 참조:** 마스터 테이블 — 각 명령이 작성하는 내용, 모든 플래그, 로컬 대 원격, `/v1` 접미사를 원하는 도구 — 는 **[CLI 통합](../guides/CLI-INTEGRATIONS.md)**에 있습니다.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### 컨테이너 내에서 실행하기
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute 컨테이너 내에서 실행된 `setup-*` 명령은 컨테이너의 자체 홈에 작성되며, 이는 호스트 CLI가 읽지 않으며 컨테이너와 함께 사라집니다. OmniRoute는 이를 감지하고 작성하는 대신 지침과 함께 `2`로 종료합니다. 두 가지 지원되는 방법 — 호스트에 CLI를 설치하고 `omniroute connect`를 통해 컨테이너에 연결하거나, 구성 디렉토리를 바인드 마운트하고 `CLI_CONFIG_HOME`을 설정합니다 (compose `host` 프로필). 모든 `setup-*` 명령, plus `omniroute configure``omniroute config set`는 컨테이너의 자체 CLI를 구성하는 것이 실제로 의미하는 경우 `--allow-container-write`를 수용합니다; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true`는 서버에 대해 동일한 작업을 수행합니다. [Docker 가이드 → 호스트 CLI 도구 구성](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker)을 참조하십시오.
대시보드의 **적용 엔드포인트** (`POST /api/cli-tools/apply`)는 동일한 보호 장치를 시행합니다: 컨테이너 내에서 호스트에서 바인드 마운트되지 않은 대상을 대상으로 하는 쓰기는 **`422`**로 응답하며 `containerEphemeralTarget: true`, 안전한 오류 텍스트 및 — 호스트 레시피가 있는 도구(claude, codex, opencode, cline, kilo, continue)에 대해 — 호스트에서 실행할 `hostSetupCommand` (예: `omniroute setup-opencode`)를 제공합니다; 아무것도 작성되지 않습니다. `dryRun: true`는 컨테이너 모드에서도 작동하며 디스크를 건드리지 않고 생성된 콘텐츠 + 대상 경로를 반환하므로 대시보드에서 미리 보고 호스트에서 적용할 수 있습니다. 이 동작은 의도적이며 `tests/unit/api/cli-tools/apply-container-guard.test.ts`에 의해 회귀 방지됩니다 — 422를 "수정"하여 보호 장치를 제거하지 마십시오.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## 진실의 출처
## Step 1 — Get an OmniRoute API Key
통합 카탈로그는 `src/shared/constants/cliTools.ts``CLI_TOOLS: Record<string, CliCatalogEntry>`로 존재합니다.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
각 항목은 다음 필드를 가지고 있습니다 (정의는 `src/shared/schemas/cliCatalog.ts`에 있음):
| 필드 | 타입 | 설명 |
| ----------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------- |
| `category` | `"code" \| "agent"` | 도구가 나타나는 페이지 |
| `vendor` | `string` | 도구 출처 ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP 에이전트로도 사용 가능 (배지 표시됨) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | 사용자 정의 엔드포인트 지원 수준. `"none"` = MITM 백로그 |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | 구성 메커니즘 |
| `id`, `name`, `color`, `description`, `docsUrl` | 표준 | 핵심 표시 필드 |
`baseUrlSupport: "none"`인 항목은 **대시보드 페이지에 표시되지 않습니다** — 이들은 계획 11의 MITM 백로그에 등록됩니다 (참조: `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### 기능 계층 (카탈로그화 × 감지 가능 × 구성 가능 × 실행 가능)
모든 카탈로그화된 도구가 감지 가능, 구성 가능 또는 실행 가능한 것은 아닙니다. 각 계층은 하나의 선언 소스를 가지고 있으며, 드리프트 테스트가 이들을 정렬 상태로 유지합니다:
| 계층 | 의미 | 선언된 위치 |
| -------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
| **카탈로그화** | 대시보드 카탈로그에 나타남 (이름, 공급업체, 문서, 구성 유형) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **감지 가능** | 바이너리/구성 감지, 상태 검사, 구성 경로 | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` 런타임 카탈로그) |
| **구성 가능** | `omniroute configure <cli>`로 지원됨 (설정 레시피 존재) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **실행 가능** | `omniroute run <target>`로 지원됨 (env/args 주입 정의됨) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs`는 CLI 명령의 정식 실행 가능 매니페스트입니다: `run`, `configure` 및 셸 완성 생성기는 모두 그로부터 대상 목록, 별칭 해석 (예: `kilocode`/`kilo-code`/`kilo_cli``kilo`) 및 `--model` 플래그 배선을 파생합니다. 드리프트 가드는
`tests/unit/cli/cli-manifest-drift.test.ts`가 매니페스트, 런타임 카탈로그, UI 카탈로그 및 모든 소비자 표면이 동기화 상태를 유지하도록 보장합니다 — 하나의 표면에 추가된 대상이 다른 표면에 없으면 테스트가 실패하고 조용히 드리프트되지 않습니다.
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 1. CLI 코드 카탈로그 (26 도구)
## Step 2 — Install CLI Tools
`/dashboard/cli-code`에 나타나는 모든 도구. `baseUrlSupport: none`인 도구는 사용자 정의 기본 URL 대신 MITM 또는 수동 가이드를 통해 연결됩니다:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
`baseUrlSupport: "partial"`인 도구는 대시보드 카드에 "⚠ Base URL parcial" 배지를 표시합니다.
---
## 2. CLI 에이전트 카탈로그 (8 도구)
`/dashboard/cli-agents`에 나타나는 자율 에이전트:
| id | name | vendor | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | full | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | full | true |
| goose | Goose | Block / Linux Foundation | full | true |
| interpreter | Open Interpreter | OSS | full | true |
| warp | Warp AI | Warp Inc. | partial | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | full | false |
| omp | Oh My Pi | OSS | full | true |
| letta | Letta CLI | Letta | full | false |
---
## 3. ACP 에이전트 (/dashboard/acp-agents)
이 페이지는 `/dashboard/agents`에서 이름이 변경되었으며, OmniRoute가 stdio/ACP 프로토콜을 통해 **생성**할 수 있는 백엔드 실행 엔진으로서의 CLI를 보여줍니다. 카탈로그는 `src/lib/acp/registry.ts`에서 별도로 유지되며 `CLI_TOOLS`와는 **다릅니다**.
---
## 4. MITM 백로그 (대시보드에 표시되지 않음)
다음 CLI는 기본 URL을 기본적으로 지원하지 않으며 CLI 코드 또는 CLI 에이전트 페이지에 **나열되지 않습니다**. 이들은 계획 11에서 MITM 가로채기의 후보입니다:
| CLI | 이유 |
| ------------------- | ---------------------------------------------------- |
| windsurf | BYOK는 선택된 Claude 모델 + 기업 URL/토큰으로 제한됨 |
| amp | 폐쇄 생태계 (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO 인증, 사용자 정의 URL 없음 |
| cowork | Anthropic Desktop, 구성 가능한 엔드포인트 없음 |
전체 교차 참조는 `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`를 참조하십시오.
---
## 5. 배치 감지 API
모든 도구 감지는 단일 엔드포인트를 통해 집계됩니다:
**`GET /api/cli-tools/all-statuses`**
- 인증: `requireCliToolsAuth(request)` (다른 `/api/cli-tools/` 경로와 동일)
- 반환: `Record<toolId, ToolBatchStatus>` (유형: `src/shared/types/cliBatchStatus.ts`)
- 전략: 모든 도구에 대해 `Promise.all`, 도구당 5초 타임아웃
- 캐시: 구성 파일 `mtime`로 인덱싱된 메모리 LRU. mtime이 변경될 때 캐시가 무효화됩니다. 서버 재시작 시 초기화됩니다.
도구별 응답 형식:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // 정리됨, 스택 추적 없음
}
```
## 6. 새로운 도구를 위한 설정 핸들러
`configType: "custom"`인 새로운 도구는 전용 설정 API 경로를 가지고 있습니다:
| 경로 | 도구 |
| ------------------------------------------- | --------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url 플래그) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, 레거시) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, 기본 + 레거시 `~/.deepseek` 동기화) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi 코딩 에이전트 |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + 전용 `.env` 키) |
모든 경로는 오류 응답을 위해 `sanitizeErrorMessage()`를 사용합니다 (하드 룰 #12).
---
## 7. 대시보드 페이지 아키텍처
### CLI 코드 (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — 서버 컴포넌트
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — 클라이언트 그리드
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — 도구 상세 페이지
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12개의 전문 도구 카드 + `ToolDetailClient.tsx`
### CLI 에이전트 (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — 서버 컴포넌트
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — 클라이언트 그리드
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` 재사용
### ACP 에이전트 (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — 서버 컴포넌트 (이동됨 `agents/`에서)
### 공유 UI 컴포넌트 (`src/shared/components/cli/`)
| 파일 | 목적 |
| ----------------------- | ----------------------------------------------- |
| `CliToolCard.tsx` | 스마트 상태 카드 (탐지 + 구성 + 엔드포인트) |
| `CliConceptCard.tsx` | 페이지별 개념 설명 카드 |
| `CliComparisonCard.tsx` | CLI 유형 간의 3열 비교 |
| `BaseUrlSelect.tsx` | 엔드포인트 드롭다운 (로컬/클라우드/사용자 정의) |
| `ApiKeySelect.tsx` | API 키 선택기 |
| `ManualConfigModal.tsx` | 복사 가능한 구성 스니펫 모달 |
### 공유 훅 (`src/shared/hooks/cli/`)
| 파일 | 목적 |
| ------------------------- | -------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses`를 가져오고, 로딩/새로 고침 상태를 관리합니다 |
## 8. i18n
플랜 14 F9에 추가된 새로운 네임스페이스:
| 네임스페이스 | 목적 |
| ------------ | --------------------------------------------------------------- |
| `cliCommon` | 공유 문자열 (카드 레이블, 개념/비교 텍스트, 상세 페이지 레이블) |
| `cliCode` | CLI 코드의 페이지 문자열 |
| `cliAgents` | CLI 에이전트 페이지 문자열 |
| `acpAgents` | ACP 에이전트 페이지 문자열 |
전체 PT-BR 및 EN 번역이 제공됩니다. 39개의 다른 로케일은 `src/i18n/request.ts`에서 네임스페이스 수준 병합을 통해 자동으로 EN으로 대체됩니다.
---
## 9. 빠른 시작
### 단계 1 — OmniRoute API 키 받기
1. `/dashboard/api-manager`를 엽니다 → **API 키 생성**
2. 이름을 지정합니다 (예: `cli-tools`) 및 모든 권한 선택
3. 키를 복사합니다 — 아래의 모든 CLI에 필요합니다
> 당신의 키는 다음과 같습니다: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### 단계 2 — CLI 도구 설치
모든 npm 기반 도구는 Node.js 22.22.2+ 또는 24.x가 필요합니다:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -316,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust 기반
# Pi coding agent
# 설치는 https://github.com/zechnerj/pi-coding-agent를 참조하세요.
# jcode
# 설치는 https://github.com/1jehuang/jcode를 참조하세요.
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### 단계 3 — 대시보드에서 구성
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code`로 이동합니다
2. 그리드에서 도구를 찾습니다
3. 카드를 클릭하여 도구 상세 페이지를 엽니다
4. API 키와 기본 URL을 선택합니다
5. **구성 적용**을 클릭하거나 수동 구성 스니펫을 복사합니다
---
### 단계 4 — 전역 환경 변수 설정
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute 범용 엔드포인트
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI는 ROOT에서 GOOGLE_GEMINI_BASE_URL을 읽습니다 (SDK가 /v1beta/...를 자동으로 추가합니다)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **원격 서버**의 경우 `localhost:20128`을 서버 IP 또는 도메인으로 교체하세요,
> 예: `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### 단계 4 — 각 도구 구성
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# ~/.claude/settings.json 생성:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code에 대해 통합된 Anthropic 게이트웨이 루트를 사용하세요. 여기서 `/v1`을 추가하지 마세요.
**테스트:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
현대 Codex (v0.137+)는 `~/.codex/config.toml`만 읽습니다 — 이전
`config.yaml`은 레거시 npm CLI에 속하며 무시됩니다. API
키는 `OMNIROUTE_API_KEY` 환경 변수 (`env_key`)에 남아 있으며,
파일 내부에는 절대 포함되지 않습니다:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
전체 참조 (프로필, `wire_api`, 컨텍스트 윈도우): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**테스트:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**테스트:** `opencode`
> `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`를 사용하여
> 사고 변형을 전송하세요.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI 또는 VS Code)
### OpenCode
**CLI 모드:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -459,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code 모드:**
Cline 확장 설정 → API 제공자: `OpenAI Compatible`기본 URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
또는 OmniRoute 대시보드를 사용하세요**CLI 도구 → Cline → 구성 적용**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI 또는 VS Code)
### KiloCode (CLI or VS Code)
**CLI 모드:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code 설정:**
**VS Code settings:**
```json
{
@@ -483,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
또는 OmniRoute 대시보드를 사용하세요**CLI 도구 → KiloCode → 구성 적용**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code 확장)
### Continue (VS Code Extension)
`~/.continue/config.yaml`을 편집하세요:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -501,255 +241,158 @@ models:
default: true
```
편집 후 VS Code를 재시작하세요.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
VS Code Insiders가 사용자 정의 엔드포인트 모델에 대해 구성되어 있고 OmniRoute가 사용자 정의 헤더 필드 없이 작동하도록 하려면 이 파일을 사용하세요.
**추천 위치:**
- 리눅스: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- 윈도우: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**토큰화된 OmniRoute 별칭을 사용하는 예:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**노트:**
- `sk-your-omniroute-key`를 OmniRoute에서 생성한 API 키로 교체하세요.
- `url` 필드는 `/api/v1/vscode/{token}/chat/completions`를 가리켜야 합니다.
- `modelsUrl` 필드는 `/api/v1/vscode/{token}/models`를 가리켜야 합니다.
- 클라이언트가 사용자 정의 헤더를 지원할 때는 일반 `/v1` + Bearer 헤더 흐름을 선호하세요.
- URL에 포함된 토큰은 호환성 대체 수단이며 편집기 로그나 프록시 기록에 나타날 수 있습니다.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# AWS/Kiro 계정에 로그인:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI는 자체 인증을 사용합니다 — Kiro CLI 자체에 OmniRoute가 필요하지 않습니다.
# 다른 도구와 함께 OmniRoute와 함께 kiro-cli를 사용하세요.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** 데스크탑 앱의 경우 OmniRoute에서 노출된 MITM 엔드포인트를 사용하세요
`/dashboard/cli-tools → Kiro` 아래에서.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. 내부 OmniRoute CLI
## Dashboard Auto-Configuration
`omniroute` 바이너리는 서버 생명 주기, 설정, 진단 및 공급자 관리를 위한 명령을 제공합니다. 진입점: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # 서버 시작 (기본 포트 20128)
omniroute setup # 대화형 설정 마법사
omniroute doctor # 구성, DB, 포트, 런타임 확인
omniroute providers list # 구성된 공급자 연결
omniroute providers test-all # 모든 활성 연결 테스트
omniroute reset-password # 관리자 비밀번호 재설정
omniroute logs # 요청 로그 스트리밍
omniroute health # 상세 건강 상태 (회로 차단기, 캐시, 메모리)
omniroute --version # 버전 출력
omniroute --help # 모든 명령 보기
```
### 설정 및 초기화
```bash
omniroute setup # 대화형 설정 마법사
omniroute setup --non-interactive # CI/자동화 모드 (환경 변수 + 플래그 읽기)
omniroute setup --password '<value>' # 관리자 비밀번호 직접 설정
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # 공급자를 한 번에 추가하고 테스트
```
비대화형 설정을 위한 인식된 환경 변수:
| Var | Purpose |
| ------------------- | ---------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | 공급자 API 키 (`--api-key`에 Commander `.env()`를 통해 바인딩됨) |
| `DATA_DIR` | OmniRoute 데이터 디렉토리 재정의 |
모든 다른 비대화형 입력은 환경 변수가 아닌 플래그로 전달됩니다:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(위의 `omniroute setup` 옵션 참조).
### 진단
```bash
omniroute doctor # 구성, DB, 포트, 런타임, 메모리, 생존 확인
omniroute doctor --json # 기계 판독 가능한 JSON
omniroute doctor --no-liveness # HTTP 건강 프로브 건너뛰기
omniroute doctor --host 0.0.0.0 # 생존 호스트 재정의
omniroute doctor --liveness-url <url> # 전체 건강 엔드포인트 URL 재정의
```
의사는 다음 검사를 수행합니다: `구성`, `데이터베이스`, `저장소/암호화`,
`포트 가용성`, `노드 런타임`, `네이티브 바이너리` (better-sqlite3),
`메모리`, 및 `서버 생존`. 어떤 검사가 `실패`하면 비제로로 종료됩니다.
### 공급자 관리
```bash
omniroute providers available # OmniRoute 공급자 카탈로그
omniroute providers available --search openai # ID/이름/별칭/카테고리로 카탈로그 필터링
omniroute providers available --category api-key # 카테고리로 필터링 (api-key, oauth, free, ...)
omniroute providers available --json # 기계 판독 가능한 JSON
omniroute providers list # 구성된 공급자 연결
omniroute providers list --json
omniroute providers test <id|name> # 구성된 연결 하나 테스트
omniroute providers test-all # 모든 활성 연결 테스트
omniroute providers validate # 로컬 전용 구조 검증
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # 기존 OAuth 흐름
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove`는 API 우선이며 따라서
활성 로컬 또는 원격 컨텍스트에 대해 작동합니다. 자격 증명 입력은
`--credential-stdin` 또는 `--credential-env`를 사용해야 합니다; `--dry-run --json`
단지 수정된 존재/형태를 보고합니다. `providers available`은 OmniRoute 카탈로그를 읽습니다;
`providers list/test/test-all/validate`는 로컬 SQLite 동작을 유지하며
서버가 실행 중일 필요가 없습니다.
### 복구 및 재설정
```bash
omniroute reset-password # 관리자 비밀번호 재설정 (또한: omniroute-reset-password)
omniroute reset-encrypted-columns # 경고 표시 + 암호화된 자격 증명 재설정에 대한 드라이 런
omniroute reset-encrypted-columns --force # SQLite에서 암호화된 자격 증명을 실제로 null로 설정
```
### 자격 증명 내보내기 (⚠ 주의해서 다루기)
```bash
omniroute auth export # 경고 표시 + 확인 게이트 — DB 접근 없음
omniroute auth export --force # 모든 연결의 복호화된 자격 증명을 stdout에 JSON으로 내보내기
omniroute auth export --force --id <id> # 일치하는 연결만 내보내기
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> 형식으로 출력
omniroute auth export --force --out creds.json # 파일에 쓰기 (0600 권한으로 생성)
```
`auth export`**로컬 전용** (직접 SQLite 읽기, HTTP 경로 없음)이며 의도적으로
**평문** `apiKey`/`accessToken`/`refreshToken`/`idToken` 값을 출력/쓰기 — 이것이 기능이며,
버그가 아닙니다. `--force` 없이 데이터베이스에서 아무것도 읽지 않으며, 아무것도 복호화되지 않습니다. 평문이 출력되기 전에 항상 stderr 경고 배너가 출력됩니다. `STORAGE_ENCRYPTION_KEY`가 설정되어 있어야 합니다. 복호화에 실패한 필드(오래된 키, 손상된 암호문)는
`<field>DecryptFailed: true`로 보고되며 전체 내보내기를 중단하거나 기본 오류를 유출하지 않습니다.
### 기타 하위 명령
이들은 다른 경우가 명시되지 않는 한 실행 중인 OmniRoute 서버를 가정합니다:
```bash
omniroute status # 종합적인 런타임 상태
omniroute logs # 요청 로그 스트리밍 (--json, --search, --follow)
omniroute config show # 현재 구성 표시
omniroute provider list # 사용 가능한 공급자 목록 (providers list의 별칭)
omniroute provider add # 도구에 OmniRoute를 공급자로 등록
omniroute keys add | list | remove # API 키 관리
omniroute models [provider] # 모델 목록 (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # 구성 + DB 스냅샷
omniroute restore # 이전 스냅샷에서 복원
omniroute health # 상세 건강 상태 (회로 차단기, 캐시, 메모리)
omniroute quota # 공급자 쿼타 사용량
omniroute cache # 캐시 상태
omniroute cache clear # 의미론적 + 서명 캐시 지우기
omniroute mcp status | restart # MCP 서버 상태 / 재시작
omniroute a2a status | card # A2A 서버 상태 / 에이전트 카드
omniroute tunnel list | create | stop # 터널 관리 (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # 환경 변수 검사 / 설정 (임시)
omniroute test # 공급자 연결성 스모크 테스트
omniroute update # 업데이트 확인
omniroute completion # 셸 완성 생성
```
### 일반 플래그
| Flag | Description |
| ------------------- | ------------------------------------------------- |
| `--no-open` | 시작 시 브라우저 자동 열기 안 함 |
| `--port <n>` | API 포트 재정의 (기본 20128) |
| `--mcp` | IDE용으로 stdio를 통해 MCP 서버로 실행 |
| `--non-interactive` | CI 모드 (프롬프트 없음; env/flags에서 읽기) |
| `--json` | 기계 판독 가능한 JSON 출력 (doctor, providers 등) |
| `--help`, `-h` | 명령별 도움말 표시 |
| `--version`, `-v` | 설치된 버전 출력 |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## 사용 가능한 API 엔드포인트
## Built-in Agents: Droid & OpenClaw
| 엔드포인트 | 설명 | 용도 |
| -------------------------- | ----------------------- | ------------------------------ |
| `/v1/chat/completions` | 표준 채팅 (모든 제공자) | 모든 최신 도구 |
| `/v1/responses` | 응답 API (OpenAI 형식) | Codex, 에이전틱 워크플로우 |
| `/v1/completions` | 레거시 텍스트 완성 | `prompt:`를 사용하는 구형 도구 |
| `/v1/embeddings` | 텍스트 임베딩 | RAG, 검색 |
| `/v1/images/generations` | 이미지 생성 | GPT-Image, Flux 등 |
| `/v1/audio/speech` | 텍스트 음성 변환 | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | 음성 텍스트 변환 | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
붙여넣기 준비 완료 예제와 토큰화된 OmniRoute URL:
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
토큰 예제: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
표준 OpenAI 기본: http://localhost:20128/v1
VS Code 모델: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code 채팅: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code 응답: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama 태그: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama 채팅: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## 문제 해결
| 오류 | 원인 | 수정 방법 |
| ---------------------------------------- | ------------------------- | --------------------------------------------- |
| `Connection refused` | OmniRoute가 실행되지 않음 | `omniroute serve` |
| `401 Unauthorized` | 잘못된 API | `/dashboard/api-manager`에서 확인 |
| `No combo configured` | 활성 라우팅 조합 없음 | `/dashboard/combos`에서 설정 |
| CLI에서 "not installed" 표시 | 바이너리가 PATH에 없음 | `which <command>`를 확인 |
| 대시보드에서 설치 후 "not detected" 표시 | 캐시가 오래됨 | 대시보드에서 "⟳ 새로 고침" 클릭 |
| 오래된 링크 `/dashboard/cli-tools` | v3.8.6 이전 북마크 | `/dashboard/cli-code`로 자동 리디렉션 (308) |
| 오래된 링크 `/dashboard/agents` | v3.8.6 이전 북마크 | `/dashboard/acp-agents`로 자동 리디렉션 (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,294 +0,0 @@
# CLI-INTEGRATIONS (मराठी)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI इंटिग्रेशन्स — OmniRoute कडे कोणत्याही कोडिंग CLI ला निर्देशित करा"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI इंटिग्रेशन्स
OmniRoute एक कुटुंब `setup-*` कमांडसह येते जे एक कोडिंग CLI (Codex, Claude Code, OpenCode, Cline, …) ला OmniRoute चा बॅकएंड म्हणून वापरण्यासाठी कॉन्फिगर करते — त्यामुळे
हे टूल **एक** एंडपॉइंटशी संवाद साधते आणि OmniRoute योग्य प्रदात्याकडे रूट करते
ऑटो-फॉल्बॅकसह. प्रत्येक कमांड चालू OmniRoute (स्थानिक किंवा दूरस्थ) कडून **लाइव्ह** मॉडेल कॅटलॉग वाचते आणि **तुमच्या** मशीनवर टूलचा स्वतःचा कॉन्फिग फाइल लिहिते. API की एक पर्यावरण चलाने संदर्भित केली जाते जिथे टूल त्याला समर्थन करते. टूल-स्थानिक पर्यावरण फाइल टिकवणाऱ्या कमांड खाली नमूद केल्या आहेत.
एक सामान्य लाँचर देखील आहे — `omniroute run <target>` — जो योग्य वातावरण इंजेक्ट करून `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` किंवा `gemini` सुरू करतो, कोणतीही कॉन्फिग लिहित नाही. लक्ष्ये आणि त्यांचे उपनाम कॅनॉनिकल मॅनिफेस्ट `bin/cli/cli-manifest.mjs` कडून येतात
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), आणि `omniroute completion` समान मॅनिफेस्ट-व्युत्पन्न लक्ष्य शब्द ऑफर करते. वारसा प्रति-टूल लाँचर्स —
`omniroute launch` (Claude Code) आणि `omniroute launch-codex` (Codex) — उपलब्ध आहेत.
प्रदात्यांचे ऑनबोर्डिंग समान स्थानिक/दूरस्थ संदर्भातून उपलब्ध आहे. खालील API-प्रथम कमांड व्यवस्थापन प्रमाणीकरण प्रदाता क्रेडेन्शियल्सपासून वेगळे ठेवतात आणि कधीही संरचित आउटपुटमध्ये क्रेडेन्शियल प्रिंट करत नाहीत:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
स्क्रिप्टसाठी, `--credential-stdin` किंवा `--credential-env` प्राधान्य द्या; `--credential` नियंत्रित स्थानिक वापरासाठी राखले जाते. `providers remove` एक नॉन-इंटरएक्टिव्ह टर्मिनलवर `--yes` आवश्यक आहे, आणि सर्व पाच कमांड सक्रिय संदर्भ किंवा जागतिक `--base-url`/`--api-key` पर्यायांचा आदर करतात.
दोन सर्वात समृद्ध इंटिग्रेशन्सच्या एकदाच, हस्तलिखित बेस सेटअपसाठी, प्रति-टूल गहन अभ्यास पहा:
- [Claude Code कॉन्फिगरेशन](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI कॉन्फिगरेशन](./CODEX-CLI-CONFIGURATION.md)
- [दूरस्थ मोड](./REMOTE-MODE.md) — तुमच्या लॅपटॉपवरून एक दूरस्थ OmniRoute (VPS / Tailnet) चालवा
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot विस्तार; हे तुम्हाला संपादकाच्या आतून तुमच्यासाठी `setup-*` कमांड चालवू शकते
---
## मास्टर टेबल
प्रत्येक कमांड **सक्रिय संदर्भ** (जो `omniroute connect` सह सेट केला जातो, पहा
[दूरस्थ मोड](./REMOTE-MODE.md)) किंवा स्पष्ट `--remote <url> --api-key <key>` फ्लॅगचा आदर करतो.
"स्थानिक विरुद्ध दूरस्थ" म्हणजे: कोणत्याही फ्लॅगशिवाय ते `http://localhost:20128` ला लक्षित करते;
`--remote` (किंवा सक्रिय दूरस्थ संदर्भ) सह ते त्या सर्व्हरकडून कॅटलॉग आणते आणि स्थानिकरित्या कॉन्फिग लिहिते.
| कमांड | टूल | काय लिहिते | मुख्य फ्लॅग्स | स्थानिक विरुद्ध दूरस्थ |
| -------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — प्रत्येक सुसंगत टेक्स्ट मॉडेलसाठी एक प्रोफाइल (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | दोन्ही |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — जुळलेल्या मॉडेलसाठी एक प्रोफाइल (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | दोन्ही |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json` — प्रत्येक कॅटलॉग मॉडेलसह `omniroute` प्रदाता (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | दोन्ही |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI मोड) + VS Code विस्तार सेटिंग्ज प्रिंट करते | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | दोन्ही |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + उपस्थित असल्यास VS Code `settings.json` मध्ये `kilocode.*` विलीन करते | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | दोन्ही |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` मॉडेल, की `${{ secrets.OMNIROUTE_API_KEY }}` द्वारे | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोन्ही |
| `omniroute setup-cursor` | Cursor | काहीही नाही — इन-ऍप स्टेप्स प्रिंट करते (Cursor कॉन्फिग अस्पष्ट SQLite आहे) | `--remote` `--api-key` `--only` `--port` | दोन्ही |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (आयात दस्तऐवज) + जर VS Code `settings.json` अस्तित्वात असेल तर `roo-cline.autoImportSettingsPath` सेट करते | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | दोन्ही |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` प्रदाता, की `$OMNIROUTE_API_KEY` द्वारे | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोन्ही |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + वातावरण रेसिपी प्रिंट करते | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोन्ही |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + वातावरण रेसिपी प्रिंट करते | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोन्ही |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` अ‍ॅरे + `OMNIROUTE_API_KEY` `~/.qwen/.env` मध्ये | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | दोन्ही |
| `omniroute run <target>` | रनटाइम लाँच (सामान्य) | काहीही नाही — योग्य वातावरण आणि आर्गसह `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` सुरू करतो; Qwen आणि Gemini एक तात्पुरता पृथक घर वापरतात | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | दोन्ही |
| `omniroute launch` | Claude Code | काहीही नाही — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` इंजेक्ट करून `claude` सुरू करतो | `--remote` `--api-key` `--token` `--profile` `--port` | दोन्ही |
| `omniroute launch-codex` | OpenAI Codex CLI | काहीही नाही — `-c` फ्लॅगद्वारे `omniroute` प्रदाता इंजेक्ट करून `codex` सुरू करतो | `--remote` `--api-key` `--profile` (`-p`) `--port` | दोन्ही |
फ्लॅग्सवरील नोट्स (कमांड स्रोतात सत्यापित):
- `--remote <url>` — दूरस्थ OmniRoute कडून कॅटलॉग आणा (सक्रिय संदर्भ आणि `--port` ओव्हरराइड करते). `--api-key <key>` त्या सर्व्हरसाठी क्रेडेन्शियल प्रदान करते (जे `OMNIROUTE_API_KEY` पर्यावरण चलानुसार, किंवा सक्रिय संदर्भाच्या टोकनवर डिफॉल्ट असते).
- `--only <patterns>` — अल्पविरामाने विभाजित उपस्ट्रिंग्ज; फक्त मॉडेल आयडी ठेवा जे जुळतात
(उदा. `--only glm,kimi`). `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` वर उपलब्ध आहे.
- `--dry-run` — फाइल सिस्टमला स्पर्श न करता नेमके काय लिहिले जाईल ते प्रिंट करा. प्रत्येक `setup-*` कमांडवर उपलब्ध **व्यतिरिक्त** `setup-cursor`
(जे कधीही फाइल लिहित नाही).
- `--model <id>` — आवश्यक (किंवा इंटरएक्टिव्हपणे निवडलेले) त्या टूलसाठी ज्यांच्याकडे
मॉडेल ऑटो-डिस्कवरी नाही: Cline, Kilo, Roo, Goose, Qwen, Aider. त्या टूल्स
`--yes` साठी देखील स्वीकारतात जे नॉन-इंटरएक्टिव्ह चालवण्यासाठी आवश्यक आहे (जेव्हा `--model` आवश्यक आहे).
`setup-opencode` `--model` घेतो जेणेकरून डिफॉल्ट टॉप-लेव्हल मॉडेल सेट होईल.
- `--model <id>` `omniroute run` वर मॅनिफेस्टच्या प्रति-लक्ष्य वायरिंगचे अनुसरण करते
(`bin/cli/cli-manifest.mjs`): **aider** `--model openai/<id>` प्राप्त करतो आणि
**opencode** `--model omniroute/<id>` (प्रिफिक्स फक्त तेव्हा जोडले जाते जेव्हा आयडी
आधीच ते घेतलेले नाही); **qwen** आणि **gemini** आयडी शब्दशः प्राप्त करतात;
**claude** ते `ANTHROPIC_MODEL` द्वारे प्राप्त करतो, **goose** `GOOSE_MODEL` द्वारे, आणि
**codex** `-c model_providers.omniroute.*` आर्गसद्वारे. **Qwen हा एकटा रन
लक्ष्य आहे जो `--model` कडून कठोरपणे आवश्यक आहे** — `omniroute run qwen` त्याशिवाय `2` सह स्पष्ट त्रुटीसह बाहेर पडतो.
- `--port <port>` — स्थानिक OmniRoute पोर्ट (डिफॉल्ट `20128`, जेव्हा `--remote`
सेट केले जाते तेव्हा दुर्लक्षित). सर्व `setup-*` आणि दोन्ही लाँचर्सवर उपस्थित.
- `omniroute run` बाहेर पडण्याचे कोड: बाल CLI चा स्वतःचा बाहेर पडण्याचा कोड
शब्दशः प्रकट केला जातो; `2` = अमान्य तर्क (समर्थित लक्ष्य, आवश्यक
`--model` गहाळ, कंटेनर गार्ड); `127` = लक्ष्य बायनरी `PATH` मध्ये नाही;
`130`/`143`/`129` जेव्हा लाँच `SIGINT`/`SIGTERM`/`SIGHUP` द्वारे संपवले जाते;
`1` = इतर रनटाइम लाँच अपयश.
- दोन लाँचर्स (`launch`, `launch-codex`) `--profile <name>` स्वीकारतात
`setup-claude` / `setup-codex` द्वारे लिहिलेल्या प्रोफाइलची निवड करण्यासाठी, तसेच
अंतर्गत `claude` / `codex` बायनरीसाठी पास-थ्रू आर्गसाठी.
इंटरएक्टिव्ह पिकर सेटअप रेसिपीमध्ये देखील सामायिक आहे:
```bash
# सक्रिय स्थानिक किंवा दूरस्थ मॉडेल कॅटलॉगमधून निवडा आणि लक्ष्य कॉन्फिगर करा.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` सध्या `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, आणि `kilo` साठी चाचणी केलेल्या रेसिपींवर प्रतिनिधित्व करते. IDE-फक्त,
MITM, आणि मार्गदर्शक-फक्त कॅटलॉग नोंदी स्पष्ट `setup-*`/हस्तनिर्मित प्रवाह म्हणून राहतात आणि लाँच करण्यायोग्य लक्ष्य म्हणून सादर केले जात नाहीत.
> `setup-opencode` हा **हलका openai-compatible** OpenCode इंटिग्रेशन आहे.
> एक समृद्ध प्लगइन इंटिग्रेशन देखील आहे — `omniroute setup opencode` — जे
> `@omniroute/opencode-plugin` स्थापित करते. हे वेगवेगळे कमांड आहेत; वरील टेबल
> `setup-opencode` दस्तऐवज करते.
---
## स्थानिक वापर
`localhost:20128` वर OmniRoute चालू असताना, आपल्या साधनासाठी सेटअप कमांड चालवा. कॅटलॉग स्थानिक सर्व्हरवरून आणला जातो.
```bash
# Codex: जुळलेल्या मॉडेलसाठी ~/.codex/ मध्ये एक प्रोफाइल लिहा
omniroute setup-codex
codex --profile glm52 # तयार केलेला प्रोफाइल वापरा
# Claude Code: प्रत्येक मॉडेलसाठी प्रोफाइल लिहा, नंतर एक चालू करा
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: सर्व कॅटलॉग मॉडेलसह openai-संगत प्रदाता लिहा
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} द्वारे संदर्भित, कधीही डिस्कवर नाही
opencode -m omniroute/glm/glm-5.2 "..."
# स्वयंचलित शोध न करणाऱ्या साधनांना स्पष्ट मॉडेलची आवश्यकता आहे:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# काहीही लिहित न येता पूर्वावलोकन:
omniroute setup-continue --dry-run
```
कुठलीही कॉन्फिगरेशन लिहित न येता चालू करा (फक्त env-injection):
```bash
omniroute launch # Claude Code → स्थानिक OmniRoute
omniroute launch-codex # Codex CLI → स्थानिक OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# स्पष्ट कमांड पथ: -- नंतर येणारे काहीही पास करा
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## दूरस्थ वापर
कुठल्याही सेटअप कमांडला `--remote` + `--api-key` सह एक दूरस्थ OmniRoute वर लक्षित करा. कॅटलॉग दूरस्थपणे आणला जातो; कॉन्फिगरेशन आपल्या स्थानिक मशीनवर लिहिले जाते.
```bash
# दूरस्थ VPS विरुद्ध OpenCode, फक्त glm/kimi मॉडेल ठेवा
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # प्रथम OMNIROUTE_API_KEY निर्यात करा
# दूरस्थ कॅटलॉगमधून Codex प्रोफाइल
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# थेट दूरस्थ विरुद्ध CLI चालू करा
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
प्रत्येक वेळी `--remote`/`--api-key` पास करण्याऐवजी, एकदा लॉगिन करा आणि **सक्रिय संदर्भ** त्यांना स्वयंचलितपणे पुरवू द्या:
```bash
omniroute connect 192.168.0.15 # एक स्कोप केलेला टोकन तयार करतो, संदर्भ संग्रहित करतो
omniroute setup-codex # ← आता दूरस्थ कॅटलॉग वापरतो
omniroute setup-opencode # ← समान
omniroute launch # ← Claude Code दूरस्थ विरुद्ध
```
संदर्भ, स्कोप आणि टोकन व्यवस्थापनासाठी [दूरस्थ मोड](./REMOTE-MODE.md) पहा.
---
## बेस URL संकल्पना (ज्या साधनांना `/v1` हवे आहे)
OmniRoute OpenAI पृष्ठभाग `/v1` वर, Anthropic पृष्ठभाग मूळवर, आणि एक स्थानिक Gemini पृष्ठभाग `/v1beta` वर उघडतो. प्रत्येक एकत्रीकरण त्याच्या साधनाला अपेक्षित असलेल्या स्वरूपात वायर्ड आहे (कमांड स्रोतात सत्यापित):
| एकत्रीकरण | बेस URL लिहिलेले | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | मूळ | नाही — Cline `/v1/chat/completions` जोडतो |
| `setup-goose` (`OPENAI_HOST`) | मूळ | नाही — Goose पथ जोडतो |
| `setup-aider` (`OPENAI_API_BASE`) | मूळ | नाही — LiteLLM `/v1/chat/completions` जोडतो |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` सह | होय |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | मूळ | नाही — Claude Code `/v1/messages` जोडतो |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` सह | होय |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` सह | होय |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | मूळ | नाही — SDK `/v1beta/models/…` जोडतो |
---
## स्थानिक अवलंबनांचे अद्यतन ठेवणे: `--include=optional`
जेव्हा तुम्ही `omniroute update` सह अद्यतन करता (पुष्टीकरणानंतर, किंवा `--apply` सह),
OmniRoute `--include=optional` सह स्थापित करते:
```bash
npm install -g omniroute@latest --include=optional
```
हे **नाही** एक ध्वज आहे जो तुम्ही `omniroute update` ला पास करता — हे नेहमी अद्यतन करणाऱ्याद्वारे लागू केले जाते. हे `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM स्टॅक) अद्यतनानंतर टिकवून ठेवण्याची हमी देते, अगदी तुमच्या npm कॉन्फिगमध्ये
`omit=optional` सेट केले तरी, जे अन्यथा स्थानिक SQLite
ड्रायव्हर आणि OS-keyring बाइंडिंग गुपचूप काढून टाकेल. अचूक आदेश पूर्वावलोकन करण्यासाठी, लागू न करता:
```bash
omniroute update --dry-run
# [DRY RUN] चालवेल: npm install -g omniroute@latest --include=optional
```
इतर `omniroute update` ध्वज (स्रोतामध्ये सत्यापित): `--check` (आउटडेट असल्यास 1 बाहेर येते), `--apply` (प्रॉम्प्ट न करता स्थापित करा), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI `omniroute run gemini` द्वारे
`@google/gemini-cli` 0.50.0 विरुद्ध करार सत्यापित: CLI `GOOGLE_GEMINI_BASE_URL` चा आदर करते
आणि `POST /v1beta/models/<model>:generateContent`
(आणि `:streamGenerateContent?alt=sse`) यावर जारी करते — अगदी OmniRoute च्या स्थानिक
Gemini पृष्ठभागावर (`/v1beta`). `omniroute run gemini` हे स्वयंचलितपणे कनेक्ट करते:
- `GOOGLE_GEMINI_BASE_URL` → सक्रिय OmniRoute बेस URL (मूळ, `/v1` नाही);
- `GEMINI_API_KEY` → निराकृत OmniRoute क्रेडेन्शियल (पर्याय/env/संदर्भ);
- एक **तात्पुरता पृथक `GEMINI_CLI_HOME`** ज्याचा `.gemini/settings.json`
`gemini-api-key` प्रमाणीकरण निवडतो, त्यामुळे संग्रहित Google OAuth सत्र (कोड सहाय्य)
कधीही OmniRoute-निर्देशित लाँचवर ओव्हरराईड करत नाही — बाहेर पडल्यावर काढले जाते;
- **env स्वच्छता**: बालक वातावरण `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` आणि `GOOGLE_GENAI_USE_GCA` यांपासून साफ केले जाते (जे
प्रमाणीकरण Vertex/Code Assist कडे पुनर्निर्देशित करेल), आणि `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` एक बेल्ट-आणि-सरकन फॉलबॅक म्हणून सेट केले जाते — इतर `run` लक्ष्य त्यांच्या स्वतःच्या संघर्ष करणाऱ्या बदल्यांसाठी समान उपचार मिळवतात;
- `--model <id>` `--provider`/`--model` मधून इंजेक्शन.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Gemini चा कार्यक्षेत्र-विश्वास गार्ड अजूनही हेडलेस मोडमध्ये लागू आहे — `--skip-trust` पास करा
(किंवा डायरेक्टरीला इंटरएक्टिव्हपणे विश्वास ठेवा); लाँचर याला चुकवित नाही. हा लाँचर **ACP
नोंदणी** (`src/lib/acp/registry.ts`, `gemini --acp`) पासून भिन्न आहे, जो `/dashboard/acp-agents` साठी एजंट-प्रोटोकॉल एकत्रीकरण राहतो.
---
## वास्तविक धूर स्विप (ऑप्ट-इन)
CI मध्ये निश्चित लाँच-प्लान रिग्रेशन चालवते (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). वास्तविक OmniRoute सर्व्हर विरुद्ध वास्तविक बायनरींची पडताळणी करण्यासाठी, एक ऑप्ट-इन हार्नेस आहे
`tests/integration/upstream-cli-smoke.int.test.ts`. हे स्वयंचलितपणे चालत नाही
(प्रत्येक उप-चाचणी `RUN_CLI_SMOKE=1` नसेल तर स्किप करते), क्रेडेन्शियल env-var
NAME द्वारे पास करते (कधीही मूल्याद्वारे नाही), कोणत्याही नोंदवलेल्या आउटपुटमधून की-आकाराच्या स्ट्रिंग्ज काढून टाकते, स्थापित न केलेल्या बायनरीच्या लक्ष्यांना स्किप करते, आणि अपयशांना
auth / upstream / config म्हणून वर्गीकृत करते, साध्या बूलियनऐवजी:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
ऐच्छिक: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` स्विपला मर्यादित करते;
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120s प्रति-लक्ष्य टाइमआउट ओव्हरराईड करते.
---
## इतर माहिती
- [Claude Code कॉन्फिगरेशन](./CLAUDE-CODE-CONFIGURATION.md) — गहन Claude Code मार्गदर्शक
- [Codex CLI कॉन्फिगरेशन](./CODEX-CLI-CONFIGURATION.md) — एकदाच `[model_providers.omniroute]` मूलभूत सेटअप
- [दूरस्थ मोड](./REMOTE-MODE.md) — संदर्भ, स्कोप केलेले प्रवेश टोकन, दूरस्थ सर्व्हर चालवणे
- [CLI साधने संदर्भ](../reference/CLI-TOOLS.md) — समर्थित साधनांचा संपूर्ण सूची + डॅशबोर्ड पृष्ठे
- [सेटअप मार्गदर्शक](./SETUP_GUIDE.md) — स्थापना पद्धती आणि पहिल्या वापराचे मार्गदर्शन

View File

@@ -1,312 +1,86 @@
# CLI-TOOLS (मराठी)
# CLI Tools Setup Guide — OmniRoute (मराठी)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI साधने — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI साधने — OmniRoute
शेवटचा अद्यतन: 2026-08-18
OmniRoute तीन श्रेणींच्या CLI साधनांसह एकत्रित आहे, जे तीन समर्पित डॅशबोर्ड पृष्ठांवर पसरलेले आहेत:
| पृष्ठ | मार्ग | संकल्पना | संख्या |
| ------------ | ----------------------- | ------------------------------------------------------------------------------------- | ---------- |
| **CLI कोड** | `/dashboard/cli-code` | OmniRoute कडे निर्देशित केलेले कोडिंग साधने (क्लायंट → CLI → OmniRoute → प्रदाता) | 26 |
| **CLI एजंट** | `/dashboard/cli-agents` | OmniRoute कडे निर्देशित केलेले स्वायत्त एजंट (त्याच प्रवाहात, व्यापक व्याप्ती) | 8 |
| **ACP एजंट** | `/dashboard/acp-agents` | OmniRoute द्वारे stdio/ACP च्या माध्यमातून बॅकएंड म्हणून तयार केलेले CLI (उलट प्रवाह) | नोंदणी पहा |
लेगसी मार्ग 308 द्वारे पुनर्निर्देशित करतात: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## हे कसे कार्य करते
## How It Works
```
CLI कोड / CLI एजंट (उपभोग प्रवाह):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes एजंट / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (सर्व OmniRoute कडे निर्देशित)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute योग्य प्रदात्याकडे मार्गदर्शन करते)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP एजंट (उलट तयार होणारा प्रवाह):
क्लायंट विनंती → OmniRoute → stdio/ACP द्वारे CLI तयार करते → प्रतिसाद
```
**फायदे:**
**Benefits:**
- सर्व साधने व्यवस्थापित करण्यासाठी एक API की
- डॅशबोर्डमध्ये सर्व CLI च्या खर्चाचे ट्रॅकिंग
- प्रत्येक साधन पुन्हा कॉन्फिगर न करता मॉडेल स्विचिंग
- स्थानिक आणि दूरस्थ सर्व्हरवर कार्य करते (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## `setup-*` सह स्वयंचलित कॉन्फिगर करा
## Supported Tools (Dashboard Source of Truth)
आपल्याला प्रत्येक साधनाची कॉन्फिगरेशन हाताने लिहिण्याची आवश्यकता नाही. OmniRoute एक `setup-*`
कमांड पाठवते प्रत्येक समर्थित CLI साठी, जे चालू OmniRoute (स्थानिक किंवा दूरस्थ) मधून **लाइव्ह** मॉडेल कॅटलॉग वाचते आणि आपल्या मशीनवर साधनाची स्वतःची कॉन्फिगरेशन लिहिते:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
प्रत्येक `--remote <url> --api-key <key>` स्वीकारतो (दूरस्थ OmniRoute विरुद्ध स्थानिक साधन कॉन्फिगर करणे), `--dry-run` (लेखन न करता पूर्वावलोकन), आणि `--port`. मॉडेल स्वयंचलित शोध नसलेल्या साधनांसाठी (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` (आणि `--yes` नॉन-इंटरएक्टिव्ह चालवण्यासाठी) आवश्यक आहे. योग्य वातावरण इंजेक्ट केलेल्या CLI सुरू करण्यासाठी आणि कोणतीही कॉन्फिगरेशन न लिहिण्यासाठी, सामान्य `omniroute run <target>` लाँचर वापरा (claude, codex, aider, goose, opencode, qwen, gemini — लक्ष्य आणि उपनाम `bin/cli/cli-manifest.mjs` मधून येतात); लेगसी प्रति-साधन लाँचर `omniroute launch` (Claude Code) आणि `omniroute launch-codex` (Codex) उपलब्ध आहेत. Gemini CLI फक्त लाँच-केवळ आहे: हे एक `omniroute run` लक्ष्य आहे परंतु याला `setup-*`/`configure` रेसिपी नाही.
### CLI fingerprint sync (Agents + Settings)
> **पूर्ण संदर्भ:** मास्टर टेबल — प्रत्येक कमांड काय लिहितो, प्रत्येक ध्वज,
> स्थानिक विरुद्ध दूरस्थ, आणि कोणती साधने `/v1` उपसर्गाची आवश्यकता आहे — येथे आहे
> **[CLI एकत्रीकरण](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### कंटेनरमध्ये हे चालवणे
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
OmniRoute कंटेनरमध्ये कार्यान्वित केलेले `setup-*` कमांड कंटेनरच्या स्वतःच्या घरात लिहितात, जे कोणतेही होस्ट CLI वाचत नाही आणि जे कंटेनरच्या सह गायब होते. OmniRoute ते ओळखते आणि लेखन न करता निर्देशांसह `2` बाहेर पडते. पुढे जाण्यासाठी दोन समर्थित मार्ग — होस्टवर CLI स्थापित करा आणि कंटेनरवर `omniroute connect` करा, किंवा कॉन्फिगरेशन डिरेक्टरी बाइंड-माउंट करा आणि `CLI_CONFIG_HOME` सेट करा (कॉम्पोज `host` प्रोफाइल). प्रत्येक `setup-*` कमांड, तसेच `omniroute configure` आणि `omniroute config set`, कंटेनरच्या स्वतःच्या CLI च्या कॉन्फिगरेशनसाठी आपण खरोखर काय म्हणत आहात तेव्हा `--allow-container-write` स्वीकारतो; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` सर्व्हर साठी तेच करते. पहा
[Docker मार्गदर्शक → होस्ट CLI साधने कॉन्फिगर करणे](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
डॅशबोर्डचा **अर्ज एंडपॉइंट** (`POST /api/cli-tools/apply`) समान गार्ड लागू करतो: कंटेनरमध्ये, एक लेखन ज्याचा लक्ष्य होस्टकडून बाइंड-माउंट केलेले नाही **`422`** सह उत्तर देते `containerEphemeralTarget: true`, सुरक्षित त्रुटी मजकूर आणि — होस्ट रेसिपी असलेल्या साधनांसाठी (claude, codex, opencode, cline, kilo, continue) — एक `hostSetupCommand` (उदा. `omniroute setup-opencode`) जे होस्टवर चालवायचे आहे; काहीही लिहिले जात नाही. `dryRun: true` कंटेनर मोडमध्ये कार्यरत राहते आणि डिस्कवर स्पर्श न करता तयार केलेला सामग्री + लक्ष्य पथ परत करते, त्यामुळे आपण डॅशबोर्डवरून पूर्वावलोकन करू शकता आणि होस्टवर लागू करू शकता. हे वर्तन हेतुपुरस्सर आहे आणि `tests/unit/api/cli-tools/apply-container-guard.test.ts` द्वारे पुनरागमन-सुरक्षित आहे — कधीही "फिक्स" 422 गार्ड काढून टाकून.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## सत्याचा स्रोत
## Step 1 — Get an OmniRoute API Key
एकत्रित कॅटलॉग `src/shared/constants/cliTools.ts` मध्ये `CLI_TOOLS: Record<string, CliCatalogEntry>` म्हणून अस्तित्वात आहे.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
प्रत्येक नोंदीत या क्षेत्रांचा समावेश आहे (जे `src/shared/schemas/cliCatalog.ts` मध्ये परिभाषित आहेत):
| क्षेत्र | प्रकार | वर्णन |
| ----------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------- |
| `category` | `"code" \| "agent"` | साधन कोणत्या पृष्ठावर दिसते |
| `vendor` | `string` | साधनाचा उगम ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | ACP एजंट म्हणून देखील वापरता येतो (बॅज दर्शविला जातो) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | कस्टम एंडपॉइंट समर्थन स्तर. `"none"` = MITM बॅकलॉग |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | कॉन्फिगरेशन यांत्रिकी |
| `id`, `name`, `color`, `description`, `docsUrl` | मानक | मुख्य प्रदर्शन क्षेत्र |
`baseUrlSupport: "none"` असलेल्या नोंदी **डॅशबोर्ड पृष्ठांवर दर्शविल्या जात नाहीत** — त्यांना योजना 11 साठी MITM बॅकलॉगमध्ये नोंदवले जाते (पहा `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### क्षमता स्तर (कॅटलॉग केलेले × शोधता येणारे × कॉन्फिगर करण्यायोग्य × सुरू करण्यायोग्य)
प्रत्येक कॅटलॉग केलेले साधन शोधता येणारे, कॉन्फिगर करण्यायोग्य किंवा सुरू करण्यायोग्य असेलच असे नाही. प्रत्येक स्तराला एक
घोषणात्मक स्रोत आहे, आणि एक ड्रिफ्ट चाचणी त्यांना समांतर ठेवते:
| स्तर | अर्थ | घोषणित केलेले |
| ---------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------- |
| **Cataloged** | डॅशबोर्ड कॅटलॉगमध्ये दिसते (नाव, विक्रेता, दस्तऐवज, कॉन्फिग प्रकार) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detectable** | बायनरी/कॉन्फिग शोध, आरोग्य तपासणी, कॉन्फिग पथ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` रनटाइम कॅटलॉग) |
| **Configurable** | `omniroute configure <cli>` द्वारे समर्थित (सेटअप रेसिपी अस्तित्वात आहे) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Launchable** | `omniroute run <target>` द्वारे समर्थित (env/args इंजेक्शन परिभाषित) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` CLI आदेशांसाठी मानक कार्यान्वयन मॅनिफेस्ट आहे
सतह: `run`, `configure` आणि शेल-पूर्णता जनरेटर सर्व त्यांच्या
लक्ष्य सूची, उपनाम निराकरण (उदाहरणार्थ `kilocode`/`kilo-code`/`kilo_cli``kilo`)
आणि `--model` ध्वज वायरिंग यावरून घेतात. ड्रिफ्ट गार्ड
`tests/unit/cli/cli-manifest-drift.test.ts` याची खात्री करतो की मॅनिफेस्ट, रनटाइम
कॅटलॉग, UI कॅटलॉग आणि प्रत्येक उपभोक्ता सतह समक्रमित राहतात — एक लक्ष्य एक
सतहवर जोडले गेले तरी इतरांवर न जोडल्यास चाचणी अपयशी ठरते, चुपचाप ड्रिफ्ट होत नाही.
## 1. CLI कोडचा कॅटलॉग (26 साधने)
सर्व साधने ज्या `/dashboard/cli-code` मध्ये दिसतात. `baseUrlSupport: none` असलेल्या साधनांना MITM किंवा मॅन्युअल मार्गदर्शकाद्वारे कनेक्ट केले जाते, कस्टम बेस URL च्या ऐवजी:
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
`baseUrlSupport: "partial"` असलेल्या साधनांना डॅशबोर्ड कार्डमध्ये "⚠ Base URL parcial" चा बॅज दर्शविला जातो.
---
## 2. CLI एजंट्स कॅटलॉग (8 साधने)
स्वायत्त एजंट्स जे `/dashboard/cli-agents` मध्ये दिसतात:
| id | नाव | विक्रेता | baseUrlSupport | acpSpawnable |
| ------------ | -------------- | ----------------------- | -------------- | ------------ |
| hermes-agent | हर्मेस एजंट | नॉस रिसर्च | पूर्ण | खोटी |
| openclaw | ओपनक्लॉ | OSS (P. स्टाइनबर्गर) | पूर्ण | खरी |
| goose | गूज | ब्लॉक / लिनक्स फाउंडेशन | पूर्ण | खरी |
| interpreter | ओपन इंटरप्रेटर | OSS | पूर्ण | खरी |
| warp | वॉर्प एआय | वॉर्प इंक. | अंशतः | खरी |
| agent-deck | एजंट डेक | asheshgoplani (OSS) | पूर्ण | खोटी |
| omp | ओह माय पाय | OSS | पूर्ण | खरी |
| letta | लेट्टा CLI | लेट्टा | पूर्ण | खोटी |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP एजंट्स (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
ही पृष्ठ ( `/dashboard/agents` वरून नाव बदललेले) OmniRoute ला **स्पॉन** करण्यास सक्षम CLI दर्शवते जे बॅकएंड कार्यान्वयन इंजिन म्हणून stdio/ACP प्रोटोकॉलद्वारे कार्य करतात. कॅटलॉग `src/lib/acp/registry.ts` मध्ये स्वतंत्रपणे देखरेख केली जाते आणि हे `CLI_TOOLS` सारखे **नाही** आहे.
---
## 4. MITM बॅकलॉग (डॅशबोर्डमध्ये दर्शवलेले नाही)
खालील CLI स्वदेशीपणे कस्टम बेस URL समर्थन करत नाहीत आणि CLI कोडच्या किंवा CLI एजंट्सच्या पृष्ठांमध्ये **यादीबद्ध** केलेले नाहीत. ते योजना 11 मध्ये MITM हस्तक्षेपासाठी उमेदवार आहेत:
| CLI | कारण |
| ------------------- | ------------------------------------------------------ |
| windsurf | BYOK निवडक क्लॉड मॉडेल्स + कॉर्पोरेट URL/token |
| amp | बंद पारिस्थितिकी तंत्र (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO प्रमाणीकरण, कस्टम URL नाही |
| cowork | अँथ्रोपिक डेस्कटॉप, कॉन्फिगर करण्यायोग्य एंडपॉइंट नाही |
पूर्ण क्रॉस-रेफरन्ससाठी `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` पहा.
---
## 5. बॅच डिटेक्शन API
सर्व साधनांचे डिटेक्शन एका एकल एंडपॉइंटद्वारे एकत्रित केले जाते:
**`GET /api/cli-tools/all-statuses`**
- प्रमाणीकरण: `requireCliToolsAuth(request)` (इतर `/api/cli-tools/` मार्गांप्रमाणे)
- परत करते: `Record<toolId, ToolBatchStatus>` (प्रकार: `src/shared/types/cliBatchStatus.ts`)
- धोरण: सर्व साधनांवर `Promise.all`, प्रत्येक साधनासाठी 5 सेकंदांचा टाइमआउट
- कॅश: इन-मेमरी LRU कॉन्फिग फाइल `mtime` द्वारे अनुक्रमित. mtime बदलल्यावर कॅश अमान्य केला जातो. सर्व्हर पुन्हा सुरू झाल्यावर रीसेट.
प्रत्येक साधनासाठी प्रतिसादाचा आकार:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // स्वच्छ, स्टॅक ट्रेस नाही
}
```
## 6. नवीन साधनांसाठी सेटिंग्ज हँडलर्स
`configType: "custom"` असलेल्या नवीन साधनांसाठी समर्पित सेटिंग्ज API मार्ग आहेत:
| मार्ग | साधन |
| ------------------------------------------- | ------------------------------------------------------------------ |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url ध्वज) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, वारसा) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, प्राथमिक + वारसा `~/.deepseek` समन्वय) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi कोडिंग एजंट |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + समर्पित `.env` की) |
सर्व मार्ग `sanitizeErrorMessage()` वापरतात त्रुटी प्रतिसादांसाठी (कठोर नियम #12).
---
## 7. डॅशबोर्ड पृष्ठांची आर्किटेक्चर
### CLI कोड (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — सर्व्हर घटक
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — क्लायंट ग्रिड
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — साधन तपशील पृष्ठ
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 विशेष साधन कार्ड + `ToolDetailClient.tsx`
### CLI एजंट (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — सर्व्हर घटक
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — क्लायंट ग्रिड
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx``ToolDetailClient` पुन्हा वापरतो
### ACP एजंट (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — सर्व्हर घटक (`agents/` मधून हलवले)
### सामायिक UI घटक (`src/shared/components/cli/`)
| फाइल | उद्देश |
| ----------------------- | ---------------------------------------------------- |
| `CliToolCard.tsx` | स्मार्ट स्थिती कार्ड (डिटेक्शन + कॉन्फिग + एंडपॉइंट) |
| `CliConceptCard.tsx` | प्रति-पृष्ठ संकल्पना स्पष्टता कार्ड |
| `CliComparisonCard.tsx` | CLI प्रकारांमध्ये तीन-स्तंभ तुलना |
| `BaseUrlSelect.tsx` | एंडपॉइंट ड्रॉपडाऊन (स्थानिक/क्लाउड/कस्टम) |
| `ApiKeySelect.tsx` | API की निवडक |
| `ManualConfigModal.tsx` | कॉपी करण्यायोग्य कॉन्फिग स्निपेट मोडाल |
### सामायिक हुक (`src/shared/hooks/cli/`)
| फाइल | उद्देश |
| ------------------------- | ------------------------------------------------------------------------------------ |
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` कडून डेटा आणतो, लोडिंग/रिफ्रेश स्थिती व्यवस्थापित करतो |
## 8. i18n
योजना 14 F9 मध्ये नवीन नामस्थान जोडले:
| Namespace | Purpose |
| ----------- | ----------------------------------------------------------------------- |
| `cliCommon` | सामायिक स्ट्रिंग्ज (कार्ड लेबल, संकल्पना/तुलना मजकूर, तपशील पृष्ठ लेबल) |
| `cliCode` | CLI कोडच्या पृष्ठाच्या स्ट्रिंग्ज |
| `cliAgents` | CLI एजंट्स पृष्ठाच्या स्ट्रिंग्ज |
| `acpAgents` | ACP एजंट्स पृष्ठाच्या स्ट्रिंग्ज |
पूर्ण PT-BR आणि EN भाषांतर प्रदान केले आहे. 39 इतर स्थानिकता `src/i18n/request.ts` मध्ये नामस्थान-स्तरीय विलीनद्वारे स्वयंचलितपणे EN वर परत जातात.
---
## 9. जलद प्रारंभ
### चरण 1 — OmniRoute API की मिळवा
1. `/dashboard/api-manager` उघडा → **API की तयार करा**
2. त्याला एक नाव द्या (उदा. `cli-tools`) आणि सर्व परवानग्या निवडा
3. की कॉपी करा — तुम्हाला खालील प्रत्येक CLI साठी ती आवश्यक असेल
> तुमची की अशी दिसते: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### चरण 2 — CLI साधने स्थापित करा
सर्व npm-आधारित साधनांना Node.js 22.22.2+ किंवा 24.x आवश्यक आहे:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -324,137 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-आधारित
# Pi coding agent
# स्थापित करण्यासाठी https://github.com/zechnerj/pi-coding-agent पहा
# jcode
# स्थापित करण्यासाठी https://github.com/1jehuang/jcode पहा
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### चरण 3 — डॅशबोर्डद्वारे कॉन्फिगर करा
## Step 3 — Set Global Environment Variables
1. `http://localhost:20128/dashboard/cli-code` वर जा
2. ग्रिडमध्ये तुमचे साधन शोधा
3. साधन तपशील पृष्ठ उघडण्यासाठी कार्डवर क्लिक करा
4. तुमची API की आणि बेस URL निवडा
5. **कॉन्फिग लागू करा** किंवा मॅन्युअल कॉन्फिग स्निप्पेट कॉपी करा
---
### चरण 4 — जागतिक पर्यावरण चलांक सेट करा
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute युनिव्हर्सल एंडपॉइंट
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI ROOT वर GOOGLE_GEMINI_BASE_URL वाचतो (त्याचे SDK स्वतः /v1beta/... जोडते)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> **दूरस्थ सर्व्हर** साठी `localhost:20128` चा बदल सर्व्हर IP किंवा डोमेनने करा,
> उदा. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### चरण 4 — प्रत्येक साधन कॉन्फिगर करा
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Create ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Claude Code साठी एकत्रित Anthropic गेटवे रूट वापरा. येथे `/v1` जोडू नका.
**चाचणी:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
आधुनिक Codex (v0.137+) फक्त `~/.codex/config.toml` वाचतो — जुना
`config.yaml` वारसा npm CLI चा आहे आणि चुपचाप दुर्लक्षित केला जातो. API
की `OMNIROUTE_API_KEY` पर्यावरण चलांमध्ये (`env_key`) राहते, कधीही
फाईलमध्ये नाही:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
पूर्ण संदर्भ (प्रोफाइल, `wire_api`, संदर्भ विंडो): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**चाचणी:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**चाचणी:** `opencode`
> विचारणीय विविधता पाठवण्यासाठी `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` वापरा.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI किंवा VS कोड)
### OpenCode
**CLI मोड:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -466,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS कोड मोड:**
Cline विस्तार सेटिंग्ज → API प्रदाता: `OpenAI Compatible`बेस URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
किंवा OmniRoute डॅशबोर्ड वापरा**CLI साधने → Cline → कॉन्फिग लागू करा**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI किंवा VS कोड)
### KiloCode (CLI or VS Code)
**CLI मोड:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS कोड सेटिंग्ज:**
**VS Code settings:**
```json
{
@@ -490,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
किंवा OmniRoute डॅशबोर्ड वापरा**CLI साधने → KiloCode → कॉन्फिग लागू करा**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS कोड विस्तार)
### Continue (VS Code Extension)
`~/.continue/config.yaml` संपादित करा:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -508,247 +241,158 @@ models:
default: true
```
संपादनानंतर VS कोड पुनः सुरू करा.
Restart VS Code after editing.
---
#### VS कोड इन्सायडर्स (`chatLanguageModels.json`)
जेव्हा VS कोड इन्सायडर्स कस्टम एंडपॉइंट मॉडेलसाठी कॉन्फिगर केले जाते आणि तुम्हाला OmniRoute कस्टम हेडर फील्डशिवाय कार्य करावे लागेल तेव्हा हे वापरा.
**शिफारस केलेले स्थान:**
- लिनक्स: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- विंडोज: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**टोकन केलेल्या OmniRoute उपनामाचा वापर करून उदाहरण:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**टीप:**
- `sk-your-omniroute-key` चा बदल OmniRoute मध्ये तयार केलेल्या API कीने करा.
- `url` फील्ड `/api/v1/vscode/{token}/chat/completions` कडे निर्देशित करावा.
- `modelsUrl` फील्ड `/api/v1/vscode/{token}/models` कडे निर्देशित करावा.
- क्लायंट कस्टम हेडरला समर्थन देत असल्यास सामान्य `/v1` + Bearer हेडर प्रवाह प्राधान्य द्या.
- URL-आधारित टोकन एक सुसंगतता बॅकफॉल आहेत आणि संपादकाच्या लॉग किंवा प्रॉक्सी इतिहासात दिसू शकतात.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# तुमच्या AWS/Kiro खात्यात लॉगिन करा:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI स्वतःसाठी OmniRoute आवश्यक नाही — Kiro CLI साठी स्वतःची प्रमाणीकरण वापरते.
# इतर साधनांसाठी OmniRoute सह kiro-cli वापरा.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
**Kiro IDE** डेस्कटॉप अॅपसाठी, OmniRoute द्वारे उघडलेल्या MITM एंडपॉइंटचा वापर करा
`/dashboard/cli-tools → Kiro` अंतर्गत.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. आंतरिक OmniRoute CLI
## Dashboard Auto-Configuration
`omniroute` बायनरी सर्व्हर जीवनचक्र, सेटअप, निदान, आणि प्रदाता व्यवस्थापनासाठी आदेश प्रदान करते. प्रवेश बिंदू: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # सर्व्हर सुरू करा (डिफॉल्ट पोर्ट 20128)
omniroute setup # इंटरएक्टिव्ह सेटअप विजार्ड
omniroute doctor # कॉन्फिग, DB, पोर्ट, रनटाइम तपासा
omniroute providers list # कॉन्फिग केलेले प्रदाता कनेक्शन
omniroute providers test-all # प्रत्येक सक्रिय कनेक्शनची चाचणी करा
omniroute reset-password # प्रशासक पासवर्ड रीसेट करा
omniroute logs # विनंती लॉग प्रवाहित करा
omniroute health # तपशीलवार आरोग्य (ब्रेकर्स, कॅश, मेमरी)
omniroute --version # आवृत्ती छापा
omniroute --help # सर्व आदेश दर्शवा
```
### सेटअप आणि प्रारंभ
```bash
omniroute setup # इंटरएक्टिव्ह सेटअप विजार्ड
omniroute setup --non-interactive # CI/ऑटोमेशन मोड (पर्यावरण चलन + फ्लॅग वाचा)
omniroute setup --password '<value>' # प्रशासक पासवर्ड थेट सेट करा
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # एकाच वेळी प्रदाता जोडा आणि चाचणी करा
```
गैर-इंटरएक्टिव्ह सेटअपसाठी मान्यताप्राप्त पर्यावरण चलन:
| Var | उद्देश |
| ------------------- | --------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | प्रदाता API की (कमांडर `.env()` द्वारे `--api-key` शी बंधनकारक) |
| `DATA_DIR` | OmniRoute डेटा निर्देशिका ओव्हरराइड करा |
इतर सर्व गैर-इंटरएक्टिव्ह इनपुट फ्लॅग म्हणून पास केले जातात, पर्यावरण चलन म्हणून नाही:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(वरच्या `omniroute setup` पर्याय पहा).
### निदान
```bash
omniroute doctor # कॉन्फिग, DB, पोर्ट, रनटाइम, मेमरी, जिवंतपणा तपासा
omniroute doctor --json # मशीन-वाचनायोग्य JSON
omniroute doctor --no-liveness # HTTP आरोग्य तपासणी वगळा
omniroute doctor --host 0.0.0.0 # जिवंतपणा होस्ट ओव्हरराइड करा
omniroute doctor --liveness-url <url> # पूर्ण आरोग्य एंडपॉइंट URL ओव्हरराइड
```
डॉक्टर हे तपासणी चालवतो: `कॉन्फिग`, `डेटाबेस`, `स्टोरेज/एन्क्रिप्शन`,
`पोर्ट उपलब्धता`, `नोड रनटाइम`, `नैसर्गिक बायनरी` (better-sqlite3),
`मेमरी`, आणि `सर्व्हर जिवंतपणा`. कोणतीही तपासणी `अयशस्वी` असल्यास हे नॉन-झिरोमध्ये बाहेर पडते.
### प्रदाता व्यवस्थापन
```bash
omniroute providers available # OmniRoute प्रदाता कॅटलॉग
omniroute providers available --search openai # आयडी/नाव/उपसर्ग/श्रेणीद्वारे कॅटलॉग फिल्टर करा
omniroute providers available --category api-key # श्रेणीद्वारे फिल्टर करा (api-key, oauth, free, ...)
omniroute providers available --json # मशीन-वाचनायोग्य JSON
omniroute providers list # कॉन्फिग केलेले प्रदाता कनेक्शन
omniroute providers list --json
omniroute providers test <id|name> # एक कॉन्फिग केलेला कनेक्शन चाचणी करा
omniroute providers test-all # प्रत्येक सक्रिय कनेक्शनची चाचणी करा
omniroute providers validate # स्थानिक-फक्त संरचनात्मक मान्यता
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # विद्यमान OAuth प्रवाह
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` API-प्रथम आहेत आणि त्यामुळे सक्रिय स्थानिक किंवा दूरस्थ संदर्भावर कार्य करतात. क्रेडेन्शियल इनपुटने `--credential-stdin` किंवा `--credential-env` वापरावे; `--dry-run --json` फक्त संपादित केलेले उपस्थिती/आकार रिपोर्ट करते. `providers available` OmniRoute कॅटलॉग वाचते; `providers list/test/test-all/validate` त्यांच्या स्थानिक SQLite वर्तनास कायम ठेवतात आणि सर्व्हर चालू असणे आवश्यक नाही.
### पुनर्प्राप्ती आणि रीसेट
```bash
omniroute reset-password # प्रशासक पासवर्ड रीसेट करा (सुद्धा: omniroute-reset-password)
omniroute reset-encrypted-columns # एन्क्रिप्टेड क्रेडेन्शियल रीसेटसाठी चेतावणी + ड्राय-रन दर्शवा
omniroute reset-encrypted-columns --force # SQLite मध्ये एन्क्रिप्टेड क्रेडेन्शियल्स खरोखर शून्य करा
```
### क्रेडेन्शियल निर्यात (⚠ काळजीपूर्वक हाताळा)
```bash
omniroute auth export # चेतावणी + पुष्टी गेट दर्शवा — DB प्रवेश नाही
omniroute auth export --force # सर्व कनेक्शनचे DECRYPTED क्रेडेन्शियल्स stdout वर JSON म्हणून निर्यात करा
omniroute auth export --force --id <id> # फक्त जुळणारा कनेक्शन निर्यात करा
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> ओळी उत्सर्जित करा
omniroute auth export --force --out creds.json # फाईलमध्ये लिहा (0600 परवानग्या सह तयार केलेली)
```
`auth export` **स्थानिक-फक्त** (सिध्द SQLite वाचन, HTTP मार्ग नाही) आणि हेतुपुरस्सर **प्लेनटेक्स्ट** `apiKey`/`accessToken`/`refreshToken`/`idToken` मूल्ये छापते/लेखते — हे एक वैशिष्ट्य आहे, बग नाही. डेटाबेसमधून काहीही वाचले जात नाही, आणि `--force` न करता काहीही डिक्रिप्ट केले जात नाही. कोणत्याही प्लेनटेक्स्टच्या उत्सर्जनापूर्वी नेहमी एक stderr चेतावणी बॅनर छापले जाते. `STORAGE_ENCRYPTION_KEY` सेट करणे आवश्यक आहे. जे क्षेत्र डिक्रिप्ट करण्यात अयशस्वी होते (जुना की, खराब ciphertext) ते `<field>DecryptFailed: true` म्हणून रिपोर्ट केले जाते, संपूर्ण निर्यात थांबविण्याऐवजी किंवा अंतर्गत त्रुटी लीक करण्याऐवजी.
### इतर उपआदेश
हे चालू OmniRoute सर्व्हरवर आधारित आहेत, अन्यथा नोट केलेले नाही:
```bash
omniroute status # सर्वसमावेशक रनटाइम स्थिती
omniroute logs # विनंती लॉग प्रवाहित करा (--json, --search, --follow)
omniroute config show # वर्तमान कॉन्फिगरेशन दर्शवा
omniroute provider list # उपलब्ध प्रदाते सूचीबद्ध करा (providers list चा उपसर्ग)
omniroute provider add # एका साधनावर प्रदाता म्हणून OmniRoute नोंदणी करा
omniroute keys add | list | remove # API की व्यवस्थापित करा
omniroute models [provider] # मॉडेल सूचीबद्ध करा (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # कॉन्फिग + DB ची स्नॅपशॉट
omniroute restore # मागील स्नॅपशॉटमधून पुनर्स्थापित करा
omniroute health # तपशीलवार आरोग्य (ब्रेकर्स, कॅश, मेमरी)
omniroute quota # प्रदाता कोटा वापर
omniroute cache # कॅश स्थिती
omniroute cache clear # सेमांटिक + सिग्नेचर कॅश साफ करा
omniroute mcp status | restart # MCP सर्व्हर स्थिती / पुनःप्रारंभ
omniroute a2a status | card # A2A सर्व्हर स्थिती / एजंट कार्ड
omniroute tunnel list | create | stop # टनेल व्यवस्थापित करा (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # पर्यावरण चलन तपासा / सेट करा (तात्पुरते)
omniroute test # प्रदाता कनेक्टिव्हिटी स्मोक चाचणी
omniroute update # अद्यतने तपासा
omniroute completion # शेल पूर्णता तयार करा
```
### सामान्य फ्लॅग
| फ्लॅग | वर्णन |
| ------------------- | --------------------------------------------------- |
| `--no-open` | प्रारंभावर ब्राउझर स्वयंचलितपणे उघडू नका |
| `--port <n>` | API पोर्ट ओव्हरराइड करा (डिफॉल्ट 20128) |
| `--mcp` | IDEs साठी stdio वर MCP सर्व्हर म्हणून चालवा |
| `--non-interactive` | CI मोड (कोणतेही प्रॉम्प्ट नाही; env/flags वाचते) |
| `--json` | मशीन-वाचनायोग्य JSON आउटपुट (doctor, providers, इ.) |
| `--help`, `-h` | आदेश-विशिष्ट मदत दर्शवा |
| `--version`, `-v` | स्थापित आवृत्ती छापवा |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## उपलब्ध API समाप्ती बिंदू
## Built-in Agents: Droid & OpenClaw
| समाप्ती बिंदू | वर्णन | वापरासाठी |
| -------------------------- | ---------------------------- | -------------------------------------- |
| `/v1/chat/completions` | मानक चॅट (सर्व प्रदाते) | सर्व आधुनिक साधने |
| `/v1/responses` | प्रतिसाद API (OpenAI स्वरूप) | कोडेक्स, एजंटिक कार्यप्रवाह |
| `/v1/completions` | वारसा मजकूर पूर्णता | `prompt:` वापरणाऱ्या जुन्या साधनांसाठी |
| `/v1/embeddings` | मजकूर एम्बेडिंग | RAG, शोध |
| `/v1/images/generations` | चित्र निर्माण | GPT-Image, Flux, इत्यादी |
| `/v1/audio/speech` | मजकूर-ते-भाषण | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | भाषण-ते-मजकूर | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
टोकनयुक्त OmniRoute URL सह तयार-करण्यासाठी उदाहरणे:
```txt
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standard OpenAI base: http://localhost:20128/v1
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
---
## समस्या निवारण
## Available API Endpoints
| त्रुटी | कारण | उपाय |
| ------------------------------------------ | ------------------------- | ------------------------------------------------------- |
| `Connection refused` | OmniRoute चालू नाही | `omniroute serve` |
| `401 Unauthorized` | चुकीचा API की | `/dashboard/api-manager` मध्ये तपासा |
| `No combo configured` | सक्रिय रूटिंग कॉम्बो नाही | `/dashboard/combos` मध्ये सेट करा |
| CLI "not installed" दर्शवित आहे | बायनरी PATH मध्ये नाही | `which <command>` तपासा |
| Dashboard मध्ये "not detected" दर्शवित आहे | कॅशे जुना आहे | Dashboard मध्ये "⟳ Refresh detection" वर क्लिक करा |
| जुना लिंक `/dashboard/cli-tools` | पूर्व- v3.8.6 बुकमार्क | `/dashboard/cli-code` कडे स्वयंचलित-मार्गदर्शित (308) |
| जुना लिंक `/dashboard/agents` | पूर्व- v3.8.6 बुकमार्क | `/dashboard/acp-agents` कडे स्वयंचलित-मार्गदर्शित (308) |
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Solución de Problemas
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,322 +0,0 @@
# CLI-INTEGRATIONS (Bahasa Melayu)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrasi CLI — arahkan mana-mana CLI pengkodan ke OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrasi CLI
OmniRoute menyediakan sekumpulan perintah `setup-*` yang mengkonfigurasi CLI pengkodan
(Codex, Claude Code, OpenCode, Cline, …) untuk menggunakan OmniRoute sebagai backend-nya — jadi
alat ini berkomunikasi dengan **satu** titik akhir dan OmniRoute mengarahkan ke penyedia yang tepat dengan
auto-fallback. Setiap perintah membaca katalog model **langsung** dari OmniRoute yang sedang berjalan
(lokal atau jauh) dan menulis fail konfigurasi alat itu sendiri di **komputer anda**. Kunci API dirujuk oleh pembolehubah persekitaran di mana sahaja alat itu menyokongnya. Perintah yang mengekalkan fail persekitaran tempatan alat dicatat di bawah.
Terdapat juga pelancar generik — `omniroute run <target>` — yang melancarkan
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` atau `gemini` dengan
persekitaran yang betul disuntik, tanpa menulis sebarang konfigurasi. Sasaran dan aliasnya datang dari manifest kanonik `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), dan `omniroute completion` menawarkan
kata sasaran yang sama yang diperoleh dari manifest. Pelancar per-alat yang lama —
`omniroute launch` (Claude Code) dan `omniroute launch-codex` (Codex) — masih
tersedia.
Pendaftaran penyedia tersedia dari konteks lokal/jauh yang sama. Perintah
API-first di bawah mengekalkan pengesahan pengurusan terpisah dari kelayakan penyedia
dan tidak pernah mencetak kelayakan dalam output terstruktur:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Untuk skrip, lebih baik menggunakan `--credential-stdin` atau `--credential-env`; `--credential`
dikekalkan untuk penggunaan lokal yang terkawal. `providers remove` memerlukan `--yes` pada terminal
non-interaktif, dan semua lima perintah menghormati konteks aktif atau pilihan global `--base-url`/`--api-key`.
Untuk penyediaan asas yang ditulis tangan sekali sahaja bagi dua integrasi terkaya, lihat
penyelaman mendalam per-alat:
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Mod Jauh](./REMOTE-MODE.md) — mengendalikan OmniRoute jauh (VPS / Tailnet) dari komputer riba anda
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — sambungan OmniCopilot; ia juga boleh menjalankan
perintah `setup-*` ini untuk anda dari dalam editor
---
## Jadual Utama
Setiap perintah menghormati **konteks aktif** (ditetapkan dengan `omniroute connect`, lihat
[Mod Jauh](./REMOTE-MODE.md)) atau bendera eksplisit `--remote <url> --api-key <key>`.
"Tempatan vs jauh" di bawah bermaksud: tanpa bendera ia menyasarkan `http://localhost:20128`;
dengan `--remote` (atau konteks jauh yang aktif) ia mengambil katalog dari pelayan itu
dan menulis konfigurasi secara lokal.
| Perintah | Alat | Apa yang ditulis | Bendera utama | Tempatan vs jauh |
| -------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — satu profil bagi setiap model teks yang serasi (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Kedua |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — satu profil bagi setiap model yang sepadan (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Kedua |
| `omniroute setup-opencode` | OpenCode (serasi dengan openai) | `~/.config/opencode/opencode.json` — penyedia `omniroute` dengan setiap model katalog (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Kedua |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mod CLI) + mencetak tetapan sambungan VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Kedua |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + menggabungkan `kilocode.*` ke dalam `settings.json` VS Code jika ada | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Kedua |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — model `provider: openai`, kunci melalui `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Kedua |
| `omniroute setup-cursor` | Cursor | Tiada — mencetak langkah dalam aplikasi (konfigurasi Cursor adalah SQLite yang tidak telus) | `--remote` `--api-key` `--only` `--port` | Kedua |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dok import) + menetapkan `roo-cline.autoImportSettingsPath` jika `settings.json` VS Code wujud | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Kedua |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — penyedia `openai-compat`, kunci melalui `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Kedua |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mencetak resipi env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Kedua |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mencetak resipi env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Kedua |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` dalam `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Kedua |
| `omniroute run <target>` | Pelancaran runtime (generik) | Tiada — melancarkan `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` dengan persekitaran dan argumen yang betul; Qwen dan Gemini menggunakan rumah terpencil sementara | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Kedua |
| `omniroute launch` | Claude Code | Tiada — melancarkan `claude` dengan `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` disuntik | `--remote` `--api-key` `--token` `--profile` `--port` | Kedua |
| `omniroute launch-codex` | OpenAI Codex CLI | Tiada — melancarkan `codex` dengan penyedia `omniroute` disuntik melalui bendera `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Kedua |
Nota mengenai bendera (disahkan dalam sumber perintah):
- `--remote <url>` — mengambil katalog dari OmniRoute jauh (menimpa `--port`
dan konteks aktif). `--api-key <key>` membekalkan kelayakan untuk pelayan itu
(secara default kepada pembolehubah persekitaran `OMNIROUTE_API_KEY`, atau token konteks aktif).
- `--only <patterns>` — substring yang dipisahkan dengan koma; hanya simpan ID model yang sepadan
(contohnya `--only glm,kimi`). Tersedia pada `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — mencetak dengan tepat apa yang akan ditulis tanpa menyentuh
sistem fail. Tersedia pada setiap perintah `setup-*` **kecuali** `setup-cursor`
(yang tidak pernah menulis fail).
- `--model <id>` — diperlukan (atau dipilih secara interaktif) untuk alat yang tidak mempunyai
penemuan model automatik: Cline, Kilo, Roo, Goose, Qwen, Aider. Alat-alat tersebut
juga menerima `--yes` untuk larian non-interaktif (yang kemudian memerlukan `--model`).
`setup-opencode` mengambil `--model` untuk menetapkan model teratas lalai.
- `--model <id>` pada `omniroute run` mengikuti pengkabelan per-sasaran manifest
(`bin/cli/cli-manifest.mjs`): **aider** menerima `--model openai/<id>` dan
**opencode** `--model omniroute/<id>` (awalan hanya ditambah apabila id
tidak sudah membawanya); **qwen** dan **gemini** menerima id secara langsung;
**claude** mendapatkannya melalui `ANTHROPIC_MODEL`, **goose** melalui `GOOSE_MODEL`, dan
**codex** melalui argumen `-c model_providers.omniroute.*`. **Qwen adalah satu-satunya sasaran run
yang memerlukan `--model`** — `omniroute run qwen` tanpa itu keluar
`2` dengan ralat eksplisit.
- `--port <port>` — port OmniRoute lokal (default `20128`, diabaikan apabila `--remote`
ditetapkan). Terdapat pada semua `setup-*` dan kedua-dua pelancar.
- Kod keluar `omniroute run`: kod keluar CLI anak disebarkan
secara langsung; `2` = argumen tidak sah (sasaran tidak disokong, `--model` yang diperlukan hilang, pengawal kontena); `127` = binari sasaran tidak ada dalam `PATH`;
`130`/`143`/`129` apabila pelancaran dihentikan oleh `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = kegagalan pelancaran runtime yang lain.
- Kedua-dua pelancar (`launch`, `launch-codex`) menerima `--profile <name>` untuk memilih
profil yang ditulis oleh `setup-claude` / `setup-codex`, serta argumen pass-through untuk
binari `claude` / `codex` yang mendasari.
Pemilih interaktif juga dikongsi oleh resipi penyediaan:
```bash
# Pilih dari katalog model lokal atau jauh yang aktif dan konfigurasikan sasaran.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` kini menyerahkan kepada resipi yang diuji untuk `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, dan `kilo`. Entri katalog yang hanya untuk IDE,
MITM, dan panduan kekal sebagai aliran `setup-*`/manual yang jelas dan
tidak dipersembahkan sebagai sasaran yang boleh dilancarkan.
> `setup-opencode` adalah integrasi OpenCode yang **ringan dan serasi dengan openai**.
> Terdapat juga integrasi plugin yang lebih kaya — `omniroute setup opencode` — yang
> memasang `@omniroute/opencode-plugin`. Mereka adalah perintah yang berbeza; jadual
> di atas mendokumentasikan `setup-opencode`.
---
## Penggunaan tempatan
Dengan OmniRoute berjalan di `localhost:20128`, hanya jalankan arahan persediaan untuk alat anda. Katalog diambil dari pelayan tempatan.
```bash
# Codex: tulis profil bagi setiap model yang sepadan ke ~/.codex/
omniroute setup-codex
codex --profile glm52 # gunakan profil yang dihasilkan
# Claude Code: tulis profil bagi setiap model, kemudian lancarkan satu
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: tulis penyedia yang serasi dengan openai dengan semua model katalog
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # dirujuk melalui {env:OMNIROUTE_API_KEY}, tidak pernah di cakera
opencode -m omniroute/glm/glm-5.2 "..."
# Alat tanpa penemuan automatik memerlukan model yang jelas:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Pratonton tanpa menulis apa-apa:
omniroute setup-continue --dry-run
```
Lancarkan tanpa menulis sebarang konfigurasi (hanya suntikan env):
```bash
omniroute launch # Claude Code → OmniRoute tempatan
omniroute launch-codex # Codex CLI → OmniRoute tempatan
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Laluan arahan yang jelas: lalui apa sahaja yang datang selepas --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Penggunaan jauh
Arahkan mana-mana arahan persediaan ke OmniRoute jauh dengan `--remote` + `--api-key`. Katalog diambil dari jauh; konfigurasi ditulis di mesin tempatan anda.
```bash
# OpenCode terhadap VPS jauh, simpan hanya model glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # eksport OMNIROUTE_API_KEY terlebih dahulu
# Profil Codex dari katalog jauh
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Lancarkan CLI terus terhadap jauh
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Daripada menghantar `--remote`/`--api-key` setiap kali, log masuk sekali dan biarkan
**konteks aktif** membekalkannya secara automatik:
```bash
omniroute connect 192.168.0.15 # mencipta token terhad, menyimpan konteks
omniroute setup-codex # ← kini menggunakan katalog jauh
omniroute setup-opencode # ← sama
omniroute launch # ← Claude Code terhadap jauh
```
Lihat [Mod Jauh](./REMOTE-MODE.md) untuk konteks, skop, dan pengurusan token.
---
## Konvensyen URL Asas (alat yang memerlukan `/v1`)
OmniRoute mendedahkan permukaan OpenAI di `/v1`, permukaan Anthropic di akar,
dan permukaan Gemini asli di `/v1beta`. Setiap integrasi disambungkan kepada bentuk yang
diharapkan oleh alatnya (disahkan dalam sumber arahan):
| Integrasi | URL Asas yang ditulis | `/v1`? |
| -------------------------------------------------------------------------- | --------------------- | ----------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | akar | Tidak — Cline menambah `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | akar | Tidak — Goose menambah laluan |
| `setup-aider` (`OPENAI_API_BASE`) | akar | Tidak — LiteLLM menambah `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | dengan `/v1` | Ya |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | akar | Tidak — Claude Code menambah `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | dengan `/v1` | Ya |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | dengan `/v1` | Ya |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | akar | Tidak — SDK menambah `/v1beta/models/…` |
---
## Menjaga kebergantungan asli semasa kemas kini: `--include=optional`
Apabila anda mengemas kini dengan `omniroute update` (selepas mengesahkan, atau dengan `--apply`),
OmniRoute menjalankan pemasangan dengan `--include=optional` yang telah disertakan:
```bash
npm install -g omniroute@latest --include=optional
```
Ini **bukan** bendera yang anda berikan kepada `omniroute update` — ia sentiasa digunakan oleh
pengemas kini. Ia menjamin bahawa `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, tumpukan LLMLingua SLM) kekal selepas kemas kini walaupun konfigurasi npm anda
mempunyai `omit=optional` yang ditetapkan, yang sebaliknya akan secara senyap membuang pemacu SQLite
asli dan pengikatan OS-keyring. Untuk melihat arahan yang tepat tanpa melaksanakan:
```bash
omniroute update --dry-run
# [DRY RUN] Akan dijalankan: npm install -g omniroute@latest --include=optional
```
Bendera lain untuk `omniroute update` (disahkan dalam sumber): `--check` (keluar 1 jika
ketinggalan), `--apply` (pasang tanpa meminta), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI melalui `omniroute run gemini`
Kontrak disahkan terhadap `@google/gemini-cli` 0.50.0: CLI menghormati
`GOOGLE_GEMINI_BASE_URL` dan mengeluarkan `POST /v1beta/models/<model>:generateContent`
(dan `:streamGenerateContent?alt=sse`) terhadapnya — tepat seperti permukaan
Gemini asli OmniRoute (`/v1beta`). `omniroute run gemini` menyambungkannya secara automatik:
- `GOOGLE_GEMINI_BASE_URL` → URL asas OmniRoute yang aktif (akar, tiada `/v1`);
- `GEMINI_API_KEY` → kelayakan OmniRoute yang diselesaikan (pilihan/env/konteks);
- **`GEMINI_CLI_HOME` yang terasing sementara** yang `.gemini/settings.json`
memilih pengesahan `gemini-api-key`, jadi sesi Google OAuth yang disimpan (Code Assist)
tidak pernah menggantikan pelancaran yang diarahkan oleh OmniRoute — dibuang selepas keluar;
- **kebersihan env**: env anak dibersihkan daripada `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` dan `GOOGLE_GENAI_USE_GCA` (yang akan mengalihkan
pengesahan ke Vertex/Code Assist), dan `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` ditetapkan
sebagai langkah tambahan — sasaran `run` yang lain mendapat rawatan yang sama
untuk pembolehubah yang bertentangan mereka sendiri;
- suntikan `--model <id>` dari `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Pengawal kepercayaan ruang kerja Gemini masih terpakai dalam mod tanpa kepala — berikan
`--skip-trust` (atau percayakan direktori secara interaktif) sendiri; pelancar
dengan sengaja tidak mengabaikannya. Pelancar ini berbeza daripada **pendaftaran ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), yang kekal sebagai integrasi protokol ejen untuk
`/dashboard/acp-agents`.
---
## Penyapu asap sebenar (pilihan)
Pelan pelancaran deterministik regresi dijalankan dalam CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Untuk mengesahkan binari SEBENAR terhadap pelayan
OmniRoute SEBENAR, terdapat alat pilihan di
`tests/integration/upstream-cli-smoke.int.test.ts`. Ia tidak pernah dijalankan secara automatik
(setiap sub-uji akan dilepaskan kecuali `RUN_CLI_SMOKE=1`), menghantar kelayakan melalui nama
env-var (tidak pernah melalui nilai), menyunting rentetan berbentuk kunci daripada sebarang output
yang direkodkan, melewati sasaran yang binarinya tidak dipasang, dan mengklasifikasikan kegagalan
sebagai pengesahan / hulu / konfigurasi dan bukannya boolean kosong:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Pilihan: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` mengehadkan sapuan;
`OMNIROUTE_SMOKE_TIMEOUT_MS` menggantikan had masa 120s bagi setiap sasaran.
---
## Lihat juga
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — panduan mendalam mengenai Claude Code
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md) — penyetupan asas `[model_providers.omniroute]` sekali sahaja
- [Mod Jauh](./REMOTE-MODE.md) — konteks, token akses terhad, mengendalikan pelayan jauh
- [Rujukan Alat CLI](../reference/CLI-TOOLS.md) — katalog penuh alat yang disokong + halaman papan pemuka
- [Panduan Persediaan](./SETUP_GUIDE.md) — kaedah pemasangan dan pengenalan pertama kali

View File

@@ -1,331 +1,86 @@
# CLI-TOOLS (Bahasa Melayu)
# CLI Tools Setup Guide — OmniRoute (Bahasa Melayu)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "Alat CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Alat CLI — OmniRoute
Dikemas kini terakhir: 2026-08-18
OmniRoute mengintegrasikan dengan tiga kategori alat CLI yang tersebar di tiga halaman papan pemuka khusus:
| Halaman | Laluan | Konsep | Bilangan |
| ------------ | ----------------------- | -------------------------------------------------------------------------------------- | ----------------- |
| **Kod CLI** | `/dashboard/cli-code` | Alat pengkodan yang anda arahkan ke OmniRoute (Pelanggan → CLI → OmniRoute → Penyedia) | 26 |
| **Ejen CLI** | `/dashboard/cli-agents` | Ejen autonomi yang anda arahkan ke OmniRoute (aliran yang sama, skop yang lebih luas) | 8 |
| **Ejen ACP** | `/dashboard/acp-agents` | CLI yang OmniRoute hasilkan sebagai backend melalui stdio/ACP (aliran terbalik) | lihat pendaftaran |
Laluan legasi mengalihkan melalui 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Cara Ia Berfungsi
## How It Works
```
Kod CLI / Ejen CLI (aliran penggunaan):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (semua mengarah ke OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute mengarahkan ke penyedia yang betul)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Ejen ACP (aliran hasil terbalik):
Permintaan pelanggan → OmniRoute → hasilkan CLI melalui stdio/ACP → respons
```
**Manfaat:**
**Benefits:**
- Satu kunci API untuk mengurus semua alat
- Penjejakan kos merentasi semua CLI dalam papan pemuka
- Penukaran model tanpa mengkonfigurasi semula setiap alat
- Berfungsi secara tempatan dan di pelayan jauh (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-konfigurasi dengan `setup-*`
## Supported Tools (Dashboard Source of Truth)
Anda tidak perlu menulis konfigurasi setiap alat dengan tangan. OmniRoute menyediakan perintah `setup-*`
untuk setiap CLI yang disokong yang membaca katalog model **langsung** dari OmniRoute yang sedang berjalan
(tempatan atau jauh) dan menulis konfigurasi alat itu sendiri di mesin anda:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Setiap satu menerima `--remote <url> --api-key <key>` (mengkonfigurasi alat tempatan terhadap
OmniRoute jauh), `--dry-run` (pratonton tanpa menulis), dan `--port`. Alat
tanpa penemuan model automatik (Cline, Kilo, Roo, Goose, Aider, Qwen) mengambil
`--model <id>` (dan `--yes` untuk larian bukan interaktif). Untuk melancarkan CLI dengan
persekitaran yang betul disuntik dan tanpa konfigurasi ditulis sama sekali, gunakan
pelancar generik `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — sasaran dan alias datang dari `bin/cli/cli-manifest.mjs`); pelancar per-alat legasi
`omniroute launch` (Claude Code) dan `omniroute launch-codex`
(Codex) masih tersedia. CLI Gemini hanya untuk pelancaran: ia adalah sasaran `omniroute run`
tetapi tidak mempunyai resipi `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **Rujukan penuh:** jadual induk — apa yang ditulis oleh setiap perintah, setiap bendera,
> tempatan vs jauh, dan alat mana yang memerlukan akhiran `/v1` — terdapat dalam
> **[Integrasi CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Menjalankan ini di dalam kontena
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Perintah `setup-*` yang dilaksanakan di dalam kontena OmniRoute menulis ke
rumah kontena itu sendiri, yang tidak dibaca oleh CLI host dan yang hilang dengan
kontena. OmniRoute mengesan itu dan keluar `2` dengan arahan daripada menulis. Dua cara yang disokong untuk maju — pasang CLI di host dan
`omniroute connect` ke kontena, atau bind-mount direktori konfigurasi dan set
`CLI_CONFIG_HOME` (profil `host` compose). Setiap perintah `setup-*`, ditambah
`omniroute configure` dan `omniroute config set`, menerima
`--allow-container-write` apabila mengkonfigurasi CLI kontena itu sendiri adalah apa yang anda
sebenarnya maksudkan; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` melakukan perkara yang sama untuk
pelayan. Lihat
[Panduan Docker → Mengkonfigurasi alat CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
Titik akhir **apply** papan pemuka (`POST /api/cli-tools/apply`) menguatkuasakan
pengawal yang sama: dalam kontena, penulisan yang sasarannya tidak bind-mounted dari
host menjawab **`422`** dengan `containerEphemeralTarget: true`, teks ralat selamat dan — untuk alat dengan resipi host (claude, codex, opencode, cline,
kilo, continue) — satu `hostSetupCommand` (contohnya `omniroute setup-opencode`) untuk dijalankan
di host sebaliknya; tiada apa yang ditulis. `dryRun: true` terus berfungsi dalam mod kontena
dan mengembalikan kandungan yang dihasilkan + laluan sasaran tanpa menyentuh cakera, jadi
anda boleh pratonton dari papan pemuka dan memohon di host. Tingkah laku ini adalah
sengaja dan dilindungi regresi oleh
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — jangan sekali-kali "baiki" 422
dengan mengeluarkan pengawal.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Sumber Kebenaran
## Step 1 — Get an OmniRoute API Key
Katalog yang disatukan terletak di `src/shared/constants/cliTools.ts` sebagai `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Setiap entri mempunyai medan ini (ditakrifkan dalam `src/shared/schemas/cliCatalog.ts`):
| Medan | Jenis | Penerangan |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | Halaman mana alat itu muncul |
| `vendor` | `string` | Asal alat ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Juga boleh digunakan sebagai ACP Agent (lencana ditunjukkan) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tahap sokongan titik akhir khusus. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mekanisme konfigurasi |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Medan paparan teras |
Entri dengan `baseUrlSupport: "none"` **tidak ditunjukkan** dalam halaman papan pemuka — mereka didaftarkan dalam backlog MITM untuk pelan 11 (lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Tahap Keupayaan (dikatalog × dapat dikesan × boleh dikonfigurasi × boleh dilancarkan)
Tidak semua alat yang dikatalog boleh dikesan, boleh dikonfigurasi atau boleh dilancarkan. Setiap tahap mempunyai satu sumber pengisytiharan, dan ujian drift memastikan mereka selari:
| Tahap | Maksud | Diisytiharkan dalam |
| ----------------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Dikatalog** | Muncul dalam katalog papan pemuka (nama, vendor, dokumen, jenis konfigurasi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Dapat Dikesan** | Pengesanan binari/config, pemeriksaan kesihatan, laluan konfigurasi | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` katalog runtime) |
| **Boleh Dikonfigurasi** | Disokong oleh `omniroute configure <cli>` (resipi penyediaan wujud) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Boleh Dilancarkan** | Disokong oleh `omniroute run <target>` (injeksi env/args ditakrifkan) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` adalah manifest boleh laku kanonik untuk permukaan arahan CLI: `run`, `configure` dan penjana penyelesaian shell semuanya memperoleh senarai sasaran mereka, penyelesaian alias (contohnya `kilocode`/`kilo-code`/`kilo_cli``kilo`) dan pengkabelan bendera `--model` daripadanya. Pengawal drift `tests/unit/cli/cli-manifest-drift.test.ts` mengesahkan bahawa manifest, katalog runtime, katalog UI dan setiap permukaan pengguna kekal seiring — sasaran yang ditambah kepada satu permukaan tanpa yang lain akan gagal suite dan bukannya mengalir secara senyap.
## 1. Katalog Kod CLI (26 alat)
Semua alat yang muncul dalam `/dashboard/cli-code`. Alat yang mempunyai `baseUrlSupport: none` disambungkan melalui MITM atau panduan manual dan bukannya URL asas khusus:
| id | nama | vendor | baseUrlSupport | configType | acpSpawnable |
| ------------ | --------------------------- | ---------------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | penuh | env | true |
| codex | OpenAI Codex CLI | OpenAI | penuh | custom | true |
| zcode | ZCode (Pelan Pengkodan GLM) | Z.ai | tiada | custom | false |
| cline | Cline | OSS (bekas-Pembangun Claude) | penuh | custom | true |
| kilo | Kilo Code | Kilo-Org | penuh | custom | false |
| roo | Roo Code | Roo (OSS) | penuh | panduan | false |
| continue | Continue | continue.dev | penuh | panduan | false |
| aider | Aider | OSS (P. Gauthier) | penuh | panduan | true |
| forge | ForgeCode | Antinomy HQ | penuh | custom | true |
| jcode | jcode | 1jehuang (OSS) | penuh | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | penuh | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | penuh | custom | false |
| opencode | OpenCode | Anomaly (bekas-SST) | penuh | panduan | true |
| droid | Factory Droid | Factory AI | separa | panduan | false |
| copilot | GitHub Copilot CLI | GitHub/MS | penuh | custom | false |
| cursor-cli | Cursor CLI | Anysphere | separa | panduan | true |
| smelt | Smelt | leonardcser (OSS) | penuh | custom | false |
| pi | Pi (agen-pengkodan-pi) | M. Zechner (OSS) | penuh | custom | false |
| grok-build | Grok Build | xAI | penuh | custom | false |
| crush | Crush | OSS (Charm) | penuh | custom | false |
| qwen | Qwen Code | Alibaba | penuh | panduan | true |
| cursor | Cursor | Anysphere | tiada | panduan | false |
| antigravity | Antigravity | Google | tiada | mitm | false |
| hermes | Hermes | Nous Research | tiada | panduan | false |
| kiro | Kiro AI | Amazon | tiada | mitm | false |
| custom | Custom CLI | — | penuh | pembina-khusus | false |
Alat dengan `baseUrlSupport: "separa"` menunjukkan lencana "⚠ URL asas separa" dalam kad papan pemuka.
## 2. Katalog Ejen CLI (8 alat)
Ejen autonomi yang muncul di `/dashboard/cli-agents`:
| id | nama | vendor | sokonganBaseUrl | acpSpawnable |
| ------------ | ------------------- | ------------------------ | --------------- | ------------ |
| hermes-agent | Ejen Hermes | Nous Research | penuh | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | penuh | true |
| goose | Goose | Block / Linux Foundation | penuh | true |
| interpreter | Penterjemah Terbuka | OSS | penuh | true |
| warp | Warp AI | Warp Inc. | separa | true |
| agent-deck | Dek Ejen | asheshgoplani (OSS) | penuh | false |
| omp | Oh My Pi | OSS | penuh | true |
| letta | Letta CLI | Letta | penuh | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. Ejen ACP (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Halaman ini (dikenali semula dari `/dashboard/agents`) menunjukkan CLI yang boleh **dihasilkan** oleh OmniRoute sebagai enjin pelaksanaan backend melalui protokol stdio/ACP. Katalog ini diselenggara secara berasingan dalam `src/lib/acp/registry.ts` dan **tidak** sama dengan `CLI_TOOLS`.
---
## 4. Senarai Tunggakan MITM (tidak ditunjukkan dalam papan pemuka)
CLI berikut tidak menyokong URL asas khusus secara asli dan **tidak disenaraikan** dalam halaman Kod CLI atau Ejen CLI. Mereka adalah calon untuk pemintasan MITM dalam pelan 11:
| CLI | Sebab |
| ------------------- | ------------------------------------------------------------- |
| windsurf | BYOK terhad kepada model Claude terpilih + URL/token korporat |
| amp | Ekosistem tertutup (Sourcegraph) |
| amazon-q / kiro-cli | Pengesahan AWS SSO, tiada URL khusus |
| cowork | Anthropic Desktop, tiada titik akhir yang boleh dikonfigurasi |
Lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` untuk rujukan silang penuh.
---
## 5. API Pengesanan Batch
Semua pengesanan alat digabungkan melalui satu titik akhir:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (sama seperti laluan `/api/cli-tools/` yang lain)
- Mengembalikan: `Record<toolId, ToolBatchStatus>` (jenis: `src/shared/types/cliBatchStatus.ts`)
- Strategi: `Promise.all` ke atas semua alat, masa tamat 5s bagi setiap alat
- Cache: dalam memori LRU yang diindeks oleh fail konfigurasi `mtime`. Cache tidak sah apabila mtime berubah. Direset semasa pelayan dimulakan semula.
Bentuk respons bagi setiap alat:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // disanitasi, tiada jejak tumpukan
}
```
## 6. Pengendali Tetapan untuk Alat Baru
Alat baru dengan `configType: "custom"` mempunyai laluan API tetapan khusus:
| Laluan | Alat |
| ------------------------------------------- | -------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legasi) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, utama + legasi `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Ejen pengkodan Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + kunci `.env` khusus) |
Semua laluan menggunakan `sanitizeErrorMessage()` untuk respons ralat (Peraturan Ketat #12).
---
## 7. Seni Bina Halaman Papan Pemuka
### Kod CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponen pelayan
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — halaman butiran alat
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 kad alat khusus + `ToolDetailClient.tsx`
### Ejen CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponen pelayan
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grid klien
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — menggunakan semula `ToolDetailClient`
### Ejen ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponen pelayan (dipindahkan dari `agents/`)
### Komponen UI Bersama (`src/shared/components/cli/`)
| Fail | Tujuan |
| ----------------------- | ---------------------------------------------------------- |
| `CliToolCard.tsx` | Kad status pintar (pengesanan + konfigurasi + titik akhir) |
| `CliConceptCard.tsx` | Kad penjelasan konsep per-halaman |
| `CliComparisonCard.tsx` | Perbandingan tiga lajur merentasi jenis CLI |
| `BaseUrlSelect.tsx` | Dropdown titik akhir (Tempatan/Awan/Khusus) |
| `ApiKeySelect.tsx` | Pemilih kunci API |
| `ManualConfigModal.tsx` | Modal petikan konfigurasi yang boleh disalin |
### Hook Bersama (`src/shared/hooks/cli/`)
| Fail | Tujuan |
| ------------------------- | ------------------------------------------------------------------------------ |
| `useToolBatchStatuses.ts` | Mengambil `/api/cli-tools/all-statuses`, menguruskan keadaan pemuatan/segarkan |
## 8. i18n
Namespace baru ditambahkan dalam pelan 14 F9:
| Namespace | Tujuan |
| ----------- | ----------------------------------------------------------------------------------- |
| `cliCommon` | Rentetan yang dikongsi (label kad, teks konsep/perbandingan, label halaman butiran) |
| `cliCode` | Rentetan halaman Kod CLI |
| `cliAgents` | Rentetan halaman Ejen CLI |
| `acpAgents` | Rentetan halaman Ejen ACP |
Terjemahan penuh PT-BR dan EN disediakan. 39 lokasi lain secara automatik menggunakan EN melalui penggabungan peringkat namespace dalam `src/i18n/request.ts`.
---
## 9. Permulaan Pantas
### Langkah 1 — Dapatkan Kunci API OmniRoute
1. Buka `/dashboard/api-manager`**Buat Kunci API**
2. Berikan nama (contohnya `cli-tools`) dan pilih semua kebenaran
3. Salin kunci tersebut — anda akan memerlukannya untuk setiap CLI di bawah
> Kunci anda kelihatan seperti: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Langkah 2 — Pasang Alat CLI
Semua alat berasaskan npm memerlukan Node.js 22.22.2+ atau 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -343,135 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (boleh dilancarkan melalui `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Berasaskan Rust
# Ejen pengkodan Pi
# lihat https://github.com/zechnerj/pi-coding-agent untuk pemasangan
# jcode
# lihat https://github.com/1jehuang/jcode untuk pemasangan
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Langkah 3 — Konfigurasi melalui Dashboard
## Step 3 — Set Global Environment Variables
1. Pergi ke `http://localhost:20128/dashboard/cli-code`
2. Cari alat anda dalam grid
3. Klik kad untuk membuka halaman butiran alat
4. Pilih kunci API dan URL asas anda
5. Klik **Terapkan Konfigurasi** atau salin petikan konfigurasi manual
---
### Langkah 4 — Tetapkan Pembolehubah Persekitaran Global
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# Titik Akhir Universal OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI membaca GOOGLE_GEMINI_BASE_URL di ROOT (SDKnya menambah /v1beta/... sendiri)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Untuk **pelayan jauh** ganti `localhost:20128` dengan IP pelayan atau domain,
> contohnya `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Langkah 4 — Konfigurasi Setiap Alat
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Buat ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Gunakan akar gerbang Anthropic yang bersatu untuk Claude Code. Jangan tambah `/v1` di sini.
**Uji:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Codex moden (v0.137+) hanya membaca `~/.codex/config.toml``config.yaml` lama milik CLI npm warisan dan diabaikan secara senyap. Kunci API kekal dalam pembolehubah persekitaran `OMNIROUTE_API_KEY` (`env_key`), tidak pernah di dalam fail:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Rujukan penuh (profil, `wire_api`, tingkap konteks): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Uji:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**Uji:** `opencode`
> Gunakan `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> untuk menghantar varian pemikiran.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI atau VS Code)
### OpenCode
**Mod CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -483,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Mod VS Code:**
Tetapan sambungan Cline → Penyedia API: `OpenAI Compatible`URL Asas: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible`Base URL: `http://localhost:20128/v1`
Atau gunakan dashboard OmniRoute → **Alat CLI → Cline → Terapkan Konfigurasi**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI atau VS Code)
### KiloCode (CLI or VS Code)
**Mod CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Tetapan VS Code:**
**VS Code settings:**
```json
{
@@ -507,11 +223,11 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Atau gunakan dashboard OmniRoute → **Alat CLI → KiloCode → Terapkan Konfigurasi**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Panjang VS Code)
### Continue (VS Code Extension)
Edit `~/.continue/config.yaml`:
@@ -525,257 +241,158 @@ models:
default: true
```
Mulakan semula VS Code selepas mengedit.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Gunakan ini apabila VS Code Insiders dikonfigurasi untuk model titik akhir khusus dan anda mahu OmniRoute berfungsi tanpa medan header khusus.
**Lokasi yang disyorkan:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Contoh menggunakan alias OmniRoute yang ditokenkan:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Nota:**
- Gantikan `sk-your-omniroute-key` dengan kunci API yang dibuat dalam OmniRoute.
- Medan `url` harus menunjuk kepada `/api/v1/vscode/{token}/chat/completions`.
- Medan `modelsUrl` harus menunjuk kepada `/api/v1/vscode/{token}/models`.
- Utamakan aliran `/v1` biasa + header Bearer apabila klien menyokong header khusus.
- Token yang disematkan dalam URL adalah fallback keserasian dan mungkin muncul dalam log editor atau sejarah proksi.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Log masuk ke akaun AWS/Kiro anda:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI menggunakan pengesahan sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
# Gunakan kiro-cli bersama OmniRoute untuk alat lain.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Untuk aplikasi desktop **Kiro IDE**, gunakan titik akhir MITM yang didedahkan oleh OmniRoute
di bawah `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. OmniRoute CLI Dalaman
## Dashboard Auto-Configuration
Biner `omniroute` menyediakan perintah untuk kitaran hayat pelayan, penyediaan, diagnostik, dan pengurusan penyedia. Titik masuk: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Mula pelayan (port lalai 20128)
omniroute setup # Wizard penyediaan interaktif
omniroute doctor # Semak konfigurasi, DB, port, masa berjalan
omniroute providers list # Sambungan penyedia yang dikonfigurasikan
omniroute providers test-all # Uji setiap sambungan aktif
omniroute reset-password # Tetapkan semula kata laluan admin
omniroute logs # Aliran log permintaan
omniroute health # Kesihatan terperinci (pemutus, cache, memori)
omniroute --version # Cetak versi
omniroute --help # Tunjukkan semua perintah
```
### Penyediaan & Inisialisasi
```bash
omniroute setup # Wizard penyediaan interaktif
omniroute setup --non-interactive # Mod CI/automasi (membaca pembolehubah env + bendera)
omniroute setup --password '<value>' # Tetapkan kata laluan admin secara langsung
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Tambah dan uji penyedia dalam satu langkah
```
Pembolehubah persekitaran yang diiktiraf untuk penyediaan bukan interaktif:
| Var | Tujuan |
| ------------------- | -------------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Kunci API penyedia (terikat kepada `--api-key` melalui Commander `.env()`) |
| `DATA_DIR` | Gantikan direktori data OmniRoute |
Semua input bukan interaktif yang lain dihantar sebagai bendera, bukan pembolehubah persekitaran:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(rujuk pilihan `omniroute setup` di atas).
### Diagnostik
```bash
omniroute doctor # Semak konfigurasi, DB, port, masa berjalan, memori, kelangsungan
omniroute doctor --json # JSON yang boleh dibaca mesin
omniroute doctor --no-liveness # Langkau probe kesihatan HTTP
omniroute doctor --host 0.0.0.0 # Gantikan hos kelangsungan
omniroute doctor --liveness-url <url> # Gantikan URL titik akhir kesihatan penuh
```
Doktor menjalankan pemeriksaan ini: `Konfigurasi`, `Pangkalan Data`, `Penyimpanan/enkripsi`,
`Ketersediaan Port`, `Masa Berjalan Node`, `Biner Asli` (better-sqlite3),
`Memori`, dan `Kelangsungan Pelayan`. Ia keluar dengan nilai bukan sifar jika mana-mana pemeriksaan adalah `gagal`.
### Pengurusan Penyedia
```bash
omniroute providers available # Katalog penyedia OmniRoute
omniroute providers available --search openai # Penapis katalog mengikut id/nama/alias/kategori
omniroute providers available --category api-key # Penapis mengikut kategori (api-key, oauth, percuma, ...)
omniroute providers available --json # JSON yang boleh dibaca mesin
omniroute providers list # Sambungan penyedia yang dikonfigurasikan
omniroute providers list --json
omniroute providers test <id|name> # Uji satu sambungan yang dikonfigurasikan
omniroute providers test-all # Uji setiap sambungan aktif
omniroute providers validate # Pengesahan struktur hanya untuk tempatan
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Aliran OAuth yang sedia ada
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` adalah API-first dan oleh itu berfungsi terhadap
konteks tempatan atau jauh yang aktif. Input kelayakan harus menggunakan
`--credential-stdin` atau `--credential-env`; `--dry-run --json` hanya melaporkan
kehadiran/bentuk yang disunting. `providers available` membaca katalog OmniRoute;
`providers list/test/test-all/validate` mengekalkan tingkah laku SQLite tempatan mereka dan
tidak memerlukan pelayan untuk berjalan.
### Pemulihan & Tetapan Semula
```bash
omniroute reset-password # Tetapkan semula kata laluan admin (juga: omniroute-reset-password)
omniroute reset-encrypted-columns # Tunjukkan amaran + dry-run untuk tetapan semula kelayakan yang dienkripsi
omniroute reset-encrypted-columns --force # Betul-betul kosongkan kelayakan yang dienkripsi dalam SQLite
```
### Eksport Kelayakan (⚠ tangani dengan berhati-hati)
```bash
omniroute auth export # Tunjukkan amaran + pintu pengesahan — tiada akses DB
omniroute auth export --force # Eksport SEMUA kelayakan DECRYPTED sambungan ke stdout sebagai JSON
omniroute auth export --force --id <id> # Eksport hanya sambungan yang sepadan
omniroute auth export --force --format env # Emit OMNIROUTE_<PROVIDER>_<FIELD>=<value> baris
omniroute auth export --force --out creds.json # Tulis ke fail (dicipta dengan kebenaran 0600)
```
`auth export` adalah **hanya untuk tempatan** (bacaan SQLite langsung, tiada laluan HTTP) dan sengaja mencetak/menulis
nilai **plaintext** `apiKey`/`accessToken`/`refreshToken`/`idToken` — itu adalah ciri, bukan
bug. Tiada apa yang dibaca dari pangkalan data, dan tiada apa yang didekripsi, tanpa `--force`. Amaran stderr
papan tanda sentiasa dicetak sebelum sebarang plaintext dikeluarkan. Memerlukan `STORAGE_ENCRYPTION_KEY` untuk
ditetapkan. Sebuah medan yang gagal untuk didekripsi (kunci lapuk, ciphertext rosak) dilaporkan sebagai
`<field>DecryptFailed: true` dan bukannya membatalkan keseluruhan eksport atau membocorkan ralat yang mendasari.
### Subperintah Lain
Ini menganggap pelayan OmniRoute sedang berjalan, kecuali dinyatakan sebaliknya:
```bash
omniroute status # Status masa berjalan yang komprehensif
omniroute logs # Aliran log permintaan (--json, --search, --follow)
omniroute config show # Paparkan konfigurasi semasa
omniroute provider list # Senaraikan penyedia yang tersedia (alias bagi providers list)
omniroute provider add # Daftar OmniRoute sebagai penyedia pada alat
omniroute keys add | list | remove # Urus kunci API
omniroute models [provider] # Senaraikan model (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfigurasi + DB
omniroute restore # Pulihkan dari snapshot sebelumnya
omniroute health # Kesihatan terperinci (pemutus, cache, memori)
omniroute quota # Penggunaan kuota penyedia
omniroute cache # Status cache
omniroute cache clear # Kosongkan cache semantik + tanda tangan
omniroute mcp status | restart # Status pelayan MCP / mulakan semula
omniroute a2a status | card # Status pelayan A2A / kad ejen
omniroute tunnel list | create | stop # Urus terowong (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Periksa / tetapkan pembolehubah env (sementara)
omniroute test # Ujian sambungan penyedia
omniroute update # Semak untuk kemas kini
omniroute completion # Hasilkan penyelesaian shell
```
### Bendera Umum
| Bendera | Penerangan |
| ------------------- | ------------------------------------------------------------ |
| `--no-open` | Jangan buka pelayar secara automatik semasa mula |
| `--port <n>` | Gantikan port API (lalai 20128) |
| `--mcp` | Jalankan sebagai pelayan MCP melalui stdio (untuk IDE) |
| `--non-interactive` | Mod CI (tiada prompt; membaca dari env/bendera) |
| `--json` | Output JSON yang boleh dibaca mesin (doktor, penyedia, dll.) |
| `--help`, `-h` | Tunjukkan bantuan khusus perintah |
| `--version`, `-v` | Cetak versi yang dipasang |
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
---
## Titik Akhir API Tersedia
## Built-in Agents: Droid & OpenClaw
| Titik Akhir | Penerangan | Digunakan Untuk |
| -------------------------- | --------------------------------- | ------------------------------- |
| `/v1/chat/completions` | Sembang standard (semua penyedia) | Semua alat moden |
| `/v1/responses` | API Respons (format OpenAI) | Codex, aliran agentik |
| `/v1/completions` | Penyelesaian teks legasi | Alat lama menggunakan `prompt:` |
| `/v1/embeddings` | Penyisipan teks | RAG, carian |
| `/v1/images/generations` | Penjanaan imej | GPT-Image, Flux, dll. |
| `/v1/audio/speech` | Teks-ke-ucapan | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Ucapan-ke-teks | Deepgram, AssemblyAI |
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
Contoh sedia untuk tampal dengan URL OmniRoute yang ditokenkan:
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
```txt
Contoh token: sk-a3ab3c080beaee3a-69f4a4-070d71af
---
Asas OpenAI standard: http://localhost:20128/v1
Model VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Sembang VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Respons VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Sembang Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
## Available API Endpoints
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Penyelesaian Masalah
| Ralat | Punca | Pembetulan |
| ------------------------------------------------------- | ----------------------------- | ------------------------------------------------ |
| `Connection refused` | OmniRoute tidak berjalan | `omniroute serve` |
| `401 Unauthorized` | Kunci API salah | Semak di `/dashboard/api-manager` |
| `No combo configured` | Tiada kombinasi routing aktif | Tetapkan di `/dashboard/combos` |
| CLI menunjukkan "not installed" | Binari tidak dalam PATH | Semak `which <command>` |
| Dashboard menunjukkan "not detected" selepas pemasangan | Cache tidak terkini | Klik "⟳ Refresh detection" di dashboard |
| Pautan lama `/dashboard/cli-tools` | Penanda buku pra-v3.8.6 | Auto-redirected ke `/dashboard/cli-code` (308) |
| Pautan lama `/dashboard/agents` | Penanda buku pra-v3.8.6 | Auto-redirected ke `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,327 +0,0 @@
# CLI-INTEGRATIONS (Nederlands)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integraties — wijs elke coderende CLI aan OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integraties
OmniRoute levert een familie van `setup-*` commando's die een coderende
CLI (Codex, Claude Code, OpenCode, Cline, …) configureert om OmniRoute als backend te gebruiken — zodat
de tool met **één** endpoint communiceert en OmniRoute naar de juiste provider doorverwijst met
automatische fallback. Elk commando leest de **live** modelcatalogus van een draaiende
OmniRoute (lokaal of op afstand) en schrijft het configuratiebestand van de tool op **jouw**
machine. De API-sleutel wordt verwezen door een omgevingsvariabele waar de tool
dit ondersteunt. Commando's die een tool-lokaal omgevingsbestand persistent maken, worden hieronder opgemerkt.
Er is ook een generieke launcher — `omniroute run <target>` — die
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` of `gemini` opstart met de
juiste omgeving geïnjecteerd, zonder enige configuratie te schrijven. Doelen en hun
aliassen komen uit het canonieke manifest `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), en `omniroute completion` biedt de
zelfde manifest-afgeleide doelwoorden. De legacy per-tool launchers —
`omniroute launch` (Claude Code) en `omniroute launch-codex` (Codex) — blijven
beschikbaar.
Provider onboarding is beschikbaar vanuit dezelfde lokale/remote context. De
API-eerste commando's hieronder houden het beheer van authenticatie gescheiden van provider
referenties en printen nooit een referentie in gestructureerde output:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Voor scripts, geef de voorkeur aan `--credential-stdin` of `--credential-env`; `--credential`
wordt behouden voor gecontroleerd lokaal gebruik. `providers remove` vereist `--yes` op een
niet-interactieve terminal, en alle vijf commando's respecteren de actieve context of de
globale `--base-url`/`--api-key` opties.
Voor de eenmalige, handgeschreven basisconfiguratie van de twee rijkste integraties, zie de
per-tool diepgaande analyses:
- [Claude Code configuratie](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI configuratie](./CODEX-CLI-CONFIGURATION.md)
- [Remote Mode](./REMOTE-MODE.md) — bestuur een remote OmniRoute (VPS / Tailnet) vanaf je laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — de OmniCopilot extensie; het kan ook deze
`setup-*` commando's voor je uitvoeren vanuit de editor
---
## Hoofdtabel
Elk commando respecteert de **actieve context** (gesteld met `omniroute connect`, zie
[Remote Mode](./REMOTE-MODE.md)) of expliciete `--remote <url> --api-key <key>` vlaggen.
"Lokale vs remote" hieronder betekent: zonder vlaggen richt het zich op `http://localhost:20128`;
met `--remote` (of een actieve remote context) haalt het de catalogus van die
server en schrijft de configuratie lokaal.
| Commando | Tool | Wat het schrijft | Sleutelvlaggen | Lokaal vs remote |
| -------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — één profiel per compatibel tekstmodel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Beide |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — één profiel per gematcht model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Beide |
| `omniroute setup-opencode` | OpenCode (openai-compatibel) | `~/.config/opencode/opencode.json``omniroute` provider met elk catalogusmodel (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Beide |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI-modus) + print VS Code extensie-instellingen | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Beide |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + voegt `kilocode.*` samen in VS Code `settings.json` indien aanwezig | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Beide |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modellen, sleutel via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-cursor` | Cursor | Niets — print de stappen in de app (Cursor-configuratie is ondoorzichtig SQLite) | `--remote` `--api-key` `--only` `--port` | Beide |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + stelt `roo-cline.autoImportSettingsPath` in als er een VS Code `settings.json` bestaat | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Beide |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` provider, sleutel via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + print omgevingsrecept | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + print omgevingsrecept | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Beide |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` array + `OMNIROUTE_API_KEY` in `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Beide |
| `omniroute run <target>` | Runtime launch (generiek) | Niets — start `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` met de juiste omgeving en argumenten; Qwen en Gemini gebruiken een tijdelijke geïsoleerde home | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Beide |
| `omniroute launch` | Claude Code | Niets — start `claude` met `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` geïnjecteerd | `--remote` `--api-key` `--token` `--profile` `--port` | Beide |
| `omniroute launch-codex` | OpenAI Codex CLI | Niets — start `codex` met de `omniroute` provider geïnjecteerd via `-c` vlaggen | `--remote` `--api-key` `--profile` (`-p`) `--port` | Beide |
Opmerkingen over vlaggen (gecontroleerd in de commandobron):
- `--remote <url>` — haal de catalogus op van een remote OmniRoute (overschrijft `--port`
en de actieve context). `--api-key <key>` levert de referentie voor die
server (standaard ingesteld op de `OMNIROUTE_API_KEY` omgevingsvariabele, of de token van de actieve context).
- `--only <patterns>` — komma-gescheiden substrings; houd alleen model-ID's die overeenkomen
(bijv. `--only glm,kimi`). Beschikbaar op `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — print precies wat er geschreven zou worden zonder het
bestandssysteem aan te raken. Beschikbaar op elk `setup-*` commando **behalve** `setup-cursor`
(dat nooit een bestand schrijft).
- `--model <id>` — vereist (of interactief gekozen) voor de tools die geen
model auto-ontdekking hebben: Cline, Kilo, Roo, Goose, Qwen, Aider. Die tools
accepteren ook `--yes` voor niet-interactieve uitvoeringen (die dan `--model` vereisen).
`setup-opencode` neemt `--model` om het standaard top-level model in te stellen.
- `--model <id>` op `omniroute run` volgt de manifest's per-target bedrading
(`bin/cli/cli-manifest.mjs`): **aider** ontvangt `--model openai/<id>` en
**opencode** `--model omniroute/<id>` (de prefix wordt alleen toegevoegd wanneer de id
het nog niet draagt); **qwen** en **gemini** ontvangen de id letterlijk;
**claude** krijgt het via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, en
**codex** via `-c model_providers.omniroute.*` args. **Qwen is het enige run
doel dat hard `--model` vereist** — `omniroute run qwen` zonder het verlaat
`2` met een expliciete fout.
- `--port <port>` — lokale OmniRoute poort (standaard `20128`, genegeerd wanneer `--remote`
is ingesteld). Aanwezig op alle `setup-*` en beide launchers.
- `omniroute run` exitcodes: de eigen exitcode van de child CLI wordt
letterlijk doorgegeven; `2` = ongeldige argumenten (ondersteunde doel, ontbrekende vereiste
`--model`, container guard); `127` = het doel-binaire bestand is niet in `PATH`;
`130`/`143`/`129` wanneer de lancering eindigt door `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = andere runtime lancering fout.
- De twee launchers (`launch`, `launch-codex`) accepteren `--profile <name>` om
een profiel te selecteren dat is geschreven door `setup-claude` / `setup-codex`, plus doorgeefargumenten voor
de onderliggende `claude` / `codex` binaire.
De interactieve picker wordt ook gedeeld door de setup-recepten:
```bash
# Kies uit de actieve lokale of remote modelcatalogus en configureer het doel.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` delegeert momenteel naar de geteste recepten voor `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, en `kilo`. IDE-only,
MITM, en alleen gids catalogusvermeldingen blijven expliciete `setup-*`/handmatige stromen en
worden niet gepresenteerd als lanceerbare doelen.
> `setup-opencode` is de **lichte openai-compatibele** OpenCode integratie.
> Er is ook een rijkere pluginintegratie — `omniroute setup opencode` — die
> `@omniroute/opencode-plugin` installeert. Het zijn verschillende commando's; de tabel
> hierboven documenteert `setup-opencode`.
---
## Lokale gebruik
Met OmniRoute draaiend op `localhost:20128`, voer gewoon de setup-opdracht uit voor jouw
tool. De catalogus wordt opgehaald van de lokale server.
```bash
# Codex: schrijf een profiel per gematcht model in ~/.codex/
omniroute setup-codex
codex --profile glm52 # gebruik een gegenereerd profiel
# Claude Code: schrijf per-model profielen, start vervolgens één
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: schrijf de openai-compatibele provider met alle catalogusmodellen
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # verwezen via {env:OMNIROUTE_API_KEY}, nooit op schijf
opencode -m omniroute/glm/glm-5.2 "..."
# Tools zonder autodetectie hebben een expliciet model nodig:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Voorbeeld zonder iets te schrijven:
omniroute setup-continue --dry-run
```
Start zonder enige configuratie te schrijven (alleen env-injectie):
```bash
omniroute launch # Claude Code → lokale OmniRoute
omniroute launch-codex # Codex CLI → lokale OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Expliciete opdrachtpad: geef door wat er na -- komt
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Extern gebruik
Wijs elke setup-opdracht aan een externe OmniRoute met `--remote` + `--api-key`. De
catalogus wordt opgehaald van de externe; de configuratie wordt op jouw lokale machine geschreven.
```bash
# OpenCode tegen een externe VPS, houd alleen glm/kimi modellen
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exporteer eerst OMNIROUTE_API_KEY
# Codex profielen van een externe catalogus
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Start een CLI rechtstreeks tegen de externe
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
In plaats van elke keer `--remote`/`--api-key` door te geven, log één keer in en laat de
**actieve context** ze automatisch leveren:
```bash
omniroute connect 192.168.0.15 # mint een scoped token, slaat de context op
omniroute setup-codex # ← gebruikt nu de externe catalogus
omniroute setup-opencode # ← hetzelfde
omniroute launch # ← Claude Code tegen de externe
```
Zie [Remote Mode](./REMOTE-MODE.md) voor contexten, scopes en tokenbeheer.
---
## Basis-URL conventies (welke tools willen `/v1`)
OmniRoute exposeert het OpenAI oppervlak op `/v1`, het Anthropic oppervlak op de root,
en een native Gemini oppervlak op `/v1beta`. Elke integratie is verbonden met de vorm die
de tool verwacht (gecontroleerd in de opdrachtbron):
| Integratie | Basis-URL geschreven | `/v1`? |
| -------------------------------------------------------------------------- | -------------------- | ---------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | root | Nee — Cline voegt `/v1/chat/completions` toe |
| `setup-goose` (`OPENAI_HOST`) | root | Nee — Goose voegt het pad toe |
| `setup-aider` (`OPENAI_API_BASE`) | root | Nee — LiteLLM voegt `/v1/chat/completions` toe |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | met `/v1` | Ja |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Nee — Claude Code voegt `/v1/messages` toe |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | met `/v1` | Ja |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | met `/v1` | Ja |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Nee — de SDK voegt `/v1beta/models/…` toe |
---
## Het bijhouden van native afhankelijkheden bij updates: `--include=optional`
Wanneer je update met `omniroute update` (na bevestiging, of met `--apply`),
voert OmniRoute de installatie uit met `--include=optional` ingebakken:
```bash
npm install -g omniroute@latest --include=optional
```
Dit is **geen** vlag die je doorgeeft aan `omniroute update` — het wordt altijd toegepast door de
updater. Het garandeert dat de `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, de LLMLingua SLM-stack) de update overleven, zelfs als je npm-configuratie
`omit=optional` heeft ingesteld, wat anders stilletjes de native SQLite
driver en OS-keyring binding zou verwijderen. Om de exacte opdracht zonder toepassing te bekijken:
```bash
omniroute update --dry-run
# [DRY RUN] Zou uitvoeren: npm install -g omniroute@latest --include=optional
```
Andere `omniroute update` vlaggen (geverifieerd in de bron): `--check` (verlaat met 1 als
verouderd), `--apply` (installeer zonder te vragen), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Contract geverifieerd tegen `@google/gemini-cli` 0.50.0: de CLI respecteert
`GOOGLE_GEMINI_BASE_URL` en verstuurt `POST /v1beta/models/<model>:generateContent`
(en `:streamGenerateContent?alt=sse`) daartegen — precies de native
Gemini-interface van OmniRoute (`/v1beta`). `omniroute run gemini` verbindt dat automatisch:
- `GOOGLE_GEMINI_BASE_URL` → de actieve OmniRoute basis-URL (root, geen `/v1`);
- `GEMINI_API_KEY` → de opgeloste OmniRoute referentie (optie/env/context);
- een **tijdelijk geïsoleerde `GEMINI_CLI_HOME`** waarvan de `.gemini/settings.json`
`gemini-api-key` authenticatie selecteert, zodat een opgeslagen Google OAuth-sessie (Code Assist)
nooit de OmniRoute-gestuurde lancering overschrijft — verwijderd na exit;
- **omgeving hygiëne**: de kindomgeving is ontdaan van `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` en `GOOGLE_GENAI_USE_GCA` (die de
authenticatie naar Vertex/Code Assist zouden omleiden), en `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` is
ingesteld als een belt-en-suspenders fallback — de andere `run` doelwitten krijgen dezelfde
behandeling voor hun eigen conflicterende variabelen;
- `--model <id>` injectie van `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
De workspace-trust bescherming van Gemini geldt nog steeds in headless modus — geef
`--skip-trust` door (of vertrouw de directory interactief) zelf; de launcher
omzeilt dit opzettelijk niet. Deze launcher is distinct van de **ACP
registratie** (`src/lib/acp/registry.ts`, `gemini --acp`), die de
agent-protocol integratie voor `/dashboard/acp-agents` blijft.
---
## Echte rooktest (opt-in)
Deterministische lancering-plan regressietests in CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Om de ECHTE binaries tegen een ECHTE
OmniRoute-server te valideren, bestaat er een opt-in harnas op
`tests/integration/upstream-cli-smoke.int.test.ts`. Het draait nooit automatisch
(elke sub-test slaat over tenzij `RUN_CLI_SMOKE=1`), geeft de referentie door via omgevingsvariabele
NAAM (nooit via waarde), redigeert sleutelvormige strings uit elke geregistreerde output, slaat
doelen over waarvan de binary niet is geïnstalleerd, en classificeert fouten als
auth / upstream / config in plaats van een blote boolean:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Optioneel: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` beperkt de sweep;
`OMNIROUTE_SMOKE_TIMEOUT_MS` overschrijft de timeout van 120s per doel.
## Zie ook
- [Claude Code configuratie](./CLAUDE-CODE-CONFIGURATION.md) — de diepere Claude Code gids
- [Codex CLI configuratie](./CODEX-CLI-CONFIGURATION.md) — de eenmalige `[model_providers.omniroute]` basisinstelling
- [Remote Mode](./REMOTE-MODE.md) — contexten, scoped toegangstokens, een externe server aansturen
- [CLI Tools referentie](../reference/CLI-TOOLS.md) — de volledige catalogus van ondersteunde tools + dashboardpagina's
- [Installatiegids](./SETUP_GUIDE.md) — installatiemethoden en onboarding bij de eerste keer gebruik

View File

@@ -1,339 +1,86 @@
# CLI-TOOLS (Nederlands)
# CLI Tools Setup Guide — OmniRoute (Nederlands)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI Tools — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Tools — OmniRoute
Laatst bijgewerkt: 2026-08-18
OmniRoute integreert met drie categorieën CLI-tools verspreid over drie speciale dashboardpagina's:
| Pagina | Route | Concept | Aantal |
| -------------- | ----------------------- | ----------------------------------------------------------------------------- | ------------ |
| **CLI Code's** | `/dashboard/cli-code` | Coderingstools die je op OmniRoute wijst (Klant → CLI → OmniRoute → Provider) | 26 |
| **CLI Agents** | `/dashboard/cli-agents` | Autonome agents die je op OmniRoute wijst (zelfde stroom, bredere reikwijdte) | 8 |
| **ACP Agents** | `/dashboard/acp-agents` | CLIs die OmniRoute als backend genereert via stdio/ACP (omgekeerde stroom) | zie register |
Legacy-routes worden omgeleid via 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Hoe Het Werkt
## How It Works
```
CLI Code's / CLI Agents (consumptiestroom):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (alle wijzen naar OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute routeert naar de juiste provider)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP Agents (omgekeerde generatie stroom):
Klantverzoek → OmniRoute → genereert CLI via stdio/ACP → reactie
```
**Voordelen:**
**Benefits:**
- Eén API-sleutel om alle tools te beheren
- Kostenregistratie over alle CLIs in het dashboard
- Modelwisseling zonder elke tool opnieuw te configureren
- Werkt lokaal en op externe servers (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-configureren met `setup-*`
## Supported Tools (Dashboard Source of Truth)
Je hoeft de configuratie van elke tool niet met de hand te schrijven. OmniRoute levert een `setup-*`
commando per ondersteunde CLI dat de **live** modelcatalogus leest van een draaiende
OmniRoute (lokaal of extern) en de eigen configuratie van de tool op jouw machine schrijft:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Elke accepteert `--remote <url> --api-key <key>` (configureer een lokale tool tegen een
externe OmniRoute), `--dry-run` (preview zonder te schrijven), en `--port`. Tools
zonder model auto-detectie (Cline, Kilo, Roo, Goose, Aider, Qwen) nemen
`--model <id>` (en `--yes` voor niet-interactieve uitvoeringen). Om een CLI te starten met de
juiste omgeving geïnjecteerd en helemaal geen configuratie geschreven, gebruik de generieke
`omniroute run <target>` launcher (claude, codex, aider, goose, opencode, qwen,
gemini — targets en aliassen komen uit `bin/cli/cli-manifest.mjs`); de legacy
per-tool launchers `omniroute launch` (Claude Code) en `omniroute launch-codex`
(Codex) blijven beschikbaar. Gemini CLI is alleen voor lancering: het is een `omniroute run`
doel maar heeft geen `setup-*`/`configure` recept.
### CLI fingerprint sync (Agents + Settings)
> **Volledige referentie:** de mastertabel — wat elk commando schrijft, elke vlag,
> lokaal versus extern, en welke tools een `/v1` suffix willen — bevindt zich in
> **[CLI Integraties](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Deze binnen een container uitvoeren
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Een `setup-*` commando dat binnen de OmniRoute-container wordt uitgevoerd, schrijft in de
eigen home van de container, die geen host CLI leest en die verdwijnt met de
container. OmniRoute detecteert dat en verlaat met `2` met instructies in plaats van
te schrijven. Twee ondersteunde manieren om verder te gaan — installeer de CLI op de host en
`omniroute connect` naar de container, of bind-mount de configuratiemap en stel
`CLI_CONFIG_HOME` in (het compose `host` profiel). Elke `setup-*` commando, plus
`omniroute configure` en `omniroute config set`, accepteert
`--allow-container-write` wanneer het configureren van de eigen CLIs van de container is wat je
eigenlijk bedoelde; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` doet hetzelfde voor
de server. Zie
[Docker Gids → Configureren van host CLI-tools](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
De **apply endpoint** van het dashboard (`POST /api/cli-tools/apply`) handhaaft dezelfde
beveiliging: in een container, een schrijfopdracht waarvan het doel niet bind-mounted is van de
host, antwoordt met **`422`** met `containerEphemeralTarget: true`, de veilige fouttekst en — voor de tools met een hostrecept (claude, codex, opencode, cline,
kilo, continue) — een `hostSetupCommand` (bijv. `omniroute setup-opencode`) om
op de host in plaats daarvan uit te voeren; er wordt niets geschreven. `dryRun: true` blijft werken in container
modus en retourneert de gegenereerde inhoud + doelpad zonder de schijf aan te raken, zodat
je een preview kunt bekijken vanuit het dashboard en op de host kunt toepassen. Dit gedrag is
opzettelijk en regressiebeveiligd door
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — "fix" nooit een 422
door de beveiliging te verwijderen.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Bron van Waarheid
## Step 1 — Get an OmniRoute API Key
De verenigde catalogus bevindt zich in `src/shared/constants/cliTools.ts` als `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Elke invoer heeft deze velden (gedefinieerd in `src/shared/schemas/cliCatalog.ts`):
| Veld | Type | Beschrijving |
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Op welke pagina de tool verschijnt |
| `vendor` | `string` | Oorsprong van de tool ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Ook bruikbaar als een ACP Agent (badge weergegeven) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Ondersteuningsniveau voor aangepaste eindpunten. `"none"` = MITM achterstand |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Configuratiemechanisme |
| `id`, `name`, `color`, `description`, `docsUrl` | standaard | Kernweergavevelden |
Invoeren met `baseUrlSupport: "none"` worden **niet weergegeven** op de dashboardpagina's — ze zijn geregistreerd in de MITM achterstand voor plan 11 (zie `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Capaciteit niveaus (gecatalogiseerd × detecteerbaar × configureerbaar × uitvoerbaar)
Niet elke gecatalogiseerde tool is detecteerbaar, configureerbaar of uitvoerbaar. Elk niveau heeft één
verklarende bron, en een drift test houdt ze in lijn:
| Niveau | Betekenis | Verklaard in |
| ------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Gecatalogiseerd** | Verschijnt in de dashboardcatalogus (naam, leverancier, docs, configuratietype) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detecteerbaar** | Detectie van binaire/configuratie, gezondheidscontroles, configuratiepaden | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalogus) |
| **Configureerbaar** | Ondersteund door `omniroute configure <cli>` (setuprecept bestaat) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Uitvoerbaar** | Ondersteund door `omniroute run <target>` (env/args injectie gedefinieerd) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` is het canonieke uitvoerbare manifest voor de CLI-opdrachten
oppervlakken: `run`, `configure` en de shell-completion generators halen allemaal hun
doellijsten, aliasresolutie (bijvoorbeeld `kilocode`/`kilo-code`/`kilo_cli``kilo`)
en `--model` vlag bedrading daaruit. De driftbewaker
`tests/unit/cli/cli-manifest-drift.test.ts` bevestigt dat het manifest, de runtime
catalogus, de UI-catalogus en elk consumentoppervlak in sync blijven — een doel dat aan
één oppervlak is toegevoegd zonder de anderen, faalt de suite in plaats van stilletjes te driften.
## 1. CLI Code's Catalog (26 tools)
Alle tools die verschijnen in `/dashboard/cli-code`. Degenen met `baseUrlSupport: none` zijn verbonden via MITM of een handmatige gids in plaats van een aangepaste basis-URL:
| id | naam | leverancier | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
Tools met `baseUrlSupport: "partial"` tonen een badge "⚠ Basis-URL gedeeltelijk" in de dashboardkaart.
## 2. CLI Agents Catalog (8 tools)
Autonome agents die verschijnen in `/dashboard/cli-agents`:
| id | naam | leverancier | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | volledig | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | volledig | true |
| goose | Goose | Block / Linux Foundation | volledig | true |
| interpreter | Open Interpreter | OSS | volledig | true |
| warp | Warp AI | Warp Inc. | gedeeltelijk | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | volledig | false |
| omp | Oh My Pi | OSS | volledig | true |
| letta | Letta CLI | Letta | volledig | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP Agents (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Deze pagina (hernoemd van `/dashboard/agents`) toont CLIs die OmniRoute kan **spawn** als backend uitvoeringsengines via stdio/ACP-protocol. De catalogus wordt afzonderlijk onderhouden in `src/lib/acp/registry.ts` en is **niet** hetzelfde als `CLI_TOOLS`.
---
## 4. MITM Backlog (niet weergegeven in dashboard)
De volgende CLIs ondersteunen niet standaard een aangepaste basis-URL en zijn **niet vermeld** op de pagina's van CLI Code of CLI Agents. Ze zijn kandidaten voor MITM onderschepping in plan 11:
| CLI | Reden |
| ------------------- | ------------------------------------------------------------- |
| windsurf | BYOK beperkt tot selecte Claude-modellen + bedrijfs-URL/token |
| amp | Gesloten ecosysteem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO-auth, geen aangepaste URL |
| cowork | Anthropic Desktop, geen configureerbaar eindpunt |
Zie `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` voor de volledige kruisverwijzing.
---
## 5. Batch Detection API
Alle tooldetectie wordt geaggregeerd via een enkel eindpunt:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (zelfde als andere `/api/cli-tools/` routes)
- Retourneert: `Record<toolId, ToolBatchStatus>` (type: `src/shared/types/cliBatchStatus.ts`)
- Strategie: `Promise.all` over alle tools, 5s time-out per tool
- Cache: in-memory LRU geïndexeerd op configuratiebestand `mtime`. Cache ongeldig gemaakt wanneer mtime verandert. Reset bij serverherstart.
Reactievorm per tool:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "geconfigureerd" | "niet_geconfigureerd" | "niet_geïnstalleerd" | "onbekend" | "ander";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // gesaneerd, geen stacktraces
}
```
## 6. Instellingen Handlers voor Nieuwe Tools
Nieuwe tools met `configType: "custom"` hebben speciale instellingen API-routes:
| Route | Tool |
| ------------------------------------------- | --------------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url vlag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primaire + legacy `~/.deepseek` synchronisatie) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + speciale `.env` sleutel) |
Alle routes gebruiken `sanitizeErrorMessage()` voor foutreacties (Harde Regel #12).
---
## 7. Architectuur van Dashboard Pagina's
### CLI Code's (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — servercomponent
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — client grid
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — tool detailpagina
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 gespecialiseerde toolkaarten + `ToolDetailClient.tsx`
### CLI Agents (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — servercomponent
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — client grid
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — hergebruikt `ToolDetailClient`
### ACP Agents (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — servercomponent (verplaatst van `agents/`)
### Gedeelde UI Componenten (`src/shared/components/cli/`)
| Bestand | Doel |
| ----------------------- | ------------------------------------------------------- |
| `CliToolCard.tsx` | Slimme statuskaart (detectie + configuratie + eindpunt) |
| `CliConceptCard.tsx` | Uitlegkaart per pagina over concepten |
| `CliComparisonCard.tsx` | Drie-koloms vergelijking tussen CLI-typen |
| `BaseUrlSelect.tsx` | Eindpunt dropdown (Lokaal/Wolk/Aangepast) |
| `ApiKeySelect.tsx` | API-sleutelselector |
| `ManualConfigModal.tsx` | Modal voor kopieerbare configuratiesnippet |
### Gedeelde Hook (`src/shared/hooks/cli/`)
| Bestand | Doel |
| ------------------------- | ------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Haalt `/api/cli-tools/all-statuses` op, beheert laad-/verversstatus |
## 8. i18n
Nieuwe namespaces toegevoegd in plan 14 F9:
| Namespace | Doel |
| ----------- | --------------------------------------------------------------------------------- |
| `cliCommon` | Gedeelde strings (kaartlabels, concept/vergelijkingsteksten, detailpagina labels) |
| `cliCode` | Strings op de pagina van CLI Code |
| `cliAgents` | Strings op de pagina van CLI Agents |
| `acpAgents` | Strings op de pagina van ACP Agents |
Volledige PT-BR en EN vertalingen zijn beschikbaar. 39 andere locales vallen automatisch terug op EN via namespace-niveau samenvoegen in `src/i18n/request.ts`.
---
## 9. Snelle Start
### Stap 1 — Verkrijg een OmniRoute API-sleutel
1. Open `/dashboard/api-manager`**API-sleutel maken**
2. Geef het een naam (bijv. `cli-tools`) en selecteer alle machtigingen
3. Kopieer de sleutel — je hebt deze nodig voor elke CLI hieronder
> Je sleutel ziet eruit als: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Stap 2 — Installeer CLI-tools
Alle npm-gebaseerde tools vereisen Node.js 22.22.2+ of 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -351,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (startbaar via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-gebaseerd
# Pi coding agent
# zie https://github.com/zechnerj/pi-coding-agent voor installatie
# jcode
# zie https://github.com/1jehuang/jcode voor installatie
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Stap 3 — Configureer via Dashboard
## Step 3 — Set Global Environment Variables
1. Ga naar `http://localhost:20128/dashboard/cli-code`
2. Zoek je tool in het raster
3. Klik op de kaart om de detailpagina van de tool te openen
4. Selecteer je API-sleutel en basis-URL
5. Klik op **Toepassen Configuratie** of kopieer de handmatige configuratiesnippet
---
### Stap 4 — Stel Globale Omgevingsvariabelen In
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universele Eindpunt
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI leest GOOGLE_GEMINI_BASE_URL op de ROOT (zijn SDK voegt /v1beta/... zelf toe)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Voor een **remote server** vervang `localhost:20128` door het server-IP of domein,
> bijv. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Stap 4 — Configureer Elke Tool
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Maak ~/.claude/settings.json aan:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Gebruik de verenigde Anthropic gateway root voor Claude Code. Voeg hier geen `/v1` aan toe.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Moderne Codex (v0.137+) leest alleen `~/.codex/config.toml` — de oude
`config.yaml` behoort tot de legacy npm CLI en wordt stilletjes genegeerd. De API
sleutel blijft in de `OMNIROUTE_API_KEY` omgevingsvariabele (`env_key`), nooit
binnen het bestand:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Volledige referentie (profielen, `wire_api`, contextvensters): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Gebruik `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> om denkvarianten te verzenden.
---
#### Cline (CLI of VS Code)
### Cline (CLI or VS Code)
**CLI-modus:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -494,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code-modus:**
Cline extensie-instellingen → API-provider: `OpenAI Compatible` → Basis-URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Of gebruik het OmniRoute-dashboard → **CLI Tools → Cline → Toepassen Configuratie**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI of VS Code)
### KiloCode (CLI or VS Code)
**CLI-modus:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code-instellingen:**
**VS Code settings:**
```json
{
@@ -518,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Of gebruik het OmniRoute-dashboard → **CLI Tools → KiloCode → Toepassen Configuratie**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code-extensie)
### Continue (VS Code Extension)
Bewerk `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -536,255 +241,158 @@ models:
default: true
```
Herstart VS Code na het bewerken.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Gebruik dit wanneer VS Code Insiders is geconfigureerd voor aangepaste eindpuntmodellen en je wilt dat OmniRoute werkt zonder een aangepast headerveld.
**Aanbevolen locatie:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Voorbeeld met de getokeniseerde OmniRoute-alias:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Opmerkingen:**
- Vervang `sk-your-omniroute-key` door een API-sleutel die in OmniRoute is aangemaakt.
- Het `url`-veld moet wijzen naar `/api/v1/vscode/{token}/chat/completions`.
- Het `modelsUrl`-veld moet wijzen naar `/api/v1/vscode/{token}/models`.
- Geef de voorkeur aan de normale `/v1` + Bearer header flow wanneer de client aangepaste headers ondersteunt.
- URL-ingebedde tokens zijn een compatibiliteitsval en kunnen in editorlogs of proxygeschiedenis verschijnen.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Log in op je AWS/Kiro-account:
# Login to your AWS/Kiro account:
kiro-cli login
# De CLI gebruikt zijn eigen authenticatie — OmniRoute is niet nodig als backend voor Kiro CLI zelf.
# Gebruik kiro-cli naast OmniRoute voor andere tools.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Voor de **Kiro IDE** desktopapp, gebruik de MITM-eindpunt die door OmniRoute wordt blootgesteld
onder `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. Interne OmniRoute CLI
## Dashboard Auto-Configuration
De `omniroute` binaire biedt commando's voor serverlevenscyclus, setup, diagnostiek en providerbeheer. Toegangspunt: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Start server (standaard poort 20128)
omniroute setup # Interactieve setup wizard
omniroute doctor # Controleer config, DB, poorten, runtime
omniroute providers list # Geconfigureerde providerverbindingen
omniroute providers test-all # Test elke actieve verbinding
omniroute reset-password # Reset het admin wachtwoord
omniroute logs # Stream aanvraaglogs
omniroute health # Gedetailleerde gezondheid (breakers, cache, geheugen)
omniroute --version # Print versie
omniroute --help # Toon alle commando's
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
### Setup & Initialisatie
---
```bash
omniroute setup # Interactieve setup wizard
omniroute setup --non-interactive # CI/automatiseringsmodus (leest omgevingsvariabelen + vlaggen)
omniroute setup --password '<value>' # Stel admin wachtwoord direct in
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Voeg een provider toe en test deze in één keer
```
## Built-in Agents: Droid & OpenClaw
Erkende omgevingsvariabelen voor niet-interactieve setup:
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
| Var | Doel |
| ------------------- | ---------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Provider API-sleutel (gebonden aan `--api-key` via Commander `.env()`) |
| `DATA_DIR` | Overschrijf de OmniRoute gegevensmap |
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
Alle andere niet-interactieve invoer wordt doorgegeven als vlaggen, niet als omgevingsvariabelen:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(zie de `omniroute setup` opties hierboven).
---
### Diagnostiek
## Available API Endpoints
```bash
omniroute doctor # Controleer config, DB, poorten, runtime, geheugen, levensvatbaarheid
omniroute doctor --json # Machine-leesbare JSON
omniroute doctor --no-liveness # Sla de HTTP gezondheidscontrole over
omniroute doctor --host 0.0.0.0 # Overschrijf levensvatbaarheid host
omniroute doctor --liveness-url <url> # Volledige gezondheids-eindpunt URL overschrijven
```
De doctor voert deze controles uit: `Config`, `Database`, `Opslag/encryptie`,
`Poortbeschikbaarheid`, `Node runtime`, `Native binaire` (better-sqlite3),
`Geheugen`, en `Server levensvatbaarheid`. Het verlaat met een niet-nul waarde als een controle `faalt`.
### Providerbeheer
```bash
omniroute providers available # OmniRoute provider catalogus
omniroute providers available --search openai # Filter catalogus op id/naam/alias/categorie
omniroute providers available --category api-key # Filter op categorie (api-key, oauth, gratis, ...)
omniroute providers available --json # Machine-leesbare JSON
omniroute providers list # Geconfigureerde providerverbindingen
omniroute providers list --json
omniroute providers test <id|name> # Test één geconfigureerde verbinding
omniroute providers test-all # Test elke actieve verbinding
omniroute providers validate # Lokale structurele validatie
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Bestaande OAuth-stroom
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` zijn API-eerst en werken daarom tegen
de actieve lokale of externe context. Invoer van referenties moet gebruik maken van
`--credential-stdin` of `--credential-env`; `--dry-run --json` rapporteert alleen
geredigeerde aanwezigheid/vorm. `providers available` leest de OmniRoute catalogus;
`providers list/test/test-all/validate` behouden hun lokale SQLite gedrag en
vereisen niet dat de server draait.
### Herstel & Reset
```bash
omniroute reset-password # Reset het admin wachtwoord (ook: omniroute-reset-password)
omniroute reset-encrypted-columns # Toon waarschuwing + dry-run voor reset van versleutelde referenties
omniroute reset-encrypted-columns --force # Maak daadwerkelijk versleutelde referenties in SQLite null
```
### Credential Export (⚠ voorzichtig mee omgaan)
```bash
omniroute auth export # Toon waarschuwing + bevestigingspoort — geen DB-toegang
omniroute auth export --force # Exporteer ALLE verbindingen' ONVERSLEUTELDE referenties naar stdout als JSON
omniroute auth export --force --id <id> # Exporteer alleen de bijbehorende verbinding
omniroute auth export --force --format env # Geef OMNIROUTE_<PROVIDER>_<FIELD>=<value> regels uit
omniroute auth export --force --out creds.json # Schrijf naar een bestand (gemaakt met 0600 machtigingen)
```
`auth export` is **lokaal alleen** (directe SQLite-lees, geen HTTP-route) en print/schrijft opzettelijk
**platte tekst** `apiKey`/`accessToken`/`refreshToken`/`idToken` waarden — dat is de functie, geen
fout. Er wordt niets uit de database gelezen, en er wordt niets ontsleuteld, zonder `--force`. Een stderr
waarschuwing banner wordt altijd afgedrukt voordat er enige platte tekst wordt uitgegeven. Vereist dat `STORAGE_ENCRYPTION_KEY`
is ingesteld. Een veld dat niet kan worden ontsleuteld (verlopen sleutel, corrupte ciphertext) wordt gerapporteerd als
`<field>DecryptFailed: true` in plaats van de hele export te beëindigen of de onderliggende fout te lekken.
### Andere subcommando's
Deze gaan uit van een draaiende OmniRoute-server, tenzij anders vermeld:
```bash
omniroute status # Uitgebreide runtime status
omniroute logs # Stream aanvraaglogs (--json, --search, --follow)
omniroute config show # Toon huidige configuratie
omniroute provider list # Lijst beschikbare providers (alias van providers list)
omniroute provider add # Registreer OmniRoute als een provider op een tool
omniroute keys add | list | remove # Beheer API-sleutels
omniroute models [provider] # Lijst modellen (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot config + DB
omniroute restore # Herstel van een eerdere snapshot
omniroute health # Gedetailleerde gezondheid (breakers, cache, geheugen)
omniroute quota # Gebruik van providerquota
omniroute cache # Cache-status
omniroute cache clear # Wis semantische + handtekening caches
omniroute mcp status | restart # MCP serverstatus / herstart
omniroute a2a status | card # A2A serverstatus / agentkaart
omniroute tunnel list | create | stop # Beheer tunnels (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspecteer / stel omgevingsvariabelen in (tijdelijk)
omniroute test # Provider connectiviteit rooktest
omniroute update # Controleer op updates
omniroute completion # Genereer shell voltooiing
```
### Veelvoorkomende vlaggen
| Vlag | Beschrijving |
| ------------------- | ------------------------------------------------------- |
| `--no-open` | Open de browser niet automatisch bij het starten |
| `--port <n>` | Overschrijf de API-poort (standaard 20128) |
| `--mcp` | Draai als MCP-server over stdio (voor IDE's) |
| `--non-interactive` | CI-modus (geen prompts; leest van env/vlaggen) |
| `--json` | Machine-leesbare JSON-uitvoer (doctor, providers, enz.) |
| `--help`, `-h` | Toon commando-specifieke hulp |
| `--version`, `-v` | Print de geïnstalleerde versie |
## Beschikbare API-eindpunten
| Eindpunt | Beschrijving | Gebruik Voor |
| -------------------------- | ------------------------------- | ------------------------------------ |
| `/v1/chat/completions` | Standaard chat (alle providers) | Alle moderne tools |
| `/v1/responses` | Responses API (OpenAI-formaat) | Codex, agentische workflows |
| `/v1/completions` | Legacy tekstcompleties | Oudere tools die `prompt:` gebruiken |
| `/v1/embeddings` | Tekstembeddings | RAG, zoeken |
| `/v1/images/generations` | Beeldgeneratie | GPT-Image, Flux, enz. |
| `/v1/audio/speech` | Tekst-naar-spraak | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Spraak-naar-tekst | Deepgram, AssemblyAI |
Klaar-om-te-plakken voorbeelden met een getokeniseerde OmniRoute URL:
```txt
Token voorbeeld: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standaard OpenAI basis: http://localhost:20128/v1
VS Code modellen: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Probleemoplossing
| Fout | Oorzaak | Oplossing |
| --------------------------------------------- | ------------------------- | ------------------------------------------------------- |
| `Connection refused` | OmniRoute draait niet | `omniroute serve` |
| `401 Unauthorized` | Onjuiste API-sleutel | Controleer in `/dashboard/api-manager` |
| `No combo configured` | Geen actieve routingcombo | Stel in op `/dashboard/combos` |
| CLI toont "not installed" | Binary niet in PATH | Controleer `which <command>` |
| Dashboard toont "not detected" na installatie | Cache verouderd | Klik op "⟳ Vernieuw detectie" in dashboard |
| Oude link `/dashboard/cli-tools` | Pre-v3.8.6 bladwijzer | Automatisch omgeleid naar `/dashboard/cli-code` (308) |
| Oude link `/dashboard/agents` | Pre-v3.8.6 bladwijzer | Automatisch omgeleid naar `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,310 +0,0 @@
# CLI-INTEGRATIONS (Norsk)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integrasjoner — pek hvilken som helst kode-CLI mot OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integrasjoner
OmniRoute leverer en familie av `setup-*` kommandoer som konfigurerer en kode-CLI (Codex, Claude Code, OpenCode, Cline, …) til å bruke OmniRoute som sin backend — slik at verktøyet snakker med **én** endepunkt og OmniRoute ruter til den riktige leverandøren med automatisk fallback. Hver kommando leser den **live** modellkatalogen fra en kjørende OmniRoute (lokal eller fjern) og skriver verktøyets egen konfigurasjonsfil på **din** maskin. API-nøkkelen refereres av en miljøvariabel der verktøyet støtter det. Kommandoer som vedvarer en verktøy-lokal miljøfil er notert nedenfor.
Det finnes også en generell launcher — `omniroute run <target>` — som starter `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` eller `gemini` med riktig miljø injisert, uten å skrive noen konfigurasjon i det hele tatt. Mål og deres aliaser kommer fra den kanoniske manifestfilen `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), og `omniroute completion` tilbyr de samme manifest-avledede målordene. De eldre per-verktøy launcherene —
`omniroute launch` (Claude Code) og `omniroute launch-codex` (Codex) — forblir tilgjengelige.
Leverandør onboarding er tilgjengelig fra den samme lokale/fjern konteksten. De API-første kommandoene nedenfor holder administrasjonsautentisering adskilt fra leverandørlegitimasjon og skriver aldri ut en legitimasjon i strukturert utdata:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
For skript, foretrekk `--credential-stdin` eller `--credential-env`; `--credential`
bevares for kontrollert lokal bruk. `providers remove` krever `--yes` på en
ikke-interaktiv terminal, og alle fem kommandoene respekterer den aktive konteksten eller de globale `--base-url`/`--api-key` alternativene.
For engangs, håndskrevet basisoppsett av de to rikeste integrasjonene, se
per-verktøy dypdykk:
- [Claude Code konfigurasjon](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI konfigurasjon](./CODEX-CLI-CONFIGURATION.md)
- [Fjernmodus](./REMOTE-MODE.md) — kjør en fjern OmniRoute (VPS / Tailnet) fra din bærbare datamaskin
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot-utvidelsen; den kan også kjøre disse
`setup-*` kommandoene for deg fra inne i editoren
---
## Hovedtabell
Hver kommando respekterer den **aktive konteksten** (satt med `omniroute connect`, se
[Remote Mode](./REMOTE-MODE.md)) eller eksplisitte `--remote <url> --api-key <key>` flagg.
"Lokal vs fjern" nedenfor betyr: uten flagg retter den seg mot `http://localhost:20128`;
med `--remote` (eller en aktiv fjern kontekst) henter den katalogen fra den
serveren og skriver konfigurasjonen lokalt.
| Kommando | Verktøy | Hva den skriver | Nøkkel flagg | Lokal vs fjern |
| -------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — én profil per kompatibel tekstmodell (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Begge |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — én profil per matchet modell (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Begge |
| `omniroute setup-opencode` | OpenCode (openai-kompatibel) | `~/.config/opencode/opencode.json``omniroute` leverandør med hver katalogmodell (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Begge |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI-modus) + skriver VS Code utvidelsesinnstillinger | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Begge |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + slår sammen `kilocode.*` inn i VS Code `settings.json` hvis tilstede | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Begge |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` modeller, nøkkel via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-cursor` | Cursor | Ingenting — skriver trinnene i appen (Cursor-konfigurasjon er ugjennomsiktig SQLite) | `--remote` `--api-key` `--only` `--port` | Begge |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (importdokument) + setter `roo-cline.autoImportSettingsPath` hvis en VS Code `settings.json` eksisterer | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Begge |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-kompat` leverandør, nøkkel via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + skriver miljøoppskrift | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + skriver miljøoppskrift | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Begge |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` array + `OMNIROUTE_API_KEY` i `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Begge |
| `omniroute run <target>` | Kjøring av launcher (generisk) | Ingenting — start `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` med riktig miljø og argumenter; Qwen og Gemini bruker et midlertidig isolert hjem | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Begge |
| `omniroute launch` | Claude Code | Ingenting — starter `claude` med `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injisert | `--remote` `--api-key` `--token` `--profile` `--port` | Begge |
| `omniroute launch-codex` | OpenAI Codex CLI | Ingenting — starter `codex` med `omniroute` leverandøren injisert via `-c` flagg | `--remote` `--api-key` `--profile` (`-p`) `--port` | Begge |
Notater om flagg (verifisert i kommandoens kilde):
- `--remote <url>` — hent katalogen fra en fjern OmniRoute (overstyrer `--port`
og den aktive konteksten). `--api-key <key>` gir legitimasjonen for den
serveren (standard til `OMNIROUTE_API_KEY` miljøvariabelen, eller den aktive kontekstens token).
- `--only <patterns>` — komma-separerte substrenger; behold kun modell-ID-er som matcher
(f.eks. `--only glm,kimi`). Tilgjengelig på `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — skriv ut nøyaktig hva som ville blitt skrevet uten å berøre
filsystemet. Tilgjengelig på hver `setup-*` kommando **unntatt** `setup-cursor`
(som aldri skriver en fil).
- `--model <id>` — påkrevd (eller valgt interaktivt) for verktøyene som ikke har
modell auto-discovery: Cline, Kilo, Roo, Goose, Qwen, Aider. Disse verktøyene
aksepterer også `--yes` for ikke-interaktive kjøringer (som da krever `--model`).
`setup-opencode` tar `--model` for å sette standard toppnivåmodell.
- `--model <id>``omniroute run` følger manifestets per-mål kabling
(`bin/cli/cli-manifest.mjs`): **aider** mottar `--model openai/<id>` og
**opencode** `--model omniroute/<id>` (prefikset legges til kun når id-en
ikke allerede bærer det); **qwen** og **gemini** mottar id-en ordrett;
**claude** får det via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, og
**codex** via `-c model_providers.omniroute.*` argumenter. **Qwen er det eneste kjøre
målet som hard-krever `--model`** — `omniroute run qwen` uten det avslutter
med `2` med en eksplisitt feil.
- `--port <port>` — lokal OmniRoute port (standard `20128`, ignorert når `--remote`
er satt). Tilstede på alle `setup-*` og begge launcherene.
- `omniroute run` exit-koder: barn-CLI-ens egen exit-kode blir videreformidlet
ordrett; `2` = ugyldige argumenter (støttet mål, manglende påkrevd
`--model`, containerbeskyttelse); `127` = mål-binæren er ikke i `PATH`;
`130`/`143`/`129` når lanseringen avsluttes av `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = annen kjøre-lanseringsfeil.
- De to launcherene (`launch`, `launch-codex`) aksepterer `--profile <name>` for å velge
en profil skrevet av `setup-claude` / `setup-codex`, pluss pass-through argumenter for
den underliggende `claude` / `codex` binæren.
Den interaktive velgeren deles også av oppsettsoppskriftene:
```bash
# Velg fra den aktive lokale eller fjern modellkatalogen og konfigurer målet.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` delegerer for øyeblikket til de testede oppskriftene for `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, og `kilo`. IDE-only,
MITM, og guide-only katalogoppføringer forblir eksplisitte `setup-*`/manuelle flyter og
blir ikke presentert som lanserbare mål.
> `setup-opencode` er den **lette openai-kompatible** OpenCode-integrasjonen.
> Det finnes også en rikere plugin-integrasjon — `omniroute setup opencode` — som
> installerer `@omniroute/opencode-plugin`. De er forskjellige kommandoer; tabellen
> ovenfor dokumenterer `setup-opencode`.
---
## Lokal bruk
Med OmniRoute som kjører på `localhost:20128`, kjør bare oppsettskommandoen for verktøyet ditt. Katalogen hentes fra den lokale serveren.
```bash
# Codex: skriv en profil per matchet modell inn i ~/.codex/
omniroute setup-codex
codex --profile glm52 # bruk en generert profil
# Claude Code: skriv per-modell profiler, og start deretter en
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: skriv den openai-kompatible leverandøren med alle katalogmodeller
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # referert via {env:OMNIROUTE_API_KEY}, aldri på disk
opencode -m omniroute/glm/glm-5.2 "..."
# Verktøy uten automatisk oppdagelse trenger en eksplisitt modell:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Forhåndsvisning uten å skrive noe som helst:
omniroute setup-continue --dry-run
```
Start uten å skrive noen konfigurasjoner i det hele tatt (bare miljøinjeksjon):
```bash
omniroute launch # Claude Code → lokal OmniRoute
omniroute launch-codex # Codex CLI → lokal OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Eksplisitt kommandosti: send gjennom hva som helst som kommer etter --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Fjernbruk
Pek hvilken som helst oppsettskommando mot en fjern OmniRoute med `--remote` + `--api-key`. Katalogen hentes fra den fjerne; konfigurasjonen skrives på din lokale maskin.
```bash
# OpenCode mot en fjern VPS, behold kun glm/kimi modeller
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # eksporter OMNIROUTE_API_KEY først
# Codex profiler fra en fjern katalog
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Start en CLI direkte mot den fjerne
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
I stedet for å sende `--remote`/`--api-key` hver gang, logg inn én gang og la den **aktive konteksten** levere dem automatisk:
```bash
omniroute connect 192.168.0.15 # lager en avgrenset token, lagrer konteksten
omniroute setup-codex # ← bruker nå den fjerne katalogen
omniroute setup-opencode # ← samme
omniroute launch # ← Claude Code mot den fjerne
```
Se [Fjernmodus](./REMOTE-MODE.md) for kontekster, omfang og tokenhåndtering.
---
## Base URL-konvensjoner (hvilke verktøy ønsker `/v1`)
OmniRoute eksponerer OpenAI-overflaten på `/v1`, Anthropic-overflaten på roten, og en native Gemini-overflate på `/v1beta`. Hver integrasjon er koblet til formen verktøyet forventer (verifisert i kommandokilden):
| Integrasjon | Base URL skrevet | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ----------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | rot | Nei — Cline legger til `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | rot | Nei — Goose legger til stien |
| `setup-aider` (`OPENAI_API_BASE`) | rot | Nei — LiteLLM legger til `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | med `/v1` | Ja |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | rot | Nei — Claude Code legger til `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | med `/v1` | Ja |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | med `/v1` | Ja |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | rot | Nei — SDK legger til `/v1beta/models/…` |
---
## Holde native avhengigheter oppdatert: `--include=optional`
Når du oppdaterer med `omniroute update` (etter å ha bekreftet, eller med `--apply`),
kjører OmniRoute installasjonen med `--include=optional` innebygd:
```bash
npm install -g omniroute@latest --include=optional
```
Dette er **ikke** et flagg du sender til `omniroute update` — det blir alltid brukt av
oppdatereren. Det garanterer at `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, LLMLingua SLM-stakken) overlever oppdateringen selv om npm-konfigurasjonen din
har `omit=optional` satt, noe som ellers stille ville fjernet den native SQLite
driveren og OS-keyring bindingen. For å forhåndsvise den eksakte kommandoen uten å bruke den:
```bash
omniroute update --dry-run
# [DRY RUN] Ville kjørt: npm install -g omniroute@latest --include=optional
```
Andre `omniroute update` flagg (verifisert i kildekoden): `--check` (exit 1 hvis
utdatert), `--apply` (installer uten å spørre), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Kontrakten er verifisert mot `@google/gemini-cli` 0.50.0: CLI-en respekterer
`GOOGLE_GEMINI_BASE_URL` og sender `POST /v1beta/models/<model>:generateContent`
(og `:streamGenerateContent?alt=sse`) mot den — nøyaktig OmniRoute sin native
Gemini-overflate (`/v1beta`). `omniroute run gemini` kobler dette automatisk:
- `GOOGLE_GEMINI_BASE_URL` → den aktive OmniRoute base-URL-en (rot, ingen `/v1`);
- `GEMINI_API_KEY` → den løste OmniRoute-legitimasjonen (alternativ/miljø/kontekst);
- en **midlertidig isolert `GEMINI_CLI_HOME`** hvis `.gemini/settings.json`
velger `gemini-api-key` autentisering, slik at en lagret Google OAuth-økt (Code Assist)
aldri overskriver den OmniRoute-styrte lanseringen — fjernet etter avslutning;
- **miljøhygiene**: barne-miljøet er renset for `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` og `GOOGLE_GENAI_USE_GCA` (som ville omdirigere
autentisering til Vertex/Code Assist), og `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` er
satt som en belte-og-seler fallback — de andre `run` målene får samme
behandling for sine egne konfliktfylte variabler;
- `--model <id>` injeksjon fra `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Geminis arbeidsområde-trustbeskyttelse gjelder fortsatt i hodeløs modus — send
`--skip-trust` (eller stol på katalogen interaktivt) selv; lansereren
omgår bevisst ikke dette. Denne lansereren er forskjellig fra **ACP
registreringen** (`src/lib/acp/registry.ts`, `gemini --acp`), som forblir
agent-protokollintegrasjonen for `/dashboard/acp-agents`.
---
## Ekte røykfjerning (opt-in)
Deterministiske lanseringsplan regresjonskjøringer i CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). For å validere de EKTTE binærene mot en EKTTE
OmniRoute-server, finnes det en opt-in ramme på
`tests/integration/upstream-cli-smoke.int.test.ts`. Den kjører aldri automatisk
(alle under-testene hopper over med mindre `RUN_CLI_SMOKE=1`), sender legitimasjonen via miljøvariabel
NAVN (aldri ved verdi), redigerer nøkkel-formede strenger fra all registrert utdata, hopper over
mål hvis binæren ikke er installert, og klassifiserer feil som
autentisering / upstream / konfigurasjon i stedet for en ren boolsk:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Valgfritt: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` begrenser feiingen;
`OMNIROUTE_SMOKE_TIMEOUT_MS` overstyrer 120s per-mål tidsgrense.
---
## Se også
- [Claude Code-konfigurasjon](./CLAUDE-CODE-CONFIGURATION.md) — den dypere Claude Code-guiden
- [Codex CLI-konfigurasjon](./CODEX-CLI-CONFIGURATION.md) — den engangs `[model_providers.omniroute]` grunnoppsettet
- [Fjernmodus](./REMOTE-MODE.md) — kontekster, avgrensede tilgangstokener, kjøring av en fjernserver
- [CLI-verktøyreferanse](../reference/CLI-TOOLS.md) — den komplette katalogen over støttede verktøy + dashbord-sider
- [Installasjonsveiledning](./SETUP_GUIDE.md) — installasjonsmetoder og onboarding ved første kjøring

View File

@@ -1,340 +1,86 @@
# CLI-TOOLS (Norsk)
# CLI Tools Setup Guide — OmniRoute (Norsk)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "CLI-verktøy — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI-verktøy — OmniRoute
Sist oppdatert: 2026-08-18
OmniRoute integreres med tre kategorier av CLI-verktøy fordelt på tre dedikerte dashbord-sider:
| Side | Rute | Konsept | Antall |
| --------------- | ----------------------- | --------------------------------------------------------------------------- | ----------- |
| **CLI-kode** | `/dashboard/cli-code` | Kodingverktøy du peker på OmniRoute (Klient → CLI → OmniRoute → Leverandør) | 26 |
| **CLI-agenter** | `/dashboard/cli-agents` | Autonome agenter du peker på OmniRoute (samme flyt, bredere omfang) | 8 |
| **ACP-agenter** | `/dashboard/acp-agents` | CLIs som OmniRoute genererer som backend via stdio/ACP (omvendt flyt) | se register |
Legacy-ruter omdirigerer via 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Hvordan det fungerer
## How It Works
```
CLI-kode / CLI-agenter (forbruksflyt):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (alle peker på OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute ruter til riktig leverandør)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
ACP-agenter (omvendt genereringsflyt):
Klientforespørsel → OmniRoute → genererer CLI via stdio/ACP → respons
```
**Fordeler:**
**Benefits:**
- Ett API-nøkkel for å administrere alle verktøy
- Kostnadssporing på tvers av alle CLIs i dashbordet
- Modellbytte uten å omkonfigurere hvert verktøy
- Fungerer lokalt og på eksterne servere (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-konfigurer med `setup-*`
## Supported Tools (Dashboard Source of Truth)
Du trenger ikke å skrive hver verktøys konfigurasjon for hånd. OmniRoute leverer en `setup-*`
kommando per støttet CLI som leser den **live** modellkatalogen fra en kjørende
OmniRoute (lokal eller ekstern) og skriver verktøyets egen konfigurasjon på maskinen din:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Hver aksepterer `--remote <url> --api-key <key>` (konfigurer et lokalt verktøy mot en
ekstern OmniRoute), `--dry-run` (forhåndsvisning uten skriving), og `--port`. Verktøy
uten modell auto-oppsporing (Cline, Kilo, Roo, Goose, Aider, Qwen) tar
`--model <id>` (og `--yes` for ikke-interaktive kjøringer). For å starte en CLI med
riktig miljø injisert og ingen konfigurasjon skrevet i det hele tatt, bruk den generiske
`omniroute run <target>` launcher (claude, codex, aider, goose, opencode, qwen,
gemini — mål og aliaser kommer fra `bin/cli/cli-manifest.mjs`); de legacy
per-verktøy launcherne `omniroute launch` (Claude Code) og `omniroute launch-codex`
(Codex) forblir tilgjengelige. Gemini CLI er kun for oppstart: det er et `omniroute run`
mål, men har ingen `setup-*`/`configure` oppskrift.
### CLI fingerprint sync (Agents + Settings)
> **Full referanse:** hovedtabellen — hva hver kommando skriver, hver flagg,
> lokal vs ekstern, og hvilke verktøy som ønsker en `/v1` suffiks — finnes i
> **[CLI-integrasjoner](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Kjøring av disse inne i en container
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
En `setup-*` kommando utført inne i OmniRoute-containeren skriver inn i
containerens egen hjem, som ingen vert-CLI leser og som forsvinner med
containeren. OmniRoute oppdager dette og avslutter med `2` med instruksjoner i stedet for
å skrive. To støttede måter videre — installer CLI på verten og
`omniroute connect` til containeren, eller bind-mount konfigurasjonskatalogene og sett
`CLI_CONFIG_HOME` (compose `host` profil). Hver `setup-*` kommando, pluss
`omniroute configure` og `omniroute config set`, aksepterer
`--allow-container-write` når konfigurasjon av containerens egne CLIs er det du
faktisk mente; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` gjør det samme for
serveren. Se
[Docker Guide → Konfigurere vert-CLI-verktøy](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
Dashbordets **apply-endepunkt** (`POST /api/cli-tools/apply`) håndhever den
samme beskyttelsen: i en container, en skriving hvis mål ikke er bind-mountet fra
vertsystemet svarer **`422`** med `containerEphemeralTarget: true`, den trygge feilmeldingen
og — for verktøyene med en vert-oppskrift (claude, codex, opencode, cline,
kilo, continue) — en `hostSetupCommand` (f.eks. `omniroute setup-opencode`) som skal kjøres
på verten i stedet; ingenting skrives. `dryRun: true` fortsetter å fungere i container
modus og returnerer det genererte innholdet + målsti uten å berøre disken, så
du kan forhåndsvise fra dashbordet og bruke på verten. Denne oppførselen er
intensjonell og regresjonsbeskyttet av
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — aldri "fikse" en 422
ved å fjerne beskyttelsen.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Kilde til sannhet
## Step 1 — Get an OmniRoute API Key
Den enhetlige katalogen finnes i `src/shared/constants/cliTools.ts` som `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Hver oppføring har disse feltene (definert i `src/shared/schemas/cliCatalog.ts`):
| Felt | Type | Beskrivelse |
| ----------------------------------------------- | ------------------------------------------------------------ | --------------------------------------------------------- |
| `category` | `"code" \| "agent"` | Hvilken side verktøyet vises på |
| `vendor` | `string` | Verktøyets opprinnelse ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Også brukbar som en ACP Agent (merke vist) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tilpasset endepunkt støtte nivå. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Konfigurasjonsmekanisme |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Kjerne visningsfelt |
Oppføringer med `baseUrlSupport: "none"` vises **ikke** på dashbordsidene — de er registrert i MITM backlog for plan 11 (se `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Kapabilitetsnivåer (katalogisert × oppdagbar × konfigurerbar × lanserbar)
Ikke hvert katalogisert verktøy er oppdagbart, konfigurerbart eller lanserbart. Hvert nivå har en
deklarerende kilde, og en driftstest holder dem synkronisert:
| Nivå | Betydning | Deklarert i |
| ----------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Katalogisert** | Visas i dashbordkatalogen (navn, leverandør, dokumentasjon, konfigurasjonstype) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Oppdagbar** | Binær-/konfigurasjonsdeteksjon, helsesjekker, konfigurasjonsstier | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime katalog) |
| **Konfigurerbar** | Støttet av `omniroute configure <cli>` (oppskriftsoppsett eksisterer) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Lanserbar** | Støttet av `omniroute run <target>` (miljø/argumentinjeksjon definert) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` er det kanoniske kjørbare manifestet for CLI-kommandoene
overflater: `run`, `configure` og shell-fullføringsgeneratorene henter alle sine
mål lister, aliasoppløsning (for eksempel `kilocode`/`kilo-code`/`kilo_cli``kilo`)
og `--model` flagg kabling fra det. Driftbeskyttelsen
`tests/unit/cli/cli-manifest-drift.test.ts` bekrefter at manifestet, runtime
katalogen, UI-katalogen og hver forbrukeroverflate forblir synkronisert — et mål lagt til
én overflate uten de andre feiler testen i stedet for å drive stille.
## 1. Katalog over CLI-kode (26 verktøy)
Alle verktøy som vises i `/dashboard/cli-code`. De med `baseUrlSupport: none` er koblet gjennom MITM eller en manuell guide i stedet for en tilpasset base-URL:
| id | navn | leverandør | baseUrlSupport | configType | acpSpawnable |
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
Verktøy med `baseUrlSupport: "partial"` viser et merke "⚠ Base URL parcial" i dashboard-kortet.
## 2. CLI Agenter Katalog (8 verktøy)
Autonome agenter som vises i `/dashboard/cli-agents`:
| id | navn | leverandør | baseUrlSupport | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | full | false |
| openclaw | OpenClaw | OSS (P. Steinberger) | full | true |
| goose | Goose | Block / Linux Foundation | full | true |
| interpreter | Open Interpreter | OSS | full | true |
| warp | Warp AI | Warp Inc. | partial | true |
| agent-deck | Agent Deck | asheshgoplani (OSS) | full | false |
| omp | Oh My Pi | OSS | full | true |
| letta | Letta CLI | Letta | full | false |
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 3. ACP Agenter (/dashboard/acp-agents)
## Step 2 — Install CLI Tools
Denne siden (omdøpt fra `/dashboard/agents`) viser CLI-er som OmniRoute kan **spawne** som backend utførelsesmotorer via stdio/ACP-protokollen. Katalogen vedlikeholdes separat i `src/lib/acp/registry.ts` og er **ikke** den samme som `CLI_TOOLS`.
---
## 4. MITM Backlog (ikke vist i dashbordet)
Følgende CLI-er støtter ikke tilpasset base-URL nativt og er **ikke oppført** på CLI-kode- eller CLI-agenter-sidene. De er kandidater for MITM-intervensjon i plan 11:
| CLI | Årsak |
| ------------------- | ---------------------------------------------------------------- |
| windsurf | BYOK begrenset til utvalgte Claude-modeller + bedrifts-URL/token |
| amp | Lukket økosystem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO autentisering, ingen tilpasset URL |
| cowork | Anthropic Desktop, ingen konfigurerbar endepunkt |
Se `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` for full kryssreferanse.
---
## 5. Batch Deteksjon API
All verktøydeteksjon er aggregert via et enkelt endepunkt:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (samme som andre `/api/cli-tools/` ruter)
- Returnerer: `Record<toolId, ToolBatchStatus>` (type: `src/shared/types/cliBatchStatus.ts`)
- Strategi: `Promise.all` over alle verktøy, 5s tidsavbrudd per verktøy
- Cache: i minnet LRU indeksert av konfigurasjonsfil `mtime`. Cache ugyldiggjøres når mtime endres. Tilbakestilles ved serveromstart.
Responsform per verktøy:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitert, ingen stakkspor
}
```
## 6. Innstillinger for nye verktøy
Nye verktøy med `configType: "custom"` har dedikerte innstillings-API-ruter:
| Rute | Verktøy |
| ------------------------------------------- | --------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primær + legacy `~/.deepseek` synk) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedikert `.env` nøkkel) |
Alle ruter bruker `sanitizeErrorMessage()` for feilmeldinger (Hard Rule #12).
---
## 7. Arkitektur for dashbord-sider
### CLI-kode (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — serverkomponent
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — klientgrid
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — verktøydetaljside
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 spesialiserte verktøykort + `ToolDetailClient.tsx`
### CLI-agenter (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — serverkomponent
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — klientgrid
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — gjenbruker `ToolDetailClient`
### ACP-agenter (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — serverkomponent (flyttet fra `agents/`)
### Delte UI-komponenter (`src/shared/components/cli/`)
| Fil | Formål |
| ----------------------- | -------------------------------------------------- |
| `CliToolCard.tsx` | Smart statuskort (deteksjon + konfig + endepunkt) |
| `CliConceptCard.tsx` | Forklaringskort for konsept per side |
| `CliComparisonCard.tsx` | Sammenligning i tre kolonner på tvers av CLI-typer |
| `BaseUrlSelect.tsx` | Endepunkt nedtrekksmeny (Lokal/Cloud/Custom) |
| `ApiKeySelect.tsx` | API-nøkkelvelger |
| `ManualConfigModal.tsx` | Kopierbar konfigurasjonsutdrag modal |
### Delt Hook (`src/shared/hooks/cli/`)
| Fil | Formål |
| ------------------------- | ---------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Henter `/api/cli-tools/all-statuses`, håndterer lasting/oppdateringstilstand |
## 8. i18n
Nye navnerom lagt til i plan 14 F9:
| Navnerom | Formål |
| ----------- | ---------------------------------------------------------------------------------- |
| `cliCommon` | Delte strenger (kortetiketter, konsept/sammenligningstekster, detaljsideetiketter) |
| `cliCode` | Strenger for CLI-kode siden |
| `cliAgents` | Strenger for CLI-agenter siden |
| `acpAgents` | Strenger for ACP-agenter siden |
Full PT-BR og EN oversettelser er tilgjengelige. 39 andre lokaliteter faller automatisk tilbake til EN via navneromsnivå sammenslåing i `src/i18n/request.ts`.
---
## 9. Hurtigstart
### Trinn 1 — Få en OmniRoute API-nøkkel
1. Åpne `/dashboard/api-manager`**Opprett API-nøkkel**
2. Gi den et navn (f.eks. `cli-tools`) og velg alle tillatelser
3. Kopier nøkkelen — du trenger den for hver CLI nedenfor
> Nøkkelen din ser slik ut: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Trinn 2 — Installer CLI-verktøy
Alle npm-baserte verktøy krever Node.js 22.22.2+ eller 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -352,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (kan startes via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Rust-basert
# Pi coding agent
# se https://github.com/zechnerj/pi-coding-agent for installasjon
# jcode
# se https://github.com/1jehuang/jcode for installasjon
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Trinn 3 — Konfigurer via Dashboard
## Step 3 — Set Global Environment Variables
1. Gå til `http://localhost:20128/dashboard/cli-code`
2. Finn verktøyet ditt i rutenettet
3. Klikk på kortet for å åpne verktøyets detaljside
4. Velg API-nøkkelen din og basis-URL
5. Klikk **Bruk konfigurasjon** eller kopier den manuelle konfigurasjonsbiten
---
### Trinn 4 — Sett globale miljøvariabler
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI leser GOOGLE_GEMINI_BASE_URL på ROT (SDK-en legger selv til /v1beta/...)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> For en **fjerntjener** erstatt `localhost:20128` med serverens IP eller domene,
> f.eks. `http://<your-server-ip>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Trinn 4 — Konfigurer hvert verktøy
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Opprett ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Bruk den enhetlige Anthropic gateway-roten for Claude Code. Ikke legg til `/v1` her.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Moderne Codex (v0.137+) leser `~/.codex/config.toml` kun — den gamle
`config.yaml` tilhører den eldre npm CLI og blir stille ignorert. API-nøkkelen
forblir i miljøvariabelen `OMNIROUTE_API_KEY` (`env_key`), aldri
inni filen:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Full referanse (profiler, `wire_api`, kontekstvinduer): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
> Bruk `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> for å sende tenkevarianter.
---
#### Cline (CLI eller VS Code)
### Cline (CLI or VS Code)
**CLI-modus:**
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -495,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**VS Code-modus:**
Cline-utvidelsens innstillinger → API-leverandør: `OpenAI Compatible` → Basis-URL: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Eller bruk OmniRoute-dashboardet**CLI-verktøy → Cline → Bruk konfigurasjon**.
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI eller VS Code)
### KiloCode (CLI or VS Code)
**CLI-modus:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**VS Code-innstillinger:**
**VS Code settings:**
```json
{
@@ -519,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Eller bruk OmniRoute-dashboardet**CLI-verktøy → KiloCode → Bruk konfigurasjon**.
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
---
#### Continue (VS Code-utvidelse)
### Continue (VS Code Extension)
Rediger `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -537,255 +241,158 @@ models:
default: true
```
Start VS Code på nytt etter redigering.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Bruk dette når VS Code Insiders er konfigurert for tilpassede endepunktmodeller og du vil at OmniRoute skal fungere uten et tilpasset headerfelt.
**Anbefalt plassering:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Eksempel som bruker den tokeniserte OmniRoute-aliasen:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Notater:**
- Erstatt `sk-your-omniroute-key` med en API-nøkkel opprettet i OmniRoute.
- `url`-feltet skal peke til `/api/v1/vscode/{token}/chat/completions`.
- `modelsUrl`-feltet skal peke til `/api/v1/vscode/{token}/models`.
- Foretrekk den normale `/v1` + Bearer header-flyten når klienten støtter tilpassede overskrifter.
- URL-innlemmede tokens er en kompatibilitetsfall tilbake og kan vises i redigeringslogger eller proxyhistorikk.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Logg inn på din AWS/Kiro-konto:
# Login to your AWS/Kiro account:
kiro-cli login
# CLI bruker sin egen autentisering — OmniRoute er ikke nødvendig som backend for Kiro CLI selv.
# Bruk kiro-cli sammen med OmniRoute for andre verktøy.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
For **Kiro IDE** skrivebordsapp, bruk MITM-endepunktet som er eksponert av OmniRoute
under `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. Intern OmniRoute CLI
## Dashboard Auto-Configuration
Den `omniroute` binæren gir kommandoer for serverlivssyklus, oppsett, diagnostikk og leverandøradministrasjon. Inngangspunkt: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Start server (standard port 20128)
omniroute setup # Interaktiv oppsettsveiviser
omniroute doctor # Sjekk konfigurasjon, DB, porter, kjøring
omniroute providers list # Konfigurerte leverandørforbindelser
omniroute providers test-all # Test hver aktiv forbindelse
omniroute reset-password # Tilbakestill adminpassord
omniroute logs # Strøm forespørsel logger
omniroute health # Detaljert helse (brytere, cache, minne)
omniroute --version # Skriv ut versjon
omniroute --help # Vis alle kommandoer
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
### Oppsett og initialisering
---
```bash
omniroute setup # Interaktiv oppsettsveiviser
omniroute setup --non-interactive # CI/automatiseringsmodus (leser miljøvariabler + flagg)
omniroute setup --password '<verdi>' # Sett adminpassord direkte
omniroute setup --add-provider \
--provider openai \
--api-key '<verdi>' \
--test-provider # Legg til og test en leverandør i ett steg
```
## Built-in Agents: Droid & OpenClaw
Gjenkjente miljøvariabler for ikke-interaktivt oppsett:
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
| Var | Formål |
| ------------------- | --------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Leverandør API-nøkkel (bundet til `--api-key` via Commander `.env()`) |
| `DATA_DIR` | Overstyr OmniRoute datakatalogen |
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
Alle andre ikke-interaktive innganger sendes som flagg, ikke miljøvariabler:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(se `omniroute setup` alternativer ovenfor).
---
### Diagnostikk
## Available API Endpoints
```bash
omniroute doctor # Sjekk konfigurasjon, DB, porter, kjøring, minne, livlighet
omniroute doctor --json # Maskinlesbar JSON
omniroute doctor --no-liveness # Hopp over HTTP helseundersøkelse
omniroute doctor --host 0.0.0.0 # Overstyr livlighet vert
omniroute doctor --liveness-url <url> # Full helseendepunkt URL-overstyring
```
Doktoren kjører disse sjekkene: `Konfigurasjon`, `Database`, `Lagring/kryptering`,
`Port tilgjengelighet`, `Node kjøring`, `Native binær` (better-sqlite3),
`Minne`, og `Server livlighet`. Den avslutter med ikke-null hvis noen sjekk er `feil`.
### Leverandøradministrasjon
```bash
omniroute providers available # OmniRoute leverandørkatalog
omniroute providers available --search openai # Filtrer katalog etter id/navn/alias/kategori
omniroute providers available --category api-key # Filtrer etter kategori (api-key, oauth, gratis, ...)
omniroute providers available --json # Maskinlesbar JSON
omniroute providers list # Konfigurerte leverandørforbindelser
omniroute providers list --json
omniroute providers test <id|navn> # Test en konfigurert forbindelse
omniroute providers test-all # Test hver aktiv forbindelse
omniroute providers validate # Lokalt strukturell validering
omniroute providers add <leverandør> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <leverandør> # Eksisterende OAuth flyt
omniroute providers edit <id|navn> --default-model <modell>
omniroute providers remove <id|navn> --yes
```
`providers add/import/auth/edit/remove` er API-først og fungerer derfor mot
den aktive lokale eller eksterne konteksten. Credential-inngang bør bruke
`--credential-stdin` eller `--credential-env`; `--dry-run --json` rapporterer kun
redigert tilstedeværelse/form. `providers available` leser OmniRoute katalogen;
`providers list/test/test-all/validate` beholder sin lokale SQLite-atferd og
krever ikke at serveren kjører.
### Gjenoppretting og tilbakestilling
```bash
omniroute reset-password # Tilbakestill adminpassord (også: omniroute-reset-password)
omniroute reset-encrypted-columns # Vis advarsel + tørrkjøring for tilbakestilling av krypterte legitimasjoner
omniroute reset-encrypted-columns --force # Faktisk nullstill krypterte legitimasjoner i SQLite
```
### Eksport av legitimasjoner (⚠ håndter med forsiktighet)
```bash
omniroute auth export # Vis advarsel + bekreftelsesport — ingen DB-tilgang
omniroute auth export --force # Eksporter ALLE forbindelsers DEKRYPTERTE legitimasjoner til stdout som JSON
omniroute auth export --force --id <id> # Eksporter kun den matchende forbindelsen
omniroute auth export --force --format env # Emit OMNIROUTE_<LEVERANDØR>_<FELT>=<verdi> linjer
omniroute auth export --force --out creds.json # Skriv til en fil (opprettet med 0600 tillatelser)
```
`auth export` er **lokal-only** (direkte SQLite lesing, ingen HTTP-rute) og skriver med vilje
**ren tekst** `apiKey`/`accessToken`/`refreshToken`/`idToken` verdier — det er funksjonen, ikke en
bug. Ingenting leses fra databasen, og ingenting dekrypteres, uten `--force`. En stderr
advarsel banner skrives alltid ut før noen ren tekst sendes. Krever `STORAGE_ENCRYPTION_KEY` å
være satt. Et felt som mislykkes i dekryptering (utdatert nøkkel, ødelagt ciphertext) rapporteres som
`<felt>DecryptFailed: true` i stedet for å avbryte hele eksporten eller lekke den underliggende feilen.
### Andre underkommandoer
Disse forutsetter en kjørende OmniRoute-server, med mindre annet er notert:
```bash
omniroute status # Omfattende kjøretidsstatus
omniroute logs # Strøm forespørsel logger (--json, --search, --follow)
omniroute config show # Vis nåværende konfigurasjon
omniroute provider list # List tilgjengelige leverandører (alias av providers list)
omniroute provider add # Registrer OmniRoute som en leverandør på et verktøy
omniroute keys add | list | remove # Administrer API-nøkler
omniroute models [leverandør] # List modeller (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Snapshot konfig + DB
omniroute restore # Gjenopprett fra et tidligere snapshot
omniroute health # Detaljert helse (brytere, cache, minne)
omniroute quota # Leverandør kvote bruk
omniroute cache # Cache status
omniroute cache clear # Tøm semantiske + signatur cacher
omniroute mcp status | restart # MCP server status / restart
omniroute a2a status | card # A2A server status / agent kort
omniroute tunnel list | create | stop # Administrer tunneler (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspiser / sett miljøvariabler (midlertidig)
omniroute test # Leverandør tilkoblings røyk test
omniroute update # Sjekk for oppdateringer
omniroute completion # Generer skall fullføring
```
### Vanlige flagg
| Flag | Beskrivelse |
| ------------------- | -------------------------------------------------- |
| `--no-open` | Ikke auto-åpne nettleseren ved start |
| `--port <n>` | Overstyr API-porten (standard 20128) |
| `--mcp` | Kjør som MCP-server over stdio (for IDE-er) |
| `--non-interactive` | CI-modus (ingen spørsmål; leser fra miljø/flag) |
| `--json` | Maskinlesbar JSON-utgang (doctor, providers, osv.) |
| `--help`, `-h` | Vis kommando-spesifikk hjelp |
| `--version`, `-v` | Skriv ut installert versjon |
## Tilgjengelige API-endepunkter
| Endepunkt | Beskrivelse | Bruk For |
| -------------------------- | --------------------------------- | ---------------------------------- |
| `/v1/chat/completions` | Standard chat (alle leverandører) | Alle moderne verktøy |
| `/v1/responses` | Respons API (OpenAI-format) | Codex, agentiske arbeidsflyter |
| `/v1/completions` | Legacy tekstfullføringer | Eldre verktøy som bruker `prompt:` |
| `/v1/embeddings` | Tekstinnbøyninger | RAG, søk |
| `/v1/images/generations` | Bildegenerering | GPT-Image, Flux, osv. |
| `/v1/audio/speech` | Tekst-til-tale | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Tale-til-tekst | Deepgram, AssemblyAI |
Klar-til-å-lime eksempler med en tokenisert OmniRoute-URL:
```txt
Token eksempel: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standard OpenAI base: http://localhost:20128/v1
VS Code modeller: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
VS Code responser: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Feilsøking
| Feil | Årsak | Løsning |
| ------------------------------------------------- | ----------------------------- | ------------------------------------------------------- |
| `Connection refused` | OmniRoute kjører ikke | `omniroute serve` |
| `401 Unauthorized` | Feil API-nøkkel | Sjekk i `/dashboard/api-manager` |
| `No combo configured` | Ingen aktiv rutingkombinasjon | Sett opp i `/dashboard/combos` |
| CLI viser "not installed" | Binær ikke i PATH | Sjekk `which <command>` |
| Dashboard viser "not detected" etter installasjon | Cache utdaterte | Klikk "⟳ Oppdater deteksjon" i dashbordet |
| Gammel lenke `/dashboard/cli-tools` | Bokmerke før v3.8.6 | Automatisk omdirigert til `/dashboard/cli-code` (308) |
| Gammel lenke `/dashboard/agents` | Bokmerke før v3.8.6 | Automatisk omdirigert til `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,320 +0,0 @@
# CLI-INTEGRATIONS (Filipino)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "CLI Integrations — ituro ang anumang coding CLI sa OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# CLI Integrations
Ang OmniRoute ay nagdadala ng isang pamilya ng `setup-*` na mga utos na nagko-configure ng isang coding
CLI (Codex, Claude Code, OpenCode, Cline, …) upang gamitin ang OmniRoute bilang backend nito — kaya
ang tool ay nakikipag-usap sa **isang** endpoint at ang OmniRoute ay nagruruta sa tamang provider na may
auto-fallback. Bawat utos ay nagbabasa ng **live** na model catalog mula sa isang tumatakbong
OmniRoute (lokal o remote) at sumusulat ng sariling config file ng tool sa **iyong**
machine. Ang API key ay tinutukoy ng isang environment variable saan man ito sinusuportahan ng tool.
Ang mga utos na nagpapanatili ng tool-local na environment file ay nakasaad sa ibaba.
Mayroon ding isang generic na launcher — `omniroute run <target>` — na naglalabas
ng `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` o `gemini` na may tamang env na na-inject, nang hindi sumusulat ng anumang config. Ang mga target at kanilang
mga alias ay nagmumula sa canonical manifest `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), at ang `omniroute completion` ay nag-aalok ng
parehong manifest-derived na mga target na salita. Ang legacy per-tool launchers —
`omniroute launch` (Claude Code) at `omniroute launch-codex` (Codex) — ay nananatiling
available.
Ang provider onboarding ay available mula sa parehong lokal/remote na konteksto. Ang
API-first na mga utos sa ibaba ay pinapanatili ang pamamahala ng authentication na hiwalay mula sa mga credential ng provider at hindi kailanman nagpi-print ng credential sa structured output:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Para sa mga script, mas mainam ang `--credential-stdin` o `--credential-env`; ang `--credential`
ay pinanatili para sa kontroladong lokal na paggamit. Ang `providers remove` ay nangangailangan ng `--yes` sa isang
non-interactive terminal, at ang lahat ng limang utos ay iginagalang ang aktibong konteksto o ang
global `--base-url`/`--api-key` na mga opsyon.
Para sa one-time, hand-written na base setup ng dalawang pinakamayamang integrations, tingnan ang
per-tool deep dives:
- [Claude Code configuration](./CLAUDE-CODE-CONFIGURATION.md)
- [Codex CLI configuration](./CODEX-CLI-CONFIGURATION.md)
- [Remote Mode](./REMOTE-MODE.md) — patakbuhin ang isang remote OmniRoute (VPS / Tailnet) mula sa iyong laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ang OmniCopilot extension; maaari rin nitong patakbuhin ang mga
`setup-*` na mga utos para sa iyo mula sa loob ng editor
---
## Master table
Bawat utos ay iginagalang ang **aktibong konteksto** (itinakda gamit ang `omniroute connect`, tingnan ang
[Remote Mode](./REMOTE-MODE.md)) o tahasang `--remote <url> --api-key <key>` na mga flag.
"Local vs remote" sa ibaba ay nangangahulugang: walang mga flag na tinatarget nito ang `http://localhost:20128`;
sa `--remote` (o isang aktibong remote na konteksto) ay kinukuha nito ang catalog mula sa server na iyon at sumusulat ng config nang lokal.
| Command | Tool | What it writes | Key flags | Local vs remote |
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — isang profile bawat compatible na text model (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Pareho |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — isang profile bawat matched model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Pareho |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json``omniroute` provider na may bawat catalog model (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Pareho |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI mode) + nagpi-print ng mga setting ng VS Code extension | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Pareho |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + pinagsasama ang `kilocode.*` sa VS Code `settings.json` kung ito ay naroroon | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Pareho |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml``provider: openai` models, key via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Pareho |
| `omniroute setup-cursor` | Cursor | Wala — nagpi-print ng mga hakbang sa app (ang Cursor config ay opaque SQLite) | `--remote` `--api-key` `--only` `--port` | Pareho |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + itinatakda ang `roo-cline.autoImportSettingsPath` kung ang isang VS Code `settings.json` ay umiiral | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Pareho |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json``openai-compat` provider, key via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Pareho |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + nagpi-print ng env recipe | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Pareho |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + nagpi-print ng env recipe | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Pareho |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` array + `OMNIROUTE_API_KEY` sa `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Pareho |
| `omniroute run <target>` | Runtime launch (generic) | Wala — naglalabas ng `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` na may tamang env at args; ang Qwen at Gemini ay gumagamit ng isang pansamantalang isolated home | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Pareho |
| `omniroute launch` | Claude Code | Wala — naglalabas ng `claude` na may `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` na na-inject | `--remote` `--api-key` `--token` `--profile` `--port` | Pareho |
| `omniroute launch-codex` | OpenAI Codex CLI | Wala — naglalabas ng `codex` na may `omniroute` provider na na-inject sa pamamagitan ng `-c` na mga flag | `--remote` `--api-key` `--profile` (`-p`) `--port` | Pareho |
Mga tala sa mga flag (naka-verify sa source ng utos):
- `--remote <url>` — kunin ang catalog mula sa isang remote OmniRoute (pinapalitan ang `--port`
at ang aktibong konteksto). Ang `--api-key <key>` ay nagbibigay ng credential para sa server na iyon
(default sa `OMNIROUTE_API_KEY` env var, o ang token ng aktibong konteksto).
- `--only <patterns>` — mga substring na pinaghihiwalay ng kuwit; panatilihin lamang ang mga model ID na tumutugma
(hal. `--only glm,kimi`). Available sa `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — i-print nang eksakto kung ano ang isusulat nang hindi hinahawakan ang
filesystem. Available sa bawat `setup-*` na utos **maliban** sa `setup-cursor`
(na hindi kailanman sumusulat ng file).
- `--model <id>` — kinakailangan (o pinili nang interactive) para sa mga tool na walang
model auto-discovery: Cline, Kilo, Roo, Goose, Qwen, Aider. Ang mga tool na iyon
ay tumatanggap din ng `--yes` para sa non-interactive na mga run (na nangangailangan ng `--model`).
Ang `setup-opencode` ay tumatanggap ng `--model` upang itakda ang default na top-level model.
- `--model <id>` sa `omniroute run` ay sumusunod sa wiring ng manifest per-target
(`bin/cli/cli-manifest.mjs`): **aider** ay tumatanggap ng `--model openai/<id>` at
**opencode** `--model omniroute/<id>` (ang prefix ay idinadagdag lamang kapag ang id
ay hindi na nagdadala nito); **qwen** at **gemini** ay tumatanggap ng id nang buo;
**claude** ay nakukuha ito sa pamamagitan ng `ANTHROPIC_MODEL`, **goose** sa pamamagitan ng `GOOSE_MODEL`, at
**codex** sa pamamagitan ng `-c model_providers.omniroute.*` na mga args. **Qwen ang tanging run
target na mahigpit na nangangailangan ng `--model`** — ang `omniroute run qwen` nang walang ito ay lumalabas
`2` na may tahasang error.
- `--port <port>` — lokal na OmniRoute port (default `20128`, hindi pinapansin kapag nakaset ang `--remote`).
Present sa lahat ng `setup-*` at parehong launchers.
- Ang mga exit code ng `omniroute run`: ang sariling exit code ng child CLI ay naipapasa
nang buo; `2` = invalid arguments (unsupported target, nawawalang kinakailangang
`--model`, container guard); `127` = ang target binary ay wala sa `PATH`;
`130`/`143`/`129` kapag ang launch ay natapos ng `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = iba pang runtime launch failure.
- Ang dalawang launchers (`launch`, `launch-codex`) ay tumatanggap ng `--profile <name>` upang pumili
ng isang profile na isinulat ng `setup-claude` / `setup-codex`, kasama ang pass-through args para sa
underlying `claude` / `codex` binary.
Ang interactive picker ay ibinabahagi rin ng mga setup recipe:
```bash
# Pumili mula sa aktibong lokal o remote na model catalog at i-configure ang target.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
Ang `configure` ay kasalukuyang nagde-delegate sa mga nasubok na recipe para sa `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, at `kilo`. Ang mga entry na tanging para sa IDE,
MITM, at guide-only ay nananatiling tahasang `setup-*`/manual flows at hindi ipinapakita bilang mga launchable na target.
> Ang `setup-opencode` ay ang **magaan na openai-compatible** na OpenCode integration.
> Mayroon ding mas mayamang plugin integration — `omniroute setup opencode` — na
> nag-i-install ng `@omniroute/opencode-plugin`. Sila ay magkaibang mga utos; ang talahanayan
> sa itaas ay nagdodokumento ng `setup-opencode`.
---
## Lokal na paggamit
Sa OmniRoute na tumatakbo sa `localhost:20128`, patakbuhin lamang ang setup command para sa iyong tool. Ang katalogo ay kinukuha mula sa lokal na server.
```bash
# Codex: magsulat ng profile para sa bawat tugmang modelo sa ~/.codex/
omniroute setup-codex
codex --profile glm52 # gamitin ang nabuo na profile
# Claude Code: magsulat ng mga profile bawat modelo, pagkatapos ay ilunsad ang isa
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: magsulat ng provider na katugma ng openai na may lahat ng modelo ng katalogo
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # tinutukoy sa pamamagitan ng {env:OMNIROUTE_API_KEY}, hindi kailanman sa disk
opencode -m omniroute/glm/glm-5.2 "..."
# Mga tool na walang auto-discovery ay nangangailangan ng tiyak na modelo:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Preview nang hindi sumusulat ng anuman:
omniroute setup-continue --dry-run
```
Ilunsad nang hindi sumusulat ng anumang config (env-injection lamang):
```bash
omniroute launch # Claude Code → lokal na OmniRoute
omniroute launch-codex # Codex CLI → lokal na OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Tiyak na landas ng command: ipasa ang anumang sumusunod pagkatapos ng --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Malalayong paggamit
Ituro ang anumang setup command sa isang malalayong OmniRoute gamit ang `--remote` + `--api-key`. Ang katalogo ay kinukuha mula sa malayo; ang config ay isinusulat sa iyong lokal na makina.
```bash
# OpenCode laban sa isang malalayong VPS, panatilihin lamang ang mga modelo ng glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # i-export muna ang OMNIROUTE_API_KEY
# Mga profile ng Codex mula sa isang malalayong katalogo
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Ilunsad ang isang CLI nang direkta laban sa malayo
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Sa halip na ipasa ang `--remote`/`--api-key` sa bawat pagkakataon, mag-log in nang isang beses at hayaan ang **aktibong konteksto** na ibigay ang mga ito nang awtomatiko:
```bash
omniroute connect 192.168.0.15 # nagmimina ng isang scoped token, nag-iimbak ng konteksto
omniroute setup-codex # ← ngayon ay gumagamit ng malalayong katalogo
omniroute setup-opencode # ← pareho
omniroute launch # ← Claude Code laban sa malayo
```
Tingnan ang [Remote Mode](./REMOTE-MODE.md) para sa mga konteksto, saklaw, at pamamahala ng token.
---
## Mga konbensyon ng Base URL (na nais ng mga tool ang `/v1`)
Ipinapakita ng OmniRoute ang OpenAI surface sa `/v1`, ang Anthropic surface sa root, at isang katutubong Gemini surface sa `/v1beta`. Ang bawat integrasyon ay naka-wire sa anyo na inaasahan ng kanyang tool (naka-verify sa pinagmulan ng command):
| Integrasyon | Base URL na isinulat | `/v1`? |
| -------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | root | Hindi — Idinadagdag ng Cline ang `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | root | Hindi — Idinadagdag ng Goose ang landas |
| `setup-aider` (`OPENAI_API_BASE`) | root | Hindi — Idinadagdag ng LiteLLM ang `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | kasama ang `/v1` | Oo |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Hindi — Idinadagdag ng Claude Code ang `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | kasama ang `/v1` | Oo |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | kasama ang `/v1` | Oo |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Hindi — idinadagdag ng SDK ang `/v1beta/models/…` |
---
## Panatilihin ang mga katutubong deps sa pag-update: `--include=optional`
Kapag nag-update ka gamit ang `omniroute update` (pagkatapos kumpirmahin, o gamit ang `--apply`),
ang OmniRoute ay nagpapatakbo ng install na may `--include=optional` na nakabake:
```bash
npm install -g omniroute@latest --include=optional
```
Ito ay **hindi** isang flag na ipapasa mo sa `omniroute update` — ito ay palaging inilalapat ng
updater. Tinitiyak nito na ang `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, ang LLMLingua SLM stack) ay makakaligtas sa update kahit na ang iyong npm config
ay may `omit=optional` na nakaset, na kung hindi ay tahimik na aalisin ang katutubong SQLite
driver at OS-keyring binding. Upang i-preview ang eksaktong command nang hindi nag-aaplay:
```bash
omniroute update --dry-run
# [DRY RUN] Gagawin: npm install -g omniroute@latest --include=optional
```
Iba pang mga flag ng `omniroute update` (naka-verify sa source): `--check` (exit 1 kung
luma na), `--apply` (install nang walang prompting), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI sa pamamagitan ng `omniroute run gemini`
Ang kontrata ay na-verify laban sa `@google/gemini-cli` 0.50.0: ang CLI ay iginagalang
`GOOGLE_GEMINI_BASE_URL` at naglalabas ng `POST /v1beta/models/<model>:generateContent`
(at `:streamGenerateContent?alt=sse`) laban dito — eksaktong ibabaw ng Gemini ng OmniRoute
(`/v1beta`). Ang `omniroute run gemini` ay awtomatikong kumokonekta dito:
- `GOOGLE_GEMINI_BASE_URL` → ang aktibong base URL ng OmniRoute (root, walang `/v1`);
- `GEMINI_API_KEY` → ang na-resolve na credential ng OmniRoute (option/env/context);
- isang **panandaliang nakahiwalay na `GEMINI_CLI_HOME`** na ang `.gemini/settings.json`
ay pumipili ng `gemini-api-key` na auth, kaya ang naka-imbak na Google OAuth session (Code Assist)
ay hindi kailanman papalitan ang OmniRoute-directed launch — tinanggal pagkatapos ng exit;
- **kalinisan ng env**: ang child env ay nilinis mula sa `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` at `GOOGLE_GENAI_USE_GCA` (na magreredirig
ng auth sa Vertex/Code Assist), at ang `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` ay
nakaset bilang fallback — ang iba pang mga target ng `run` ay nakakakuha ng parehong
paggamot para sa kanilang sariling mga conflicting variables;
- `--model <id>` injection mula sa `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Ang workspace-trust guard ng Gemini ay nananatiling naaangkop sa headless mode — ipasa
`--skip-trust` (o pagkatiwalaan ang direktoryo nang interaktibo) sa iyong sarili; ang launcher
ay sinadyang hindi ito nilalampasan. Ang launcher na ito ay naiiba mula sa **ACP
registration** (`src/lib/acp/registry.ts`, `gemini --acp`), na nananatiling ang
agent-protocol integration para sa `/dashboard/acp-agents`.
---
## Tunay na smoke sweep (opt-in)
Ang deterministic launch-plan regression ay tumatakbo sa CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Upang i-validate ang TUNAY na binaries laban sa isang TUNAY
na OmniRoute server, mayroong opt-in harness sa
`tests/integration/upstream-cli-smoke.int.test.ts`. Hindi ito tumatakbo nang awtomatiko
(bawat sub-test ay lumilipat maliban kung `RUN_CLI_SMOKE=1`), ipinapasa ang credential sa pamamagitan ng env-var
NAME (hindi kailanman sa pamamagitan ng value), itinatago ang mga key-shaped na string mula sa anumang naitalang output, lumilipat
ng mga target na ang binary ay hindi naka-install, at nag-uuri ng mga pagkabigo bilang
auth / upstream / config sa halip na isang bare boolean:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opsyonal: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` ay naglilimita sa sweep;
`OMNIROUTE_SMOKE_TIMEOUT_MS` ay nag-ooverride sa 120s per-target timeout.
---
## Tingnan din
- [Claude Code configuration](./CLAUDE-CODE-CONFIGURATION.md) — ang mas malalim na gabay sa Claude Code
- [Codex CLI configuration](./CODEX-CLI-CONFIGURATION.md) — ang isang beses na `[model_providers.omniroute]` base setup
- [Remote Mode](./REMOTE-MODE.md) — mga konteksto, nakatuon na access tokens, pagmamaneho ng isang remote server
- [CLI Tools reference](../reference/CLI-TOOLS.md) — ang buong katalogo ng mga suportadong tool + mga pahina ng dashboard
- [Setup Guide](./SETUP_GUIDE.md) — mga pamamaraan ng pag-install at onboarding sa unang takbo

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,310 +1,203 @@
# CLI-INTEGRATIONS (Polski)
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integracje CLI — skieruj dowolne CLI kodujące na OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
title: "Integracje CLI — skieruj dowolne CLI do kodowania na OmniRoute"
version: 3.8.40
lastUpdated: 2026-06-28
---
# Integracje CLI
OmniRoute dostarcza zestaw poleceń `setup-*`, które konfigurować CLI kodujące (Codex, Claude Code, OpenCode, Cline, …) do używania OmniRoute jako swojego backendu — dzięki czemu narzędzie komunikuje się z **jednym** punktem końcowym, a OmniRoute kieruje do odpowiedniego dostawcy z automatycznym przełączaniem. Każde polecenie odczytuje **na żywo** katalog modeli z działającego OmniRoute (lokalnego lub zdalnego) i zapisuje własny plik konfiguracyjny narzędzia na **twojej** maszynie. Klucz API jest odwoływany przez zmienną środowiskową wszędzie tam, gdzie narzędzie to wspiera. Polecenia, które utrwalają lokalny plik środowiskowy narzędzia, są wymienione poniżej.
OmniRoute dostarcza rodzinę poleceń `setup-*`, które konfigurują CLI do
kodowania (Codex, Claude Code, OpenCode, Cline, …) tak, by używało OmniRoute jako backendu —
narzędzie rozmawia z **jednym** endpointem, a OmniRoute kieruje ruch do właściwego providera z
auto-fallbackiem. Każde polecenie odczytuje **aktualny** katalog modeli z działającego
OmniRoute (lokalnego lub zdalnego) i zapisuje plik konfiguracyjny narzędzia na **Twojej**
maszynie. Klucz API jest odwoływany przez zmienną środowiskową wszędzie tam, gdzie narzędzie
to obsługuje. Polecenia zapisujące lokalny plik środowiska narzędzia są opisane poniżej.
Dostępny jest również ogólny launcher — `omniroute run <target>` — który uruchamia `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` lub `gemini` z odpowiednim środowiskiem wstrzykniętym, bez zapisywania jakiejkolwiek konfiguracji. Cele i ich aliasy pochodzą z kanonicznego manifestu `bin/cli/cli-manifest.mjs`
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
`open-code`, `qwen-code`, `gemini-cli`), a `omniroute completion` oferuje
te same słowa docelowe pochodzące z manifestu. Starsze launchery per-narzędzie —
`omniroute launch` (Claude Code) i `omniroute launch-codex` (Codex) — pozostają
dostępne.
Są też dwa launchery`omniroute launch` (Claude Code) oraz
`omniroute launch-codex` (Codex) — które uruchamiają CLI z wstrzykniętym właściwym env,
bez zapisywania jakiejkolwiek konfiguracji.
Onboarding dostawcy jest dostępny z tego samego kontekstu lokalnego/zdalnego. Poniższe polecenia API-first utrzymują uwierzytelnianie zarządzania oddzielnie od poświadczeń dostawcy i nigdy nie drukują poświadczenia w ustrukturyzowanym wyjściu:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Dla skryptów, preferuj `--credential-stdin` lub `--credential-env`; `--credential`
jest zachowane do kontrolowanego użytku lokalnego. `providers remove` wymaga `--yes` na
terminalu bez interakcji, a wszystkie pięć poleceń honoruje aktywny kontekst lub globalne opcje `--base-url`/`--api-key`.
Dla jednorazowej, ręcznie napisanej podstawowej konfiguracji dwóch najbogatszych integracji, zobacz
dogłębne analizy per-narzędzie:
Jednorazową, ręczną konfigurację bazową dwóch najbogatszych integracji znajdziesz w
szczegółowych przewodnikach per narzędzie:
- [Konfiguracja Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Konfiguracja CLI Codex](./CODEX-CLI-CONFIGURATION.md)
- [Tryb zdalny](./REMOTE-MODE.md) — prowadź zdalne OmniRoute (VPS / Tailnet) z laptopa
- [Czat Copilot w VS Code](./VSCODE-COPILOT.md) — rozszerzenie OmniCopilot; może również uruchamiać te
polecenia `setup-*` za Ciebie z wnętrza edytora
- [Konfiguracja Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Tryb zdalny](./REMOTE-MODE.md) — steruj zdalnym OmniRoute (VPS / Tailnet) z laptopa
---
## Tabela główna
Każde polecenie honoruje **aktywny kontekst** (ustawiony za pomocą `omniroute connect`, zobacz
[Tryb zdalny](./REMOTE-MODE.md)) lub explicite flagi `--remote <url> --api-key <key>`.
"Lokalne vs zdalne" poniżej oznacza: bez flag celuje w `http://localhost:20128`;
z `--remote` (lub aktywnym zdalnym kontekstem) pobiera katalog z tego
Każde polecenie respektuje **aktywny kontekst** (ustawiany przez `omniroute connect`, zob.
[Tryb zdalny](./REMOTE-MODE.md)) albo jawne flagi `--remote <url> --api-key <key>`.
Lokalnie vs zdalnie” poniżej oznacza: bez flag celuje w `http://localhost:20128`;
z `--remote` (lub aktywnym kontekstem zdalnym) pobiera katalog z tego
serwera i zapisuje konfigurację lokalnie.
| Polecenie | Narzędzie | Co zapisuje | Kluczowe flagi | Lokalne vs zdalne |
| -------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — jeden profil na każdy kompatybilny model tekstowy (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Oba |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — jeden profil na każdy dopasowany model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Oba |
| `omniroute setup-opencode` | OpenCode (kompatybilny z openai) | `~/.config/opencode/opencode.json`dostawca `omniroute` z każdym modelem katalogu (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Oba |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (tryb CLI) + drukuje ustawienia rozszerzenia VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Oba |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + łączy `kilocode.*` z `settings.json` VS Code, jeśli jest obecny | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Oba |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modele `provider: openai`, klucz przez `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-cursor` | Cursor | Nic — drukuje kroki w aplikacji (konfiguracja Cursor jest nieprzezroczysta SQLite) | `--remote` `--api-key` `--only` `--port` | Oba |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + ustawia `roo-cline.autoImportSettingsPath`, jeśli istnieje `settings.json` w VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Oba |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json`dostawca `openai-compat`, klucz przez `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + drukuje przepis środowiskowy | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + drukuje przepis środowiskowy | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — tablica `V4 modelProviders.openai` + `OMNIROUTE_API_KEY` w `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Oba |
| `omniroute run <target>` | Uruchomienie w czasie rzeczywistym (ogólne) | Nic — uruchamia `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` z odpowiednim środowiskiem i argumentami; Qwen i Gemini używają tymczasowego izolowanego katalogu | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Oba |
| `omniroute launch` | Claude Code | Nic — uruchamia `claude` z wstrzykniętymi `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` | `--remote` `--api-key` `--token` `--profile` `--port` | Oba |
| `omniroute launch-codex` | OpenAI Codex CLI | Nic — uruchamia `codex` z wstrzykniętym dostawcą `omniroute` przez flagi `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Oba |
| Polecenie | Narzędzie | Co zapisuje | Kluczowe flagi | Lokalnie vs zdalnie |
| -------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — jeden profil na kompatybilny model tekstowy (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Oba |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — jeden profil na dopasowany model (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Oba |
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json`provider `omniroute` z każdym modelem z katalogu (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Oba |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (tryb CLI) + wypisuje ustawienia rozszerzenia VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Oba |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + scala `kilocode.*` do VS Code `settings.json`, jeśli istnieje | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Oba |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modele `provider: openai`, klucz przez `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-cursor` | Cursor | Nic — wypisuje kroki w aplikacji (konfiguracja Cursor to nieprzezroczysty SQLite) | `--remote` `--api-key` `--only` `--port` | Oba |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dokument importu) + ustawia `roo-cline.autoImportSettingsPath`, jeśli istnieje VS Code `settings.json` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Oba |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json`provider `openai-compat`, klucz przez `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + wypisuje przepis env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + wypisuje przepis env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Oba |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — tablica V4 `modelProviders.openai` + `OMNIROUTE_API_KEY` w `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Oba |
| `omniroute launch` | Claude Code | Nic — uruchamia `claude` z wstrzykniętymi `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` | `--remote` `--api-key` `--token` `--profile` `--port` | Oba |
| `omniroute launch-codex` | OpenAI Codex CLI | Nic — uruchamia `codex` z providerem `omniroute` wstrzykniętym przez flagi `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Oba |
Uwagi dotyczące flag (zweryfikowane w źródle polecenia):
Uwagi o flagach (zweryfikowane w źródle poleceń):
- `--remote <url>` — pobiera katalog z zdalnego OmniRoute (nadpisuje `--port`
i aktywny kontekst). `--api-key <key>` dostarcza poświadczenie dla tego
serwera (domyślnie do zmiennej środowiskowej `OMNIROUTE_API_KEY`, lub tokenu aktywnego kontekstu).
- `--only <patterns>`ciągi oddzielone przecinkami; zachowuje tylko identyfikatory modeli, które pasują
- `--remote <url>` — pobierz katalog ze zdalnego OmniRoute (nadpisuje `--port`
i aktywny kontekst). `--api-key <key>` podaje poświadczenie dla tego
serwera (domyślnie zmienna env `OMNIROUTE_API_KEY` albo token aktywnego kontekstu).
- `--only <patterns>`podłańcuchy rozdzielone przecinkami; zachowaj tylko ID modeli, które pasują
(np. `--only glm,kimi`). Dostępne w `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run`drukuje dokładnie to, co byłoby zapisane, bez dotykania
- `--dry-run`wypisz dokładnie to, co zostałoby zapisane, bez ruszania
systemu plików. Dostępne w każdym poleceniu `setup-*` **oprócz** `setup-cursor`
(które nigdy nie zapisuje pliku).
- `--model <id>` — wymagane (lub wybierane interaktywnie) dla narzędzi, które nie mają
automatycznego odkrywania modeli: Cline, Kilo, Roo, Goose, Qwen, Aider. Te narzędzia
akceptują równi`--yes` dla uruchomień bez interakcji (co wtedy wymaga `--model`).
`setup-opencode` przyjmuje `--model`, aby ustawić domyślny model na najwyższym poziomie.
- `--model <id>` w `omniroute run` podąża za okablowaniem per-target manifestu
(`bin/cli/cli-manifest.mjs`): **aider** otrzymuje `--model openai/<id>` i
**opencode** `--model omniroute/<id>` (prefiks jest dodawany tylko wtedy, gdy id
go nie zawiera); **qwen** i **gemini** otrzymują id dosłownie;
**claude** otrzymuje go przez `ANTHROPIC_MODEL`, **goose** przez `GOOSE_MODEL`, a
**codex** przez argumenty `-c model_providers.omniroute.*`. **Qwen jest jedynym celem uruchomienia, który wymaga `--model`**`omniroute run qwen` bez niego kończy się
`2` z wyraźnym błędem.
- `--port <port>` — lokalny port OmniRoute (domyślnie `20128`, ignorowany, gdy ustawione `--remote`).
- `--model <id>` — wymagane (lub wybierane interaktywnie) dla narzędzi bez
auto-odkrywania modeli: Cline, Kilo, Roo, Goose, Qwen, Aider. Te narzędzia
przyjmują t`--yes` do uruchomień nieinteraktywnych (wtedy wymaga `--model`).
`setup-opencode` przyjmuje `--model`, by ustawić domyślny model najwyższego poziomu.
- `--port <port>` — lokalny port OmniRoute (domyślnie `20128`, ignorowany gdy ustawione `--remote`).
Obecne we wszystkich `setup-*` i obu launcherach.
- Kody wyjścia `omniroute run`: kod wyjścia własnego CLI potomnego jest propagowany
dosłownie; `2` = nieprawidłowe argumenty (nieobsługiwany cel, brak wymaganych
`--model`, ochrona kontenera); `127` = docelowy binarny plik nie znajduje się w `PATH`;
`130`/`143`/`129` gdy uruchomienie kończy się przez `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = inny błąd uruchomienia.
- Dwa launchery (`launch`, `launch-codex`) akceptują `--profile <name>` do wyboru
profilu zapisanego przez `setup-claude` / `setup-codex`, plus argumenty przekazywane do
podstawowego binarnego pliku `claude` / `codex`.
- Oba launchery (`launch`, `launch-codex`) przyjmują `--profile <name>`, by wybrać
profil zapisany przez `setup-claude` / `setup-codex`, plus argumenty przekazywane do
leżącego poniżej binarium `claude` / `codex`.
Interaktywny wybieracz jest również współdzielony przez przepisy konfiguracyjne:
```bash
# Wybierz z aktywnego lokalnego lub zdalnego katalogu modeli i skonfiguruj cel.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` obecnie deleguje do przetestowanych przepisów dla `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue` i `kilo`. Wpisy katalogu tylko dla IDE,
MITM i tylko przewodniki pozostają explicite `setup-*`/ręcznymi przepływami i
nie są prezentowane jako cele do uruchomienia.
> `setup-opencode` to **lekkie, kompatybilne z openai** zintegrowanie OpenCode.
> Istnieje również bogatsza integracja wtyczki — `omniroute setup opencode` — która
> instaluje `@omniroute/opencode-plugin`. To różne polecenia; powyższa tabela
> dokumentuje `setup-opencode`.
> `setup-opencode` to **lekka, openai-compatible** integracja OpenCode.
> Jest też bogatsza integracja wtyczkowa — `omniroute setup opencode` — która
> instaluje `@omniroute/opencode-plugin`. To różne polecenia; tabela
> powyżej dokumentuje `setup-opencode`.
---
## Użycie lokalne
Z OmniRoute działającym na `localhost:20128`, wystarczy uruchomić polecenie konfiguracji dla swojego narzędzia. Katalog jest pobierany z lokalnego serwera.
Przy OmniRoute działającym na `localhost:20128` wystarczy uruchomić polecenie setup dla swojego
narzędzia. Katalog jest pobierany z lokalnego serwera.
```bash
# Codex: zapisz profil dla dopasowanego modelu w ~/.codex/
# Codex: write a profile per matched model into ~/.codex/
omniroute setup-codex
codex --profile glm52 # użyj wygenerowanego profilu
codex --profile glm52 # use a generated profile
# Claude Code: zapisz profile dla każdego modelu, a następnie uruchom jeden
# Claude Code: write per-model profiles, then launch one
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: zapisz dostawcę zgodnego z openai ze wszystkimi modelami katalogu
# OpenCode: write the openai-compatible provider with all catalog models
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # odniesienie przez {env:OMNIROUTE_API_KEY}, nigdy na dysku
export OMNIROUTE_API_KEY=sk-... # referenced via {env:OMNIROUTE_API_KEY}, never on disk
opencode -m omniroute/glm/glm-5.2 "..."
# Narzędzia bez automatycznego wykrywania potrzebują wyraźnego modelu:
# Tools without auto-discovery need an explicit model:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Podgląd bez zapisywania czegokolwiek:
# Preview without writing anything:
omniroute setup-continue --dry-run
```
Uruchom bez zapisywania jakiejkolwiek konfiguracji (tylko wstrzykiwanie zmiennych środowiskowych):
Uruchomienie bez zapisywania jakiejkolwiek konfiguracji (tylko wstrzykiwanie env):
```bash
omniroute launch # Claude Code → lokalny OmniRoute
omniroute launch-codex # Codex CLI → lokalny OmniRoute
omniroute launch # Claude Code → local OmniRoute
omniroute launch-codex # Codex CLI → local OmniRoute
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
# Wyraźna ścieżka polecenia: przekaż wszystko, co przychodzi po --
omniroute run claude -- --print-system-prompt "review this diff"
```
---
## Użycie zdalne
Wskaź dowolne polecenie konfiguracji na zdalny OmniRoute z `--remote` + `--api-key`. Katalog jest pobierany zdalnie; konfiguracja jest zapisywana na twoim lokalnym komputerze.
Skieruj dowolne polecenie setup na zdalne OmniRoute przez `--remote` + `--api-key`.
Katalog jest pobierany ze zdalnego serwera; konfiguracja jest zapisywana na Twojej lokalnej maszynie.
```bash
# OpenCode przeciwko zdalnemu VPS, zachowaj tylko modele glm/kimi
# OpenCode against a remote VPS, keep only glm/kimi models
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # najpierw wyeksportuj OMNIROUTE_API_KEY
opencode -m omniroute/glm/glm-5.2 "..." # export OMNIROUTE_API_KEY first
# Profile Codex z zdalnego katalogu
# Codex profiles from a remote catalog
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Uruchom CLI bezpośrednio przeciwko zdalnemu
# Launch a CLI straight against the remote
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Zamiast przekazywać `--remote`/`--api-key` za każdym razem, zaloguj się raz i pozwól, aby **aktywny kontekst** dostarczył je automatycznie:
Zamiast podawać `--remote`/`--api-key` za każdym razem, zaloguj się raz i pozwól, by
**aktywny kontekst** dostarczał je automatycznie:
```bash
omniroute connect 192.168.0.15 # generuje token o ograniczonym zakresie, przechowuje kontekst
omniroute setup-codex # ← teraz używa zdalnego katalogu
omniroute setup-opencode # ← to samo
omniroute launch # ← Claude Code przeciwko zdalnemu
omniroute connect 192.168.0.15 # mints a scoped token, stores the context
omniroute setup-codex # ← now uses the remote catalog
omniroute setup-opencode # ← same
omniroute launch # ← Claude Code against the remote
```
Zobacz [Tryb zdalny](./REMOTE-MODE.md) dla kontekstów, zakresów i zarządzania tokenami.
Zobacz [Tryb zdalny](./REMOTE-MODE.md) o kontekstach, zakresach i zarządzaniu tokenami.
---
## Konwencje dotyczące podstawowego URL (które narzędzia chcą `/v1`)
## Konwencje Base URL (które narzędzia chcą `/v1`)
OmniRoute udostępnia interfejs OpenAI pod `/v1`, interfejs Anthropic w katalogu głównym, a natywny interfejs Gemini pod `/v1beta`. Każda integracja jest podłączona do formy, której oczekuje jej narzędzie (zweryfikowane w źródle polecenia):
OmniRoute udostępnia powierzchnię OpenAI pod `/v1`, powierzchnię Anthropic w root,
oraz natywną powierzchnię Gemini pod `/v1beta`. Każda integracja jest podpięta w formie, jakiej
oczekuje jej narzędzie (zweryfikowane w źródle poleceń):
| Integracja | Podstawowy URL zapisany | `/v1`? |
| -------------------------------------------------------------------------- | ----------------------- | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | katalog główny | Nie — Cline dodaje `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | katalog główny | Nie — Goose dodaje ścieżkę |
| `setup-aider` (`OPENAI_API_BASE`) | katalog główny | Nie — LiteLLM dodaje `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | z `/v1` | Tak |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | katalog główny | Nie — Claude Code dodaje `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | z `/v1` | Tak |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | z `/v1` | Tak |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | katalog główny | Nie — SDK dodaje `/v1beta/models/…` |
| Integracja | Zapisywany Base URL | `/v1`? |
| -------------------------------------------------------------------------- | ------------------- | ------------------------------------------- |
| `setup-cline` (`openAiBaseUrl`) | root | Nie — Cline dopina `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | root | Nie — Goose dopina ścieżkę |
| `setup-aider` (`OPENAI_API_BASE`) | root | Nie — LiteLLM dopina `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | z `/v1` | Tak |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Nie — Claude Code dopina `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | z `/v1` | Tak |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | z `/v1` | Tak |
---
## Utrzymywanie natywnych zależności podczas aktualizacji: `--include=optional`
## Zachowanie natywnych zależności przy aktualizacji: `--include=optional`
Kiedy aktualizujesz za pomocą `omniroute update` (po potwierdzeniu lub z `--apply`),
OmniRoute uruchamia instalację z `--include=optional` wbudowanym:
Gdy aktualizujesz przez `omniroute update` (po potwierdzeniu albo z `--apply`),
OmniRoute uruchamia instalację z wbudowanym `--include=optional`:
```bash
npm install -g omniroute@latest --include=optional
```
To **nie** jest flaga, którą przekazujesz do `omniroute update`jest zawsze stosowana przez
aktualizator. Gwarantuje, że `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, stos LLMLingua SLM) przetrwają aktualizację, nawet jeśli Twoja konfiguracja npm
ma ustawione `omit=optional`, co w przeciwnym razie cicho usunęłoby natywny
sterownik SQLite i powiązanie z OS-keyring. Aby zobaczyć dokładne polecenie bez zastosowania:
To **nie** jest flaga, którą przekazujesz do `omniroute update`updater zawsze stosuje.
Gwarantuje, że `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, stos SLM LLMLingua) przetrwają aktualizację nawet gdy w konfiguracji npm
masz `omit=optional`, co w przeciwnym razie po cichu usunęłoby natywny sterownik SQLite
i powiązanie z keyringiem OS. Podgląd dokładnego polecenia bez zastosowania:
```bash
omniroute update --dry-run
# [DRY RUN] Wykonałoby: npm install -g omniroute@latest --include=optional
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
```
Inne flagi `omniroute update` (zweryfikowane w źródle): `--check` (wyjdź 1, jeśli
nieaktualne), `--apply` (zainstaluj bez pytania), `--changelog`, `--no-backup`,
Inne flagi `omniroute update` (zweryfikowane w źródle): `--check` (exit 1, jeśli
nieaktualne), `--apply` (instalacja bez monitu), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI za pomocą `omniroute run gemini`
## Zobacz też
Kontrakt zweryfikowany w stosunku do `@google/gemini-cli` 0.50.0: CLI respektuje
`GOOGLE_GEMINI_BASE_URL` i wydaje `POST /v1beta/models/<model>:generateContent`
(i `:streamGenerateContent?alt=sse`) przeciwko temu — dokładnie jak natywna
powierzchnia Gemini OmniRoute (`/v1beta`). `omniroute run gemini` automatycznie to
podłącza:
- `GOOGLE_GEMINI_BASE_URL` → aktywne URL bazowe OmniRoute (root, bez `/v1`);
- `GEMINI_API_KEY` → rozwiązany kredencja OmniRoute (opcjonalne/środowisko/kontekst);
- **tymczasowy izolowany `GEMINI_CLI_HOME`**, którego `.gemini/settings.json`
wybiera autoryzację `gemini-api-key`, więc przechowywana sesja Google OAuth (Code Assist)
nigdy nie nadpisuje uruchomienia kierowanego przez OmniRoute — usunięte po wyjściu;
- **higiena środowiska**: środowisko potomne jest oczyszczane z `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` i `GOOGLE_GENAI_USE_GCA` (które przekierowywałyby
autoryzację do Vertex/Code Assist), a `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` jest
ustawione jako dodatkowe zabezpieczenie — inne cele `run` otrzymują to samo
traktowanie dla swoich własnych konfliktujących zmiennych;
- wstrzyknięcie `--model <id>` z `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
Ochrona przed zaufaniem w przestrzeni roboczej Gemini nadal obowiązuje w trybie headless — przekaż
`--skip-trust` (lub zaufaj katalogowi interaktywnie) sam; launcher
celowo tego nie omija. Ten launcher jest odrębny od **rejestracji ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), która pozostaje integracją protokołu agenta dla
`/dashboard/acp-agents`.
---
## Prawdziwe testy dymne (opcja)
Deterministyczne uruchomienia planu regresji w CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Aby zweryfikować PRAWIDŁOWE binaria przeciwko PRAWIDŁOWEMU
serwerowi OmniRoute, istnieje opcjonalny zestaw testów w
`tests/integration/upstream-cli-smoke.int.test.ts`. Nigdy nie uruchamia się automatycznie
(każdy podtest pomija, chyba że `RUN_CLI_SMOKE=1`), przekazuje kredencję przez zmienną środowiskową
NAME (nigdy przez wartość), redaguje ciągi w kształcie klucza z jakiegokolwiek zarejestrowanego
wyjścia, pomija cele, których binaria nie są zainstalowane, i klasyfikuje błędy jako
autoryzacja / upstream / konfiguracja zamiast prostego boolean:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opcjonalnie: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` ogranicza zakres;
`OMNIROUTE_SMOKE_TIMEOUT_MS` nadpisuje limit czasu 120s na cel.
## Zobacz także
- [Konfiguracja Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — głębszy przewodnik po Claude Code
- [Konfiguracja Codex CLI](./CODEX-CLI-CONFIGURATION.md) — jednorazowa konfiguracja podstawowa `[model_providers.omniroute]`
- [Tryb zdalny](./REMOTE-MODE.md) — konteksty, tokeny dostępu o ograniczonym zakresie, sterowanie zdalnym serwerem
- [Referencje narzędzi CLI](../reference/CLI-TOOLS.md) — pełny katalog obsługiwanych narzędzi + strony pulpitu
- [Przewodnik instalacji](./SETUP_GUIDE.md) — metody instalacji i wprowadzenie przy pierwszym uruchomieniu
- [Konfiguracja Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — głębszy przewodnik Claude Code
- [Konfiguracja Codex CLI](./CODEX-CLI-CONFIGURATION.md) — jednorazowa konfiguracja bazowa `[model_providers.omniroute]`
- [Tryb zdalny](./REMOTE-MODE.md) — konteksty, tokeny dostępu ze scope, sterowanie zdalnym serwerem
- [Referencja narzędzi CLI](../reference/CLI-TOOLS.md) — pełny katalog obsługiwanych narzędzi + strony dashboardu
- [Przewodnik instalacji](./SETUP_GUIDE.md) — metody instalacji i onboarding przy pierwszym uruchomieniu

View File

@@ -1,789 +0,0 @@
# CLI-TOOLS (Polski)
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
---
---
title: "Narzędzia CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Narzędzia CLI — OmniRoute
Ostatnia aktualizacja: 2026-08-18
OmniRoute integruje się z trzema kategoriami narzędzi CLI rozłożonymi na trzech dedykowanych stronach pulpitu:
| Strona | Trasa | Koncepcja | Liczba |
| -------------- | ----------------------- | ------------------------------------------------------------------------------------------- | -------------- |
| **Kod CLI** | `/dashboard/cli-code` | Narzędzia do kodowania, które wskazujesz na OmniRoute (Klient → CLI → OmniRoute → Dostawca) | 26 |
| **Agenci CLI** | `/dashboard/cli-agents` | Autonomiczne agenty, które wskazujesz na OmniRoute (ta sama ścieżka, szerszy zakres) | 8 |
| **Agenci ACP** | `/dashboard/acp-agents` | CLIs, które OmniRoute uruchamia jako backend przez stdio/ACP (odwrotna ścieżka) | zobacz rejestr |
Trasy legacy przekierowują przez 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
---
## Jak to działa
```
Kod CLI / Agenci CLI (przepływ konsumpcji):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
▼ (wszystkie wskazują na OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute kieruje do odpowiedniego dostawcy)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Agenci ACP (odwrotny przepływ uruchamiania):
Żądanie klienta → OmniRoute → uruchamia CLI przez stdio/ACP → odpowiedź
```
**Korzyści:**
- Jeden klucz API do zarządzania wszystkimi narzędziami
- Śledzenie kosztów we wszystkich CLI na pulpicie
- Przełączanie modeli bez ponownej konfiguracji każdego narzędzia
- Działa lokalnie i na zdalnych serwerach (VPS, Docker, Akamai, Cloudflare Tunnel)
---
## Automatyczna konfiguracja z `setup-*`
Nie musisz pisać konfiguracji każdego narzędzia ręcznie. OmniRoute dostarcza polecenie `setup-*`
dla każdego obsługiwanego CLI, które odczytuje **na żywo** katalog modeli z działającego
OmniRoute (lokalnie lub zdalnie) i zapisuje własną konfigurację narzędzia na twojej maszynie:
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
Każde z nich akceptuje `--remote <url> --api-key <key>` (konfiguracja lokalnego narzędzia w
odniesieniu do zdalnego OmniRoute), `--dry-run` (podgląd bez zapisywania) oraz `--port`. Narzędzia
bez automatycznego odkrywania modeli (Cline, Kilo, Roo, Goose, Aider, Qwen) przyjmują
`--model <id>` (i `--yes` dla uruchomień bez interakcji). Aby uruchomić CLI z
odpowiednim środowiskiem wstrzykniętym i bez zapisanej konfiguracji, użyj ogólnego
uruchamiacza `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
gemini — cele i aliasy pochodzą z `bin/cli/cli-manifest.mjs`); legacy
uruchamiacze per-narzędzie `omniroute launch` (Claude Code) i `omniroute launch-codex`
(Codex) pozostają dostępne. Gemini CLI jest tylko do uruchamiania: jest celem `omniroute run`
ale nie ma przepisu `setup-*`/`configure`.
> **Pełna dokumentacja:** główny stół — co każde polecenie zapisuje, każdy flag,
> lokalnie vs zdalnie, i które narzędzia wymagają sufiksu `/v1` — znajduje się w
> **[Integracje CLI](../guides/CLI-INTEGRATIONS.md)**.
### Uruchamianie tych wewnątrz kontenera
Polecenie `setup-*` wykonane wewnątrz kontenera OmniRoute zapisuje w
własnym katalogu domowym kontenera, do którego żadne lokalne CLI nie ma dostępu i które znika z
kontenerem. OmniRoute to wykrywa i kończy z kodem `2` z instrukcjami zamiast
zapisywać. Dwie wspierane metody — zainstaluj CLI na hoście i
`omniroute connect` do kontenera, lub zamontuj katalogi konfiguracyjne i ustaw
`CLI_CONFIG_HOME` (profil hosta w compose). Każde polecenie `setup-*`, plus
`omniroute configure` i `omniroute config set`, akceptuje
`--allow-container-write`, gdy konfiguracja własnych CLI kontenera jest tym, co
naprawdę miałeś na myśli; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` robi to samo dla
serwera. Zobacz
[Przewodnik Docker → Konfigurowanie narzędzi CLI na hoście](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
**Endpoint zastosowania** pulpitu (`POST /api/cli-tools/apply`) egzekwuje
ten sam guard: w kontenerze, zapis, którego cel nie jest zamontowany z hosta, odpowiada
**`422`** z `containerEphemeralTarget: true`, bezpiecznym tekstem błędu i — dla narzędzi z przepisem hosta (claude, codex, opencode, cline,
kilo, continue) — `hostSetupCommand` (np. `omniroute setup-opencode`), które należy uruchomić
na hoście zamiast tego; nic nie jest zapisywane. `dryRun: true` działa nadal w trybie kontenera
i zwraca wygenerowaną zawartość + ścieżkę docelową bez dotykania dysku, więc
możesz podglądać z pulpitu i zastosować na hoście. To zachowanie jest
zamierzone i chronione przed regresją przez
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — nigdy nie "naprawiaj" 422
poprzez usunięcie guard.
## Źródło prawdy
Zunifikowany katalog znajduje się w `src/shared/constants/cliTools.ts` jako `CLI_TOOLS: Record<string, CliCatalogEntry>`.
Każdy wpis ma te pola (zdefiniowane w `src/shared/schemas/cliCatalog.ts`):
| Pole | Typ | Opis |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | Na której stronie narzędzie się pojawia |
| `vendor` | `string` | Pochodzenie narzędzia ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Może być również używane jako agent ACP (wyświetlany badge) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Poziom wsparcia dla niestandardowego punktu końcowego. `"none"` = MITM backlog |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mechanizm konfiguracji |
| `id`, `name`, `color`, `description`, `docsUrl` | standard | Podstawowe pola wyświetlania |
Wpisy z `baseUrlSupport: "none"` **nie są wyświetlane** na stronach dashboardu — są zarejestrowane w MITM backlog dla planu 11 (zobacz `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Poziomy możliwości (skatalogowane × wykrywalne × konfigurowalne × uruchamialne)
Nie każde skatalogowane narzędzie jest wykrywalne, konfigurowalne lub uruchamialne. Każdy poziom ma jedno
deklarujące źródło, a test dryfu utrzymuje je w synchronizacji:
| Poziom | Znaczenie | Zadeklarowane w |
| ------------------ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Skatalogowane** | Pojawia się w katalogu dashboardu (nazwa, dostawca, dokumentacja, typ konfiguracji) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Wykrywalne** | Wykrywanie binariów/konfiguracji, kontrole stanu, ścieżki konfiguracji | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
| **Konfigurowalne** | Wsparcie przez `omniroute configure <cli>` (istnieje przepis na konfigurację) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Uruchamialne** | Wsparcie przez `omniroute run <target>` (definiowane wstrzykiwanie env/args) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` jest kanonicznym manifestem wykonywalnym dla poleceń CLI: `run`, `configure` oraz generatorów uzupełnień powłoki, które czerpią swoje
listy celów, rozwiązywanie aliasów (na przykład `kilocode`/`kilo-code`/`kilo_cli``kilo`)
i okablowanie flagi `--model` z niego. Guard dryfu
`tests/unit/cli/cli-manifest-drift.test.ts` zapewnia, że manifest, katalog runtime,
katalog UI i każda powierzchnia konsumencka pozostają w synchronizacji — cel dodany do
jednej powierzchni bez innych powoduje niepowodzenie zestawu testów zamiast cichego dryfu.
## 1. Katalog kodów CLI (26 narzędzi)
Wszystkie narzędzia, które pojawiają się w `/dashboard/cli-code`. Te z `baseUrlSupport: none` są podłączone przez MITM lub ręczny przewodnik zamiast niestandardowego adresu URL:
| id | nazwa | dostawca | wsparcieBaseUrl | typKonfiguracji | acpSpawnable |
| ------------ | ----------------------- | ------------------- | --------------- | --------------- | ------------ |
| claude | Claude Code | Anthropic | pełne | env | true |
| codex | OpenAI Codex CLI | OpenAI | pełne | custom | true |
| zcode | ZCode (GLM Coding Plan) | Z.ai | brak | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | pełne | custom | true |
| kilo | Kilo Code | Kilo-Org | pełne | custom | false |
| roo | Roo Code | Roo (OSS) | pełne | przewodnik | false |
| continue | Continue | continue.dev | pełne | przewodnik | false |
| aider | Aider | OSS (P. Gauthier) | pełne | przewodnik | true |
| forge | ForgeCode | Antinomy HQ | pełne | custom | true |
| jcode | jcode | 1jehuang (OSS) | pełne | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | pełne | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | pełne | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | pełne | przewodnik | true |
| droid | Factory Droid | Factory AI | częściowe | przewodnik | false |
| copilot | GitHub Copilot CLI | GitHub/MS | pełne | custom | false |
| cursor-cli | Cursor CLI | Anysphere | częściowe | przewodnik | true |
| smelt | Smelt | leonardcser (OSS) | pełne | custom | false |
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | pełne | custom | false |
| grok-build | Grok Build | xAI | pełne | custom | false |
| crush | Crush | OSS (Charm) | pełne | custom | false |
| qwen | Qwen Code | Alibaba | pełne | przewodnik | true |
| cursor | Cursor | Anysphere | brak | przewodnik | false |
| antigravity | Antigravity | Google | brak | mitm | false |
| hermes | Hermes | Nous Research | brak | przewodnik | false |
| kiro | Kiro AI | Amazon | brak | mitm | false |
| custom | Custom CLI | — | pełne | custom-builder | false |
Narzędzia z `baseUrlSupport: "partial"` wyświetlają znacznik "⚠ Częściowe wsparcie adresu URL" na karcie w dashboardzie.
## 2. Katalog agentów CLI (8 narzędzi)
Autonomiczne agenty, które pojawiają się w `/dashboard/cli-agents`:
| id | nazwa | dostawca | wsparcieBaseUrl | acpSpawnable |
| ------------ | ---------------- | ------------------------ | --------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | pełne | fałsz |
| openclaw | OpenClaw | OSS (P. Steinberger) | pełne | prawda |
| goose | Goose | Block / Linux Foundation | pełne | prawda |
| interpreter | Open Interpreter | OSS | pełne | prawda |
| warp | Warp AI | Warp Inc. | częściowe | prawda |
| agent-deck | Agent Deck | asheshgoplani (OSS) | pełne | fałsz |
| omp | Oh My Pi | OSS | pełne | prawda |
| letta | Letta CLI | Letta | pełne | fałsz |
---
## 3. Agenci ACP (/dashboard/acp-agents)
Ta strona (zmieniona z `/dashboard/agents`) pokazuje CLI, które OmniRoute może **uruchomić** jako silniki wykonawcze w tle za pomocą protokołu stdio/ACP. Katalog jest utrzymywany osobno w `src/lib/acp/registry.ts` i **nie** jest tym samym co `CLI_TOOLS`.
---
## 4. Zaległości MITM (nie pokazane w dashboardzie)
Następujące CLI nie obsługują niestandardowego podstawowego URL-a natywnie i **nie są wymienione** na stronach kodu CLI ani agentów CLI. Są kandydatami do przechwytywania MITM w planie 11:
| CLI | Powód |
| ------------------- | -------------------------------------------------------------------- |
| windsurf | BYOK ograniczone do wybranych modeli Claude + korporacyjny URL/token |
| amp | Zamknięty ekosystem (Sourcegraph) |
| amazon-q / kiro-cli | AWS SSO auth, brak niestandardowego URL |
| cowork | Anthropic Desktop, brak konfigurowalnego punktu końcowego |
Zobacz `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` dla pełnego odniesienia.
---
## 5. API wykrywania wsadowego
Wszystkie wykrycia narzędzi są agregowane za pomocą jednego punktu końcowego:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (tak samo jak inne trasy `/api/cli-tools/`)
- Zwraca: `Record<toolId, ToolBatchStatus>` (typ: `src/shared/types/cliBatchStatus.ts`)
- Strategia: `Promise.all` dla wszystkich narzędzi, 5s limit czasu na narzędzie
- Cache: w pamięci LRU indeksowane przez plik konfiguracyjny `mtime`. Cache unieważnione, gdy mtime się zmienia. Resetowane przy restarcie serwera.
Kształt odpowiedzi dla narzędzia:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // oczyszczone, bez śladów stosu
}
```
## 6. Obsługa Ustawień dla Nowych Narzędzi
Nowe narzędzia z `configType: "custom"` mają dedykowane trasy API do ustawień:
| Trasa | Narzędzie |
| ------------------------------------------- | ---------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedicated `.env` key) |
Wszystkie trasy używają `sanitizeErrorMessage()` do odpowiedzi błędów (Twarda zasada #12).
---
## 7. Architektura Stron Dashboardu
### Kod CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponent serwera
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — klient grid
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — strona szczegółów narzędzia
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 specjalistycznych kart narzędzi + `ToolDetailClient.tsx`
### Agenci CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponent serwera
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — klient grid
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — ponownie wykorzystuje `ToolDetailClient`
### Agenci ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponent serwera (przeniesiony z `agents/`)
### Wspólne Komponenty UI (`src/shared/components/cli/`)
| Plik | Cel |
| ----------------------- | ---------------------------------------------------------------------- |
| `CliToolCard.tsx` | Inteligentna karta statusu (wykrywanie + konfiguracja + punkt końcowy) |
| `CliConceptCard.tsx` | Karta wyjaśniająca pojęcie na stronie |
| `CliComparisonCard.tsx` | Porównanie w trzech kolumnach między typami CLI |
| `BaseUrlSelect.tsx` | Dropdown punktu końcowego (Lokalny/Chmura/Custom) |
| `ApiKeySelect.tsx` | Selektor klucza API |
| `ManualConfigModal.tsx` | Modal z fragmentem konfiguracyjnym do skopiowania |
### Wspólny Hook (`src/shared/hooks/cli/`)
| Plik | Cel |
| ------------------------- | ---------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Pobiera `/api/cli-tools/all-statuses`, zarządza stanem ładowania/odświeżania |
## 8. i18n
Nowe przestrzenie nazw dodane w planie 14 F9:
| Przestrzeń nazw | Cel |
| --------------- | -------------------------------------------------------------------------------------- |
| `cliCommon` | Wspólne ciągi (etykiety kart, teksty koncepcji/porównań, etykiety stron szczegółowych) |
| `cliCode` | Ciągi stron kodu CLI |
| `cliAgents` | Ciągi stron agentów CLI |
| `acpAgents` | Ciągi stron agentów ACP |
Pełne tłumaczenia PT-BR i EN są dostępne. 39 innych lokalizacji automatycznie przechodzi na EN poprzez scalanie na poziomie przestrzeni nazw w `src/i18n/request.ts`.
---
## 9. Szybki start
### Krok 1 — Uzyskaj klucz API OmniRoute
1. Otwórz `/dashboard/api-manager`**Utwórz klucz API**
2. Nadaj mu nazwę (np. `cli-tools`) i wybierz wszystkie uprawnienia
3. Skopiuj klucz — będziesz go potrzebować w każdym CLI poniżej
> Twój klucz wygląda jak: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Krok 2 — Zainstaluj narzędzia CLI
Wszystkie narzędzia oparte na npm wymagają Node.js 22.22.2+ lub 24.x:
```bash
# Claude Code (Anthropic)
npm install -g @anthropic-ai/claude-code
# OpenAI Codex
npm install -g @openai/codex
# OpenCode
npm install -g opencode-ai
# Cline
npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Google Gemini CLI (uruchamiane przez `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Oparte na Rust
# Pi coding agent
# zobacz https://github.com/zechnerj/pi-coding-agent w celu instalacji
# jcode
# zobacz https://github.com/1jehuang/jcode w celu instalacji
```
---
### Krok 3 — Skonfiguruj przez Dashboard
1. Przejdź do `http://localhost:20128/dashboard/cli-code`
2. Znajdź swoje narzędzie w siatce
3. Kliknij kartę, aby otworzyć stronę szczegółów narzędzia
4. Wybierz swój klucz API i podstawowy URL
5. Kliknij **Zastosuj konfigurację** lub skopiuj ręczny fragment konfiguracji
---
### Krok 4 — Ustaw globalne zmienne środowiskowe
```bash
# Uniwersalny punkt końcowy OmniRoute
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# Gemini CLI odczytuje GOOGLE_GEMINI_BASE_URL na ROOT (jego SDK dodaje /v1beta/... samodzielnie)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Dla **zdalnego serwera** zamień `localhost:20128` na adres IP serwera lub domenę,
> np. `http://<your-server-ip>:20128`.
---
### Krok 4 — Skonfiguruj każde narzędzie
#### Claude Code
```bash
# Utwórz ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
}
EOF
```
Użyj zjednoczonego korzenia bramy Anthropic dla Claude Code. Nie dodawaj tutaj `/v1`.
**Test:** `claude "say hello"`
---
#### OpenAI Codex
Nowoczesny Codex (v0.137+) odczytuje tylko `~/.codex/config.toml` — stary
`config.yaml` należy do przestarzałego CLI npm i jest cicho ignorowany. Klucz API
pozostaje w zmiennej środowiskowej `OMNIROUTE_API_KEY` (`env_key`), nigdy
wewnątrz pliku:
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Pełna dokumentacja (profile, `wire_api`, okna kontekstowe): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Test:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
EOF
```
**Test:** `opencode`
> Użyj `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> aby wysłać warianty myślenia.
---
#### Cline (CLI lub VS Code)
**Tryb CLI:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
{
"apiProvider": "openai",
"openAiBaseUrl": "http://localhost:20128/v1",
"openAiApiKey": "sk-your-omniroute-key"
}
EOF
```
**Tryb VS Code:**
Ustawienia rozszerzenia Cline → Dostawca API: `OpenAI Compatible` → Podstawowy URL: `http://localhost:20128/v1`
Lub użyj dashboardu OmniRoute → **Narzędzia CLI → Cline → Zastosuj konfigurację**.
---
#### KiloCode (CLI lub VS Code)
**Tryb CLI:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Ustawienia VS Code:**
```json
{
"kilo-code.openAiBaseUrl": "http://localhost:20128/v1",
"kilo-code.apiKey": "sk-your-omniroute-key"
}
```
Lub użyj dashboardu OmniRoute → **Narzędzia CLI → KiloCode → Zastosuj konfigurację**.
---
#### Continue (Rozszerzenie VS Code)
Edytuj `~/.continue/config.yaml`:
```yaml
models:
- name: OmniRoute
provider: openai
model: auto
apiBase: http://localhost:20128/v1
apiKey: sk-your-omniroute-key
default: true
```
Uruchom ponownie VS Code po edytowaniu.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Użyj tego, gdy VS Code Insiders jest skonfigurowany dla modeli punktów końcowych i chcesz, aby OmniRoute działał bez niestandardowego pola nagłówka.
**Zalecana lokalizacja:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Przykład używający tokenizowanego aliasu OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Uwagi:**
- Zamień `sk-your-omniroute-key` na klucz API utworzony w OmniRoute.
- Pole `url` powinno wskazywać na `/api/v1/vscode/{token}/chat/completions`.
- Pole `modelsUrl` powinno wskazywać na `/api/v1/vscode/{token}/models`.
- Preferuj normalny przepływ `/v1` + nagłówek Bearer, gdy klient obsługuje niestandardowe nagłówki.
- Tokeny osadzone w URL są rozwiązaniem zgodności i mogą pojawić się w logach edytora lub historii proxy.
---
#### Kiro CLI (Amazon)
```bash
# Zaloguj się do swojego konta AWS/Kiro:
kiro-cli login
# CLI używa własnej autoryzacji — OmniRoute nie jest potrzebny jako backend dla Kiro CLI.
# Użyj kiro-cli obok OmniRoute dla innych narzędzi.
kiro-cli status
```
Dla aplikacji desktopowej **Kiro IDE** użyj punktu końcowego MITM udostępnionego przez OmniRoute
pod `/dashboard/cli-tools → Kiro`.
---
## 10. Wewnętrzny OmniRoute CLI
Binarna wersja `omniroute` oferuje polecenia do zarządzania cyklem życia serwera, konfiguracji, diagnostyki i zarządzania dostawcami. Punkt wejścia: `bin/omniroute.mjs`.
```bash
omniroute # Uruchom serwer (domyślny port 20128)
omniroute setup # Interaktywny kreator konfiguracji
omniroute doctor # Sprawdź konfigurację, DB, porty, czas działania
omniroute providers list # Skonfigurowane połączenia dostawców
omniroute providers test-all # Przetestuj każde aktywne połączenie
omniroute reset-password # Zresetuj hasło administratora
omniroute logs # Strumieniuj logi żądań
omniroute health # Szczegółowe informacje o stanie (wyłączniki, pamięć podręczna, pamięć)
omniroute --version # Wydrukuj wersję
omniroute --help # Pokaż wszystkie polecenia
```
### Konfiguracja i inicjalizacja
```bash
omniroute setup # Interaktywny kreator konfiguracji
omniroute setup --non-interactive # Tryb CI/automatyzacji (odczytuje zmienne środowiskowe + flagi)
omniroute setup --password '<value>' # Ustaw hasło administratora bezpośrednio
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Dodaj i przetestuj dostawcę w jednym kroku
```
Rozpoznane zmienne środowiskowe do konfiguracji bez interakcji:
| Var | Cel |
| ------------------- | --------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Klucz API dostawcy (powiązany z `--api-key` za pomocą `.env()`) |
| `DATA_DIR` | Nadpisz katalog danych OmniRoute |
Wszystkie inne wejścia bez interakcji są przekazywane jako flagi, a nie zmienne środowiskowe:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(zobacz opcje `omniroute setup` powyżej).
### Diagnostyka
```bash
omniroute doctor # Sprawdź konfigurację, DB, porty, czas działania, pamięć, żywotność
omniroute doctor --json # Odczyt maszynowy w formacie JSON
omniroute doctor --no-liveness # Pomiń HTTP health probe
omniroute doctor --host 0.0.0.0 # Nadpisz host żywotności
omniroute doctor --liveness-url <url> # Pełny adres URL punktu końcowego zdrowia
```
Diagnosta wykonuje te kontrole: `Konfiguracja`, `Baza danych`, `Przechowywanie/szyfrowanie`,
`Dostępność portu`, `Czas działania węzła`, `Binarna wersja` (better-sqlite3),
`Pamięć` i `Żywotność serwera`. Kończy z kodem różnym od zera, jeśli jakakolwiek kontrola zakończy się `niepowodzeniem`.
### Zarządzanie dostawcami
```bash
omniroute providers available # Katalog dostawców OmniRoute
omniroute providers available --search openai # Filtruj katalog według id/nazwy/aliasu/kategorii
omniroute providers available --category api-key # Filtruj według kategorii (api-key, oauth, free, ...)
omniroute providers available --json # Odczyt maszynowy w formacie JSON
omniroute providers list # Skonfigurowane połączenia dostawców
omniroute providers list --json
omniroute providers test <id|name> # Przetestuj jedno skonfigurowane połączenie
omniroute providers test-all # Przetestuj każde aktywne połączenie
omniroute providers validate # Walidacja strukturalna tylko lokalnie
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Istniejący proces OAuth
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` są oparte na API i dlatego działają w
aktywnym lokalnym lub zdalnym kontekście. Wprowadzenie poświadczeń powinno używać
`--credential-stdin` lub `--credential-env`; `--dry-run --json` raportuje tylko
ukryte istnienie/kształt. `providers available` odczytuje katalog OmniRoute;
`providers list/test/test-all/validate` zachowują swoje lokalne zachowanie SQLite i
nie wymagają uruchomionego serwera.
### Przywracanie i resetowanie
```bash
omniroute reset-password # Zresetuj hasło administratora (również: omniroute-reset-password)
omniroute reset-encrypted-columns # Pokaż ostrzeżenie + dry-run dla resetowania szyfrowanych poświadczeń
omniroute reset-encrypted-columns --force # Rzeczywiście wyczyść szyfrowane poświadczenia w SQLite
```
### Eksport poświadczeń (⚠ traktuj ostrożnie)
```bash
omniroute auth export # Pokaż ostrzeżenie + bramkę potwierdzenia — brak dostępu do DB
omniroute auth export --force # Eksportuj WSZYSTKIE połączenia z DESZYFROWANYMI poświadczeniami do stdout jako JSON
omniroute auth export --force --id <id> # Eksportuj tylko pasujące połączenie
omniroute auth export --force --format env # Emituj linie OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # Zapisz do pliku (utworzony z uprawnieniami 0600)
```
`auth export` jest **tylko lokalny** (bezpośredni odczyt SQLite, brak trasy HTTP) i celowo drukuje/zapisuje
**czysty tekst** wartości `apiKey`/`accessToken`/`refreshToken`/`idToken` — to jest funkcja, a nie
błąd. Nic nie jest odczytywane z bazy danych, a nic nie jest deszyfrowane, bez `--force`. Zawsze przed
wydrukowaniem jakiegokolwiek czystego tekstu wyświetlane jest ostrzeżenie na stderr. Wymaga ustawienia `STORAGE_ENCRYPTION_KEY`.
Pole, które nie uda się zdeszyfrować (stary klucz, uszkodzony szyfrogram) jest zgłaszane jako
`<field>DecryptFailed: true` zamiast przerywać cały eksport lub ujawniać podstawowy błąd.
### Inne podpolecenia
Te zakładają działający serwer OmniRoute, chyba że zaznaczone inaczej:
```bash
omniroute status # Wszechstronny status czasu działania
omniroute logs # Strumieniuj logi żądań (--json, --search, --follow)
omniroute config show # Wyświetl bieżącą konfigurację
omniroute provider list # Lista dostępnych dostawców (alias polecenia providers list)
omniroute provider add # Zarejestruj OmniRoute jako dostawcę w narzędziu
omniroute keys add | list | remove # Zarządzaj kluczami API
omniroute models [provider] # Lista modeli (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Zrzut konfiguracji + DB
omniroute restore # Przywróć z poprzedniego zrzutu
omniroute health # Szczegółowe informacje o stanie (wyłączniki, pamięć podręczna, pamięć)
omniroute quota # Użycie limitu dostawcy
omniroute cache # Status pamięci podręcznej
omniroute cache clear # Wyczyść pamięć podręczną semantyczną + podpisów
omniroute mcp status | restart # Status serwera MCP / restart
omniroute a2a status | card # Status serwera A2A / karta agenta
omniroute tunnel list | create | stop # Zarządzaj tunelami (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspekcja / ustaw zmienne środowiskowe (tymczasowe)
omniroute test # Test łączności dostawcy
omniroute update # Sprawdź dostępność aktualizacji
omniroute completion # Generuj uzupełnienie powłoki
```
### Wspólne flagi
| Flaga | Opis |
| ------------------- | ------------------------------------------------------------- |
| `--no-open` | Nie otwieraj automatycznie przeglądarki przy uruchomieniu |
| `--port <n>` | Nadpisz port API (domyślny 20128) |
| `--mcp` | Uruchom jako serwer MCP przez stdio (dla IDE) |
| `--non-interactive` | Tryb CI (bez podpowiedzi; odczytuje z env/flag) |
| `--json` | Odczyt maszynowy w formacie JSON (diagnostyka, dostawcy itp.) |
| `--help`, `-h` | Pokaż pomoc specyficzną dla polecenia |
| `--version`, `-v` | Wydrukuj zainstalowaną wersję |
---
## Dostępne punkty końcowe API
| Punkt końcowy | Opis | Użyj do |
| -------------------------- | ----------------------------------- | ------------------------------------- |
| `/v1/chat/completions` | Standardowy czat (wszyscy dostawcy) | Wszystkie nowoczesne narzędzia |
| `/v1/responses` | API odpowiedzi (format OpenAI) | Codex, agentyczne przepływy pracy |
| `/v1/completions` | Dziedziczne uzupełnienia tekstu | Starsze narzędzia używające `prompt:` |
| `/v1/embeddings` | Osadzenia tekstu | RAG, wyszukiwanie |
| `/v1/images/generations` | Generowanie obrazów | GPT-Image, Flux itd. |
| `/v1/audio/speech` | Tekst na mowę | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Mowa na tekst | Deepgram, AssemblyAI |
Przykłady gotowe do wklejenia z tokenizowanym adresem URL OmniRoute:
```txt
Przykład tokena: sk-a3ab3c080beaee3a-69f4a4-070d71af
Standardowa baza OpenAI: http://localhost:20128/v1
Modele VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Czat VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Odpowiedzi VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tagi Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Czat Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
---
## Rozwiązywanie problemów
| Błąd | Przyczyna | Naprawa |
| ----------------------------------------------- | ------------------------------- | ------------------------------------------------------------ |
| `Connection refused` | OmniRoute nie działa | `omniroute serve` |
| `401 Unauthorized` | Zły klucz API | Sprawdź w `/dashboard/api-manager` |
| `No combo configured` | Brak aktywnego zestawu routingu | Skonfiguruj w `/dashboard/combos` |
| CLI pokazuje "not installed" | Plik binarny nie w PATH | Sprawdź `which <command>` |
| Dashboard pokazuje "not detected" po instalacji | Cache przestarzałe | Kliknij "⟳ Odśwież wykrywanie" w dashboardzie |
| Stary link `/dashboard/cli-tools` | Zakładka przed wersją 3.8.6 | Automatyczne przekierowanie do `/dashboard/cli-code` (308) |
| Stary link `/dashboard/agents` | Zakładka przed wersją 3.8.6 | Automatyczne przekierowanie do `/dashboard/acp-agents` (308) |

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,270 +0,0 @@
# CLI-INTEGRATIONS (Português (Brasil))
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrações CLI — aponte qualquer CLI de codificação para o OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrações CLI
O OmniRoute fornece uma família de comandos `setup-*` que configuram uma CLI de codificação (Codex, Claude Code, OpenCode, Cline, …) para usar o OmniRoute como seu backend — assim, a ferramenta se comunica com **um** endpoint e o OmniRoute direciona para o provedor correto com fallback automático. Cada comando lê o catálogo de modelos **ao vivo** de um OmniRoute em execução (local ou remoto) e escreve o próprio arquivo de configuração da ferramenta em **sua** máquina. A chave da API é referenciada por uma variável de ambiente sempre que a ferramenta a suporta. Comandos que persistem um arquivo de ambiente local da ferramenta são observados abaixo.
Há também um lançador genérico — `omniroute run <target>` — que inicia `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` ou `gemini` com o ambiente correto injetado, sem escrever nenhuma configuração. Os alvos e seus aliases vêm do manifesto canônico `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), e `omniroute completion` oferece as mesmas palavras-alvo derivadas do manifesto. Os lançadores legados por ferramenta — `omniroute launch` (Claude Code) e `omniroute launch-codex` (Codex) — permanecem disponíveis.
A integração de provedores está disponível a partir do mesmo contexto local/remoto. Os comandos API-first abaixo mantêm a autenticação de gerenciamento separada das credenciais do provedor e nunca imprimem uma credencial na saída estruturada:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Para scripts, prefira `--credential-stdin` ou `--credential-env`; `--credential` é mantido para uso local controlado. `providers remove` requer `--yes` em um terminal não interativo, e todos os cinco comandos respeitam o contexto ativo ou as opções globais `--base-url`/`--api-key`.
Para a configuração base feita à mão, uma única vez, das duas integrações mais ricas, veja os mergulhos profundos por ferramenta:
- [Configuração do Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Configuração do Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Modo Remoto](./REMOTE-MODE.md) — controle um OmniRoute remoto (VPS / Tailnet) a partir do seu laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — a extensão OmniCopilot; ela também pode executar esses
comandos `setup-*` para você de dentro do editor
---
## Tabela mestre
Cada comando respeita o **contexto ativo** (definido com `omniroute connect`, veja
[Modo Remoto](./REMOTE-MODE.md)) ou as flags explícitas `--remote <url> --api-key <key>`. "Local vs remoto" abaixo significa: sem flags, ele se destina a `http://localhost:20128`; com `--remote` (ou um contexto remoto ativo), ele busca o catálogo daquele servidor e escreve a configuração localmente.
| Comando | Ferramenta | O que escreve | Principais flags | Local vs remoto |
| -------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — um perfil por modelo de texto compatível (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Ambos |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — um perfil por modelo correspondente (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Ambos |
| `omniroute setup-opencode` | OpenCode (compatível com openai) | `~/.config/opencode/opencode.json` — provedor `omniroute` com cada modelo do catálogo (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Ambos |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (modo CLI) + imprime configurações da extensão do VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Ambos |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + mescla `kilocode.*` nas configurações do VS Code `settings.json` se presente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Ambos |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modelos `provider: openai`, chave via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-cursor` | Cursor | Nada — imprime os passos no aplicativo (a configuração do Cursor é opaca em SQLite) | `--remote` `--api-key` `--only` `--port` | Ambos |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (importar doc) + define `roo-cline.autoImportSettingsPath` se um `settings.json` do VS Code existir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Ambos |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — provedor `openai-compat`, chave via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + imprime receita de ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + imprime receita de ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `V4 modelProviders.openai` + `OMNIROUTE_API_KEY` em `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Ambos |
| `omniroute run <target>` | Lançamento em tempo de execução (genérico) | Nada — inicia `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` com o ambiente e argumentos corretos; Qwen e Gemini usam um home isolado temporário | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Ambos |
| `omniroute launch` | Claude Code | Nada — inicia `claude` com `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injetados | `--remote` `--api-key` `--token` `--profile` `--port` | Ambos |
| `omniroute launch-codex` | OpenAI Codex CLI | Nada — inicia `codex` com o provedor `omniroute` injetado via flags `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Ambos |
Notas sobre as flags (verificadas na fonte do comando):
- `--remote <url>` — busca o catálogo de um OmniRoute remoto (substitui `--port`
e o contexto ativo). `--api-key <key>` fornece a credencial para aquele
servidor (padrão para a variável de ambiente `OMNIROUTE_API_KEY`, ou o token do contexto ativo).
- `--only <patterns>` — substrings separadas por vírgula; mantém apenas os IDs de modelo que correspondem
(por exemplo, `--only glm,kimi`). Disponível em `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — imprime exatamente o que seria escrito sem tocar no
sistema de arquivos. Disponível em todos os comandos `setup-*` **exceto** `setup-cursor`
(que nunca escreve um arquivo).
- `--model <id>` — necessário (ou escolhido interativamente) para as ferramentas que não têm
descoberta automática de modelo: Cline, Kilo, Roo, Goose, Qwen, Aider. Essas ferramentas
também aceitam `--yes` para execuções não interativas (que então requerem `--model`).
`setup-opencode` aceita `--model` para definir o modelo padrão de nível superior.
- `--model <id>` em `omniroute run` segue a fiação por alvo do manifesto
(`bin/cli/cli-manifest.mjs`): **aider** recebe `--model openai/<id>` e
**opencode** `--model omniroute/<id>` (o prefixo é adicionado apenas quando o id
não o possui); **qwen** e **gemini** recebem o id verbatim;
**claude** recebe via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, e
**codex** via args `-c model_providers.omniroute.*`. **Qwen é o único alvo de execução
que requer obrigatoriamente `--model`** — `omniroute run qwen` sem ele sai
`2` com um erro explícito.
- `--port <port>` — porta local do OmniRoute (padrão `20128`, ignorada quando `--remote`
está definido). Presente em todos os `setup-*` e ambos os lançadores.
- Códigos de saída do `omniroute run`: o próprio código de saída da CLI filha é propagado
verbatim; `2` = argumentos inválidos (alvo não suportado, `--model` obrigatório ausente, guardião do contêiner); `127` = o binário alvo não está no `PATH`;
`130`/`143`/`129` quando o lançamento é encerrado por `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = outra falha de lançamento em tempo de execução.
- Os dois lançadores (`launch`, `launch-codex`) aceitam `--profile <name>` para selecionar
um perfil escrito por `setup-claude` / `setup-codex`, além de passar argumentos para
o binário subjacente `claude` / `codex`.
O seletor interativo também é compartilhado pelas receitas de configuração:
```bash
# Escolha a partir do catálogo de modelos local ou remoto ativo e configure o alvo.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` atualmente delega para as receitas testadas para `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, e `kilo`. Entradas de catálogo apenas para IDE, MITM e apenas guia permanecem como fluxos explícitos `setup-*`/manuais e não são apresentadas como alvos lançáveis.
> `setup-opencode` é a integração **leve compatível com openai** do OpenCode.
> Há também uma integração de plugin mais rica — `omniroute setup opencode` — que
> instala `@omniroute/opencode-plugin`. Eles são comandos diferentes; a tabela
> acima documenta `setup-opencode`.
---
## Uso local
Com o OmniRoute rodando em `localhost:20128`, basta executar o comando de configuração para sua ferramenta. O catálogo é buscado no servidor local.
```bash
# Codex: escreve um perfil por modelo correspondente em ~/.codex/
omniroute setup-codex
codex --profile glm52 # usa um perfil gerado
# Claude Code: escreve perfis por modelo, depois inicia um
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: escreve o provedor compatível com openai com todos os modelos do catálogo
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # referenciado via {env:OMNIROUTE_API_KEY}, nunca em disco
opencode -m omniroute/glm/glm-5.2 "..."
# Ferramentas sem auto-descoberta precisam de um modelo explícito:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Pré-visualização sem escrever nada:
omniroute setup-continue --dry-run
```
Inicie sem escrever nenhuma configuração (apenas injeção de env):
```bash
omniroute launch # Claude Code → OmniRoute local
omniroute launch-codex # Codex CLI → OmniRoute local
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "resposta OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "resposta OK"
omniroute run qwen --model glm/glm-5.2 -- -p "resposta OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "resposta OK"
# Caminho de comando explícito: passe tudo que vem depois de --
omniroute run claude -- --print-system-prompt "revise esta diferença"
```
---
## Uso remoto
Aponte qualquer comando de configuração para um OmniRoute remoto com `--remote` + `--api-key`. O catálogo é buscado remotamente; a configuração é escrita em sua máquina local.
```bash
# OpenCode contra um VPS remoto, mantenha apenas os modelos glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exporte OMNIROUTE_API_KEY primeiro
# Perfis Codex de um catálogo remoto
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Inicie um CLI diretamente contra o remoto
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Em vez de passar `--remote`/`--api-key` toda vez, faça login uma vez e deixe o **contexto ativo** fornecê-los automaticamente:
```bash
omniroute connect 192.168.0.15 # gera um token escopado, armazena o contexto
omniroute setup-codex # ← agora usa o catálogo remoto
omniroute setup-opencode # ← o mesmo
omniroute launch # ← Claude Code contra o remoto
```
Veja [Modo Remoto](./REMOTE-MODE.md) para contextos, escopos e gerenciamento de tokens.
---
## Convenções de URL base (quais ferramentas querem `/v1`)
OmniRoute expõe a superfície OpenAI em `/v1`, a superfície Anthropic na raiz, e uma superfície nativa Gemini em `/v1beta`. Cada integração está conectada à forma que sua ferramenta espera (verificado na fonte do comando):
| Integração | URL Base escrita | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | raiz | Não — Cline anexa `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | raiz | Não — Goose anexa o caminho |
| `setup-aider` (`OPENAI_API_BASE`) | raiz | Não — LiteLLM anexa `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | com `/v1` | Sim |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | raiz | Não — Claude Code anexa `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | com `/v1` | Sim |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | com `/v1` | Sim |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | raiz | Não — o SDK anexa `/v1beta/models/…` |
---
## Mantendo dependências nativas na atualização: `--include=optional`
Quando você atualiza com `omniroute update` (após confirmar, ou com `--apply`), o OmniRoute executa a instalação com `--include=optional` embutido:
```bash
npm install -g omniroute@latest --include=optional
```
Este **não** é um flag que você passa para `omniroute update` — ele é sempre aplicado pelo atualizador. Isso garante que as `optionalDependencies` (`better-sqlite3`, `keytar`, `tls-client`, a pilha LLMLingua SLM) sobrevivam à atualização, mesmo que sua configuração npm tenha `omit=optional` definida, o que, de outra forma, descartaria silenciosamente o driver SQLite nativo e a vinculação do keyring do SO. Para visualizar o comando exato sem aplicar:
```bash
omniroute update --dry-run
# [DRY RUN] Executaria: npm install -g omniroute@latest --include=optional
```
Outros flags do `omniroute update` (verificados no código-fonte): `--check` (sai com 1 se desatualizado), `--apply` (instala sem solicitar), `--changelog`, `--no-backup`, `--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Contrato verificado contra `@google/gemini-cli` 0.50.0: a CLI respeita `GOOGLE_GEMINI_BASE_URL` e emite `POST /v1beta/models/<model>:generateContent` (e `:streamGenerateContent?alt=sse`) contra ele — exatamente a superfície nativa do Gemini do OmniRoute (`/v1beta`). `omniroute run gemini` conecta isso automaticamente:
- `GOOGLE_GEMINI_BASE_URL` → a URL base ativa do OmniRoute (raiz, sem `/v1`);
- `GEMINI_API_KEY` → a credencial resolvida do OmniRoute (opção/env/contexto);
- um **`GEMINI_CLI_HOME` isolado temporariamente** cujo `.gemini/settings.json` seleciona a autenticação `gemini-api-key`, de modo que uma sessão OAuth do Google armazenada (Code Assist) nunca sobrescreva o lançamento direcionado pelo OmniRoute — removido após a saída;
- **higiene do env**: o ambiente filho é limpo de `GOOGLE_API_KEY`, `GOOGLE_GENAI_USE_VERTEXAI` e `GOOGLE_GENAI_USE_GCA` (que redirecionariam a autenticação para Vertex/Code Assist), e `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` é definido como uma segurança adicional — os outros alvos de `run` recebem o mesmo tratamento para suas próprias variáveis conflitantes;
- injeção de `--model <id>` de `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
A proteção de confiança do workspace do Gemini ainda se aplica no modo headless — passe `--skip-trust` (ou confie no diretório interativamente) você mesmo; o lançador deliberadamente não ignora isso. Este lançador é distinto do **registro ACP** (`src/lib/acp/registry.ts`, `gemini --acp`), que permanece a integração do protocolo do agente para `/dashboard/acp-agents`.
---
## Varredura real de fumaça (opcional)
Execuções de regressão do plano de lançamento determinístico em CI (`tests/unit/cli/run-command.test.ts`, `tests/unit/cli/run-execution.test.ts`). Para validar os binários REAIS contra um servidor OmniRoute REAL, existe um harness opcional em `tests/integration/upstream-cli-smoke.int.test.ts`. Ele nunca é executado automaticamente (cada sub-teste é pulado a menos que `RUN_CLI_SMOKE=1`), passa a credencial pela variável de ambiente NOME (nunca pelo valor), redige strings em formato de chave de qualquer saída gravada, pula alvos cujo binário não está instalado e classifica falhas como auth / upstream / config em vez de um booleano simples:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opcional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` restringe a varredura; `OMNIROUTE_SMOKE_TIMEOUT_MS` substitui o tempo limite de 120s por alvo.
---
## Veja também
- [Configuração do Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — o guia mais aprofundado do Claude Code
- [Configuração do Codex CLI](./CODEX-CLI-CONFIGURATION.md) — a configuração base única de `[model_providers.omniroute]`
- [Modo Remoto](./REMOTE-MODE.md) — contextos, tokens de acesso escopados, controle de um servidor remoto
- [Referência de Ferramentas CLI](../reference/CLI-TOOLS.md) — o catálogo completo de ferramentas suportadas + páginas do painel
- [Guia de Configuração](./SETUP_GUIDE.md) — métodos de instalação e integração inicial

View File

@@ -1,311 +1,86 @@
# CLI-TOOLS (Português (Brasil))
# CLI Tools Setup Guide — OmniRoute (Português (Brasil))
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
---
---
title: "Ferramentas CLI — OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Ferramentas CLI — OmniRoute
Última atualização: 2026-08-18
OmniRoute integra-se com três categorias de ferramentas CLI distribuídas em três páginas de painel dedicadas:
| Página | Rota | Conceito | Contagem |
| --------------- | ----------------------- | -------------------------------------------------------------------------------------------------- | ------------- |
| **Código CLI** | `/dashboard/cli-code` | Ferramentas de codificação que você aponta para o OmniRoute (Cliente → CLI → OmniRoute → Provedor) | 26 |
| **Agentes CLI** | `/dashboard/cli-agents` | Agentes autônomos que você aponta para o OmniRoute (mesmo fluxo, escopo mais amplo) | 8 |
| **Agentes ACP** | `/dashboard/acp-agents` | CLIs que o OmniRoute gera como backend via stdio/ACP (fluxo reverso) | veja registro |
Rotas legadas redirecionam via 308: `/dashboard/cli-tools``/dashboard/cli-code`, `/dashboard/agents``/dashboard/acp-agents`.
This guide explains how to install and configure all supported AI coding CLI tools
to use **OmniRoute** as the unified backend, giving you centralized key management,
cost tracking, model switching, and request logging across every tool.
---
## Como Funciona
## How It Works
```
Código CLI / Agentes CLI (fluxo de consumo):
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
▼ (todos apontam para o OmniRoute)
▼ (all point to OmniRoute)
http://YOUR_SERVER:20128/v1
▼ (OmniRoute roteia para o provedor correto)
▼ (OmniRoute routes to the right provider)
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
Agentes ACP (fluxo de spawn reverso):
Solicitação do cliente → OmniRoute → gera CLI via stdio/ACP → resposta
```
**Benefícios:**
**Benefits:**
- Uma chave de API para gerenciar todas as ferramentas
- Rastreamento de custos em todas as CLIs no painel
- Troca de modelo sem reconfigurar cada ferramenta
- Funciona localmente e em servidores remotos (VPS, Docker, Akamai, Cloudflare Tunnel)
- One API key to manage all tools
- Cost tracking across all CLIs in the dashboard
- Model switching without reconfiguring every tool
- Works locally and on remote servers (VPS)
---
## Auto-configurar com `setup-*`
## Supported Tools (Dashboard Source of Truth)
Você não precisa escrever a configuração de cada ferramenta manualmente. O OmniRoute fornece um comando `setup-*` por CLI suportada que lê o catálogo de modelos **ao vivo** de um OmniRoute em execução (local ou remoto) e escreve a configuração da ferramenta em sua máquina:
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
Current list (v3.0.0-rc.16):
```bash
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
```
| Tool | ID | Command | Setup Mode | Install Method |
| ------------------ | ------------- | ---------- | ---------- | -------------- |
| **Claude Code** | `claude` | `claude` | env | npm |
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
| **Cursor** | `cursor` | app | guide | desktop app |
| **Cline** | `cline` | `cline` | custom | npm |
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
| **Continue** | `continue` | extension | guide | VS Code |
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
| **OpenCode** | `opencode` | `opencode` | guide | npm |
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
Cada um aceita `--remote <url> --api-key <key>` (configurar uma ferramenta local contra um OmniRoute remoto), `--dry-run` (visualizar sem escrever) e `--port`. Ferramentas sem descoberta automática de modelo (Cline, Kilo, Roo, Goose, Aider, Qwen) aceitam `--model <id>` (e `--yes` para execuções não interativas). Para lançar uma CLI com o ambiente correto injetado e nenhuma configuração escrita, use o lançador genérico `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen, gemini — alvos e aliases vêm de `bin/cli/cli-manifest.mjs`); os lançadores legados por ferramenta `omniroute launch` (Claude Code) e `omniroute launch-codex` (Codex) permanecem disponíveis. A CLI Gemini é apenas para lançamento: é um alvo de `omniroute run`, mas não possui receita `setup-*`/`configure`.
### CLI fingerprint sync (Agents + Settings)
> **Referência completa:** a tabela mestre — o que cada comando escreve, cada flag, local vs remoto, e quais ferramentas querem um sufixo `/v1` — está em **[Integrações CLI](../guides/CLI-INTEGRATIONS.md)**.
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
This keeps provider IDs aligned with CLI cards and legacy IDs.
### Executando isso dentro de um contêiner
| CLI ID | Fingerprint Provider ID |
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
| `kilo` | `kilocode` |
| `copilot` | `github` |
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
Um comando `setup-*` executado dentro do contêiner OmniRoute escreve no próprio diretório home do contêiner, que nenhuma CLI do host lê e que desaparece com o contêiner. O OmniRoute detecta isso e sai com `2` com instruções em vez de escrever. Duas maneiras suportadas de prosseguir — instalar a CLI no host e `omniroute connect` para o contêiner, ou montar os diretórios de configuração e definir `CLI_CONFIG_HOME` (o perfil `host` do compose). Cada comando `setup-*`, além de `omniroute configure` e `omniroute config set`, aceita `--allow-container-write` quando configurar as CLIs do contêiner é o que você realmente quis dizer; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` faz o mesmo para o servidor. Veja
[Guia Docker → Configurando ferramentas CLI do host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
O **endpoint de aplicar** do painel (`POST /api/cli-tools/apply`) impõe a mesma proteção: em um contêiner, uma gravação cujo alvo não está montado do host responde **`422`** com `containerEphemeralTarget: true`, o texto de erro seguro e — para as ferramentas com uma receita de host (claude, codex, opencode, cline, kilo, continue) — um `hostSetupCommand` (por exemplo, `omniroute setup-opencode`) para executar no host em vez disso; nada é escrito. `dryRun: true` continua funcionando em modo contêiner e retorna o conteúdo gerado + caminho alvo sem tocar no disco, para que você possa visualizar a partir do painel e aplicar no host. Esse comportamento é intencional e protegido contra regressão por
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — nunca "corrija" um 422 removendo a proteção.
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
---
## Fonte de Verdade
## Step 1 — Get an OmniRoute API Key
O catálogo unificado vive em `src/shared/constants/cliTools.ts` como `CLI_TOOLS: Record<string, CliCatalogEntry>`.
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
2. Click **Create API Key**
3. Give it a name (e.g. `cli-tools`) and select all permissions
4. Copy the key — you'll need it for every CLI below
Cada entrada possui os seguintes campos (definidos em `src/shared/schemas/cliCatalog.ts`):
| Campo | Tipo | Descrição |
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------ |
| `category` | `"code" \| "agent"` | Em qual página a ferramenta aparece |
| `vendor` | `string` | Origem da ferramenta ("Anthropic", "OSS (P. Gauthier)") |
| `acpSpawnable` | `boolean` | Também utilizável como um Agente ACP (insígnia mostrada) |
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Nível de suporte a endpoint personalizado. `"none"` = backlog MITM |
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mecanismo de configuração |
| `id`, `name`, `color`, `description`, `docsUrl` | padrão | Campos de exibição principais |
Entradas com `baseUrlSupport: "none"` **não são mostradas** nas páginas do painel — elas estão registradas no backlog MITM para o plano 11 (veja `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
### Níveis de Capacidade (catalogado × detectável × configurável × lançável)
Nem toda ferramenta catalogada é detectável, configurável ou lançável. Cada nível tem uma
fonte declarada, e um teste de desvio mantém elas alinhadas:
| Nível | Significado | Declarado em |
| ---------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Catalogado** | Aparece no catálogo do painel (nome, fornecedor, docs, tipo de configuração) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
| **Detectável** | Detecção de binário/configuração, verificações de saúde, caminhos de configuração | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` catálogo de runtime) |
| **Configurável** | Suportado por `omniroute configure <cli>` (receita de configuração existe) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
| **Lançável** | Suportado por `omniroute run <target>` (injeção de env/args definida) | `bin/cli/cli-manifest.mjs` (`run: true`) |
`bin/cli/cli-manifest.mjs` é o manifesto executável canônico para os comandos CLI
superfícies: `run`, `configure` e os geradores de conclusão de shell derivam suas
listas de alvos, resolução de alias (por exemplo `kilocode`/`kilo-code`/`kilo_cli``kilo`)
e fiação da flag `--model` a partir dele. O guardião de desvio
`tests/unit/cli/cli-manifest-drift.test.ts` afirma que o manifesto, o catálogo de runtime,
o catálogo da UI e cada superfície consumidora permanecem sincronizados — um alvo adicionado a
uma superfície sem as outras falha na suíte em vez de desviar silenciosamente.
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
## 1. Catálogo de Código CLI (26 ferramentas)
## Step 2 — Install CLI Tools
Todas as ferramentas que aparecem em `/dashboard/cli-code`. Aqueles com `baseUrlSupport: none` estão conectados através de MITM ou um guia manual em vez de uma URL base personalizada:
| id | nome | fornecedor | baseUrlSupport | tipoDeConfiguração | acpSpawnable |
| ------------ | -------------------------------- | ------------------- | -------------- | ------------------ | ------------ |
| claude | Claude Code | Anthropic | full | env | true |
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
| zcode | ZCode (Plano de Codificação GLM) | Z.ai | none | custom | false |
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
| kilo | Kilo Code | Kilo-Org | full | custom | false |
| roo | Roo Code | Roo (OSS) | full | guide | false |
| continue | Continue | continue.dev | full | guide | false |
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
| forge | ForgeCode | Antinomy HQ | full | custom | true |
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
| droid | Factory Droid | Factory AI | partial | guide | false |
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
| pi | Pi (agente de codificação pi) | M. Zechner (OSS) | full | custom | false |
| grok-build | Grok Build | xAI | full | custom | false |
| crush | Crush | OSS (Charm) | full | custom | false |
| qwen | Qwen Code | Alibaba | full | guide | true |
| cursor | Cursor | Anysphere | none | guide | false |
| antigravity | Antigravity | Google | none | mitm | false |
| hermes | Hermes | Nous Research | none | guide | false |
| kiro | Kiro AI | Amazon | none | mitm | false |
| custom | Custom CLI | — | full | custom-builder | false |
Ferramentas com `baseUrlSupport: "partial"` mostram um distintivo "⚠ Base URL parcial" no cartão do dashboard.
## 2. Catálogo de Agentes CLI (8 ferramentas)
Agentes autônomos que aparecem em `/dashboard/cli-agents`:
| id | nome | fornecedor | suporteBaseUrl | acpSpawnable |
| ------------ | ---------------- | ------------------------ | -------------- | ------------ |
| hermes-agent | Hermes Agent | Nous Research | completo | falso |
| openclaw | OpenClaw | OSS (P. Steinberger) | completo | verdadeiro |
| goose | Goose | Block / Linux Foundation | completo | verdadeiro |
| interpreter | Open Interpreter | OSS | completo | verdadeiro |
| warp | Warp AI | Warp Inc. | parcial | verdadeiro |
| agent-deck | Agent Deck | asheshgoplani (OSS) | completo | falso |
| omp | Oh My Pi | OSS | completo | verdadeiro |
| letta | Letta CLI | Letta | completo | falso |
---
## 3. Agentes ACP (/dashboard/acp-agents)
Esta página (renomeada de `/dashboard/agents`) mostra CLIs que o OmniRoute pode **gerar** como motores de execução de backend via protocolo stdio/ACP. O catálogo é mantido separadamente em `src/lib/acp/registry.ts` e **não** é o mesmo que `CLI_TOOLS`.
---
## 4. Pendência MITM (não exibida no dashboard)
Os seguintes CLIs não suportam URL base personalizada nativamente e **não estão listados** nas páginas de Código CLI ou Agentes CLI. Eles são candidatos à interceptação MITM no plano 11:
| CLI | Motivo |
| ------------------- | ----------------------------------------------------------------- |
| windsurf | BYOK limitado a selecionar modelos Claude + URL/token corporativo |
| amp | Ecossistema fechado (Sourcegraph) |
| amazon-q / kiro-cli | Autenticação AWS SSO, sem URL personalizada |
| cowork | Anthropic Desktop, sem endpoint configurável |
Veja `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` para a referência cruzada completa.
---
## 5. API de Detecção em Lote
Toda a detecção de ferramentas é agregada via um único endpoint:
**`GET /api/cli-tools/all-statuses`**
- Auth: `requireCliToolsAuth(request)` (mesmo que outras rotas `/api/cli-tools/`)
- Retorna: `Record<toolId, ToolBatchStatus>` (tipo: `src/shared/types/cliBatchStatus.ts`)
- Estratégia: `Promise.all` sobre todas as ferramentas, timeout de 5s por ferramenta
- Cache: LRU em memória indexado pelo `mtime` do arquivo de configuração. Cache invalidado quando o `mtime` muda. Resetado na reinicialização do servidor.
Formato da resposta por ferramenta:
```ts
interface ToolBatchStatus {
detection: {
installed: boolean;
runnable: boolean;
version?: string;
command?: string;
commandPath?: string;
reason?: string;
};
config: {
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
endpoint?: string | null;
lastConfiguredAt?: string | null;
};
error?: string; // sanitizado, sem rastros de pilha
}
```
## 6. Manipuladores de Configurações para Novas Ferramentas
Novas ferramentas com `configType: "custom"` têm rotas de API de configurações dedicadas:
| Rota | Ferramenta |
| ------------------------------------------- | -------------------------------------------------------------------------- |
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legado) |
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primário + sincronização legado `~/.deepseek`) |
| `POST /api/cli-tools/smelt-settings` | Smelt |
| `POST /api/cli-tools/pi-settings` | Agente de codificação Pi |
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + chave `.env` dedicada) |
Todas as rotas usam `sanitizeErrorMessage()` para respostas de erro (Regra Rigorosa #12).
---
## 7. Arquitetura das Páginas do Painel
### Código CLI (`/dashboard/cli-code`)
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — componente do servidor
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grade do cliente
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — página de detalhes da ferramenta
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 cartões de ferramentas especializadas + `ToolDetailClient.tsx`
### Agentes CLI (`/dashboard/cli-agents`)
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — componente do servidor
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grade do cliente
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — reutiliza `ToolDetailClient`
### Agentes ACP (`/dashboard/acp-agents`)
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — componente do servidor (movido de `agents/`)
### Componentes de UI Compartilhados (`src/shared/components/cli/`)
| Arquivo | Propósito |
| ----------------------- | ----------------------------------------------------------------- |
| `CliToolCard.tsx` | Cartão de status inteligente (detecção + configuração + endpoint) |
| `CliConceptCard.tsx` | Cartão de explicação de conceito por página |
| `CliComparisonCard.tsx` | Comparação em três colunas entre tipos de CLI |
| `BaseUrlSelect.tsx` | Dropdown de endpoint (Local/Nuvem/Personalizado) |
| `ApiKeySelect.tsx` | Seletor de chave da API |
| `ManualConfigModal.tsx` | Modal de snippet de configuração copiável |
### Hook Compartilhado (`src/shared/hooks/cli/`)
| Arquivo | Propósito |
| ------------------------- | -------------------------------------------------------------------------------- |
| `useToolBatchStatuses.ts` | Busca `/api/cli-tools/all-statuses`, gerencia estado de carregamento/atualização |
## 8. i18n
Novos namespaces adicionados no plano 14 F9:
| Namespace | Propósito |
| ----------- | -------------------------------------------------------------------------------------------------------- |
| `cliCommon` | Strings compartilhadas (rótulos de cartão, textos de conceito/comparação, rótulos de página de detalhes) |
| `cliCode` | Strings da página do Código CLI |
| `cliAgents` | Strings da página de Agentes CLI |
| `acpAgents` | Strings da página de Agentes ACP |
Traduções completas em PT-BR e EN são fornecidas. 39 outros locais retornam automaticamente para EN via mesclagem em nível de namespace em `src/i18n/request.ts`.
---
## 9. Início Rápido
### Passo 1 — Obter uma Chave de API do OmniRoute
1. Abra `/dashboard/api-manager`**Criar Chave de API**
2. Dê um nome (por exemplo, `cli-tools`) e selecione todas as permissões
3. Copie a chave — você precisará dela para cada CLI abaixo
> Sua chave se parece com: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
---
### Passo 2 — Instalar Ferramentas CLI
Todas as ferramentas baseadas em npm requerem Node.js 22.22.2+ ou 24.x:
All npm-based tools require Node.js 18+:
```bash
# Claude Code (Anthropic)
@@ -323,138 +98,96 @@ npm install -g cline
# KiloCode
npm install -g kilocode
# Qwen Code
npm install -g @qwen-code/qwen-code
# Kiro CLI (Amazon — requires curl + unzip)
apt-get install -y unzip # on Debian/Ubuntu
curl -fsSL https://cli.kiro.dev/install | bash
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
```
# Google Gemini CLI (lançável via `omniroute run gemini` → /v1beta surface)
npm install -g @google/gemini-cli
**Verify:**
# Aider
pip install aider-chat
# Smelt
cargo install smelt # Baseado em Rust
# Agente de codificação Pi
# veja https://github.com/zechnerj/pi-coding-agent para instalação
# jcode
# veja https://github.com/1jehuang/jcode para instalação
```bash
claude --version # 2.x.x
codex --version # 0.x.x
opencode --version # x.x.x
cline --version # 2.x.x
kilocode --version # x.x.x (or: kilo --version)
kiro-cli --version # 1.x.x
```
---
### Passo 3 — Configurar via Dashboard
## Step 3 — Set Global Environment Variables
1. Vá para `http://localhost:20128/dashboard/cli-code`
2. Encontre sua ferramenta na grade
3. Clique no cartão para abrir a página de detalhes da ferramenta
4. Selecione sua chave de API e URL base
5. Clique em **Aplicar Configuração** ou copie o trecho de configuração manual
---
### Passo 4 — Definir Variáveis de Ambiente Globais
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
```bash
# Endpoint Universal do OmniRoute
# OmniRoute Universal Endpoint
export OPENAI_BASE_URL="http://localhost:20128/v1"
export OPENAI_API_KEY="sk-your-omniroute-key"
export ANTHROPIC_BASE_URL="http://localhost:20128"
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
# O CLI Gemini lê GOOGLE_GEMINI_BASE_URL na RAIZ (seu SDK anexa /v1beta/... por conta própria)
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
export GEMINI_BASE_URL="http://localhost:20128/v1"
export GEMINI_API_KEY="sk-your-omniroute-key"
```
> Para um **servidor remoto**, substitua `localhost:20128` pelo IP ou domínio do servidor,
> por exemplo, `http://<seu-ip-do-servidor>:20128`.
> For a **remote server** replace `localhost:20128` with the server IP or domain,
> e.g. `http://192.168.0.15:20128`.
---
### Passo 4 — Configurar Cada Ferramenta
## Step 4 — Configure Each Tool
#### Claude Code
### Claude Code
```bash
# Crie ~/.claude/settings.json:
# Via CLI:
claude config set --global api-base-url http://localhost:20128/v1
# Or create ~/.claude/settings.json:
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:20128",
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
}
"apiBaseUrl": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
}
EOF
```
Use a raiz do gateway unificado da Anthropic para Claude Code. Não anexe `/v1` aqui.
**Teste:** `claude "say hello"`
**Test:** `claude "say hello"`
---
#### OpenAI Codex
O Codex moderno (v0.137+) lê `~/.codex/config.toml` apenas — o antigo
`config.yaml` pertence ao CLI npm legado e é ignorado silenciosamente. A chave da API
permanece na variável de ambiente `OMNIROUTE_API_KEY` (`env_key`), nunca
dentro do arquivo:
### OpenAI Codex
```bash
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
model_provider = "omniroute"
[model_providers.omniroute]
name = "OmniRoute"
base_url = "http://localhost:20128/v1"
env_key = "OMNIROUTE_API_KEY"
requires_openai_auth = false
EOF
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
```
Referência completa (perfis, `wire_api`, janelas de contexto): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
**Teste:** `codex "what is 2+2?"`
---
#### OpenCode
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
{
"\$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "sk-your-omniroute-key"
},
"models": {
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3-flash": { "name": "gemini-3-flash" }
}
}
}
}
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
model: auto
apiKey: sk-your-omniroute-key
apiBaseUrl: http://localhost:20128/v1
EOF
```
**Teste:** `opencode`
> Use `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
> para enviar variantes de pensamento.
**Test:** `codex "what is 2+2?"`
---
#### Cline (CLI ou VS Code)
### OpenCode
**Modo CLI:**
```bash
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
[provider.openai]
base_url = "http://localhost:20128/v1"
api_key = "sk-your-omniroute-key"
EOF
```
**Test:** `opencode`
---
### Cline (CLI or VS Code)
**CLI mode:**
```bash
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
@@ -466,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
EOF
```
**Modo VS Code:**
Configurações da extensão Cline → Provedor de API: `OpenAI Compatible`URL Base: `http://localhost:20128/v1`
**VS Code mode:**
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
Ou use o dashboard do OmniRoute**CLI Tools → Cline → Aplicar Config**.
Or use the OmniRoute dashboard**CLI Tools → Cline → Apply Config**.
---
#### KiloCode (CLI ou VS Code)
### KiloCode (CLI or VS Code)
**Modo CLI:**
**CLI mode:**
```bash
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
```
**Configurações do VS Code:**
**VS Code settings:**
```json
{
@@ -490,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
}
```
Ou use o dashboard do OmniRoute**CLI Tools → KiloCode → Aplicar Config**.
Or use the OmniRoute dashboard**CLI Tools → KiloCode → Apply Config**.
---
#### Continue (Extensão do VS Code)
### Continue (VS Code Extension)
Edite `~/.continue/config.yaml`:
Edit `~/.continue/config.yaml`:
```yaml
models:
@@ -508,255 +241,158 @@ models:
default: true
```
Reinicie o VS Code após a edição.
Restart VS Code after editing.
---
#### VS Code Insiders (`chatLanguageModels.json`)
Use isso quando o VS Code Insiders estiver configurado para modelos de endpoint personalizados e você quiser que o OmniRoute funcione sem um campo de cabeçalho personalizado.
**Localização recomendada:**
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
**Exemplo usando o alias tokenizado do OmniRoute:**
```json
[
{
"vendor": "customendpoint",
"id": "auto",
"name": "OmniRoute Auto",
"family": "gpt-4",
"version": "1.0.0",
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
"requestFormat": "openai-chat-completions",
"contextWindow": 256000,
"maxOutputTokens": 32768,
"auth": {
"type": "none"
}
}
]
```
**Notas:**
- Substitua `sk-your-omniroute-key` por uma chave de API criada no OmniRoute.
- O campo `url` deve apontar para `/api/v1/vscode/{token}/chat/completions`.
- O campo `modelsUrl` deve apontar para `/api/v1/vscode/{token}/models`.
- Prefira o fluxo normal `/v1` + cabeçalho Bearer quando o cliente suportar cabeçalhos personalizados.
- Tokens incorporados na URL são uma solução de compatibilidade e podem aparecer nos logs do editor ou no histórico do proxy.
---
#### Kiro CLI (Amazon)
### Kiro CLI (Amazon)
```bash
# Faça login na sua conta AWS/Kiro:
# Login to your AWS/Kiro account:
kiro-cli login
# O CLI usa sua própria autenticação — o OmniRoute não é necessário como backend para o Kiro CLI em si.
# Use kiro-cli junto com o OmniRoute para outras ferramentas.
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
# Use kiro-cli alongside OmniRoute for other tools.
kiro-cli status
```
Para o aplicativo desktop **Kiro IDE**, use o endpoint MITM exposto pelo OmniRoute
sob `/dashboard/cli-tools → Kiro`.
---
### Qwen Code (Alibaba)
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
**Option 1: Environment variables (`~/.qwen/.env`)**
```bash
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
OPENAI_API_KEY="sk-your-omniroute-key"
OPENAI_BASE_URL="http://localhost:20128/v1"
OPENAI_MODEL="auto"
EOF
```
**Option 2: `settings.json` with model providers**
```json
// ~/.qwen/settings.json
{
"env": {
"OPENAI_API_KEY": "sk-your-omniroute-key",
"OPENAI_BASE_URL": "http://localhost:20128/v1"
},
"modelProviders": {
"openai": [
{
"id": "omniroute-default",
"name": "OmniRoute (Auto)",
"envKey": "OPENAI_API_KEY",
"baseUrl": "http://localhost:20128/v1"
}
]
}
}
```
**Option 3: Inline CLI flags**
```bash
OPENAI_BASE_URL="http://localhost:20128/v1" \
OPENAI_API_KEY="sk-your-omniroute-key" \
OPENAI_MODEL="auto" \
qwen
```
> For a **remote server** replace `localhost:20128` with the server IP or domain.
**Test:** `qwen "say hello"`
### Cursor (Desktop App)
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
Via GUI: **Settings → Models → OpenAI API Key**
- Base URL: `https://your-domain.com/v1`
- API Key: your OmniRoute key
---
## 10. OmniRoute CLI Interno
## Dashboard Auto-Configuration
O binário `omniroute` fornece comandos para ciclo de vida do servidor, configuração, diagnósticos e gerenciamento de provedores. Ponto de entrada: `bin/omniroute.mjs`.
The OmniRoute dashboard automates configuration for most tools:
```bash
omniroute # Iniciar servidor (porta padrão 20128)
omniroute setup # Assistente de configuração interativo
omniroute doctor # Verificar configuração, DB, portas, tempo de execução
omniroute providers list # Conexões de provedores configurados
omniroute providers test-all # Testar todas as conexões ativas
omniroute reset-password # Redefinir a senha do administrador
omniroute logs # Transmitir logs de requisições
omniroute health # Saúde detalhada (disjuntores, cache, memória)
omniroute --version # Imprimir versão
omniroute --help # Mostrar todos os comandos
```
1. Go to `http://localhost:20128/dashboard/cli-tools`
2. Expand any tool card
3. Select your API key from the dropdown
4. Click **Apply Config** (if tool is detected as installed)
5. Or copy the generated config snippet manually
### Configuração e Inicialização
---
```bash
omniroute setup # Assistente de configuração interativo
omniroute setup --non-interactive # Modo CI/automação (lê variáveis de ambiente + flags)
omniroute setup --password '<value>' # Definir senha do administrador diretamente
omniroute setup --add-provider \
--provider openai \
--api-key '<value>' \
--test-provider # Adicionar e testar um provedor em uma única ação
```
## Built-in Agents: Droid & OpenClaw
Variáveis de ambiente reconhecidas para configuração não interativa:
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
They run as internal routes and use OmniRoute's model routing automatically.
| Var | Propósito |
| ------------------- | ------------------------------------------------------------------------- |
| `OMNIROUTE_API_KEY` | Chave da API do provedor (vinculada a `--api-key` via Commander `.env()`) |
| `DATA_DIR` | Substituir o diretório de dados do OmniRoute |
- Access: `http://localhost:20128/dashboard/agents`
- Configure: same combos and providers as all other tools
- No API key or CLI install required
Todas as outras entradas não interativas são passadas como flags, não variáveis de ambiente:
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
(veja as opções `omniroute setup` acima).
---
### Diagnósticos
## Available API Endpoints
```bash
omniroute doctor # Verificar configuração, DB, portas, tempo de execução, memória, vivacidade
omniroute doctor --json # JSON legível por máquina
omniroute doctor --no-liveness # Ignorar a verificação de saúde HTTP
omniroute doctor --host 0.0.0.0 # Substituir host de vivacidade
omniroute doctor --liveness-url <url> # Substituir URL do endpoint de saúde completo
```
O comando doctor executa estas verificações: `Configuração`, `Banco de Dados`, `Armazenamento/encriptação`,
`Disponibilidade de Porta`, `Tempo de execução do Node`, `Binário nativo` (better-sqlite3),
`Memória` e `Vivacidade do Servidor`. Ele sai com um código diferente de zero se qualquer verificação falhar.
### Gerenciamento de Provedores
```bash
omniroute providers available # Catálogo de provedores do OmniRoute
omniroute providers available --search openai # Filtrar catálogo por id/nome/alias/categoria
omniroute providers available --category api-key # Filtrar por categoria (api-key, oauth, free, ...)
omniroute providers available --json # JSON legível por máquina
omniroute providers list # Conexões de provedores configurados
omniroute providers list --json
omniroute providers test <id|name> # Testar uma conexão configurada
omniroute providers test-all # Testar todas as conexões ativas
omniroute providers validate # Validação estrutural apenas local
omniroute providers add <provider> --credential-env PROVIDER_KEY
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth <provider> # Fluxo OAuth existente
omniroute providers edit <id|name> --default-model <model>
omniroute providers remove <id|name> --yes
```
`providers add/import/auth/edit/remove` são orientados por API e, portanto, funcionam contra
o contexto local ou remoto ativo. A entrada de credenciais deve usar
`--credential-stdin` ou `--credential-env`; `--dry-run --json` relata apenas
a presença/formato redigido. `providers available` lê o catálogo do OmniRoute;
`providers list/test/test-all/validate` mantêm seu comportamento local SQLite e
não requerem que o servidor esteja em execução.
### Recuperação e Redefinição
```bash
omniroute reset-password # Redefinir a senha do administrador (também: omniroute-reset-password)
omniroute reset-encrypted-columns # Mostrar aviso + execução simulada para redefinição de credenciais criptografadas
omniroute reset-encrypted-columns --force # Na verdade, anular credenciais criptografadas no SQLite
```
### Exportação de Credenciais (⚠ manuseie com cuidado)
```bash
omniroute auth export # Mostrar aviso + porta de confirmação — sem acesso ao DB
omniroute auth export --force # Exportar TODAS as credenciais DESCRITAS de conexões para stdout como JSON
omniroute auth export --force --id <id> # Exportar apenas a conexão correspondente
omniroute auth export --force --format env # Emitir linhas OMNIROUTE_<PROVIDER>_<FIELD>=<value>
omniroute auth export --force --out creds.json # Escrever em um arquivo (criado com permissões 0600)
```
`auth export` é **apenas local** (leitura direta do SQLite, sem rota HTTP) e intencionalmente imprime/grava
valores **em texto simples** `apiKey`/`accessToken`/`refreshToken`/`idToken` — essa é a funcionalidade, não um
bug. Nada é lido do banco de dados, e nada é descriptografado, sem `--force`. Um banner de aviso no stderr
sempre é impresso antes de qualquer texto simples ser emitido. Requer que `STORAGE_ENCRYPTION_KEY` esteja
definido. Um campo que falha ao descriptografar (chave antiga, texto cifrado corrompido) é relatado como
`<field>DecryptFailed: true` em vez de abortar toda a exportação ou vazar o erro subjacente.
### Outros subcomandos
Estes assumem um servidor OmniRoute em execução, a menos que indicado de outra forma:
```bash
omniroute status # Status abrangente em tempo de execução
omniroute logs # Transmitir logs de requisições (--json, --search, --follow)
omniroute config show # Exibir configuração atual
omniroute provider list # Listar provedores disponíveis (alias de providers list)
omniroute provider add # Registrar o OmniRoute como um provedor em uma ferramenta
omniroute keys add | list | remove # Gerenciar chaves de API
omniroute models [provider] # Listar modelos (--json, --search)
omniroute combo list | switch | create | delete
omniroute backup # Captura de configuração + DB
omniroute restore # Restaurar de uma captura anterior
omniroute health # Saúde detalhada (disjuntores, cache, memória)
omniroute quota # Uso de cota do provedor
omniroute cache # Status do cache
omniroute cache clear # Limpar caches semânticos + de assinatura
omniroute mcp status | restart # Status do servidor MCP / reiniciar
omniroute a2a status | card # Status do servidor A2A / cartão do agente
omniroute tunnel list | create | stop # Gerenciar túneis (cloudflare/tailscale/ngrok)
omniroute env show | get <k> | set <k> <v> # Inspecionar / definir variáveis de ambiente (temporárias)
omniroute test # Teste de conectividade do provedor
omniroute update # Verificar atualizações
omniroute completion # Gerar conclusão de shell
```
### Flags Comuns
| Flag | Descrição |
| ------------------- | -------------------------------------------------------- |
| `--no-open` | Não abrir automaticamente o navegador ao iniciar |
| `--port <n>` | Substituir a porta da API (padrão 20128) |
| `--mcp` | Executar como servidor MCP via stdio (para IDEs) |
| `--non-interactive` | Modo CI (sem prompts; lê de env/flags) |
| `--json` | Saída JSON legível por máquina (doctor, providers, etc.) |
| `--help`, `-h` | Mostrar ajuda específica do comando |
| `--version`, `-v` | Imprimir a versão instalada |
## Endpoints da API Disponíveis
| Endpoint | Descrição | Uso Para |
| -------------------------- | --------------------------------- | ----------------------------------------- |
| `/v1/chat/completions` | Chat padrão (todos os provedores) | Todas as ferramentas modernas |
| `/v1/responses` | API de respostas (formato OpenAI) | Codex, fluxos de trabalho agenticos |
| `/v1/completions` | Completações de texto legadas | Ferramentas mais antigas usando `prompt:` |
| `/v1/embeddings` | Embeddings de texto | RAG, busca |
| `/v1/images/generations` | Geração de imagens | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Texto para fala | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Fala para texto | Deepgram, AssemblyAI |
Exemplos prontos para colar com uma URL OmniRoute tokenizada:
```txt
Exemplo de token: sk-a3ab3c080beaee3a-69f4a4-070d71af
Base padrão OpenAI: http://localhost:20128/v1
Modelos do VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
Chat do VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
Respostas do VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
Tags do Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
Chat do Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
```
| Endpoint | Description | Use For |
| -------------------------- | ----------------------------- | --------------------------- |
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
| `/v1/embeddings` | Text embeddings | RAG, search |
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
---
## Solução de Problemas
| Erro | Causa | Correção |
| ----------------------------------------------- | -------------------------------- | ---------------------------------------------------------------- |
| `Connection refused` | OmniRoute não está rodando | `omniroute serve` |
| `401 Unauthorized` | Chave da API incorreta | Verifique em `/dashboard/api-manager` |
| `No combo configured` | Nenhum combo de roteamento ativo | Configure em `/dashboard/combos` |
| CLI mostra "not installed" | Binário não está no PATH | Verifique `which <command>` |
| Dashboard mostra "not detected" após instalação | Cache desatualizado | Clique em "⟳ Atualizar detecção" no dashboard |
| Link antigo `/dashboard/cli-tools` | Favorito pré-v3.8.6 | Redirecionado automaticamente para `/dashboard/cli-code` (308) |
| Link antigo `/dashboard/agents` | Favorito pré-v3.8.6 | Redirecionado automaticamente para `/dashboard/acp-agents` (308) |
| Error | Cause | Fix |
| ------------------------- | ----------------------- | ------------------------------------------ |
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
---
## Quick Setup Script (One Command)
```bash
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
OMNIROUTE_URL="http://localhost:20128/v1"
OMNIROUTE_KEY="sk-your-omniroute-key"
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
# Kiro CLI
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
# Write configs
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
cat >> ~/.bashrc << EOF
export OPENAI_BASE_URL="$OMNIROUTE_URL"
export OPENAI_API_KEY="$OMNIROUTE_KEY"
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
EOF
source ~/.bashrc
echo "✅ All CLIs installed and configured for OmniRoute"
```

View File

@@ -4,7 +4,7 @@
---
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
## Overview
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
- **Framework:** Next.js 16 (App Router) with TypeScript 6
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
- **State management:** Zustand (client), SQLite (server persistence)
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
│ │ └── manager.ts # MITM proxy manager
│ ├── shared/ # Shared utilities, components, and constants
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
│ │ ├── contracts/ # Shared API contracts
│ │ ├── hooks/ # React hooks
│ │ ├── middleware/ # Shared middleware utilities
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
## Key Features (v3.8.50)
### Core Proxy
- **341 AI providers** with automatic format translation
- **340 AI providers** with automatic format translation
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
- **4-tier fallback**: Subscription → API Key → Cheap → Free
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
## v3.8.x Highlights
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)

View File

@@ -1,302 +0,0 @@
# CLI-INTEGRATIONS (Português (Portugal))
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
---
---
title: "Integrações CLI — aponte qualquer CLI de codificação para o OmniRoute"
version: 3.8.50
lastUpdated: 2026-08-18
---
# Integrações CLI
O OmniRoute fornece uma família de comandos `setup-*` que configuram uma CLI de codificação (Codex, Claude Code, OpenCode, Cline, …) para usar o OmniRoute como seu backend — assim, a ferramenta comunica-se com **um** endpoint e o OmniRoute direciona para o provedor certo com fallback automático. Cada comando lê o catálogo de modelos **ao vivo** de um OmniRoute em execução (local ou remoto) e escreve o próprio arquivo de configuração da ferramenta na **sua** máquina. A chave da API é referenciada por uma variável de ambiente sempre que a ferramenta a suporta. Comandos que persistem um arquivo de ambiente local da ferramenta estão anotados abaixo.
Há também um lançador genérico — `omniroute run <target>` — que inicia `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` ou `gemini` com o ambiente correto injetado, sem escrever nenhuma configuração. Os alvos e seus aliases vêm do manifesto canônico `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), e `omniroute completion` oferece as mesmas palavras-alvo derivadas do manifesto. Os lançadores legados por ferramenta — `omniroute launch` (Claude Code) e `omniroute launch-codex` (Codex) — permanecem disponíveis.
A integração de provedores está disponível a partir do mesmo contexto local/remoto. Os comandos API-first abaixo mantêm a autenticação de gerenciamento separada das credenciais do provedor e nunca imprimem uma credencial na saída estruturada:
```bash
omniroute providers add glm --credential-env GLM_API_KEY --name work
omniroute providers import ./providers.json --dry-run --json
omniroute providers auth openai
omniroute providers edit <connection-id> --default-model glm/glm-5.2
omniroute providers remove <connection-id> --yes
```
Para scripts, prefira `--credential-stdin` ou `--credential-env`; `--credential` é mantido para uso local controlado. `providers remove` requer `--yes` em um terminal não interativo, e todos os cinco comandos respeitam o contexto ativo ou as opções globais `--base-url`/`--api-key`.
Para a configuração base única e escrita à mão das duas integrações mais ricas, consulte as análises detalhadas por ferramenta:
- [Configuração do Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
- [Configuração do Codex CLI](./CODEX-CLI-CONFIGURATION.md)
- [Modo Remoto](./REMOTE-MODE.md) — controle um OmniRoute remoto (VPS / Tailnet) a partir do seu laptop
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — a extensão OmniCopilot; ela também pode executar esses
comandos `setup-*` para você a partir dentro do editor
---
## Tabela mestre
Cada comando respeita o **contexto ativo** (definido com `omniroute connect`, veja
[Modo Remoto](./REMOTE-MODE.md)) ou as flags explícitas `--remote <url> --api-key <key>`.
"Local vs remoto" abaixo significa: sem flags, o alvo é `http://localhost:20128`;
com `--remote` (ou um contexto remoto ativo), ele busca o catálogo daquele
servidor e escreve a configuração localmente.
| Comando | Ferramenta | O que escreve | Principais flags | Local vs remoto |
| -------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — um perfil por modelo de texto compatível (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Ambos |
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — um perfil por modelo correspondente (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Ambos |
| `omniroute setup-opencode` | OpenCode (compatível com openai) | `~/.config/opencode/opencode.json` — provedor `omniroute` com cada modelo do catálogo (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Ambos |
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (modo CLI) + imprime configurações da extensão do VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Ambos |
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + mescla `kilocode.*` nas configurações do VS Code `settings.json` se presente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Ambos |
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — modelos `provider: openai`, chave via `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-cursor` | Cursor | Nada — imprime os passos no aplicativo (a configuração do Cursor é opaca em SQLite) | `--remote` `--api-key` `--only` `--port` | Ambos |
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (importar doc) + define `roo-cline.autoImportSettingsPath` se um `settings.json` do VS Code existir | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Ambos |
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — provedor `openai-compat`, chave via `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + imprime receita de ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + imprime receita de ambiente | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Ambos |
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` em `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Ambos |
| `omniroute run <target>` | Lançamento em tempo de execução (genérico) | Nada — inicia `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` com o ambiente e argumentos corretos; Qwen e Gemini usam um diretório isolado temporário | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Ambos |
| `omniroute launch` | Claude Code | Nada — inicia `claude` com `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injetados | `--remote` `--api-key` `--token` `--profile` `--port` | Ambos |
| `omniroute launch-codex` | OpenAI Codex CLI | Nada — inicia `codex` com o provedor `omniroute` injetado via flags `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Ambos |
Notas sobre as flags (verificadas na fonte do comando):
- `--remote <url>` — busca o catálogo de um OmniRoute remoto (substitui `--port`
e o contexto ativo). `--api-key <key>` fornece a credencial para aquele
servidor (padrão para a variável de ambiente `OMNIROUTE_API_KEY`, ou o token do contexto ativo).
- `--only <patterns>` — substrings separadas por vírgula; mantém apenas os IDs de modelo que correspondem
(por exemplo, `--only glm,kimi`). Disponível em `setup-codex`, `setup-claude`,
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
- `--dry-run` — imprime exatamente o que seria escrito sem tocar no
sistema de arquivos. Disponível em todos os comandos `setup-*` **exceto** `setup-cursor`
(que nunca escreve um arquivo).
- `--model <id>` — necessário (ou escolhido interativamente) para as ferramentas que não têm
descoberta automática de modelo: Cline, Kilo, Roo, Goose, Qwen, Aider. Essas ferramentas
também aceitam `--yes` para execuções não interativas (que então requerem `--model`).
`setup-opencode` aceita `--model` para definir o modelo padrão de nível superior.
- `--model <id>` em `omniroute run` segue a fiação por alvo do manifesto
(`bin/cli/cli-manifest.mjs`): **aider** recebe `--model openai/<id>` e
**opencode** `--model omniroute/<id>` (o prefixo é adicionado apenas quando o id
não o possui); **qwen** e **gemini** recebem o id verbatim;
**claude** recebe via `ANTHROPIC_MODEL`, **goose** via `GOOSE_MODEL`, e
**codex** via argumentos `-c model_providers.omniroute.*`. **Qwen é o único alvo de execução
que requer obrigatoriamente `--model`** — `omniroute run qwen` sem ele sai
`2` com um erro explícito.
- `--port <port>` — porta local do OmniRoute (padrão `20128`, ignorada quando `--remote`
está definido). Presente em todos os `setup-*` e ambos os lançadores.
- Códigos de saída de `omniroute run`: o próprio código de saída da CLI filha é propagado
verbatim; `2` = argumentos inválidos (alvo não suportado, `--model` obrigatório ausente, guardião de contêiner); `127` = o binário alvo não está no `PATH`;
`130`/`143`/`129` quando o lançamento é encerrado por `SIGINT`/`SIGTERM`/`SIGHUP`;
`1` = outra falha de lançamento em tempo de execução.
- Os dois lançadores (`launch`, `launch-codex`) aceitam `--profile <name>` para selecionar
um perfil escrito por `setup-claude` / `setup-codex`, além de argumentos pass-through para
o binário subjacente `claude` / `codex`.
O seletor interativo também é compartilhado pelas receitas de configuração:
```bash
# Escolha a partir do catálogo de modelos local ou remoto ativo e configure o alvo.
omniroute configure claude
omniroute configure opencode --provider glm
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
```
`configure` atualmente delega para as receitas testadas para `codex`, `claude`,
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, e `kilo`. Entradas de catálogo apenas para IDE,
MITM, e apenas guias permanecem como fluxos explícitos `setup-*`/manuais e não são apresentadas como alvos lançáveis.
> `setup-opencode` é a integração **leve compatível com openai** do OpenCode.
> Há também uma integração de plugin mais rica — `omniroute setup opencode` — que
> instala `@omniroute/opencode-plugin`. Eles são comandos diferentes; a tabela
> acima documenta `setup-opencode`.
---
## Uso local
Com o OmniRoute a correr em `localhost:20128`, basta executar o comando de configuração para a sua ferramenta. O catálogo é buscado no servidor local.
```bash
# Codex: escreve um perfil por modelo correspondente em ~/.codex/
omniroute setup-codex
codex --profile glm52 # usa um perfil gerado
# Claude Code: escreve perfis por modelo, depois inicia um
omniroute setup-claude
omniroute launch --profile glm52
# OpenCode: escreve o fornecedor compatível com openai com todos os modelos do catálogo
omniroute setup-opencode
export OMNIROUTE_API_KEY=sk-... # referenciado via {env:OMNIROUTE_API_KEY}, nunca em disco
opencode -m omniroute/glm/glm-5.2 "..."
# Ferramentas sem auto-descoberta precisam de um modelo explícito:
omniroute setup-aider --model glm/glm-5.2
omniroute setup-qwen --model qwen/qwen3.8-max-preview
# Pré-visualização sem escrever nada:
omniroute setup-continue --dry-run
```
Inicie sem escrever qualquer configuração (apenas injeção de ambiente):
```bash
omniroute launch # Claude Code → OmniRoute local
omniroute launch-codex # Codex CLI → OmniRoute local
omniroute launch-codex --profile glm52
omniroute run claude --model openai/gpt-5.4
omniroute run codex --model openai/gpt-5.4 --dry-run --json
omniroute run aider --model glm/glm-5.2 -- --message "resposta OK"
omniroute run goose --model glm/glm-5.2
omniroute run opencode --model glm/glm-5.2 -- run "resposta OK"
omniroute run qwen --model glm/glm-5.2 -- -p "resposta OK"
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "resposta OK"
# Caminho de comando explícito: passe tudo o que vem depois de --
omniroute run claude -- --print-system-prompt "revise este diff"
```
---
## Uso remoto
Aponte qualquer comando de configuração para um OmniRoute remoto com `--remote` + `--api-key`. O catálogo é buscado remotamente; a configuração é escrita na sua máquina local.
```bash
# OpenCode contra um VPS remoto, mantenha apenas os modelos glm/kimi
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
--only glm,kimi
opencode -m omniroute/glm/glm-5.2 "..." # exporte OMNIROUTE_API_KEY primeiro
# Perfis Codex de um catálogo remoto
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
# Inicie um CLI diretamente contra o remoto
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
```
Em vez de passar `--remote`/`--api-key` todas as vezes, faça login uma vez e deixe o **contexto ativo** fornecê-los automaticamente:
```bash
omniroute connect 192.168.0.15 # gera um token com escopo, armazena o contexto
omniroute setup-codex # ← agora usa o catálogo remoto
omniroute setup-opencode # ← o mesmo
omniroute launch # ← Claude Code contra o remoto
```
Veja [Modo Remoto](./REMOTE-MODE.md) para contextos, escopos e gestão de tokens.
---
## Convenções de URL base (quais ferramentas querem `/v1`)
O OmniRoute expõe a superfície OpenAI em `/v1`, a superfície Anthropic na raiz, e uma superfície nativa Gemini em `/v1beta`. Cada integração está ligada à forma que a sua ferramenta espera (verificado na fonte do comando):
| Integração | URL base escrita | `/v1`? |
| -------------------------------------------------------------------------- | ---------------- | ------------------------------------------ |
| `setup-cline` (`openAiBaseUrl`) | raiz | Não — Cline anexa `/v1/chat/completions` |
| `setup-goose` (`OPENAI_HOST`) | raiz | Não — Goose anexa o caminho |
| `setup-aider` (`OPENAI_API_BASE`) | raiz | Não — LiteLLM anexa `/v1/chat/completions` |
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | com `/v1` | Sim |
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | raiz | Não — Claude Code anexa `/v1/messages` |
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | com `/v1` | Sim |
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | com `/v1` | Sim |
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | raiz | Não — o SDK anexa `/v1beta/models/…` |
---
## Manter dependências nativas na atualização: `--include=optional`
Quando você atualiza com `omniroute update` (após confirmar, ou com `--apply`),
o OmniRoute executa a instalação com `--include=optional` incorporado:
```bash
npm install -g omniroute@latest --include=optional
```
Este **não** é um parâmetro que você passa para `omniroute update` — ele é sempre aplicado pelo
atualizador. Isso garante que as `optionalDependencies` (`better-sqlite3`, `keytar`,
`tls-client`, a pilha LLMLingua SLM) sobrevivam à atualização, mesmo que sua configuração npm
tenha `omit=optional` definido, o que, de outra forma, eliminaria silenciosamente o driver SQLite
nativo e a ligação ao keyring do SO. Para visualizar o comando exato sem aplicar:
```bash
omniroute update --dry-run
# [DRY RUN] Executaria: npm install -g omniroute@latest --include=optional
```
Outros parâmetros de `omniroute update` (verificados no código-fonte): `--check` (sai com 1 se
desatualizado), `--apply` (instala sem solicitar), `--changelog`, `--no-backup`,
`--yes`.
---
## Google Gemini CLI via `omniroute run gemini`
Contrato verificado contra `@google/gemini-cli` 0.50.0: a CLI respeita
`GOOGLE_GEMINI_BASE_URL` e emite `POST /v1beta/models/<model>:generateContent`
(e `:streamGenerateContent?alt=sse`) contra ele — exatamente a superfície nativa
Gemini do OmniRoute (`/v1beta`). `omniroute run gemini` conecta isso automaticamente:
- `GOOGLE_GEMINI_BASE_URL` → a URL base ativa do OmniRoute (raiz, sem `/v1`);
- `GEMINI_API_KEY` → a credencial resolvida do OmniRoute (opção/env/contexto);
- um **`GEMINI_CLI_HOME` isolado temporário** cujo `.gemini/settings.json`
seleciona a autenticação `gemini-api-key`, de modo que uma sessão OAuth do Google armazenada (Code Assist)
nunca sobrescreva o lançamento direcionado pelo OmniRoute — removido após a saída;
- **higiene do env**: o ambiente filho é limpo de `GOOGLE_API_KEY`,
`GOOGLE_GENAI_USE_VERTEXAI` e `GOOGLE_GENAI_USE_GCA` (que redirecionariam
a autenticação para Vertex/Code Assist), e `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` é
definido como uma rede de segurança — os outros alvos de `run` recebem o mesmo
tratamento para suas próprias variáveis conflitantes;
- injeção de `--model <id>` a partir de `--provider`/`--model`.
```bash
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
```
O guardião de confiança do espaço de trabalho do Gemini ainda se aplica em modo headless — passe
`--skip-trust` (ou confie no diretório interativamente) você mesmo; o lançador
deliberadamente não o ignora. Este lançador é distinto do **registro ACP**
(`src/lib/acp/registry.ts`, `gemini --acp`), que permanece a
integração do protocolo do agente para `/dashboard/acp-agents`.
---
## Varredura real de fumaça (opcional)
Execuções de regressão do plano de lançamento determinístico em CI (`tests/unit/cli/run-command.test.ts`,
`tests/unit/cli/run-execution.test.ts`). Para validar os binários REAIS contra um servidor REAL
do OmniRoute, existe um suporte opcional em
`tests/integration/upstream-cli-smoke.int.test.ts`. Ele nunca é executado automaticamente
(cada sub-teste é ignorado a menos que `RUN_CLI_SMOKE=1`), passa a credencial por variável de ambiente
NOME (nunca por valor), redige strings em formato de chave de qualquer saída gravada, ignora
alvos cujo binário não está instalado, e classifica falhas como
auth / upstream / config em vez de um booleano simples:
```bash
RUN_CLI_SMOKE=1 \
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
```
Opcional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` restringe a varredura;
`OMNIROUTE_SMOKE_TIMEOUT_MS` substitui o tempo limite de 120s por alvo.
---
## Veja também
- [Configuração do Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — o guia mais aprofundado do Claude Code
- [Configuração do Codex CLI](./CODEX-CLI-CONFIGURATION.md) — a configuração base única `[model_providers.omniroute]`
- [Modo Remoto](./REMOTE-MODE.md) — contextos, tokens de acesso com escopo, controlo de um servidor remoto
- [Referência de Ferramentas CLI](../reference/CLI-TOOLS.md) — o catálogo completo de ferramentas suportadas + páginas do painel
- [Guia de Configuração](./SETUP_GUIDE.md) — métodos de instalação e integração inicial

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More