Compare commits
4 Commits
fix/10785-
...
refactor/e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7d418889d | ||
|
|
0310e49a99 | ||
|
|
9ced57bc08 | ||
|
|
a459dfd221 |
50
.env.example
@@ -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
|
||||
@@ -143,8 +138,6 @@ PORT=20128
|
||||
# (/api, /v1, /v1beta, /a2a, /healthz and the root-level aliases) keeps the strict
|
||||
# headers regardless. Only `vscode` is recognised; `1`/`true` do NOT enable it.
|
||||
# Used by: next.config.mjs via scripts/build/dashboardEmbed.mjs — build-time, rebuild after changing.
|
||||
# Docker: pass it as a build arg (`docker build --build-arg DASHBOARD_ALLOW_EMBED=vscode`);
|
||||
# setting it on an already-built server or image does nothing.
|
||||
# DASHBOARD_ALLOW_EMBED=vscode
|
||||
|
||||
# Split-port mode: serve Dashboard and API on separate ports for network isolation.
|
||||
@@ -264,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
|
||||
@@ -773,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
|
||||
|
||||
@@ -1033,10 +1007,6 @@ PROVIDER_LIMITS_SYNC_SPACING_MS=1500
|
||||
# Used by: src/lib/db/core.ts::getDbHealthCheckIntervalMs().
|
||||
#OMNIROUTE_DB_HEALTHCHECK_INTERVAL_MS=21600000
|
||||
|
||||
# WAL truncate cadence override (ms). Set to 0 to disable. Default: 21600000 (6h).
|
||||
# Used by: src/lib/db/core.ts::getWalTruncateIntervalMs().
|
||||
#OMNIROUTE_WAL_TRUNCATE_INTERVAL_MS=21600000
|
||||
|
||||
# Skip the Redis-backed auth cache used by API key lookups (forces DB reads).
|
||||
# Used by: src/lib/db/apiKeys.ts. Set to 1 to disable. Default: enabled.
|
||||
#OMNIROUTE_DISABLE_REDIS_AUTH_CACHE=0
|
||||
@@ -2847,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.
|
||||
|
||||
@@ -46,7 +46,7 @@ Repository map and Reference Documentation sections below.
|
||||
|
||||
## Project at a Glance
|
||||
|
||||
**OmniRoute** — unified AI proxy/router. One endpoint, 342 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 |
|
||||
|
||||
@@ -167,7 +167,6 @@ _Living section — regenerated 2026-08-12 from all cycle commits (cycle open `e
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
- **security(search)**: block SSRF via `/v1/search` `provider_options.baseUrl` for the Firecrawl search provider — the client-controlled override is now validated as a public URL before it is used to build the server-side fetch target, so a caller with a valid API key can no longer redirect search requests at loopback, RFC1918, or cloud-metadata hosts — thanks @zmf963
|
||||
- **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)
|
||||
|
||||
15
CLAUDE.md
@@ -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 →
|
||||
|
||||
12
Dockerfile
@@ -140,18 +140,6 @@ ENV OMNIROUTE_USE_TURBOPACK="${OMNIROUTE_USE_TURBOPACK}"
|
||||
ARG OMNIROUTE_BASE_PATH=""
|
||||
ENV OMNIROUTE_BASE_PATH=$OMNIROUTE_BASE_PATH
|
||||
|
||||
# #10273: the dashboard's `frame-ancestors` policy is compiled into the route
|
||||
# manifest by next.config.mjs (via scripts/build/dashboardEmbed.mjs), so it is
|
||||
# fixed when the image is built and cannot be flipped with `-e` on a running
|
||||
# container. Build with `--build-arg DASHBOARD_ALLOW_EMBED=vscode` to produce an
|
||||
# image whose HTML pages may be framed by the VS Code Simple Browser
|
||||
# (OmniCopilot's `dashboardOpen: "editor"`). Unset — the default — keeps every
|
||||
# route on `frame-ancestors 'none'` + X-Frame-Options: DENY. Builder-stage only:
|
||||
# the runner stage deliberately does not carry it, because a runtime value would
|
||||
# suggest an effect it cannot have.
|
||||
ARG DASHBOARD_ALLOW_EMBED=""
|
||||
ENV DASHBOARD_ALLOW_EMBED=$DASHBOARD_ALLOW_EMBED
|
||||
|
||||
# Docker containers cannot run the MITM/Agent-Bridge stack (no host DNS/cert
|
||||
# access), so keep @/mitm/manager on the graceful stub (#3390). This flag is
|
||||
# Docker-only: npm/Electron/VPS builds must bundle the REAL manager (#6344).
|
||||
|
||||
22
README.md
@@ -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 → 342 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 15–95% tokens (~89% avg) — never hit limits. 342 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 15–95% 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 | **342** | 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="#-342-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 & 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. 342 providers. Never stop building — OmniRoute picks the cheapest one that works. Six pillars: Never hit limits (auto-fallback across 342 providers in milliseconds, zero downtime) · Save up to 95% tokens (RTK + Caveman stacked compression cuts 15–95%, ~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 15–95%, ~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: 342 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'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's docs."/>
|
||||
|
||||
<sub>📊 Full methodology & per-feature detail vs 9router, OpenRouter, CLIProxyAPI & 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 **342-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">
|
||||
|
||||
## 🌐 342 AI Providers — 90+ Free
|
||||
## 🌐 340 AI Providers — 90+ Free
|
||||
|
||||
</div>
|
||||
|
||||
> The most complete catalog of any open-source router: **342 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>>=22.22.2 <23 || >=24.0.0 <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>
|
||||
|
||||
@@ -118,11 +118,6 @@ export function npmInstallRuntime(pkgs, opts = {}) {
|
||||
// install of a sibling runtime dep (e.g. systray2 from trayRuntime.ts, which writes to the
|
||||
// same runtime dir) does not prune this package as "extraneous" — that pruning otherwise
|
||||
// reproduces "No SQLite driver available" after a tray install removes better-sqlite3.
|
||||
// npm 12+ defaults `allowScripts` to off, silently skipping lifecycle/install
|
||||
// scripts (e.g. better-sqlite3's node-gyp/prebuild-install rebuild) unless the
|
||||
// package has a matching `allowScripts` entry — and still exits 0, masking the
|
||||
// failure (#10713). The runtime dir is a CLI-owned, non-user package.json, so
|
||||
// explicitly allowing scripts for the packages we are installing here is safe.
|
||||
const npmArgs = [
|
||||
"install",
|
||||
...pkgs,
|
||||
@@ -130,7 +125,6 @@ export function npmInstallRuntime(pkgs, opts = {}) {
|
||||
"--no-fund",
|
||||
"--prefer-online",
|
||||
"--save-exact",
|
||||
...pkgs.map((pkg) => `--allow-scripts=${pkg}`),
|
||||
];
|
||||
// On Windows .cmd files cannot be executed without a shell; use cmd.exe /c explicitly
|
||||
// so we never set shell:true (which would propagate env and enable injection).
|
||||
|
||||
@@ -102,7 +102,7 @@ export async function waitForServer(port, timeout = 60000) {
|
||||
// - "not-listening": nothing is accepting connections on the port at all.
|
||||
async function pollHealthOnce(port) {
|
||||
try {
|
||||
const res = await fetch(`http://127.0.0.1:${port}/api/monitoring/health`, {
|
||||
const res = await fetch(`http://localhost:${port}/api/monitoring/health`, {
|
||||
signal: AbortSignal.timeout(2000),
|
||||
});
|
||||
return res.ok ? "ready" : "fast-reject";
|
||||
|
||||
@@ -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))
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(docker):** `DASHBOARD_ALLOW_EMBED` is now a Docker build argument — `docker build --build-arg DASHBOARD_ALLOW_EMBED=vscode` produces an image whose dashboard renders inside the VS Code Simple Browser (OmniCopilot's `dashboardOpen: "editor"`). Previously the flag was only reachable from a source build: Docker silently drops a `--build-arg` with no matching `ARG`, so the operator got the default image and no error. Builder-stage only and empty by default — the runtime stages deliberately do not carry it, and the unframable default posture is unchanged ([#10701](https://github.com/diegosouzapw/OmniRoute/pull/10701))
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(providers):** new `cursor-api` provider (card "Cursor API", alias `cua`): connect a Cursor user API key (`crsr_…`) and route `cursor-api/<model>` through the existing Cursor agent executor (the key is exchanged for a 1h session token and cached), plus a `/api/cursor-cli/*` passthrough so the Cursor CLI itself runs through OmniRoute (`CURSOR_API_ENDPOINT=http://<omniroute>/api/cursor-cli`, `CURSOR_API_KEY=<OmniRoute key>`) with every RPC attributed and logged. The IDE `cursor` provider is unchanged. (#10729)
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(api):** `GET /api/health` now answers `{ status, timestamp }` without a key. Until now the path had no route, so the management-auth boundary answered first with a 401 — indistinguishable from a wrong key or an unknown route, which left Docker HEALTHCHECKs and Kubernetes probes unable to tell "down" from "misconfigured". Kept deliberately minimal: version, uptime and memory stay behind the authenticated `/api/monitoring/health` ([#PRNUM](https://github.com/diegosouzapw/OmniRoute/pull/10771)).
|
||||
@@ -1 +0,0 @@
|
||||
- feat(routing): make Task-Aware Smart Routing's detection patterns operator-configurable via `settings.taskRouting.patternOverrides` (`PUT /api/settings/task-routing`) — the built-in patterns are English-only, so a non-English dashboard had no recourse short of turning detection off entirely; an override now replaces the pattern list for one task type without touching the rest (#10783)
|
||||
@@ -1 +0,0 @@
|
||||
- **feat(usage):** show Kimi Coding's fixed-order Code 5-hour/7-day quota windows plus Extra Usage status, balance, monthly spend/limit, and the official Additional Credits link on Dashboard → Quota cards.
|
||||
@@ -1 +0,0 @@
|
||||
- fix(video): stop advertising the googleflow (Veo) video provider as working and fail fast with a clear diagnostic — its submit/poll endpoints 404 and no server-side OAuth transport can satisfy the working endpoint (#10285)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(api): hash the API key before using it as the model-catalog cache Map key (no raw credentials in process heap) (#10313)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): fail over combo streaming responses that reach `finish_reason` with zero content, reasoning, or tool_calls instead of forwarding a terminated-but-empty completion (#10404)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(mitm): forward passthrough traffic to the actual requested Host instead of misrouting every non-TARGET_HOSTS request to the hardcoded Antigravity sandbox host (#10479)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(cli): use 127.0.0.1 for the readiness health-check poll instead of localhost, avoiding Windows DNS-resolution delays that made a healthy server report as never-ready (#10508)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(providers): register a real Firefly auth probe under both the `firefly` alias and the `adobe-firefly` canonical id, and normalize the provider id before the generic web-cookie fallback, so a Firefly connection stops always reporting "Provider validation not supported" (#10522)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): auto-replay a bounded multi-turn trajectory in the DeepSeek Web prompt builder for clients that never send `tools[]`, so agentic clients like Cline stop losing the original task after a couple of turns (#10527)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(dashboard): show the real model count on the "List Models" endpoint card instead of a permanent "—" (#10553)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(providers): remove 10 retired model ids from the crof seed catalog so /v1/models stops advertising models crof.ai no longer serves (#10577)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): resolve the short provider-alias prefix (e.g. `el/`) advertised by GET /v1/models for audio speech, transcription and translation model ids (#10586)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): map OpenAI-compat voice names to real ElevenLabs voice_ids in direct TTS (#10589)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(dashboard): make /api/models agree with /v1/models on synced-catalog coverage instead of reporting stale models as available (#10615)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(guardrails): resolve the public provider alias before querying credentials in the Vision Bridge router, so command-code/opencode (and any alias!=id provider) are no longer reported as "unusable" despite active connections (#10702)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(dashboard): filter the Modality Bridge Vision model picker to vision-capable models, matching the sibling Video/Audio tabs (#10703)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(usage): repair provider-reported input_tokens: 0 on non-trivial requests instead of passing it through unrepaired (#10705)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(cli): distinguish a CLI-probe timeout from a genuinely absent binary in locateCommand, and resolve the Hermes Agent Apply flow's `keyId` server-side instead of writing the `YOUR_OMNIROUTE_API_KEY_HERE` placeholder (#10710, #10711)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(cli): pass --allow-scripts for the runtime's own npm-installed dependencies, so npm 12+'s default install-scripts block no longer silently skips better-sqlite3's native build (#10713)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(db): filter `getProviderMetrics()` to providers with a live `provider_connections` row so a deleted provider stops permanently ghost-haunting the Home "Provider Topology" widget (#10714)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(proxy): keep password-only proxy credentials instead of dropping them when no username is set (#10720)
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(providers):** copilot-m365-web chat turns no longer surface as `(empty response)` — the type:4 invocation is aligned with the 2026-08 wire shape and now carries its type:1 Metrics follow-up in the same socket write, and the access token pre-flight-refreshes from a stored refresh_token instead of requiring a DevTools re-capture every ~75 minutes ([#10732](https://github.com/diegosouzapw/OmniRoute/pull/10732) — thanks @acc0mplish)
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(catalog):** stop counting `getTokenLimit()`'s generic 128k catch-all as a known combo window, so `/v1/models` advertises the min of sourced member contexts instead of collapsing a 500k combo to 128k ([#10734](https://github.com/diegosouzapw/OmniRoute/issues/10734))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(api):** `/api/cache/stats` reported the prompt-cache LRU, which no request path ever writes to — it answered `0 hit / 0 miss, size 0` while the semantic cache served real traffic, and the Health and Usage dashboards rendered that as fact. It now reports the semantic cache's in-memory entries, with the same response shape ([#PRNUM](https://github.com/diegosouzapw/OmniRoute/pull/10769)) — thanks @Poid-ZA, who first fixed this in #9446.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(logging):** the app log is filterable and readable again. Entries from the tagged logger (`[LEVEL] [TAG] message`) were filed under the level instead of the component, and printf format strings were never applied, so `%s`/`%d` stayed literal with the values trailing behind them unlabelled — including every LiveWS connection line, where the format is deliberate hardening against injected format specifiers ([#PRNUM](https://github.com/diegosouzapw/OmniRoute/pull/10770)).
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(analytics):** Claude Code (`claude`/`cc`) is a flat-rate subscription, so cost analytics reports `$0` for it instead of estimating Anthropic list prices — the metered `anthropic` API keeps its real cost, and budget/quota/routing still estimate as before ([#10774](https://github.com/diegosouzapw/OmniRoute/pull/10774)) — thanks @electrumguy
|
||||
@@ -1 +0,0 @@
|
||||
- fix(db): periodically run `wal_checkpoint(TRUNCATE)` so the SQLite WAL file shrinks on long-running servers (default 6h, override with `OMNIROUTE_WAL_TRUNCATE_INTERVAL_MS`, `0` disables) (#10781)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(sse): replace LiveWS's application-only liveness check with a protocol-level `ws.ping()`/`pong` heartbeat (RFC 6455 §5.5.2) alongside the existing one, so a read-only dashboard subscriber that never sends anything survives the connection timeout — a socket that stops reading frames entirely is still reaped exactly as before (#10782)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(compression): preserve unfenced raw code (e.g. Copilot #file references) from Caveman's prose recapitalization/whitespace cleanup, which was corrupting keyword casing and indentation (#9144)
|
||||
@@ -1 +0,0 @@
|
||||
- fix(api): yield the event loop during catalog builds and bulk-load override/hidden-model tables (#9147)
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(translator):** convert OpenAI `image_url` blocks nested in `role: "tool"` / `tool_result` content to Claude `image` source blocks so OpenAI-compatible clients (Kimi Code CLI `ReadMediaFile`, and any other tool that returns media) no longer 400 the next Claude-format upstream turn ([#9692](https://github.com/diegosouzapw/OmniRoute/issues/9692))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(resilience):** retry a retryable Codex pre-output 502/503/504/507 once on the same account (2–3s jitter) before cooling the connection, and stop translating that mixed pool into an all-accounts quota `429` ([#9708](https://github.com/diegosouzapw/OmniRoute/issues/9708))
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(electron):** desktop window stays hidden on Windows because the embedded Next.js server binds to the machine hostname instead of loopback ([#PENDING](https://github.com/diegosouzapw/OmniRoute/pull/PENDING))
|
||||
@@ -1 +0,0 @@
|
||||
- fix(build): tolerate a same-realpath symlink or stale-typed dest in the standalone bundle assembler, fixing non-deterministic `ERR_FS_CP_EINVAL`/`ERR_FS_CP_DIR_TO_NON_DIR` crashes under heavy concurrent build I/O
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(tests):** drain three base-reds on the release branch — the Vietnamese locale regained parity with English (6 keys added), the chatCore SSE test now asserts the comment-free default that #10539 introduced instead of the trailer it replaced, and the Antigravity cloudcode test asserts the missing-messages guard it is named for instead of a `/ok/` regex that only ever matched the "ok" inside `: x-omniroute-tokens-in` ([#10704](https://github.com/diegosouzapw/OmniRoute/pull/10704))
|
||||
@@ -1 +0,0 @@
|
||||
- chore(security): remove the unused `enforceSecrets()` duplicate of the boot secret check and pin the live `enforceWebRuntimeEnv()` wiring with a regression test (#10775)
|
||||
@@ -1 +0,0 @@
|
||||
- **docs:** Custom combos are only invoked by their exact name in the `model` field — `auto` remains a separate zero-config router, and `openrouter/auto` is a paid OpenRouter product, not an alias ([#10779](https://github.com/diegosouzapw/OmniRoute/pull/10779)) — thanks @maxmad64bis
|
||||
@@ -1,3 +0,0 @@
|
||||
- **fix(ci):** route `open-sse/handlers/imageGeneration/providers/geminiWeb.ts`'s b64_json
|
||||
download-failure message through `sanitizeErrorMessage()` instead of embedding a raw
|
||||
`err.message`, clearing the `check:error-helper` base-red on `release/v3.8.50` (#9985).
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(tests):** drain two base-reds on the release branch — `auto/glm` now expects the Cloudflare AI Playground backend (its registry advertises `zai-org/glm-5.2` and `zai-org/glm-4.7-flash`, so it belongs in the family pool by the same rule already documented for `auggie`, `devin-cli-agentic` and `zcode`), and the ESLint gate is green again after the GitLab executor test dropped its five `as any` casts for a declared response shape and the CLI OAuth suppression count caught up with the two casts #10491 added.
|
||||
@@ -1 +0,0 @@
|
||||
- **fix(tests):** realign the two `stream-utils` passthrough cases that still asserted the pre-#10017 SSE framing — the event-boundary case declares the OpenAI Responses client format it actually exercises, and the metadata case now pins that surviving lines stay inside one event instead of expecting the `:`/`id:` control lines that #10473 stopped forwarding to every client format.
|
||||
@@ -1,12 +0,0 @@
|
||||
- **fix(tests):** drain several base-reds on `release/v3.8.50` (#9985) that were all instances
|
||||
of the same pattern — a legitimate product change landed without updating the test that
|
||||
asserted the old behavior: `tests/unit/glm-provider-model-import-route.test.ts` (12 tests)
|
||||
and `tests/unit/model-sync-route.test.ts` (2 tests) predate #10603's "upstream model sync is
|
||||
opt-in and manual overrides are preserved" change; `tests/unit/antigravity-model-aliases.test.ts`
|
||||
predated #10537 retiring the collapsed `gemini-3.7-flash` alias in favor of its three tiered
|
||||
ids. Also fixes a real data drift in `open-sse/config/freeModelCatalog.data.ts` (the `qwen-web`
|
||||
free-catalog entry still pointed at the retired `qwen3.8-max-preview` id instead of the
|
||||
current `qwen3.8-max`), corrects the zh-TW `providers.autoFetchModelsTooltip` string to the
|
||||
glossary-canonical 快取 instead of 緩存, and removes an unused default export from
|
||||
`src/lib/oauth/providers/zed-hosted.ts` (the named export already covers every consumer) to
|
||||
shave one symbol off the `check:dead-code` ratchet regression.
|
||||
@@ -1898,7 +1898,7 @@
|
||||
},
|
||||
"tests/unit/cli-oauth-commands.test.ts": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 20
|
||||
"count": 18
|
||||
}
|
||||
},
|
||||
"tests/unit/cli-oneproxy-commands.test.ts": {
|
||||
@@ -2396,6 +2396,11 @@
|
||||
"count": 7
|
||||
}
|
||||
},
|
||||
"tests/unit/executor-gitlab.test.ts": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 4
|
||||
}
|
||||
},
|
||||
"tests/unit/executor-nlpcloud.test.ts": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
|
||||
@@ -442,14 +442,12 @@
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/modals/AddApiKeyModal.tsx": 1062,
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts": 1051,
|
||||
"src/shared/components/ModelSelectModal.tsx": 1138,
|
||||
"src/shared/constants/providers/apikey/gateways.ts": 1268,
|
||||
"src/shared/constants/providers/apikey/gateways.ts": 1255,
|
||||
"open-sse/vendor/codex-chatgpt-web/bridge.ts": 1387,
|
||||
"_rebaseline_2026_08_11_v3850_merge_storm_provider_registry": "DRIFT do merge-storm 2026-08-11 (99 PRs mergeados no release/v3.8.50). AddApiKeyModal.tsx (PR #8949 ChatGPT Web provider) e useProviderConnections.ts/ModelSelectModal.tsx (PRs #9011 combo test-all, #9499 image combos) = UI nova legitima acima do cap; gateways.ts = god-file de catalogo de providers que cresceu com PRs #9009/#9421/#9468/#9594 (qualquer split arriscaria corromper o merge de novo — o proprio PR #9421 quebrou o arquivo); bridge.ts (PR #8949) = ponte Chromium vendored; proxyFetch.ts 1207->1220 = drift herdado de merges. Owner autorizou rebaseline com anotacao (2026-08-11).",
|
||||
"src/lib/modelCapabilities.ts": 1006,
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/providerPageHelpers.ts": 1014,
|
||||
"open-sse/config/imageRegistry.ts": 1019,
|
||||
"src/sse/handlers/chatHelpers.ts": 1017,
|
||||
"src/shared/middleware/chatBodyAdmission.ts": 1005
|
||||
"open-sse/config/imageRegistry.ts": 1019
|
||||
},
|
||||
"_rebaseline_base_2026_08_10_proxyfetch": "Base-red fix (green-prs sweep, issue #9985): open-sse/utils/proxyFetch.ts 1207 > cap 1000 — new proxied-TLS fetch helper introduced by the Fal reference-image work. Owner-authorized quick rebaseline to green; structural slim tracked for v3.9.0.",
|
||||
"_rebaseline_2026_07_27_v3849_train2": "Merge-train 2 (7 PRs) — owner-approved 2026-07-27. Single entry: chatCore.ts 4955->5006 (#8595, Responses multi-turn image compaction before the context hard-reject). Genuine irreducible growth at the existing compaction chokepoint in handleChatCore — the PR adds a last-resort retry against the concrete budget plus the estimateFinalInputTokens helper, both wired at the pre-existing call site rather than a new branch. Covered by tests/unit/8560-responses-image-compaction.test.ts (4 tests).",
|
||||
@@ -614,6 +612,5 @@
|
||||
"_rebaseline_2026_08_12_proxyfetch_redaction": "Base-reds round 3 (#9985): proxyFetch.ts 1220->1239 (+19) = redactProxyDetailsInMessage() helper closing the credential leak #10032 reintroduced (raw proxy URL with user:password appended to the propagated error, Hard Rule #12); irreducible security fix at the existing error-surface chokepoint. Covered by tests/unit/tls-proxy-context.test.ts (strengthened leak guards).",
|
||||
"_rebaseline_2026_08_12_modelcapabilities_snapshot_routing": "Base-reds round 3 (#9985): modelCapabilities.ts crossed the new-file cap at 1006 (+~10) when the context/max-input-token override lookups were routed through the #9199 bulk snapshot (fixing 323 per-model SQLite reads per catalog prepare — auto-combo-context-advertising guard); cohesive change at the existing resolution chokepoints, not extractable. Covered by tests/unit/auto-combo-context-advertising.test.ts + model-capability-resolution-snapshot-9199.test.ts.",
|
||||
"_rebaseline_2026_08_14_imagetotext_servicekinds": "Image-to-Text category (#10275/#10291): gateways.ts grew 1250→1255 by data lines only — the serviceKinds: [\"llm\", \"imageToText\"] declarations on the openrouter and chutes catalog entries, plus the 3-line comment recording why chutes needs no static dots.ocr entry (passthroughModels discovery). No new logic or branching; the file is a provider catalog of declarative metadata. Splitting a catalog for five lines would be worse than the growth (semantic-families rule).",
|
||||
"_rebaseline_2026_08_18_imageregistry_merge_train": "merge-train 2026-08-18 (owner-authorized, /merge-prs batch of 84): open-sse/config/imageRegistry.ts crossed the 1000-line new-file cap for the first time purely from combining three independent, already-legitimate provider registrations boarded in the same local merge-train — #10542 (aihorde optional-key image catalog), #10494 (gemini-web image generation), #10594 (freepik/magnific provider rename + validation). 996 on release tip -> 1019 on the train tip. Each PR individually adds a small, additive IMAGE_PROVIDERS registry entry at the existing chokepoint; none crosses the cap alone. Not modularized as part of this train's gate fix (out of scope for a merge reconciliation, not a feature change). Covered by each PR's own focused tests (aihorde-image-catalog/generation, gemini-web image tests, freepik/magnific provider tests).",
|
||||
"_rebaseline_2026_08_20_v3850_merge_train_batch1": "Merge-train batch1 (2026-08-19/20, 30 PRs boarded onto release/v3.8.50): gateways.ts 1255->1268 = PR #10722 (Token Kiosk OpenAI-compatible provider gateway catalog entry, +13 declarative lines, same god-file no-split rationale as prior gateways.ts rebaselines); chatHelpers.ts (uncapped, not previously frozen) new 1017 = PR #10797 (relay/bifrost error normalization, +23/-2, own-PR growth, existing file already near cap from accumulated chokepoint wiring per its own rebaseline history above); chatBodyAdmission.ts (uncapped) new 1005 = pre-existing base-red on the pure release tip (1004>1000 before this train boarded anything, no PR in this batch touches this file) — frozen here at its current size, not authorizing further growth. Owner-authorized rebaseline (2026-08-19 merge-prs session)."
|
||||
}
|
||||
"_rebaseline_2026_08_18_imageregistry_merge_train": "merge-train 2026-08-18 (owner-authorized, /merge-prs batch of 84): open-sse/config/imageRegistry.ts crossed the 1000-line new-file cap for the first time purely from combining three independent, already-legitimate provider registrations boarded in the same local merge-train — #10542 (aihorde optional-key image catalog), #10494 (gemini-web image generation), #10594 (freepik/magnific provider rename + validation). 996 on release tip -> 1019 on the train tip. Each PR individually adds a small, additive IMAGE_PROVIDERS registry entry at the existing chokepoint; none crosses the cap alone. Not modularized as part of this train's gate fix (out of scope for a merge reconciliation, not a feature change). Covered by each PR's own focused tests (aihorde-image-catalog/generation, gemini-web image tests, freepik/magnific provider tests)."
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 (342 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 |
@@ -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: 342 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 |
@@ -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, 342 providers — never stop building, OmniRoute picks the cheapest one that works. Six pillars. Never hit limits: auto-fallback across 342 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">342 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 342 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 |
@@ -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 342 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: 342 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">342 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  →  <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 |
@@ -189,7 +189,7 @@ Use `auto/smart` when you want the best quality and are okay with occasional exp
|
||||
|
||||
### "Can I force a specific provider?"
|
||||
|
||||
Yes! Use a combo with `priority` strategy instead of `auto`, then send the combo's **exact name** as the `model` field (e.g. `model: "my-combo"` — not `auto`). See the [Technical Reference](../routing/AUTO-COMBO.md) for details.
|
||||
Yes! Use a combo with `priority` strategy instead of `auto`. See the [Technical Reference](../routing/AUTO-COMBO.md) for details.
|
||||
|
||||
### "How is this different from round-robin?"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.138–v0.141)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)**.
|
||||
|
||||
@@ -6,16 +6,16 @@ lastUpdated: 2026-08-18
|
||||
|
||||
# VS Code Copilot Chat — OmniCopilot extension
|
||||
|
||||
**OmniCopilot** puts every model your OmniRoute serves into the _native_ GitHub Copilot Chat
|
||||
**OmniCopilot** puts every model your OmniRoute serves into the *native* GitHub Copilot Chat
|
||||
model picker. No second sidebar, no separate chat UI — Copilot's agent mode, tool calling,
|
||||
MCP servers and custom instructions all keep working, just running on the model you pick.
|
||||
|
||||
| | |
|
||||
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Install (VS Code)** | [Marketplace → `diegosouzapw.omnicopilot`](https://marketplace.visualstudio.com/items?itemName=diegosouzapw.omnicopilot) |
|
||||
| **Install (forks)** | [Open VSX](https://open-vsx.org/extension/diegosouzapw/omnicopilot) — Cursor, Windsurf, VSCodium, Theia, code-server, Gitpod, Antigravity, Kiro |
|
||||
| **Source / issues** | [github.com/diegosouzapw/OmniCopilot](https://github.com/diegosouzapw/OmniCopilot) (MIT) |
|
||||
| **Requires** | VS Code 1.104+ |
|
||||
| | |
|
||||
| --- | --- |
|
||||
| **Install (VS Code)** | [Marketplace → `diegosouzapw.omnicopilot`](https://marketplace.visualstudio.com/items?itemName=diegosouzapw.omnicopilot) |
|
||||
| **Install (forks)** | [Open VSX](https://open-vsx.org/extension/diegosouzapw/omnicopilot) — Cursor, Windsurf, VSCodium, Theia, code-server, Gitpod, Antigravity, Kiro |
|
||||
| **Source / issues** | [github.com/diegosouzapw/OmniCopilot](https://github.com/diegosouzapw/OmniCopilot) (MIT) |
|
||||
| **Requires** | VS Code 1.104+ |
|
||||
|
||||
> **No Copilot subscription needed.** Since VS Code 1.122 a language-model provider works
|
||||
> without a GitHub sign-in and without any Copilot plan. Inline completions and
|
||||
@@ -60,7 +60,7 @@ The extension requests **`GET /v1/models?prefix=alias`** so one id arrives per m
|
||||
changing the server-wide setting for your other clients. On a reference instance this collapsed
|
||||
**2345 entries to 1396 — 949 duplicates, zero models lost.**
|
||||
|
||||
If you would rather fix it server-wide for _every_ client, set the
|
||||
If you would rather fix it server-wide for *every* client, set the
|
||||
`MODELS_CATALOG_PREFIX_MODE` feature flag to `alias` in the dashboard. See
|
||||
[API_REFERENCE → prefix](../reference/API_REFERENCE.md#model-id-prefixes-prefix) for the
|
||||
query parameter and the warning about `canonical`.
|
||||
@@ -81,7 +81,7 @@ and OmniRoute translates those for `/v1/chat/completions`, so they are perfectly
|
||||
|
||||
### Providers you never configured
|
||||
|
||||
The catalog lists models from providers with an **active connection** _plus_ every **noAuth**
|
||||
The catalog lists models from providers with an **active connection** *plus* every **noAuth**
|
||||
provider — the keyless ones that make up much of the free tier. That is intentional. To hide
|
||||
them, add them to `blockedProviders` in the dashboard settings; nothing changes in the
|
||||
extension.
|
||||
@@ -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 | ✅ `docker build --build-arg DASHBOARD_ALLOW_EMBED=vscode -t omniroute:embed .` — the prebuilt image on Docker Hub is not embed-enabled |
|
||||
|
||||
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).
|
||||
|
||||
---
|
||||
@@ -133,14 +119,14 @@ Kilo and Roo — the same configs described in
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Symptom | Cause / fix |
|
||||
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| No OmniRoute models in the picker | Server unreachable. The status-bar dot goes grey; run `OmniRoute: Check Connection`. Discovery is silent by design and contributes no models rather than prompting. |
|
||||
| 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. |
|
||||
| Models list is stale after changing providers | `OmniRoute: Refresh Models`, or the ↻ link in the panel. |
|
||||
| Symptom | Cause / fix |
|
||||
| --- | --- |
|
||||
| No OmniRoute models in the picker | Server unreachable. The status-bar dot goes grey; run `OmniRoute: Check Connection`. Discovery is silent by design and contributes no models rather than prompting. |
|
||||
| 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 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. |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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) — طرق التثبيت والتوجيه عند التشغيل الأول
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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** və **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` və `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` və `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ı
|
||||
@@ -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` və `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`)
|
||||
və `--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`-ı açı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ş` və `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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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) — методи за инсталиране и първоначално запознаване
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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) — ইনস্টল পদ্ধতি এবং প্রথমবারের অনবোর্ডিং
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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í
|
||||
@@ -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á aktivní 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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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>` på `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
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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) — روشهای نصب و آموزش اولیه در اولین اجرا
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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
|
||||
@@ -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 342 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 (342), 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
|
||||
- **342 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
|
||||
|
||||
- **342-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)
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
```
|
||||
|
||||