Compare commits
4 Commits
fix/releas
...
refactor/e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7d418889d | ||
|
|
0310e49a99 | ||
|
|
9ced57bc08 | ||
|
|
a459dfd221 |
46
.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
|
||||
|
||||
@@ -2843,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, 341 LLM providers, auto-fallback.
|
||||
**OmniRoute** — unified AI proxy/router. One endpoint, 340 LLM providers, auto-fallback.
|
||||
|
||||
| Layer | Location | Purpose |
|
||||
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -56,7 +56,7 @@ Repository map and Reference Documentation sections below.
|
||||
| Translators | `open-sse/translator/` | Format conversion (OpenAI↔Claude↔Gemini) |
|
||||
| Transformer | `open-sse/transformer/` | Responses API ↔ Chat Completions |
|
||||
| Services | `open-sse/services/` | Combo routing, rate limits, caching, etc |
|
||||
| Database | `src/lib/db/` | SQLite domain modules (154 migrations) |
|
||||
| Database | `src/lib/db/` | SQLite domain modules (153 migrations) |
|
||||
| Domain/Policy | `src/domain/` | Policy engine, cost rules, fallback logic |
|
||||
| MCP Server | `open-sse/mcp-server/` | 109 tools (44 canonical + memory/skill/GitHub/pool/gamification/plugin/Notion/Obsidian/local-corpus/RTK modules), 3 transports (stdio / SSE / Streamable HTTP), 33 scopes |
|
||||
| A2A Server | `src/lib/a2a/` | JSON-RPC 2.0 agent protocol |
|
||||
|
||||
@@ -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 → 341 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 15–95% tokens (~89% avg) — never hit limits. 341 AI providers · 90+ free tiers · ~1.51B free tokens/mo · 19 routing strategies · $0 to start."/>
|
||||
<img src="./docs/diagrams/readme-hero.svg" width="100%" alt="OmniRoute — Never stop coding. Every AI tool → 340 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot & Antigravity into FREE Claude / GPT / Gemini with auto-fallback. RTK + Caveman stacked compression saves 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 | **341** | more queued |
|
||||
| 🌐 Providers | 290 | **340** | more queued |
|
||||
| 🧠 Documented models | 1185 | **1202** | — |
|
||||
| 🖼️ Modality Bridge | — | 🆕 vision | video |
|
||||
| 📡 Radar free catalog | — | 🆕 opt-in | — |
|
||||
@@ -101,7 +101,7 @@
|
||||
<tr>
|
||||
<td align="right"><b>⚙️ Features</b></td>
|
||||
<td align="center"><a href="#-combos--the-flagship">🎯 Combos</a></td>
|
||||
<td align="center"><a href="#-341-ai-providers--90-free">🌐 Providers</a></td>
|
||||
<td align="center"><a href="#-340-ai-providers--90-free">🌐 Providers</a></td>
|
||||
<td align="center"><a href="#-full-cli--a2a--mcp">🔌 CLI & MCP</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -210,7 +210,7 @@ curl http://localhost:20128/v1/chat/completions \
|
||||
|
||||
</div>
|
||||
|
||||
<img src="./docs/diagrams/promise-pillars.svg" width="100%" alt="The Promise — One endpoint. 341 providers. Never stop building — OmniRoute picks the cheapest one that works. Six pillars: Never hit limits (auto-fallback across 341 providers in milliseconds, zero downtime) · Save up to 95% tokens (RTK + Caveman stacked compression cuts 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: 341 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, built-in MCP server with 109 tools, A2A agent protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, Desktop/Termux/PWA, 43 i18n UI locales, 100% MIT self-hosted. OmniRoute is the only one with the full set; competitors show a mix of checks, partials and crosses. Verified from each project'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 **341-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **🤝 More providers & agents** — Cursor Cloud Agent, Grok Build (xAI) with browser + OAuth login, Ollama first-class card, Claude Opus 5 & Sonnet 5, Kimi official partnership (Code/Web/Moonshot), Zed, Requesty, SenseNova, Yuanbao, Agnes AI… and a refreshed **340-provider catalog**. → [Providers](docs/reference/PROVIDER_REFERENCE.md)
|
||||
- **📡 Routing transparency** — every response carries an `X-OmniRoute-Decision` header naming the strategy/provider/latency that served it, a new `cache-optimized` combo strategy + Auto-Combo `cacheAffinity` factor route repeat requests back to the connection holding the cached prefix, and a read-only `/v1/auto-combo/{channel}/candidates` endpoint exposes an `auto/*` channel's live candidate pool. → [Auto-Combo](docs/routing/AUTO-COMBO.md)
|
||||
- **⚡ Local performance & infra** — one-click local Redis, Cloudflare Workers / Deno Deploy relay deployers, Bifrost & Mux as supervised embedded services. → [Embedded Services](docs/frameworks/EMBEDDED-SERVICES.md)
|
||||
|
||||
@@ -642,11 +642,11 @@ of your shell history. → [CLI Integrations](docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
<div align="center">
|
||||
|
||||
## 🌐 341 AI Providers — 90+ Free
|
||||
## 🌐 340 AI Providers — 90+ Free
|
||||
|
||||
</div>
|
||||
|
||||
> The most complete catalog of any open-source router: **341 providers**, **90+ with a free tier**, **56 free forever**.
|
||||
> The most complete catalog of any open-source router: **340 providers**, **90+ with a free tier**, **56 free forever**.
|
||||
|
||||
<div align="center">
|
||||
|
||||
@@ -877,7 +877,7 @@ Engines run in pipeline order; each is independently toggleable and configurable
|
||||
<tr><td align="center" nowrap>9</td><td align="left" nowrap><b>Aggressive</b></td><td align="left">Summarization + progressive aging of old turns</td></tr>
|
||||
<tr><td align="center" nowrap>10</td><td align="left" nowrap><b>LLMLingua-2</b></td><td align="left">ML semantic pruning via MobileBERT ONNX — code-safe, async</td></tr>
|
||||
<tr><td align="center" nowrap>11</td><td align="left" nowrap><b>Ultra</b></td><td align="left">Heuristic token pruning with an optional small-model (SLM) tier</td></tr>
|
||||
<tr><td align="center" nowrap>12</td><td align="left" nowrap><b>OmniGlyph</b></td><td align="left">Experimental context-as-image encoding for measured Claude Fable 5 on the direct Anthropic wire; GPT 5.6 transformers remain fail-closed pending provider receipts. Four compression profiles (aggressive default, balanced, coding-safe, passthrough) (most aggressive; opt-in)</td></tr>
|
||||
<tr><td align="center" nowrap>12</td><td align="left" nowrap><b>OmniGlyph</b></td><td align="left">Experimental context-as-image encoding routed to Claude Fable 5 (most aggressive; opt-in)</td></tr>
|
||||
</table>
|
||||
|
||||
Code blocks, URLs and structured data are **always preserved** byte-perfect. **One-click presets** combine the engines:
|
||||
@@ -1172,7 +1172,7 @@ Métricas de validação: 1002 vídeos rastreados · 7,069,190 visualizações c
|
||||
<tr><td nowrap><b>Runtime</b></td><td>Node.js 22.x / 24.x LTS — <code>>=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 @@
|
||||
- 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(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(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,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,20 +0,0 @@
|
||||
- **fix(ci):** drain three more base-reds on `release/v3.8.50` (#9985). ESLint was reporting
|
||||
219 errors locally (vs. 25 in the last CI run) — all from `react-hooks/set-state-in-effect`,
|
||||
`react-hooks/preserve-manual-memoization`, `react-hooks/immutability`,
|
||||
`react-hooks/static-components`, `react-hooks/refs` and `react-hooks/purity`, six React
|
||||
Compiler lint rules that `eslint-plugin-react-hooks` v7 turns on by default and that were
|
||||
never frozen in `config/quality/eslint-suppressions.json` after the dependency bump. Froze
|
||||
the pre-existing violations for those six rules via ESLint's native
|
||||
`--suppress-rule`/`--suppressions-location` mechanism (the same pattern already used for
|
||||
`@next/next/no-location-assign-relative-destination`) — no application code changed, no rule
|
||||
disabled, only genuinely-new violations stay blocking. `check:dead-code` was at 418 against a
|
||||
415 baseline: removed the unused `src/lib/quota/providerCapabilities.ts` file and the unused
|
||||
`ProviderQuotaMonitor` interface in `providerQuotaTelemetry.ts` (both dead since PR #10148,
|
||||
2026-08-18, confirmed via `grep`/knip cross-reference), landing at 416; the residual +1 could
|
||||
not be attributed to a single recent commit after checking every dead-list entry touched
|
||||
since the 2026-08-14 baseline measurement, so it is rebaselined with the investigation
|
||||
recorded in `quality-baseline.json`. `tests/unit/autoCombo/tieredRotation.test.ts`'s
|
||||
"rotates across all 43 Cerebras connection IDs" case was hitting vitest's 5000ms default
|
||||
timeout on a 200-iteration synchronous `selectProvider()` loop under shared-devbox
|
||||
contention (load average 40-60+ observed) — widened its explicit timeout to 20000ms; the
|
||||
assertion itself is unchanged.
|
||||
@@ -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,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.
|
||||
@@ -296,109 +296,6 @@
|
||||
"src/app/(dashboard)/dashboard/HomePageClient.tsx": {
|
||||
"react-hooks/exhaustive-deps": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/a2a/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/acp-agents/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/activity/ActivityFeedClient.tsx": {
|
||||
"react-hooks/purity": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/refs": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/analytics/CacheHealthTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/analytics/ComboHealthTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/analytics/ProviderUtilizationTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/analytics/RouteExplainabilityTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/api-manager/ApiManagerPageClient.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 4
|
||||
},
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 2
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/audit/A2aAuditTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/audit/ComplianceTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/audit/McpAuditTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/batch/components/wizard/CostEstimateStep.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/batch/components/wizard/JsonlValidationStep.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/batch/files/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cache/components/CacheEntriesTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cache/components/ReasoningCacheTab.tsx": {
|
||||
"react-hooks/purity": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cache/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx": {
|
||||
@@ -409,119 +306,6 @@
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/AntigravityToolCard.tsx": {
|
||||
"react-hooks/exhaustive-deps": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/ClaudeClassifierCompatToggle.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/ClaudeToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/CliProfileAutoSyncToggles.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/ClineToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/CliproxyapiToolCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/CodexToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 4
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/DroidToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/HermesAgentToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/purity": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/KiloToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/cli-code/components/OpenClawToolCard.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/combos/ComboControlCenterClient.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/combos/page.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 7
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/conductor/ConductorPageClient.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/conductor/FaroChat.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/conversations/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/components/ApiKeyUsageLimitCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/costExplorerUtils.ts": {
|
||||
@@ -529,258 +313,11 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/quota-share/components/PoolWizard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/quota-share/hooks/usePoolUsage.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/quota-share/hooks/usePools.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/costs/useApiKeyUsageLimits.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/discovery/DiscoveryPageClient.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/endpoint/EndpointPageClient.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/endpoint/components/A2ADashboard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/endpoint/components/MCPDashboard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/endpoint/components/NotionSourceCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/endpoint/components/ObsidianSourceCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/free-provider-rankings/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/health/ProviderHealthAutopilotCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/health/ProviderHealthMatrixCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/health/TelemetryCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/mcp/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/memory/components/EditMemoryModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/memory/components/QdrantConfigCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/memory/components/tabs/MemoriesTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/memory/hooks/useEngineStatus.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/memory/hooks/useMemorySettings.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/playground/components/tabs/ApiTab.tsx": {
|
||||
"react-hooks/exhaustive-deps": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/plugins/[name]/config/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/plugins/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/provider-stats/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/static-components": {
|
||||
"count": 7
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/CustomModelsSection.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/ModelCompatPopover.tsx": {
|
||||
"react-hooks/refs": {
|
||||
"count": 4
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/ProviderCcAliasSection.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/ProviderInterceptionSection.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/ProviderParamFilterSection.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditCompatibleNodeModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderSettings.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/components/AddCompatibleProviderModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/hooks/useProviderModels.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/hooks/useProviderUrlFilters.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/hooks/useRiskAcknowledged.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/services/components/DarioAccountPanel.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/providers/services/components/NinerouterModelList.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/radar/RadarCatalogTable.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/radar/intel/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/radar/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/radar/setup/page.tsx": {
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/relay/RelayProxyClient.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/resilience/connections/components/ResilienceConnectionsClient.tsx": {
|
||||
"react-hooks/purity": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/refs": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/runtime/components/ModelCooldownsCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/AccessTokensTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/AppearanceTab.tsx": {
|
||||
"@next/next/no-img-element": {
|
||||
"count": 4
|
||||
@@ -789,75 +326,16 @@
|
||||
"src/app/(dashboard)/dashboard/settings/components/AuthzSection.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/FallbackChainsEditor.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/IPFilterSection.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/MitmProxyTab.tsx": {
|
||||
"@next/next/no-html-link-for-pages": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/ModelCapabilityOverridesTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/ModelsDevSyncTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/OneproxyTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/PayloadRulesTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/PoliciesPanel.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/PricingTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/ProviderAccountRoutingCard.tsx": {
|
||||
"react-hooks/exhaustive-deps": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/ResilienceTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 7
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/RoutingStrategyCard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/SessionInfoCard.tsx": {
|
||||
@@ -865,92 +343,11 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/SystemStorageTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/proxy/GlobalConfigTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/settings/components/proxy/SubscriptionTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/tools/agent-bridge/components/AgentList.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 3
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/tools/agent-bridge/components/ModelSelectorModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/tools/agent-bridge/components/SetupWizard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/tools/traffic-inspector/components/CustomHostsManager.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/translator/components/MonitorTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/usage/components/EvalsTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/usage/components/ProviderLimits/useCodexResetCreditRedemption.ts": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/usage/components/RateLimitStatus.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/usage/components/SessionsTab.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/webhooks/WebhooksPageClient.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/webhooks/components/AddWebhookWizard.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/dashboard/webhooks/components/WebhookDeliveriesPanel.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/home/ProviderQuotaWidget.tsx": {
|
||||
"react-hooks/purity": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/refs": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/(dashboard)/home/page.tsx": {
|
||||
"no-restricted-imports": {
|
||||
"count": 1
|
||||
@@ -1606,16 +1003,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/global-error.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/app/status/page.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/domain/costRules.ts": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 1
|
||||
@@ -1899,50 +1286,14 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/KiroAuthModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/LanguageSelector.tsx": {
|
||||
"@next/next/no-img-element": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/ModelSelectModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 4
|
||||
}
|
||||
},
|
||||
"src/shared/components/OAuthModal.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 4
|
||||
}
|
||||
},
|
||||
"src/shared/components/PricingModal.tsx": {
|
||||
"react-hooks/immutability": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/ProxyConfigModal.tsx": {
|
||||
"react-hooks/exhaustive-deps": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/immutability": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/ReasoningRoutingRules.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/RequestLoggerDetail.sections.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/RequestLoggerV2.tsx": {
|
||||
@@ -1953,27 +1304,6 @@
|
||||
"src/shared/components/Sidebar.tsx": {
|
||||
"@next/next/no-img-element": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/shared/components/UsageStats.tsx": {
|
||||
"react-hooks/preserve-manual-memoization": {
|
||||
"count": 1
|
||||
},
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/analytics/useProviderDailyUsage.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/components/compression/ComboCompressionModeSelect.tsx": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/contracts/quota.ts": {
|
||||
@@ -1981,11 +1311,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/hooks/cli/useToolBatchStatuses.ts": {
|
||||
"react-hooks/set-state-in-effect": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"src/shared/services/apiKeyResolver.ts": {
|
||||
"no-restricted-imports": {
|
||||
"count": 1
|
||||
@@ -2573,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": {
|
||||
@@ -3071,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
|
||||
@@ -3979,4 +3309,4 @@
|
||||
"count": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,9 +102,8 @@
|
||||
"_rebaseline_2026_07_28_v3849_release": "75.5 -> 99 (+23.5). Aperto EXIGIDO pelo modo --require-tighten do ratchet: a métrica melhorou de verdade no ciclo v3.8.49. A causa é o workflow assíncrono de tradução, que finalmente alcançou o denominador em EN — as rebaselines anteriores (v3.8.39/.44/.47) foram todas afrouxamentos registrando o atraso das traduções, e agora ele foi pago. O coletor SUBTRAI os placeholders (present - placeholder em scripts/quality/collect-metrics.mjs), então os 317 marcadores __MISSING__ que esta release introduziu para o drift de valor já estão descontados dos 99 — o número é honesto, não inflado por placeholder. Medido pelo collect-metrics do CI no run 30404226939."
|
||||
},
|
||||
"deadExports": {
|
||||
"value": 416,
|
||||
"value": 415,
|
||||
"direction": "down",
|
||||
"_rebaseline_2026_08_19_v3850_basereds_9985": "415 -> 416. Measured on release/v3.8.50 tip 14a480453 during the #9985 base-red drain. Removed the 2 genuinely-dead symbols traced to a specific recent change (PR #10148, 2026-08-18): the unused src/lib/quota/providerCapabilities.ts file and the unused ProviderQuotaMonitor interface in providerQuotaTelemetry.ts (418 -> 416). The remaining +1 could not be attributed to a single recent commit after checking every dead-list entry touched since the 2026-08-14 baseline measurement (most are pre-existing debt on files edited for unrelated reasons); rebaselining the residual 1 rather than guessing at removals. Structural cleanup stays tracked in #3501.",
|
||||
"_rebaseline_2026_08_09_v3850_post_sweep": "227 -> 230. Measured by npm run check:dead-code on the unmodified release/v3.8.50 tip 382449d593 during the mandatory --full-ci pre-flight. The +3 is inherited cycle drift from the authorized merge sweep; this repair adds no production exports. Rebaseline records the actual tip so ci.yml quality-gate can run, while structural cleanup remains separate debt.",
|
||||
"_rebaseline_2026_07_01_v3843_release": "225->227 (+2). v3.8.43 cycle drift, surfaced in the Quality Ratchet job after eslintWarnings was rebaselined (check:dead-code runs there). 227 = measured by check:dead-code (knip) on the release tip 4635076eb. The 5 CI fixes add 0 dead exports: safeHttpHref in linkify.ts is module-local AND used (called by linkifyText); no new exports; test files are not scanned. Tighten via --update next cycle.",
|
||||
"dedicatedGate": true,
|
||||
|
||||
@@ -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 (341 providers registered, anthropic, codex, glm, kimi shown active), omniroute combo list (always-on priority, cost-saver, fusion-panel, context-relay) and omniroute health (healthy, 18412 requests in 24h, p95 412ms, circuit breakers 24 closed, 1 half-open, 0 open), cycling over the 80+ command surface: providers, oauth, keys, combo, nodes, models, cache, compression, cost, usage, quota, health, resilience, telemetry, logs, audit, mcp, a2a, cloud, memory, skills, eval, doctor, repl, tunnel, backup, sync, webhooks, policy, pricing, translator, simulate and more.">
|
||||
<svg viewBox="0 0 1200 350" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Animated terminal demoing the OmniRoute CLI: omniroute providers list (340 providers registered, anthropic, codex, glm, kimi shown active), omniroute combo list (always-on priority, cost-saver, fusion-panel, context-relay) and omniroute health (healthy, 18412 requests in 24h, p95 412ms, circuit breakers 24 closed, 1 half-open, 0 open), cycling over the 80+ command surface: providers, oauth, keys, combo, nodes, models, cache, compression, cost, usage, quota, health, resilience, telemetry, logs, audit, mcp, a2a, cloud, memory, skills, eval, doctor, repl, tunnel, backup, sync, webhooks, policy, pricing, translator, simulate and more.">
|
||||
<desc>Compact animated terminal cycling three real OmniRoute CLI commands with a typewriter effect and a scrolling subcommand ticker; the first frame shows the completed providers-list screen.</desc>
|
||||
<defs><clipPath id="tickerClip"><rect x="12" y="304" width="1176" height="40"/></clipPath><clipPath id="tw0"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;31;61;92;122;153;184;214;245;245" keyTimes="0;0.012;0.018;0.024;0.030;0.036;0.042;0.048;0.054;1" dur="18s" repeatCount="indefinite"/></rect></clipPath><clipPath id="tw1"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;26;51;76;102;128;153;178;204;204" keyTimes="0;0.345;0.351;0.357;0.363;0.369;0.375;0.381;0.387;1" dur="18s" repeatCount="indefinite"/></rect></clipPath><clipPath id="tw2"><rect x="64" y="46" height="26" width="0"><animate attributeName="width" calcMode="discrete" values="0;20;41;61;82;102;122;143;163;163" keyTimes="0;0.678;0.684;0.690;0.696;0.702;0.708;0.714;0.720;1" dur="18s" repeatCount="indefinite"/></rect></clipPath></defs>
|
||||
<rect width="1200" height="350" fill="#0d1117"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg viewBox="0 0 1200 780" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Comparison table: OmniRoute versus 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute is the only one with the full set: 341 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, a built-in MCP server with 109 tools, A2A protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, desktop/Termux/PWA, 43 UI locales and 100% MIT self-hosted. 9router has free providers, RTK compression and translation but no MCP, A2A, memory, guardrails, cloud agents or stealth. OpenRouter is a hosted SaaS with 400+ models, guardrails and a hosted MCP but is not self-hosted and lacks A2A, memory, cloud agents and stealth. CLIProxyAPI is a light OAuth proxy with two routing strategies. LiteLLM has 100+ providers, A2A and extensive guardrails but no memory, compression, free tier, stealth or cloud agents.">
|
||||
<svg viewBox="0 0 1200 780" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Comparison table: OmniRoute versus 9router, OpenRouter, CLIProxyAPI and LiteLLM across 13 capabilities. OmniRoute is the only one with the full set: 340 providers, 90+ free providers built-in, 19 routing strategies, 12-engine token compression, a built-in MCP server with 109 tools, A2A protocol, persistent memory, guardrails, cloud agents, TLS fingerprint stealth, desktop/Termux/PWA, 43 UI locales and 100% MIT self-hosted. 9router has free providers, RTK compression and translation but no MCP, A2A, memory, guardrails, cloud agents or stealth. OpenRouter is a hosted SaaS with 400+ models, guardrails and a hosted MCP but is not self-hosted and lacks A2A, memory, cloud agents and stealth. CLIProxyAPI is a light OAuth proxy with two routing strategies. LiteLLM has 100+ providers, A2A and extensive guardrails but no memory, compression, free tier, stealth or cloud agents.">
|
||||
<desc>Static-header comparison table where each capability row fades in top to bottom; the OmniRoute column is highlighted and shows a check or a leading value in every row, while competitors show a mix of checks, partials and crosses.</desc>
|
||||
<defs>
|
||||
<pattern id="gC" width="32" height="32" patternUnits="userSpaceOnUse"><path d="M 32 0 L 0 0 0 32" fill="none" stroke="#ffffff" stroke-opacity="0.05" stroke-width="1"/></pattern>
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg viewBox="0 0 1200 540" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The OmniRoute promise: one endpoint, 341 providers — never stop building, OmniRoute picks the cheapest one that works. Six pillars. Never hit limits: auto-fallback across 341 providers in milliseconds, quota out means the next provider takes over with zero downtime. Save up to 95 percent of tokens: RTK plus Caveman stacked compression cuts 15 to 95 percent of eligible tokens, about 89 percent average on tool-heavy sessions. Zero dollars to start: 90+ providers with a free tier, 56 free forever — Qoder, Pollinations, Cloudflare, SiliconFlow — no card needed. Every tool works: 33 coding agents including Claude Code, Codex, Cursor, Cline, Copilot and Antigravity through one config. One endpoint: OpenAI, Claude, Gemini and Responses API translation — point any tool at /v1 and it just works. Production-grade: circuit breakers, TLS stealth, MCP with 109 tools, A2A, memory, guardrails, evals — 25,000+ tests.">
|
||||
<svg viewBox="0 0 1200 540" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The OmniRoute promise: one endpoint, 340 providers — never stop building, OmniRoute picks the cheapest one that works. Six pillars. Never hit limits: auto-fallback across 340 providers in milliseconds, quota out means the next provider takes over with zero downtime. Save up to 95 percent of tokens: RTK plus Caveman stacked compression cuts 15 to 95 percent of eligible tokens, about 89 percent average on tool-heavy sessions. Zero dollars to start: 90+ providers with a free tier, 56 free forever — Qoder, Pollinations, Cloudflare, SiliconFlow — no card needed. Every tool works: 33 coding agents including Claude Code, Codex, Cursor, Cline, Copilot and Antigravity through one config. One endpoint: OpenAI, Claude, Gemini and Responses API translation — point any tool at /v1 and it just works. Production-grade: circuit breakers, TLS stealth, MCP with 109 tools, A2A, memory, guardrails, evals — 25,000+ tests.">
|
||||
<desc>Animated promise card: six pillar tiles fade in in reading order, then a soft colored border highlight sweeps from tile to tile in a continuous cycle.</desc>
|
||||
<defs>
|
||||
<pattern id="gridPaperP" width="32" height="32" patternUnits="userSpaceOnUse">
|
||||
@@ -21,7 +21,7 @@
|
||||
<line x1="150" y1="53" x2="1160" y2="53" stroke="#232b38" stroke-width="1.5"/>
|
||||
</g>
|
||||
<g>
|
||||
<text x="40" y="100" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="23" font-weight="600" fill="#c9d1d9">One endpoint. <tspan fill="#a78bfa" font-weight="800">341 providers.</tspan> Never stop building — OmniRoute picks <tspan fill="#7ee787" font-weight="700">the cheapest one that works</tspan>.</text>
|
||||
<text x="40" y="100" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="23" font-weight="600" fill="#c9d1d9">One endpoint. <tspan fill="#a78bfa" font-weight="800">340 providers.</tspan> Never stop building — OmniRoute picks <tspan fill="#7ee787" font-weight="700">the cheapest one that works</tspan>.</text>
|
||||
</g>
|
||||
|
||||
<g font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif">
|
||||
@@ -38,7 +38,7 @@
|
||||
<line x1="3.9" y1="3.9" x2="18.1" y2="18.1"/>
|
||||
</g>
|
||||
<text x="102" y="170" font-size="18" font-weight="800" fill="#74b9ff">Never hit limits</text>
|
||||
<text x="66" y="204" font-size="13.5" fill="#a1a1aa">Auto-fallback across 341 providers in</text>
|
||||
<text x="66" y="204" font-size="13.5" fill="#a1a1aa">Auto-fallback across 340 providers in</text>
|
||||
<text x="66" y="226" font-size="13.5" fill="#a1a1aa">milliseconds. Quota out? The next provider</text>
|
||||
<text x="66" y="248" font-size="13.5" fill="#a1a1aa">takes over — zero downtime.</text>
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,4 +1,4 @@
|
||||
<svg viewBox="0 0 1200 548" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="OmniRoute hero: Never stop coding. Every AI tool to 341 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot and Antigravity into free Claude, GPT and Gemini with auto-fallback. RTK + Caveman stacked compression saves 15 to 95 percent of tokens — about 89 percent average on tool-heavy sessions — so you never hit limits. Stats: 341 AI providers, 90+ free tiers, about 1.51B free tokens per month, 15 to 95 percent token savings, 19 routing strategies, zero dollars to start.">
|
||||
<svg viewBox="0 0 1200 548" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="OmniRoute hero: Never stop coding. Every AI tool to 340 providers — 90+ free — through one endpoint. Claude Code, Codex, Cursor, Cline, Copilot and Antigravity into free Claude, GPT and Gemini with auto-fallback. RTK + Caveman stacked compression saves 15 to 95 percent of tokens — about 89 percent average on tool-heavy sessions — so you never hit limits. Stats: 340 AI providers, 90+ free tiers, about 1.51B free tokens per month, 15 to 95 percent token savings, 19 routing strategies, zero dollars to start.">
|
||||
<desc>Animated hero card: a pulse travels the divider line and a compression bar demo repeatedly shrinks a prompt by up to 95 percent; all headline content is static and readable on the first frame.</desc>
|
||||
<defs>
|
||||
<pattern id="gridPaperH" width="32" height="32" patternUnits="userSpaceOnUse">
|
||||
@@ -28,7 +28,7 @@
|
||||
<text x="48" y="138" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="60" font-weight="800" fill="#e9edf3">Never stop coding<tspan fill="#a855f7">.</tspan></text>
|
||||
|
||||
<!-- subheadline -->
|
||||
<text x="48" y="184" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="25" font-weight="600" fill="#c9d1d9">Every AI tool → <tspan fill="#a78bfa" font-weight="800">341 providers</tspan> — <tspan fill="#7ee787" font-weight="800">90+ free</tspan> — through one endpoint.</text>
|
||||
<text x="48" y="184" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="25" font-weight="600" fill="#c9d1d9">Every AI tool → <tspan fill="#a78bfa" font-weight="800">340 providers</tspan> — <tspan fill="#7ee787" font-weight="800">90+ free</tspan> — through one endpoint.</text>
|
||||
|
||||
<!-- plug line -->
|
||||
<text x="48" y="222" font-family="Inter, 'Segoe UI', Arial, Helvetica, system-ui, sans-serif" font-size="16.5" fill="#a1a1aa">Claude Code · Codex · Cursor · Cline · Copilot · Antigravity  →  <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 |
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -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"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,311 +0,0 @@
|
||||
# CLI-INTEGRATIONS (ગુજરાતી)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "CLI ઇન્ટિગ્રેશન્સ — કોઈપણ કોડિંગ CLI ને OmniRoute પર પોઈન્ટ કરો"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# CLI ઇન્ટિગ્રેશન્સ
|
||||
|
||||
OmniRoute `setup-*` આદેશોની એક કુટુંબ સાથે આવે છે જે કોડિંગ
|
||||
CLI (Codex, Claude Code, OpenCode, Cline, …) ને OmniRoute ને તેના બેકએન્ડ તરીકે ઉપયોગ કરવા માટે કન્ફિગર કરે છે — જેથી
|
||||
આ સાધન **એક** એન્ડપોઈન્ટ સાથે વાત કરે છે અને OmniRoute યોગ્ય પ્રદાતા તરફ માર્ગદર્શન આપે છે
|
||||
ઓટો-ફોલબેક સાથે. દરેક આદેશ એક ચાલતી
|
||||
OmniRoute (સ્થાનિક અથવા દૂરસ્થ)માંથી **લાઇવ** મોડેલ કૅટલોગ વાંચે છે અને **તમારા**
|
||||
યંત્ર પર સાધનનું પોતાનું કન્ફિગરેશન ફાઇલ લખે છે. API કી એ વાતાવરણના ચલ દ્વારા સંદર્ભિત છે જ્યાં પણ સાધન
|
||||
તેને સપોર્ટ કરે છે. સાધનો જે સાધન-સ્થાનિક વાતાવરણ ફાઇલને જાળવે છે તે નીચે નોંધાયેલા છે.
|
||||
|
||||
એક સામાન્ય લોન્ચર પણ છે — `omniroute run <target>` — જે `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` અથવા `gemini` ને યોગ્ય એન્વાયર્નમેન્ટ ઇન્જેક્ટ કરીને શરૂ કરે છે, કોઈપણ કન્ફિગરેશન લખ્યા વિના. ટાર્ગેટ અને તેમના
|
||||
ઉપનામો કૅનોનિકલ મેનિફેસ્ટ `bin/cli/cli-manifest.mjs`માંથી આવે છે
|
||||
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
|
||||
`open-code`, `qwen-code`, `gemini-cli`), અને `omniroute completion` એ
|
||||
સમાન મેનિફેસ્ટ-ઉપજિત ટાર્ગેટ શબ્દો આપે છે. વારસાગત પ્રત્યેક સાધન લોન્ચર્સ —
|
||||
`omniroute launch` (Claude Code) અને `omniroute launch-codex` (Codex) — ઉપલબ્ધ રહે છે.
|
||||
|
||||
પ્રદાતા ઓનબોર્ડિંગ સમાન સ્થાનિક/દૂરસ્થ સંદર્ભમાંથી ઉપલબ્ધ છે. નીચેના
|
||||
API-પ્રથમ આદેશો વ્યવસ્થાપન પ્રમાણપત્રોને પ્રદાતા
|
||||
પ્રમાણપત્રોથી અલગ રાખે છે અને ક્યારેય રચનાત્મક આઉટપુટમાં પ્રમાણપત્ર છાપતા નથી:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
સ્ક્રિપ્ટો માટે, `--credential-stdin` અથવા `--credential-env` પસંદ કરો; `--credential`
|
||||
નિયંત્રિત સ્થાનિક ઉપયોગ માટે જ રાખવામાં આવે છે. `providers remove` ને
|
||||
નોન-ઇન્ટરેક્ટિવ ટર્મિનલ પર `--yes`ની જરૂર છે, અને તમામ પાંચ આદેશો સક્રિય સંદર્ભ અથવા
|
||||
ગ્લોબલ `--base-url`/`--api-key` વિકલ્પોને માન્ય રાખે છે.
|
||||
|
||||
બે સૌથી ધનવાન ઇન્ટિગ્રેશન્સના એકવારના, હેન્ડ-લખેલા આધાર સેટઅપ માટે, જુઓ
|
||||
પ્રત્યેક સાધનની ઊંડાણમાં:
|
||||
|
||||
- [Claude Code કન્ફિગરેશન](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [Codex CLI કન્ફિગરેશન](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [દૂરસ્થ મોડ](./REMOTE-MODE.md) — તમારા લેપટોપમાંથી દૂરસ્થ OmniRoute (VPS / Tailnet) ચલાવો
|
||||
- [VS Code Copilot ચેટ](./VSCODE-COPILOT.md) — OmniCopilot એક્સટેંશન; તે તમારા માટે આ
|
||||
`setup-*` આદેશો સંપાદકની અંદર ચલાવી શકે છે
|
||||
|
||||
---
|
||||
|
||||
## માસ્ટર ટેબલ
|
||||
|
||||
દરેક આદેશ **સક્રિય સંદર્ભ**ને માન્ય રાખે છે (જેને `omniroute connect` સાથે સેટ કરવામાં આવે છે, જુઓ
|
||||
[દૂરસ્થ મોડ](./REMOTE-MODE.md)) અથવા સ્પષ્ટ `--remote <url> --api-key <key>` ફ્લેગ્સ.
|
||||
"સ્થાનિક વિરુદ્ધ દૂરસ્થ" નીચેનો અર્થ છે: કોઈ ફ્લેગ્સ વિના તે `http://localhost:20128`ને લક્ષ્ય બનાવે છે;
|
||||
`--remote` (અથવા સક્રિય દૂરસ્થ સંદર્ભ) સાથે તે કૅટલોગને તે સર્વર પરથી મેળવે છે અને કન્ફિગરેશનને સ્થાનિક રીતે લખે છે.
|
||||
|
||||
| આદેશ | સાધન | તે શું લખે છે | મુખ્ય ફ્લેગ્સ | સ્થાનિક વિરુદ્ધ દૂરસ્થ |
|
||||
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — એક સુસંગત ટેક્સ્ટ મોડેલ માટે એક પ્રોફાઇલ (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | બંને |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — મેળવનાર મોડેલ માટે એક પ્રોફાઇલ (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | બંને |
|
||||
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json` — `omniroute` પ્રદાતા સાથે દરેક કૅટલોગ મોડેલ (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | બંને |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI મોડ) + VS Code એક્સટેંશન સેટિંગ્સ છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | બંને |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + જો હાજર હોય તો VS Code `settings.json` માં `kilocode.*` મર્જ કરે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | બંને |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — `provider: openai` મોડેલ, કી `${{ secrets.OMNIROUTE_API_KEY }}` દ્વારા | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | બંને |
|
||||
| `omniroute setup-cursor` | Cursor | કશું નહીં — એપ્લિકેશનમાં પગલાં છાપે (Cursor કન્ફિગરેશન ઓપેક SQLite છે) | `--remote` `--api-key` `--only` `--port` | બંને |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (આયાત દસ્તાવેજ) + જો VS Code `settings.json` હાજર હોય તો `roo-cline.autoImportSettingsPath` સેટ કરે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | બંને |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — `openai-compat` પ્રદાતા, કી `$OMNIROUTE_API_KEY` દ્વારા | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | બંને |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + એન્વાયર્નમેન્ટ રેસીપી છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | બંને |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + એન્વાયર્નમેન્ટ રેસીપી છાપે | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | બંને |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` એરે + `OMNIROUTE_API_KEY` `~/.qwen/.env` માં | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | બંને |
|
||||
| `omniroute run <target>` | રનટાઇમ લોન્ચ (સામાન્ય) | કશું નહીં — `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` ને યોગ્ય એન્વાયર્નમેન્ટ અને આર્ગ્યુમેન્ટ્સ સાથે શરૂ કરે છે; Qwen અને Gemini એક તાત્કાલિક અલગ હોમનો ઉપયોગ કરે છે | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | બંને |
|
||||
| `omniroute launch` | Claude Code | કશું નહીં — `claude` ને `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` ઇન્જેક્ટ કરીને શરૂ કરે | `--remote` `--api-key` `--token` `--profile` `--port` | બંને |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | કશું નહીં — `codex` ને `omniroute` પ્રદાતા ઇન્જેક્ટ કરીને શરૂ કરે છે `-c` ફ્લેગ્સ દ્વારા | `--remote` `--api-key` `--profile` (`-p`) `--port` | બંને |
|
||||
|
||||
ફ્લેગ્સ પર નોંધો (આદેશના સ્ત્રોતમાં ચકાસવામાં આવ્યું):
|
||||
|
||||
- `--remote <url>` — દૂરસ્થ OmniRouteમાંથી કૅટલોગ મેળવો (જે `--port` ને ઓવરરાઈડ કરે છે
|
||||
અને સક્રિય સંદર્ભ). `--api-key <key>` તે સર્વર માટે પ્રમાણપત્ર પૂરૂં પાડે છે (ડિફોલ્ટ `OMNIROUTE_API_KEY` એન્વાયર્નમેન્ટ ચલ અથવા સક્રિય સંદર્ભના ટોકન પર).
|
||||
- `--only <patterns>` — કોમાના-separated substrings; માત્ર મોડેલ ID જ રાખો જે મેળવે છે
|
||||
(ઉદાહરણ તરીકે, `--only glm,kimi`). ઉપલબ્ધ છે `setup-codex`, `setup-claude`,
|
||||
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
|
||||
- `--dry-run` — ફાઇલ સિસ્ટમને સ્પર્શ કર્યા વિના લખાશે તે ચોક્કસપણે છાપે. દરેક `setup-*` આદેશ પર ઉપલબ્ધ છે **છતાં** `setup-cursor`
|
||||
(જે ક્યારેય ફાઇલ લખતું નથી).
|
||||
- `--model <id>` — જરૂરી (અથવા ઇન્ટરેક્ટિવ રીતે પસંદ કરવામાં આવે છે) તે સાધનો માટે જેમણે કોઈ નથી
|
||||
મોડેલ ઓટો-ડિસ્કવરી: Cline, Kilo, Roo, Goose, Qwen, Aider. તે સાધનો
|
||||
પણ `--yes` માટે નોન-ઇન્ટરેક્ટિવ ચલણો સ્વીકાર કરે છે (જે પછી `--model`ની જરૂર છે).
|
||||
`setup-opencode` ડિફોલ્ટ ટોપ-લેવલ મોડેલ સેટ કરવા માટે `--model` લે છે.
|
||||
- `--model <id>` પર `omniroute run` મેનિફેસ્ટના પ્રતિ-લક્ષ્ય વાયરિંગને અનુસરે છે
|
||||
(`bin/cli/cli-manifest.mjs`): **aider**ને `--model openai/<id>` મળે છે અને
|
||||
**opencode**ને `--model omniroute/<id>` (પ્રિફિક્સ માત્ર ત્યારે જ ઉમેરવામાં આવે છે જ્યારે ID
|
||||
પહેલેથી જ તેને ધરાવતું નથી); **qwen** અને **gemini**ને ID વર્બેટિમ મળે છે;
|
||||
**claude**ને `ANTHROPIC_MODEL` દ્વારા મળે છે, **goose**ને `GOOSE_MODEL` દ્વારા, અને
|
||||
**codex**ને `-c model_providers.omniroute.*` આર્ગ્યુમેન્ટ્સ દ્વારા. **Qwen એ એકમાત્ર રન છે
|
||||
લક્ષ્ય જે કડક રીતે `--model`ની જરૂર છે** — `omniroute run qwen` વિના તે બહાર જાય છે
|
||||
`2` સાથે સ્પષ્ટ ભૂલ.
|
||||
- `--port <port>` — સ્થાનિક OmniRoute પોર્ટ (ડિફોલ્ટ `20128`, જ્યારે `--remote`
|
||||
સેટ કરવામાં આવે છે ત્યારે અવગણવામાં આવે છે). તમામ `setup-*` અને બંને લોન્ચર્સ પર હાજર છે.
|
||||
- `omniroute run` ની બહાર નીકળવાની કોડ: બાળક CLI ની પોતાની બહાર નીકળવાની કોડ જાળવવામાં આવે છે
|
||||
વર્બેટિમ; `2` = અમાન્ય દલીલ (અસમર્થિત લક્ષ્ય, જરૂરી ખોટું `--model`, કન્ટેનર ગાર્ડ); `127` = લક્ષ્ય બાયનરી `PATH`માં નથી;
|
||||
`130`/`143`/`129` જ્યારે લોન્ચ `SIGINT`/`SIGTERM`/`SIGHUP` દ્વારા સમાપ્ત થાય છે;
|
||||
`1` = અન્ય રનટાઇમ લોન્ચ નિષ્ફળતા.
|
||||
- બે લોન્ચર્સ (`launch`, `launch-codex`) `--profile <name>`ને સ્વીકારે છે
|
||||
`setup-claude` / `setup-codex` દ્વારા લખાયેલ પ્રોફાઇલ પસંદ કરવા માટે, ઉપરાંત
|
||||
નીચેના `claude` / `codex` બાયનરી માટે પાસ-થ્રૂ આર્ગ્યુમેન્ટ્સ.
|
||||
|
||||
ઇન્ટરેક્ટિવ પિકર પણ સેટઅપ રેસીપી દ્વારા શેર કરવામાં આવે છે:
|
||||
|
||||
```bash
|
||||
# સક્રિય સ્થાનિક અથવા દૂરસ્થ મોડેલ કૅટલોગમાંથી પસંદ કરો અને લક્ષ્યને કન્ફિગર કરો.
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
`configure` હાલમાં `codex`, `claude`,
|
||||
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, અને `kilo` માટે પરીક્ષણ કરેલી રેસીપીને સોંપે છે. IDE-માત્ર,
|
||||
MITM, અને માર્ગદર્શિકા-માત્ર કૅટલોગ એન્ટ્રીઓ સ્પષ્ટ `setup-*`/હાથથી પ્રવાહો તરીકે રહે છે અને
|
||||
લોંચેબલ ટાર્ગેટ તરીકે રજૂ કરવામાં આવતી નથી.
|
||||
|
||||
> `setup-opencode` એ **હલકો openai-compatible** OpenCode ઇન્ટિગ્રેશન છે.
|
||||
> વધુ ધનવાન પ્લગઇન ઇન્ટિગ્રેશન પણ છે — `omniroute setup opencode` — જે
|
||||
> `@omniroute/opencode-plugin` ઇન્સ્ટોલ કરે છે. તે અલગ આદેશો છે; ટેબલ
|
||||
> ઉપર `setup-opencode`ને દસ્તાવેજ કરે છે.
|
||||
|
||||
---
|
||||
|
||||
## સ્થાનિક ઉપયોગ
|
||||
|
||||
`localhost:20128` પર OmniRoute ચલાવતા, તમારા સાધન માટે સેટઅપ કમાન્ડ ચલાવો. કેટલોગ સ્થાનિક સર્વર પરથી મેળવવામાં આવે છે.
|
||||
|
||||
```bash
|
||||
# Codex: મેળવનારા મોડલ માટે ~/.codex/ માં એક પ્રોફાઇલ લખો
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # જનરેટ કરેલી પ્રોફાઇલનો ઉપયોગ કરો
|
||||
|
||||
# Claude Code: મોડલ મુજબ પ્રોફાઇલ લખો, પછી એક લોન્ચ કરો
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: તમામ કેટલોગ મોડલ સાથે openai-સંગત પ્રદાતા લખો
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} દ્વારા સંદર્ભિત, ક્યારેય ડિસ્ક પર નહીં
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# ઓટો-ડિસ્કવરી વગરના સાધનોને સ્પષ્ટ મોડલની જરૂર છે:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# કંઈપણ લખ્યા વિના પૂર્વદર્શન:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
કોઈપણ કન્ફિગ લખ્યા વિના લોન્ચ કરો (ફક્ત env-injection):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → સ્થાનિક OmniRoute
|
||||
omniroute launch-codex # Codex CLI → સ્થાનિક OmniRoute
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
|
||||
|
||||
# સ્પષ્ટ કમાન્ડ પાથ: -- પછી જે પણ આવે છે તે પસાર કરો
|
||||
omniroute run claude -- --print-system-prompt "review this diff"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## દૂરસ્થ ઉપયોગ
|
||||
|
||||
કોઈપણ સેટઅપ કમાન્ડને `--remote` + `--api-key` સાથે દૂરસ્થ OmniRoute પર નિશાન બનાવો. કેટલોગ દૂરસ્થમાંથી મેળવવામાં આવે છે; કન્ફિગ તમારા સ્થાનિક મશીન પર લખવામાં આવે છે.
|
||||
|
||||
```bash
|
||||
# દૂરસ્થ VPS સામે OpenCode, ફક્ત glm/kimi મોડલ જ રાખો
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # પહેલા OMNIROUTE_API_KEY નિકાસ કરો
|
||||
|
||||
# દૂરસ્થ કેટલોગમાંથી Codex પ્રોફાઇલ
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# દૂરસ્થ સામે સીધા CLI લોન્ચ કરો
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
દરેક વખતે `--remote`/`--api-key` પસાર કરવા બદલે, એકવાર લોગિન કરો અને **સક્રિય સંદર્ભ** તેમને આપોઆપ પૂરા પાડવા દો:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # એક સ્કોપ્ડ ટોકન બનાવે છે, સંદર્ભ સંગ્રહિત કરે છે
|
||||
omniroute setup-codex # ← હવે દૂરસ્થ કેટલોગનો ઉપયોગ કરે છે
|
||||
omniroute setup-opencode # ← સમાન
|
||||
omniroute launch # ← Claude Code દૂરસ્થ સામે
|
||||
```
|
||||
|
||||
સંદર્ભો, સ્કોપ્સ અને ટોકન વ્યવસ્થાપન માટે [દૂરસ્થ મોડ](./REMOTE-MODE.md) જુઓ.
|
||||
|
||||
---
|
||||
|
||||
## બેઝ URL પરંપરાઓ (જે સાધનો `/v1` માંગે છે)
|
||||
|
||||
OmniRoute OpenAI સપાટી `/v1` પર, Anthropic સપાટી મૂળ પર, અને એક નેટિવ Gemini સપાટી `/v1beta` પર પ્રદર્શિત કરે છે. દરેક ઇન્ટિગ્રેશન તેના સાધન દ્વારા અપેક્ષિત સ્વરૂપમાં જોડાયેલ છે (કમાન્ડ સ્ત્રોતમાં ચકાસવામાં આવ્યું):
|
||||
|
||||
| ઇન્ટિગ્રેશન | બેઝ URL લખાયેલ | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | -------------- | ---------------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | મૂળ | નહીં — Cline `/v1/chat/completions` ઉમેરે છે |
|
||||
| `setup-goose` (`OPENAI_HOST`) | મૂળ | નહીં — Goose પાથ ઉમેરે છે |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | મૂળ | નહીં — LiteLLM `/v1/chat/completions` ઉમેરે છે |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` સાથે | હા |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | મૂળ | નહીં — Claude Code `/v1/messages` ઉમેરે છે |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` સાથે | હા |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` સાથે | હા |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | મૂળ | નહીં — SDK `/v1beta/models/…` ઉમેરે છે |
|
||||
|
||||
---
|
||||
|
||||
## નેટિવ ડિપેન્ડન્સી અપડેટ રાખવું: `--include=optional`
|
||||
|
||||
જ્યારે તમે `omniroute update` સાથે અપડેટ કરો છો (પુષ્ટિ કર્યા પછી, અથવા `--apply` સાથે),
|
||||
OmniRoute `--include=optional` સાથે ઇન્સ્ટોલ ચલાવે છે:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
આ **નહીં** એક ફ્લેગ છે જે તમે `omniroute update` ને આપો છો — તે હંમેશા અપડેટર દ્વારા લાગુ કરવામાં આવે છે. તે ખાતરી આપે છે કે `optionalDependencies` (`better-sqlite3`, `keytar`,
|
||||
`tls-client`, LLMLingua SLM સ્ટેક) અપડેટ દરમિયાન જીવંત રહે છે, ભલે તમારા npm કન્ફિગમાં
|
||||
`omit=optional` સેટ હોય, જે અન્યથા નેટિવ SQLite ડ્રાઇવર અને OS-keyring બાઇન્ડિંગને મૌન રીતે દૂર કરશે. ચોક્કસ કમાન્ડને પૂર્વાવલોકન કરવા માટે, લાગુ કર્યા વિના:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
અન્ય `omniroute update` ફ્લેગ્સ (સોર્સમાં ચકાસવામાં આવ્યા): `--check` (અપડેટેડ ન હોય તો 1 ની બહાર નીકળે), `--apply` (પ્રોમ્પ્ટ કર્યા વિના ઇન્સ્ટોલ કરે), `--changelog`, `--no-backup`,
|
||||
`--yes`.
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI દ્વારા `omniroute run gemini`
|
||||
|
||||
`@google/gemini-cli` 0.50.0 સામે કરાર ચકાસવામાં આવ્યો: CLI
|
||||
`GOOGLE_GEMINI_BASE_URL` નો માન રાખે છે અને `POST /v1beta/models/<model>:generateContent`
|
||||
(અને `:streamGenerateContent?alt=sse`) સામે જારી કરે છે — ચોક્કસ રીતે OmniRouteનું નેટિવ
|
||||
Gemini સપાટી (`/v1beta`). `omniroute run gemini` તે આપોઆપ જોડે છે:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → સક્રિય OmniRoute આધાર URL (રૂટ, કોઈ `/v1` નથી);
|
||||
- `GEMINI_API_KEY` → ઉકેલાયેલ OmniRoute ક્રેડેન્શિયલ (વિકલ્પ/env/સંદર્ભ);
|
||||
- એક **અસ્થાયી અલગ `GEMINI_CLI_HOME`** જેનું `.gemini/settings.json`
|
||||
`gemini-api-key` ઓથને પસંદ કરે છે, જેથી સંગ્રહિત Google OAuth સત્ર (Code Assist)
|
||||
ક્યારેય OmniRoute-દિશાનિર્દેશિત લોન્ચને ઓવરરાઈડ ન કરે — બહાર નીકળ્યા પછી દૂર કરવામાં આવે છે;
|
||||
- **env સ્વચ્છતા**: બાળક env માંથી `GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` અને `GOOGLE_GENAI_USE_GCA` દૂર કરવામાં આવે છે (જે
|
||||
ઓથને Vertex/Code Assist તરફ ફરી મોકલશે), અને `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
|
||||
બેલ્ટ-અને-સસ્પેન્ડર્સ બેકઅપ તરીકે સેટ કરવામાં આવે છે — અન્ય `run` લક્ષ્યોને તેમના પોતાના
|
||||
વિરુદ્ધતા વેરિયેબલ્સ માટે સમાન સારવાર મળે છે;
|
||||
- `--model <id>` ઇન્જેક્શન `--provider`/`--model` માંથી.
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
Geminiનું વર્કસ્પેસ-ટ્રસ્ટ ગાર્ડ હેડલેસ મોડમાં હજી પણ લાગુ પડે છે — `--skip-trust` પસાર કરો
|
||||
(અથવા ડિરેક્ટરીને ઇન્ટરેક્ટિવ રીતે વિશ્વાસ કરો); લોન્ચર જાનબૂઝીને તેને બાયપાસ નથી કરતું. આ લોન્ચર **ACP
|
||||
રજીસ્ટ્રેશન** (`src/lib/acp/registry.ts`, `gemini --acp`) થી અલગ છે, જે `/dashboard/acp-agents` માટે એજન્ટ-પ્રોટોકોલ ઇન્ટિગ્રેશન રહે છે.
|
||||
|
||||
---
|
||||
|
||||
## વાસ્તવિક ધૂમ્રપાન સ્વીપ (ઓપ્ટ-ઇન)
|
||||
|
||||
CI માં નિશ્ચિત લોંચ-યોજન પુનરાવર્તન ચલાવે છે (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`). વાસ્તવિક બાઇનરીઓને વાસ્તવિક
|
||||
OmniRoute સર્વર સામે માન્ય કરવા માટે, એક ઓપ્ટ-ઇન હાર્નેસ છે
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts`. તે ક્યારેય આપોઆપ ચલાવવામાં નથી આવતું
|
||||
(દરેક ઉપ-ટેસ્ટ છોડી દે છે જો `RUN_CLI_SMOKE=1` ન હોય), ક્રેડેન્શિયલને env-var
|
||||
NAME દ્વારા પસાર કરે છે (ક્યારેય મૂલ્ય દ્વારા નહીં), કોઈપણ નોંધાયેલા આઉટપુટમાંથી કી-આકારના સ્ટ્રિંગ્સને છુપાવે છે, તે લક્ષ્યોને છોડી દે છે જેમની બાઇનરી ઇન્સ્ટોલ નથી, અને નિષ્ફળતાઓને
|
||||
ઓથ / અપસ્ટ્રીમ / કન્ફિગ તરીકે વર્ગીકૃત કરે છે, ન કે માત્ર બેર બુલિયન:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
વિકલ્પિક: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` સ્વીપને મર્યાદિત કરે છે;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120સેકન્ડ પ્રતિ-લક્ષ્ય ટાઈમઆઉટને ઓવરરાઈડ કરે છે.
|
||||
|
||||
---
|
||||
|
||||
## વધુ જુઓ
|
||||
|
||||
- [Claude Code રૂપરેખાંકન](./CLAUDE-CODE-CONFIGURATION.md) — ઊંડા Claude Code માર્ગદર્શિકા
|
||||
- [Codex CLI રૂપરેખાંકન](./CODEX-CLI-CONFIGURATION.md) — એકવારનો `[model_providers.omniroute]` આધારભૂત સેટઅપ
|
||||
- [દૂરનું મોડ](./REMOTE-MODE.md) — સંદર્ભ, સ્કોપ કરેલા ઍક્સેસ ટોકન, એક દૂરના સર્વર ચલાવવું
|
||||
- [CLI ટૂલ્સ સંદર્ભ](../reference/CLI-TOOLS.md) — સમર્થિત ટૂલ્સ + ડેશબોર્ડ પૃષ્ઠોનો સંપૂર્ણ કૅટલોગ
|
||||
- [સેટઅપ માર્ગદર્શિકા](./SETUP_GUIDE.md) — ઇન્સ્ટોલ પદ્ધતિઓ અને પ્રથમ વખત શરૂ થવા માટેની માર્ગદર્શિકા
|
||||
@@ -1,309 +1,86 @@
|
||||
# CLI-TOOLS (ગુજરાતી)
|
||||
# CLI Tools Setup Guide — OmniRoute (ગુજરાતી)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "CLI Tools — OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# CLI Tools — OmniRoute
|
||||
|
||||
છેલ્લી અપડેટ: 2026-08-18
|
||||
|
||||
OmniRoute ત્રણ શ્રેણીઓના CLI ટૂલ્સ સાથે સંકલિત થાય છે જે ત્રણ સમર્પિત ડેશબોર્ડ પેજો પર ફેલાય છે:
|
||||
|
||||
| પેજ | માર્ગ | સંકલ્પના | ગણતરી |
|
||||
| --------------- | ----------------------- | -------------------------------------------------------------------------------------- | ------------- |
|
||||
| **CLI Code's** | `/dashboard/cli-code` | કોડિંગ ટૂલ્સ જે તમે OmniRoute પર નિર્દેશ કરો છો (ક્લાયન્ટ → CLI → OmniRoute → પ્રદાતા) | 26 |
|
||||
| **CLI એજન્ટ્સ** | `/dashboard/cli-agents` | સ્વાયત્ત એજન્ટો જે તમે OmniRoute પર નિર્દેશ કરો છો (એક જ પ્રવાહ, વ્યાપક વ્યાપ) | 8 |
|
||||
| **ACP એજન્ટ્સ** | `/dashboard/acp-agents` | CLIs જે OmniRoute stdio/ACP દ્વારા બેકએન્ડ તરીકે ઉત્પન્ન કરે છે (વિપરીત પ્રવાહ) | રજીસ્ટ્રી જુઓ |
|
||||
|
||||
Legacy routes 308 દ્વારા રીડાયરેક્ટ કરે છે: `/dashboard/cli-tools` → `/dashboard/cli-code`, `/dashboard/agents` → `/dashboard/acp-agents`.
|
||||
This guide explains how to install and configure all supported AI coding CLI tools
|
||||
to use **OmniRoute** as the unified backend, giving you centralized key management,
|
||||
cost tracking, model switching, and request logging across every tool.
|
||||
|
||||
---
|
||||
|
||||
## કેવી રીતે કાર્ય કરે છે
|
||||
## How It Works
|
||||
|
||||
```
|
||||
CLI Code's / CLI Agents (ઉપભોગ પ્રવાહ):
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
|
||||
│
|
||||
▼ (બધા OmniRoute તરફ નિર્દેશ કરે છે)
|
||||
▼ (all point to OmniRoute)
|
||||
http://YOUR_SERVER:20128/v1
|
||||
│
|
||||
▼ (OmniRoute યોગ્ય પ્રદાતાને માર્ગ આપે છે)
|
||||
▼ (OmniRoute routes to the right provider)
|
||||
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
|
||||
|
||||
ACP Agents (વિપરીત ઉત્પન્ન પ્રવાહ):
|
||||
ક્લાયન્ટ વિનંતી → OmniRoute → stdio/ACP દ્વારા CLI ઉત્પન્ન કરે છે → પ્રતિસાદ
|
||||
```
|
||||
|
||||
**લાભ:**
|
||||
**Benefits:**
|
||||
|
||||
- તમામ ટૂલ્સને સંચાલિત કરવા માટે એક API કી
|
||||
- ડેશબોર્ડમાં તમામ CLIs માટે ખર્ચ ટ્રેકિંગ
|
||||
- દરેક ટૂલને ફરીથી કન્ફિગર કર્યા વિના મોડલ સ્વિચિંગ
|
||||
- સ્થાનિક અને દૂરસ્થ સર્વરો (VPS, Docker, Akamai, Cloudflare Tunnel) પર કાર્ય કરે છે
|
||||
- One API key to manage all tools
|
||||
- Cost tracking across all CLIs in the dashboard
|
||||
- Model switching without reconfiguring every tool
|
||||
- Works locally and on remote servers (VPS)
|
||||
|
||||
---
|
||||
|
||||
## `setup-*` સાથે આપોઆપ કન્ફિગર કરો
|
||||
## Supported Tools (Dashboard Source of Truth)
|
||||
|
||||
તમે દરેક ટૂલની કન્ફિગરેશન હાથથી લખવાની જરૂર નથી. OmniRoute એક `setup-*`
|
||||
કમાન્ડ પ્રત્યેક સમર્થિત CLI માટે મોકલે છે જે એક ચાલતી
|
||||
OmniRoute (સ્થાનિક અથવા દૂરસ્થ)માંથી **લાઇવ** મોડલ કેટલોગ વાંચે છે અને તમારા મશીન પર ટૂલની પોતાની કન્ફિગરેશન લખે છે:
|
||||
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
|
||||
Current list (v3.0.0-rc.16):
|
||||
|
||||
```bash
|
||||
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
|
||||
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
|
||||
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
|
||||
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
|
||||
```
|
||||
| Tool | ID | Command | Setup Mode | Install Method |
|
||||
| ------------------ | ------------- | ---------- | ---------- | -------------- |
|
||||
| **Claude Code** | `claude` | `claude` | env | npm |
|
||||
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
|
||||
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
|
||||
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
|
||||
| **Cursor** | `cursor` | app | guide | desktop app |
|
||||
| **Cline** | `cline` | `cline` | custom | npm |
|
||||
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
|
||||
| **Continue** | `continue` | extension | guide | VS Code |
|
||||
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
|
||||
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
|
||||
| **OpenCode** | `opencode` | `opencode` | guide | npm |
|
||||
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
|
||||
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
|
||||
|
||||
દરેક `--remote <url> --api-key <key>` સ્વીકારે છે (દૂરસ્થ OmniRoute સામે સ્થાનિક ટૂલને કન્ફિગર કરો), `--dry-run` (લખ્યા વિના પૂર્વદર્શન), અને `--port`. મોડલ આપોઆપ શોધી ન શકતા ટૂલ્સ (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` લે છે (અને `--yes` નોન-ઇન્ટરેક્ટિવ ચલાવવા માટે). યોગ્ય એન્વાયર્નમેન્ટ ઇન્જેક્ટેડ અને બિલકુલ કન્ફિગરેશન લખ્યા વિના CLI શરૂ કરવા માટે, સામાન્ય `omniroute run <target>` લોન્ચરનો ઉપયોગ કરો (claude, codex, aider, goose, opencode, qwen, gemini — ટાર્ગેટ અને અલિયાસ `bin/cli/cli-manifest.mjs`માંથી આવે છે); લેગસી પ્રત્યેક ટૂલ લોન્ચર્સ `omniroute launch` (Claude Code) અને `omniroute launch-codex` (Codex) ઉપલબ્ધ રહે છે. Gemini CLI માત્ર લોન્ચ-માત્ર છે: તે `omniroute run` ટાર્ગેટ છે પરંતુ તેમાં `setup-*`/`configure` રેસીપી નથી.
|
||||
### CLI fingerprint sync (Agents + Settings)
|
||||
|
||||
> **પૂર્ણ સંદર્ભ:** માસ્ટર ટેબલ — દરેક કમાન્ડ શું લખે છે, દરેક ફ્લેગ,
|
||||
> સ્થાનિક વિરુદ્ધ દૂરસ્થ, અને કયા ટૂલ્સ `/v1` સોફિક્સ માંગે છે — રહે છે
|
||||
> **[CLI Integrations](../guides/CLI-INTEGRATIONS.md)**.
|
||||
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
|
||||
This keeps provider IDs aligned with CLI cards and legacy IDs.
|
||||
|
||||
### કન્ટેનરમાં આ ચલાવવું
|
||||
| CLI ID | Fingerprint Provider ID |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `kilo` | `kilocode` |
|
||||
| `copilot` | `github` |
|
||||
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
|
||||
|
||||
OmniRoute કન્ટેનરમાં અમલમાં લાવવામાં આવેલ `setup-*` કમાન્ડ કન્ટેનરના પોતાના હોમમાં લખે છે, જે કોઈ હોસ્ટ CLI વાંચતું નથી અને જે કન્ટેનર સાથે ગુમ થઈ જાય છે. OmniRoute તે શોધે છે અને લખવા બદલે સૂચનાઓ સાથે `2` ની બહાર નીકળે છે. આગળ વધવા માટે બે સમર્થિત માર્ગો — હોસ્ટ પર CLI ઇન્સ્ટોલ કરો અને `omniroute connect` કન્ટેનર સાથે, અથવા કન્ફિગરેશન ડિરેક્ટરીઓને બાઇન્ડ-માઉન્ટ કરો અને `CLI_CONFIG_HOME` સેટ કરો (કમ્પોઝ `હોસ્ટ` પ્રોફાઇલ). દરેક `setup-*` કમાન્ડ, ઉપરાંત `omniroute configure` અને `omniroute config set`, કન્ટેનરના પોતાના CLIs ને કન્ફિગર કરતી વખતે `--allow-container-write` સ્વીકારે છે; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` સર્વર માટે તે જ કરે છે. જુઓ
|
||||
[Docker Guide → Configuring host CLI tools](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
|
||||
|
||||
ડેશબોર્ડનું **લાગુ કરો એન્ડપોઈન્ટ** (`POST /api/cli-tools/apply`) સમાન રક્ષણ લાગુ કરે છે: કન્ટેનરમાં, લખાણ જેનો લક્ષ્ય હોસ્ટમાંથી બાઇન્ડ-માઉન્ટ નથી તે **`422`** સાથે જવાબ આપે છે `containerEphemeralTarget: true`, સુરક્ષિત ભૂલ
|
||||
ટેક્સ્ટ અને — હોસ્ટ રેસીપી ધરાવતા ટૂલ્સ માટે (claude, codex, opencode, cline,
|
||||
kilo, continue) — એક `hostSetupCommand` (ઉદાહરણ તરીકે `omniroute setup-opencode`) જે હોસ્ટ પર ચલાવવા માટે; કશું લખાયું નથી. `dryRun: true` કન્ટેનર મોડમાં કાર્યરત રહે છે અને જનરેટ કરેલ સામગ્રી + લક્ષ્ય પાથ પાછું આપે છે, જેથી તમે ડેશબોર્ડમાંથી પૂર્વદર્શન કરી શકો અને હોસ્ટ પર લાગુ કરી શકો. આ વર્તન ઇરાદાપૂર્વક છે અને
|
||||
`tests/unit/api/cli-tools/apply-container-guard.test.ts` દ્વારા રેગ્રેશન-ગાર્ડેડ છે — ક્યારેય "ફિક્સ" 422 ને રક્ષણ દૂર કરીને.
|
||||
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
|
||||
|
||||
---
|
||||
|
||||
## સત્યનો સ્ત્રોત
|
||||
## Step 1 — Get an OmniRoute API Key
|
||||
|
||||
એકીકૃત કૅટલોગ `src/shared/constants/cliTools.ts` માં `CLI_TOOLS: Record<string, CliCatalogEntry>` તરીકે રહે છે.
|
||||
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
|
||||
2. Click **Create API Key**
|
||||
3. Give it a name (e.g. `cli-tools`) and select all permissions
|
||||
4. Copy the key — you'll need it for every CLI below
|
||||
|
||||
પ્રત્યેક એન્ટ્રીમાં આ ક્ષેત્રો હોય છે (જેઓ `src/shared/schemas/cliCatalog.ts` માં વ્યાખ્યાયિત છે):
|
||||
|
||||
| ક્ષેત્ર | પ્રકાર | વર્ણન |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
|
||||
| `શ્રેણી` | `"code" \| "agent"` | ટૂલ કયા પૃષ્ઠ પર દેખાય છે |
|
||||
| `વેન્ડર` | `string` | ટૂલનો ઉદ્ભવ ("Anthropic", "OSS (P. Gauthier)") |
|
||||
| `acpSpawnable` | `boolean` | ACP એજન્ટ તરીકે પણ ઉપયોગી (બેજ દર્શાવવામાં આવે છે) |
|
||||
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | કસ્ટમ એન્ડપોઈન્ટ સપોર્ટ સ્તર. `"none"` = MITM બેકલોગ |
|
||||
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | કન્ફિગરેશન મિકેનિઝમ |
|
||||
| `id`, `name`, `color`, `description`, `docsUrl` | માનક | મુખ્ય પ્રદર્શિત ક્ષેત્રો |
|
||||
|
||||
`baseUrlSupport: "none"` ધરાવતી એન્ટ્રીઓ ડેશબોર્ડ પૃષ્ઠોમાં **દેખાવતી નથી** — તે MITM બેકલોગમાં યોજના 11 માટે નોંધાયેલ છે (જુઓ `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
|
||||
|
||||
### ક્ષમતા સ્તરો (કૅટલોગ કરેલ × શોધી શકાય તેવા × કન્ફિગર કરી શકાય તેવા × શરૂ કરી શકાય તેવા)
|
||||
|
||||
દરેક કૅટલોગ કરેલ ટૂલ શોધી શકાય તેવા, કન્ફિગર કરી શકાય તેવા અથવા શરૂ કરી શકાય તેવા નથી. દરેક સ્તરે એક જાહેર કરેલ સ્ત્રોત હોય છે, અને એક ડ્રિફ્ટ ટેસ્ટ તેમને સમન્વયિત રાખે છે:
|
||||
|
||||
| સ્તર | અર્થ | જાહેર કરવામાં આવ્યું છે |
|
||||
| ------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| **કૅટલોગ કરેલ** | ડેશબોર્ડ કૅટલોગમાં દેખાય છે (નામ, વેન્ડર, દસ્તાવેજો, કન્ફિગરેશન પ્રકાર) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
|
||||
| **શોધી શકાય તેવા** | બાઈનરી/કન્ફિગરેશન શોધ, આરોગ્ય ચકાસણીઓ, કન્ફિગરેશન પાથ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` રનટાઇમ કૅટલોગ) |
|
||||
| **કન્ફિગર કરી શકાય તેવા** | `omniroute configure <cli>` દ્વારા સપોર્ટેડ (સેટઅપ રેસીપી હાજર છે) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
|
||||
| **શરૂ કરી શકાય તેવા** | `omniroute run <target>` દ્વારા સપોર્ટેડ (env/args ઇન્જેક્શન વ્યાખ્યાયિત) | `bin/cli/cli-manifest.mjs` (`run: true`) |
|
||||
|
||||
`bin/cli/cli-manifest.mjs` CLI આદેશ માટેનું કૅનોનિકલ એક્ઝિક્યુટેબલ મેનિફેસ્ટ છે જે સપાટી: `run`, `configure` અને શેલ-કમ્પ્લેશન જનરેટર્સ તમામ તેમના લક્ષ્ય યાદીઓ, ઉપનામ ઉકેલ (ઉદાહરણ તરીકે `kilocode`/`kilo-code`/`kilo_cli` → `kilo`) અને `--model` ફ્લેગ વાયરિંગમાંથી ઉત્પન્ન કરે છે. ડ્રિફ્ટ ગાર્ડ `tests/unit/cli/cli-manifest-drift.test.ts` ખાતરી કરે છે કે મેનિફેસ્ટ, રનટાઇમ કૅટલોગ, UI કૅટલોગ અને દરેક ગ્રાહક સપાટી સમન્વયિત રહે — એક સપાટી પર ઉમેરાયેલ લક્ષ્ય અન્ય વિના નિષ્ફળ થાય છે, જે ડ્રિફ્ટ થવા બદલે સુટને નિષ્ફળ બનાવે છે.
|
||||
|
||||
## 1. CLI કોડનું કેટલોગ (26 સાધનો)
|
||||
|
||||
બધા સાધનો જે `/dashboard/cli-code` માં દેખાય છે. જેમના પાસે `baseUrlSupport: none` છે, તેઓ MITM અથવા મેન્યુઅલ માર્ગદર્શિકા દ્વારા કસ્ટમ બેઝ URL ના બદલે જોડાયેલા છે:
|
||||
|
||||
| id | name | vendor | baseUrlSupport | configType | acpSpawnable |
|
||||
| ------------ | ----------------------- | ------------------- | -------------- | -------------- | ------------ |
|
||||
| claude | Claude Code | Anthropic | full | env | true |
|
||||
| codex | OpenAI Codex CLI | OpenAI | full | custom | true |
|
||||
| zcode | ZCode (GLM Coding Plan) | Z.ai | none | custom | false |
|
||||
| cline | Cline | OSS (ex-Claude Dev) | full | custom | true |
|
||||
| kilo | Kilo Code | Kilo-Org | full | custom | false |
|
||||
| roo | Roo Code | Roo (OSS) | full | guide | false |
|
||||
| continue | Continue | continue.dev | full | guide | false |
|
||||
| aider | Aider | OSS (P. Gauthier) | full | guide | true |
|
||||
| forge | ForgeCode | Antinomy HQ | full | custom | true |
|
||||
| jcode | jcode | 1jehuang (OSS) | full | custom | false |
|
||||
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | full | custom | false |
|
||||
| codewhale | CodeWhale | Hmbown (OSS) | full | custom | false |
|
||||
| opencode | OpenCode | Anomaly (ex-SST) | full | guide | true |
|
||||
| droid | Factory Droid | Factory AI | partial | guide | false |
|
||||
| copilot | GitHub Copilot CLI | GitHub/MS | full | custom | false |
|
||||
| cursor-cli | Cursor CLI | Anysphere | partial | guide | true |
|
||||
| smelt | Smelt | leonardcser (OSS) | full | custom | false |
|
||||
| pi | Pi (pi-coding-agent) | M. Zechner (OSS) | full | custom | false |
|
||||
| grok-build | Grok Build | xAI | full | custom | false |
|
||||
| crush | Crush | OSS (Charm) | full | custom | false |
|
||||
| qwen | Qwen Code | Alibaba | full | guide | true |
|
||||
| cursor | Cursor | Anysphere | none | guide | false |
|
||||
| antigravity | Antigravity | Google | none | mitm | false |
|
||||
| hermes | Hermes | Nous Research | none | guide | false |
|
||||
| kiro | Kiro AI | Amazon | none | mitm | false |
|
||||
| custom | Custom CLI | — | full | custom-builder | false |
|
||||
|
||||
`baseUrlSupport: "partial"` ધરાવતા સાધનો ડેશબોર્ડ કાર્ડમાં "⚠ Base URL parcial" બેજ દર્શાવે છે.
|
||||
---
|
||||
|
||||
## 2. CLI એજન્ટો કૅટલોગ (8 સાધનો)
|
||||
|
||||
સ્વતંત્ર એજન્ટો જે `/dashboard/cli-agents` માં દેખાય છે:
|
||||
|
||||
| id | name | vendor | baseUrlSupport | acpSpawnable |
|
||||
| ------------ | --------------- | ------------------------ | -------------- | ------------ |
|
||||
| hermes-agent | હર્મેસ એજન્ટ | Nous Research | સંપૂર્ણ | ખોટું |
|
||||
| openclaw | ઓપનક્લો | OSS (P. સ્ટાઇનબર્ગર) | સંપૂર્ણ | સાચું |
|
||||
| goose | ગૂસ | બ્લોક / લિનક્સ ફાઉન્ડેશન | સંપૂર્ણ | સાચું |
|
||||
| interpreter | ઓપન ઇન્ટરપ્રિટર | OSS | સંપૂર્ણ | સાચું |
|
||||
| warp | વાર્પ એઆઈ | વાર્પ ઇન્ક. | અર્ધ | સાચું |
|
||||
| agent-deck | એજન્ટ ડેક | આશેશગોપલાની (OSS) | સંપૂર્ણ | ખોટું |
|
||||
| omp | ઓહ માય પાઈ | OSS | સંપૂર્ણ | સાચું |
|
||||
| letta | લેતા CLI | લેતા | સંપૂર્ણ | ખોટું |
|
||||
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
## 3. ACP એજન્ટો (/dashboard/acp-agents)
|
||||
## Step 2 — Install CLI Tools
|
||||
|
||||
આ પૃષ્ઠ (જેનું નામ બદલવામાં આવ્યું છે `/dashboard/agents`) CLIs દર્શાવે છે કે જે ઓમ્નીરૂટ **સ્પોન** કરી શકે છે બેકએન્ડ અમલ એન્જિન તરીકે stdio/ACP પ્રોટોકોલ દ્વારા. કૅટલોગ અલગથી `src/lib/acp/registry.ts` માં જાળવવામાં આવે છે અને તે `CLI_TOOLS` સાથે **એકસરખું** નથી.
|
||||
|
||||
---
|
||||
|
||||
## 4. MITM બેકલોગ (ડેશબોર્ડમાં દર્શાવવામાં આવતું નથી)
|
||||
|
||||
નીચેના CLIs કસ્ટમ બેઝ URL ને સ્વાભાવિક રીતે સપોર્ટ કરતા નથી અને CLI કોડ અથવા CLI એજન્ટો પૃષ્ઠોમાં **યાદીબદ્ધ** નથી. તેઓ યોજના 11 માં MITM અવરોધન માટે ઉમેદવાર છે:
|
||||
|
||||
| CLI | કારણ |
|
||||
| ------------------- | ------------------------------------------------- |
|
||||
| windsurf | BYOK પસંદ કરેલા ક્લોડ મોડલ્સ + કોર્પોરેટ URL/ટોકન |
|
||||
| amp | બંધ ઇકોસિસ્ટમ (સોર્સગ્રાફ) |
|
||||
| amazon-q / kiro-cli | AWS SSO ઓથ, કસ્ટમ URL નથી |
|
||||
| cowork | એન્થ્રોપિક ડેસ્કટોપ, કન્ફિગરેબલ એન્ડપોઈન્ટ નથી |
|
||||
|
||||
પૂર્ણ ક્રોસ-રેફરન્સ માટે `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` જુઓ.
|
||||
|
||||
---
|
||||
|
||||
## 5. બેચ ડિટેક્શન API
|
||||
|
||||
બધા સાધન ડિટેક્શન એક જ એન્ડપોઈન્ટ દ્વારા સંકલિત કરવામાં આવે છે:
|
||||
|
||||
**`GET /api/cli-tools/all-statuses`**
|
||||
|
||||
- ઓથેન્ટિકેશન: `requireCliToolsAuth(request)` (અન્ય `/api/cli-tools/` માર્ગો સમાન)
|
||||
- પાછું આપે છે: `Record<toolId, ToolBatchStatus>` (પ્રકાર: `src/shared/types/cliBatchStatus.ts`)
|
||||
- વ્યૂહ: `Promise.all` તમામ સાધનો પર, 5સ ટાઇમઆઉટ પ્રતિ સાધન
|
||||
- કેશ: મેમરીમાં LRU કન્ફિગરેશન ફાઇલ `mtime` દ્વારા સૂચિબદ્ધ. જ્યારે mtime બદલાય છે ત્યારે કેશ અમાન્ય થાય છે. સર્વર પુનઃપ્રારંભ પર પુનઃસેટ થાય છે.
|
||||
|
||||
પ્રતિ સાધન પ્રતિસાદ આકાર:
|
||||
|
||||
```ts
|
||||
interface ToolBatchStatus {
|
||||
detection: {
|
||||
installed: boolean;
|
||||
runnable: boolean;
|
||||
version?: string;
|
||||
command?: string;
|
||||
commandPath?: string;
|
||||
reason?: string;
|
||||
};
|
||||
config: {
|
||||
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
|
||||
endpoint?: string | null;
|
||||
lastConfiguredAt?: string | null;
|
||||
};
|
||||
error?: string; // સાફ, કોઈ સ્ટેક ટ્રેસ નથી
|
||||
}
|
||||
```
|
||||
|
||||
## 6. નવા સાધનો માટે સેટિંગ્સ હેન્ડલર્સ
|
||||
|
||||
`configType: "custom"` ધરાવતી નવા સાધનો માટે સમર્પિત સેટિંગ્સ API માર્ગો છે:
|
||||
|
||||
| માર્ગ | સાધન |
|
||||
| ------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
|
||||
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url ધ્વજ) |
|
||||
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, વારસાગત) |
|
||||
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, પ્રાથમિક + વારસાગત `~/.deepseek` સમન્વય) |
|
||||
| `POST /api/cli-tools/smelt-settings` | Smelt |
|
||||
| `POST /api/cli-tools/pi-settings` | Pi કોડિંગ એજન્ટ |
|
||||
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
|
||||
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + સમર્પિત `.env` કી) |
|
||||
|
||||
બધા માર્ગો ભૂલના પ્રતિસાદ માટે `sanitizeErrorMessage()` નો ઉપયોગ કરે છે (Hard Rule #12).
|
||||
|
||||
---
|
||||
|
||||
## 7. ડેશબોર્ડ પેજોની આર્કિટેક્ચર
|
||||
|
||||
### CLI કોડ (`/dashboard/cli-code`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — સર્વર ઘટક
|
||||
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — ક્લાયન્ટ ગ્રિડ
|
||||
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — સાધન વિગતો પેજ
|
||||
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 વિશિષ્ટ સાધન કાર્ડ + `ToolDetailClient.tsx`
|
||||
|
||||
### CLI એજન્ટો (`/dashboard/cli-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — સર્વર ઘટક
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — ક્લાયન્ટ ગ્રિડ
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — `ToolDetailClient` નો પુનઃઉપયોગ કરે છે
|
||||
|
||||
### ACP એજન્ટો (`/dashboard/acp-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — સર્વર ઘટક (એજન્ટમાંથી ખસેડવામાં આવ્યું)
|
||||
|
||||
### શેર કરેલ UI ઘટકો (`src/shared/components/cli/`)
|
||||
|
||||
| ફાઇલ | ઉદ્દેશ |
|
||||
| ----------------------- | ---------------------------------------------------- |
|
||||
| `CliToolCard.tsx` | સ્માર્ટ સ્થિતિ કાર્ડ (પહેચાન + કન્ફિગ + અંતિમ બિંદુ) |
|
||||
| `CliConceptCard.tsx` | પ્રતિ પેજ સંકલ્પના સમજાવતી કાર્ડ |
|
||||
| `CliComparisonCard.tsx` | CLI પ્રકારો વચ્ચે ત્રણ કૉલમની તુલના |
|
||||
| `BaseUrlSelect.tsx` | અંતિમ બિંદુ ડ્રોપડાઉન (સ્થાનિક/ક્લાઉડ/કસ્ટમ) |
|
||||
| `ApiKeySelect.tsx` | API કી પસંદકર્તા |
|
||||
| `ManualConfigModal.tsx` | નકલ કરી શકાય તેવી કન્ફિગ સ્નિપેટ મોડલ |
|
||||
|
||||
### શેર કરેલ હૂક (`src/shared/hooks/cli/`)
|
||||
|
||||
| ફાઇલ | ઉદ્દેશ |
|
||||
| ------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` ને લાવે છે, લોડિંગ/ફરેશ સ્થિતિને સંચાલિત કરે છે |
|
||||
|
||||
## 8. i18n
|
||||
|
||||
યોજનામાં 14 F9 માં નવા નામસ્થાનો ઉમેરવામાં આવ્યા છે:
|
||||
|
||||
| Namespace | Purpose |
|
||||
| ----------- | ------------------------------------------------------------------------- |
|
||||
| `cliCommon` | શેર કરેલ સ્ટ્રિંગ્સ (કાર્ડ લેબલ, સંકલ્પના/તુલના ટેક્સ્ટ, વિગત પાનું લેબલ) |
|
||||
| `cliCode` | CLI કોડના પાનું સ્ટ્રિંગ્સ |
|
||||
| `cliAgents` | CLI એજન્ટ્સ પાનું સ્ટ્રિંગ્સ |
|
||||
| `acpAgents` | ACP એજન્ટ્સ પાનું સ્ટ્રિંગ્સ |
|
||||
|
||||
પૂર્ણ PT-BR અને EN અનુવાદ પ્રદાન કરવામાં આવ્યા છે. 39 અન્ય લોકલ્સ આપમેળે EN પર પાછા ફરે છે `src/i18n/request.ts` માં નામસ્થાન-સ્તર મર્જ દ્વારા.
|
||||
|
||||
---
|
||||
|
||||
## 9. ઝડપી શરૂઆત
|
||||
|
||||
### પગલું 1 — એક OmniRoute API કી મેળવો
|
||||
|
||||
1. ખોલો `/dashboard/api-manager` → **API કી બનાવો**
|
||||
2. તેને એક નામ આપો (ઉદાહરણ તરીકે `cli-tools`) અને તમામ પરવાનગીઓ પસંદ કરો
|
||||
3. કી નકલ કરો — તમને નીચેના દરેક CLI માટે તેની જરૂર પડશે
|
||||
|
||||
> તમારી કી આ રીતે દેખાય છે: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
### પગલું 2 — CLI ટૂલ્સ સ્થાપિત કરો
|
||||
|
||||
બધા npm આધારિત ટૂલ્સ માટે Node.js 22.22.2+ અથવા 24.x ની જરૂર છે:
|
||||
All npm-based tools require Node.js 18+:
|
||||
|
||||
```bash
|
||||
# Claude Code (Anthropic)
|
||||
@@ -321,137 +98,96 @@ npm install -g cline
|
||||
# KiloCode
|
||||
npm install -g kilocode
|
||||
|
||||
# Qwen Code
|
||||
npm install -g @qwen-code/qwen-code
|
||||
# Kiro CLI (Amazon — requires curl + unzip)
|
||||
apt-get install -y unzip # on Debian/Ubuntu
|
||||
curl -fsSL https://cli.kiro.dev/install | bash
|
||||
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
|
||||
```
|
||||
|
||||
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
|
||||
npm install -g @google/gemini-cli
|
||||
**Verify:**
|
||||
|
||||
# Aider
|
||||
pip install aider-chat
|
||||
|
||||
# Smelt
|
||||
cargo install smelt # Rust આધારિત
|
||||
|
||||
# Pi coding agent
|
||||
# સ્થાપન માટે https://github.com/zechnerj/pi-coding-agent જુઓ
|
||||
|
||||
# jcode
|
||||
# સ્થાપન માટે https://github.com/1jehuang/jcode જુઓ
|
||||
```bash
|
||||
claude --version # 2.x.x
|
||||
codex --version # 0.x.x
|
||||
opencode --version # x.x.x
|
||||
cline --version # 2.x.x
|
||||
kilocode --version # x.x.x (or: kilo --version)
|
||||
kiro-cli --version # 1.x.x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### પગલું 3 — ડેશબોર્ડ દ્વારા કન્ફિગર કરો
|
||||
## Step 3 — Set Global Environment Variables
|
||||
|
||||
1. જાઓ `http://localhost:20128/dashboard/cli-code`
|
||||
2. ગ્રિડમાં તમારી ટૂલ શોધો
|
||||
3. ટૂલ વિગત પાનું ખોલવા માટે કાર્ડ પર ક્લિક કરો
|
||||
4. તમારી API કી અને બેઝ URL પસંદ કરો
|
||||
5. **કન્ફિગર લાગુ કરો** પર ક્લિક કરો અથવા મેન્યુઅલ કન્ફિગર સ્નિપેટ નકલ કરો
|
||||
|
||||
---
|
||||
|
||||
### પગલું 4 — વૈશ્વિક પર્યાવરણ ચલ સેટ કરો
|
||||
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# OmniRoute યુનિવર્સલ એન્ડપોઈન્ટ
|
||||
# OmniRoute Universal Endpoint
|
||||
export OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
export OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
|
||||
# Gemini CLI ROOT પર GOOGLE_GEMINI_BASE_URL વાંચે છે (તેનું SDK પોતે /v1beta/... ઉમેરે છે)
|
||||
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
|
||||
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
|
||||
export GEMINI_BASE_URL="http://localhost:20128/v1"
|
||||
export GEMINI_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
> **દૂરના સર્વર** માટે `localhost:20128` ને સર્વર IP અથવા ડોમેન સાથે બદલો,
|
||||
> ઉદાહરણ તરીકે `http://<your-server-ip>:20128`.
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain,
|
||||
> e.g. `http://192.168.0.15:20128`.
|
||||
|
||||
---
|
||||
|
||||
### પગલું 4 — દરેક ટૂલને કન્ફિગર કરો
|
||||
## Step 4 — Configure Each Tool
|
||||
|
||||
#### Claude Code
|
||||
### Claude Code
|
||||
|
||||
```bash
|
||||
# બનાવો ~/.claude/settings.json:
|
||||
# Via CLI:
|
||||
claude config set --global api-base-url http://localhost:20128/v1
|
||||
|
||||
# Or create ~/.claude/settings.json:
|
||||
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:20128",
|
||||
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
|
||||
}
|
||||
"apiBaseUrl": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Claude Code માટે એકીકૃત Anthropic ગેટવે રૂટનો ઉપયોગ કરો. અહીં `/v1` ઉમેરશો નહીં.
|
||||
|
||||
**પરીક્ષણ:** `claude "say hello"`
|
||||
**Test:** `claude "say hello"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenAI Codex
|
||||
|
||||
આધુનિક Codex (v0.137+) ફક્ત `~/.codex/config.toml` વાંચે છે — જૂનું
|
||||
`config.yaml` વારસાગત npm CLI માટે છે અને મૌન રીતે અવગણવામાં આવે છે. API
|
||||
કી `OMNIROUTE_API_KEY` પર્યાવરણ ચલ (`env_key`) માં રહે છે, ક્યારેય
|
||||
ફાઇલની અંદર નહીં:
|
||||
### OpenAI Codex
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
|
||||
model_provider = "omniroute"
|
||||
|
||||
[model_providers.omniroute]
|
||||
name = "OmniRoute"
|
||||
base_url = "http://localhost:20128/v1"
|
||||
env_key = "OMNIROUTE_API_KEY"
|
||||
requires_openai_auth = false
|
||||
EOF
|
||||
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
પૂર્ણ સંદર્ભ (પ્રોફાઇલ, `wire_api`, સંદર્ભ વિન્ડોઝ): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
|
||||
|
||||
**પરીક્ષણ:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenCode
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
|
||||
{
|
||||
"\$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"omniroute": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "OmniRoute",
|
||||
"options": {
|
||||
"baseURL": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
},
|
||||
"models": {
|
||||
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
|
||||
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
|
||||
"gemini-3-flash": { "name": "gemini-3-flash" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
|
||||
model: auto
|
||||
apiKey: sk-your-omniroute-key
|
||||
apiBaseUrl: http://localhost:20128/v1
|
||||
EOF
|
||||
```
|
||||
|
||||
**પરીક્ષણ:** `opencode`
|
||||
|
||||
> વિચારણા રૂપો મોકલવા માટે `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` નો ઉપયોગ કરો.
|
||||
**Test:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### Cline (CLI અથવા VS Code)
|
||||
### OpenCode
|
||||
|
||||
**CLI મોડ:**
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
|
||||
[provider.openai]
|
||||
base_url = "http://localhost:20128/v1"
|
||||
api_key = "sk-your-omniroute-key"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Test:** `opencode`
|
||||
|
||||
---
|
||||
|
||||
### Cline (CLI or VS Code)
|
||||
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
@@ -463,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
EOF
|
||||
```
|
||||
|
||||
**VS Code મોડ:**
|
||||
Cline વિસ્તરણ સેટિંગ્સ → API પ્રદાતા: `OpenAI Compatible` → બેઝ URL: `http://localhost:20128/v1`
|
||||
**VS Code mode:**
|
||||
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
|
||||
|
||||
અથવા OmniRoute ડેશબોર્ડનો ઉપયોગ કરો → **CLI ટૂલ્સ → Cline → કન્ફિગર લાગુ કરો**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### KiloCode (CLI અથવા VS Code)
|
||||
### KiloCode (CLI or VS Code)
|
||||
|
||||
**CLI મોડ:**
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
```
|
||||
|
||||
**VS Code સેટિંગ્સ:**
|
||||
**VS Code settings:**
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -487,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
}
|
||||
```
|
||||
|
||||
અથવા OmniRoute ડેશબોર્ડનો ઉપયોગ કરો → **CLI ટૂલ્સ → KiloCode → કન્ફિગર લાગુ કરો**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### Continue (VS Code Extension)
|
||||
### Continue (VS Code Extension)
|
||||
|
||||
`~/.continue/config.yaml` સંપાદિત કરો:
|
||||
Edit `~/.continue/config.yaml`:
|
||||
|
||||
```yaml
|
||||
models:
|
||||
@@ -505,253 +241,158 @@ models:
|
||||
default: true
|
||||
```
|
||||
|
||||
સંપાદન પછી VS Code ફરી શરૂ કરો.
|
||||
Restart VS Code after editing.
|
||||
|
||||
---
|
||||
|
||||
#### VS Code Insiders (`chatLanguageModels.json`)
|
||||
|
||||
જ્યારે VS Code Insiders કસ્ટમ એન્ડપોઈન્ટ મોડલ માટે કન્ફિગર કરવામાં આવે છે અને તમે OmniRoute ને કસ્ટમ હેડર ફીલ્ડ વિના કાર્ય કરવા માંગો છો ત્યારે આનો ઉપયોગ કરો.
|
||||
|
||||
**સૂચવેલ સ્થાન:**
|
||||
|
||||
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
|
||||
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
|
||||
|
||||
**ટોકનાઇઝ્ડ OmniRoute ઉપનામનો ઉપયોગ કરીને ઉદાહરણ:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"vendor": "customendpoint",
|
||||
"id": "auto",
|
||||
"name": "OmniRoute Auto",
|
||||
"family": "gpt-4",
|
||||
"version": "1.0.0",
|
||||
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
|
||||
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
|
||||
"requestFormat": "openai-chat-completions",
|
||||
"contextWindow": 256000,
|
||||
"maxOutputTokens": 32768,
|
||||
"auth": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**નોંધ:**
|
||||
|
||||
- `sk-your-omniroute-key` ને OmniRoute માં બનાવવામાં આવેલી API કી સાથે બદલો.
|
||||
- `url` ફીલ્ડને `/api/v1/vscode/{token}/chat/completions` તરફ સંકેત કરવો જોઈએ.
|
||||
- `modelsUrl` ફીલ્ડને `/api/v1/vscode/{token}/models` તરફ સંકેત કરવો જોઈએ.
|
||||
- જ્યારે ક્લાયન્ટ કસ્ટમ હેડર્સને સપોર્ટ કરે છે ત્યારે સામાન્ય `/v1` + બેરર હેડર પ્રવાહને પ્રાથમિકતા આપો.
|
||||
- URL-એમ્બેડેડ ટોકન્સ એક સુસંગતતા પાછા ફરવા છે અને સંપાદક લોગ્સ અથવા પ્રોક્સી ઇતિહાસમાં દેખાઈ શકે છે.
|
||||
|
||||
---
|
||||
|
||||
#### Kiro CLI (અમેઝોન)
|
||||
### Kiro CLI (Amazon)
|
||||
|
||||
```bash
|
||||
# તમારા AWS/Kiro ખાતામાં લોગિન કરો:
|
||||
# Login to your AWS/Kiro account:
|
||||
kiro-cli login
|
||||
|
||||
# CLI તેની પોતાની ઓથનો ઉપયોગ કરે છે — Kiro CLI માટે બેકએન્ડ તરીકે OmniRouteની જરૂર નથી.
|
||||
# અન્ય ટૂલ્સ માટે OmniRoute સાથે kiro-cli નો ઉપયોગ કરો.
|
||||
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
|
||||
# Use kiro-cli alongside OmniRoute for other tools.
|
||||
kiro-cli status
|
||||
```
|
||||
|
||||
**Kiro IDE** ડેસ્કટોપ એપ્લિકેશન માટે, OmniRoute દ્વારા પ્રદર્શિત MITM એન્ડપોઈન્ટનો ઉપયોગ કરો
|
||||
`/dashboard/cli-tools → Kiro` હેઠળ.
|
||||
---
|
||||
|
||||
### Qwen Code (Alibaba)
|
||||
|
||||
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
|
||||
|
||||
**Option 1: Environment variables (`~/.qwen/.env`)**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
|
||||
OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
OPENAI_MODEL="auto"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Option 2: `settings.json` with model providers**
|
||||
|
||||
```json
|
||||
// ~/.qwen/settings.json
|
||||
{
|
||||
"env": {
|
||||
"OPENAI_API_KEY": "sk-your-omniroute-key",
|
||||
"OPENAI_BASE_URL": "http://localhost:20128/v1"
|
||||
},
|
||||
"modelProviders": {
|
||||
"openai": [
|
||||
{
|
||||
"id": "omniroute-default",
|
||||
"name": "OmniRoute (Auto)",
|
||||
"envKey": "OPENAI_API_KEY",
|
||||
"baseUrl": "http://localhost:20128/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Option 3: Inline CLI flags**
|
||||
|
||||
```bash
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1" \
|
||||
OPENAI_API_KEY="sk-your-omniroute-key" \
|
||||
OPENAI_MODEL="auto" \
|
||||
qwen
|
||||
```
|
||||
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain.
|
||||
|
||||
**Test:** `qwen "say hello"`
|
||||
|
||||
### Cursor (Desktop App)
|
||||
|
||||
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
|
||||
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
|
||||
|
||||
Via GUI: **Settings → Models → OpenAI API Key**
|
||||
|
||||
- Base URL: `https://your-domain.com/v1`
|
||||
- API Key: your OmniRoute key
|
||||
|
||||
---
|
||||
|
||||
## 10. આંતરિક ઓમ્નીરૂટ CLI
|
||||
## Dashboard Auto-Configuration
|
||||
|
||||
`omniroute` બાઈનરી સર્વર જીવનચક્ર, સેટઅપ, નિદાન અને પ્રદાતા વ્યવસ્થાપન માટે આદેશો પ્રદાન કરે છે. પ્રવેશ બિંદુ: `bin/omniroute.mjs`.
|
||||
The OmniRoute dashboard automates configuration for most tools:
|
||||
|
||||
```bash
|
||||
omniroute # સર્વર શરૂ કરો (ડિફોલ્ટ પોર્ટ 20128)
|
||||
omniroute setup # ઇન્ટરેક્ટિવ સેટઅપ વિઝાર્ડ
|
||||
omniroute doctor # કન્ફિગ, DB, પોર્ટ, રનટાઇમ તપાસો
|
||||
omniroute providers list # કન્ફિગર્ડ પ્રદાતા કનેક્શન
|
||||
omniroute providers test-all # દરેક સક્રિય કનેક્શનનું પરીક્ષણ કરો
|
||||
omniroute reset-password # એડમિન પાસવર્ડ ફરીથી સેટ કરો
|
||||
omniroute logs # વિનંતી લોગ્સ સ્ટ્રીમ કરો
|
||||
omniroute health # વિગતવાર આરોગ્ય (બ્રેકર્સ, કેશ, મેમરી)
|
||||
omniroute --version # સંસ્કરણ છાપો
|
||||
omniroute --help # બધા આદેશો બતાવો
|
||||
```
|
||||
|
||||
### સેટઅપ અને આરંભ
|
||||
|
||||
```bash
|
||||
omniroute setup # ઇન્ટરેક્ટિવ સેટઅપ વિઝાર્ડ
|
||||
omniroute setup --non-interactive # CI/ઓટોમેશન મોડ (પર્યાવરણ ચલ + ફ્લેગ્સ વાંચે છે)
|
||||
omniroute setup --password '<value>' # એડમિન પાસવર્ડ સીધો સેટ કરો
|
||||
omniroute setup --add-provider \
|
||||
--provider openai \
|
||||
--api-key '<value>' \
|
||||
--test-provider # એક જ શોટમાં પ્રદાતા ઉમેરો અને પરીક્ષણ કરો
|
||||
```
|
||||
|
||||
ગેર-ઇન્ટરેક્ટિવ સેટઅપ માટે માન્ય પર્યાવરણ ચલ:
|
||||
|
||||
| Var | ઉદ્દેશ |
|
||||
| ------------------- | --------------------------------------------------------------- |
|
||||
| `OMNIROUTE_API_KEY` | પ્રદાતા API કી (કમાંડર `.env()` દ્વારા `--api-key` સાથે બાઉન્ડ) |
|
||||
| `DATA_DIR` | ઓમ્નીરૂટ ડેટા ડિરેક્ટરીને ઓવરરાઈડ કરો |
|
||||
|
||||
બાકીના બધા ગેર-ઇન્ટરેક્ટિવ ઇનપુટ્સ ફ્લેગ્સ તરીકે પસાર થાય છે, પર્યાવરણ ચલ તરીકે નહીં:
|
||||
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
|
||||
(ઉપરના `omniroute setup` વિકલ્પો જુઓ).
|
||||
|
||||
### નિદાન
|
||||
|
||||
```bash
|
||||
omniroute doctor # કન્ફિગ, DB, પોર્ટ, રનટાઇમ, મેમરી, જીવંતતા તપાસો
|
||||
omniroute doctor --json # મશીન-વાંચનક્ષમ JSON
|
||||
omniroute doctor --no-liveness # HTTP આરોગ્ય પ્રોબને છોડી દો
|
||||
omniroute doctor --host 0.0.0.0 # જીવંતતા હોસ્ટને ઓવરરાઈડ કરો
|
||||
omniroute doctor --liveness-url <url> # સંપૂર્ણ આરોગ્ય અંતિમ બિંદુ URL ઓવરરાઈડ
|
||||
```
|
||||
|
||||
ડોક્ટર આ ચકાસણીઓ ચલાવે છે: `કન્ફિગ`, `ડેટાબેઝ`, `સ્ટોરેજ/એન્ક્રિપ્શન`,
|
||||
`પોર્ટ ઉપલબ્ધતા`, `નોડ રનટાઇમ`, `નેટિવ બાઈનરી` (બેટર-સ્ક્વાઇટ 3),
|
||||
`મેમરી`, અને `સર્વર જીવંતતા`. જો કોઈ ચકાસણી `ફેલ` થાય તો તે નોન-ઝીરોમાં બહાર નીકળે છે.
|
||||
|
||||
### પ્રદાતા વ્યવસ્થાપન
|
||||
|
||||
```bash
|
||||
omniroute providers available # ઓમ્નીરૂટ પ્રદાતા કૅટલોગ
|
||||
omniroute providers available --search openai # id/name/alias/category દ્વારા કૅટલોગને ફિલ્ટર કરો
|
||||
omniroute providers available --category api-key # શ્રેણી દ્વારા ફિલ્ટર કરો (api-key, oauth, free, ...)
|
||||
omniroute providers available --json # મશીન-વાંચનક્ષમ JSON
|
||||
|
||||
omniroute providers list # કન્ફિગર્ડ પ્રદાતા કનેક્શન
|
||||
omniroute providers list --json
|
||||
|
||||
omniroute providers test <id|name> # એક કન્ફિગર્ડ કનેક્શનનું પરીક્ષણ કરો
|
||||
omniroute providers test-all # દરેક સક્રિય કનેક્શનનું પરીક્ષણ કરો
|
||||
omniroute providers validate # સ્થાનિક-માત્ર બંધારણ માન્યતા
|
||||
omniroute providers add <provider> --credential-env PROVIDER_KEY
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth <provider> # અસ્તિત્વમાં આવેલા OAuth પ્રવાહ
|
||||
omniroute providers edit <id|name> --default-model <model>
|
||||
omniroute providers remove <id|name> --yes
|
||||
```
|
||||
|
||||
`providers add/import/auth/edit/remove` એ API-પ્રથમ છે અને તેથી સક્રિય સ્થાનિક અથવા દૂરના સંદર્ભ સામે કાર્ય કરે છે. પ્રમાણપત્ર ઇનપુટને ઉપયોગ કરવો જોઈએ
|
||||
`--credential-stdin` અથવા `--credential-env`; `--dry-run --json` માત્ર
|
||||
લાલિત્યની હાજરી/આકારની માહિતી આપે છે. `providers available` ઓમ્નીરૂટ કૅટલોગને વાંચે છે;
|
||||
`providers list/test/test-all/validate` તેમના સ્થાનિક SQLite વર્તનને જાળવે છે અને
|
||||
સર્વર ચલાવવાની જરૂર નથી.
|
||||
|
||||
### પુનઃપ્રાપ્તિ અને પુનઃસેટ
|
||||
|
||||
```bash
|
||||
omniroute reset-password # એડમિન પાસવર્ડ ફરીથી સેટ કરો (અન્ય: omniroute-reset-password)
|
||||
omniroute reset-encrypted-columns # એન્ક્રિપ્ટેડ પ્રમાણપત્ર પુનઃસેટ માટે ચેતવણી + ડ્રાય-રન બતાવો
|
||||
omniroute reset-encrypted-columns --force # વાસ્તવમાં SQLite માં એન્ક્રિપ્ટેડ પ્રમાણપત્રને નલ કરો
|
||||
```
|
||||
|
||||
### પ્રમાણપત્ર નિકાસ (⚠ ધ્યાનથી હેન્ડલ કરો)
|
||||
|
||||
```bash
|
||||
omniroute auth export # ચેતવણી + પુષ્ટિ ગેટ — DB ઍક્સેસ નથી
|
||||
omniroute auth export --force # તમામ કનેક્શનના ડિક્રિપ્ટેડ પ્રમાણપત્રોને stdout પર JSON તરીકે નિકાસ કરો
|
||||
omniroute auth export --force --id <id> # ફક્ત મેળ ખાતા કનેક્શનને નિકાસ કરો
|
||||
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> લાઇન ઉત્પન્ન કરો
|
||||
omniroute auth export --force --out creds.json # ફાઇલમાં લખો (0600 પરમિશન સાથે બનાવવામાં આવે છે)
|
||||
```
|
||||
|
||||
`auth export` એ **સ્થાનિક-માત્ર** (સિધા SQLite વાંચન, કોઈ HTTP માર્ગ નથી) અને ઇરાદાપૂર્વક છાપે/લખે છે
|
||||
**પ્લેઇનટેક્સ્ટ** `apiKey`/`accessToken`/`refreshToken`/`idToken` મૂલ્યો — આ ફીચર છે, બગ નથી. ડેટાબેઝમાંથી કંઈપણ વાંચવામાં આવતું નથી, અને કંઈપણ ડિક્રિપ્ટ કરવામાં આવતું નથી, વિના `--force`. કોઈપણ પ્લેઇનટેક્સ્ટ ઉત્પન્ન થાય તે પહેલાં હંમેશા stderr ચેતવણી બેનર છાપે છે. `STORAGE_ENCRYPTION_KEY` સેટ કરવું જરૂરી છે. એક ક્ષેત્ર જે ડિક્રિપ્ટ કરવામાં નિષ્ફળ જાય છે (જૂનો કી, ખોટી ciphertext) તે તરીકે રિપોર્ટ કરવામાં આવે છે
|
||||
`<field>DecryptFailed: true` સમગ્ર નિકાસને બંધ કરવાનો બદલે અથવા આધારભૂત ભૂલને લીક કરવાનો બદલે.
|
||||
|
||||
### અન્ય ઉપઆદેશો
|
||||
|
||||
આઓમ્નીરૂટ સર્વર ચલાવવાની ધારણા કરે છે, જો અન્યથા નોંધાયેલ ન હોય:
|
||||
|
||||
```bash
|
||||
omniroute status # વ્યાપક રનટાઇમ સ્થિતિ
|
||||
omniroute logs # વિનંતી લોગ્સ સ્ટ્રીમ (--json, --search, --follow)
|
||||
omniroute config show # વર્તમાન કન્ફિગ્યુરેશન દર્શાવો
|
||||
|
||||
omniroute provider list # ઉપલબ્ધ પ્રદાતાઓની યાદી (પ્રદાતાઓની યાદીનું ઉપનામ)
|
||||
omniroute provider add # એક સાધન પર ઓમ્નીરૂટને પ્રદાતા તરીકે નોંધણી કરો
|
||||
omniroute keys add | list | remove # API કી વ્યવસ્થાપન
|
||||
omniroute models [provider] # મોડલની યાદી (--json, --search)
|
||||
omniroute combo list | switch | create | delete
|
||||
|
||||
omniroute backup # કન્ફિગ + DB નું સ્નેપશોટ
|
||||
omniroute restore # અગાઉના સ્નેપશોટમાંથી પુનઃપ્રાપ્તિ
|
||||
|
||||
omniroute health # વિગતવાર આરોગ્ય (બ્રેકર્સ, કેશ, મેમરી)
|
||||
omniroute quota # પ્રદાતા ક્વોટનો ઉપયોગ
|
||||
omniroute cache # કેશની સ્થિતિ
|
||||
omniroute cache clear # સેમેન્ટિક + સહી કેશને સાફ કરો
|
||||
|
||||
omniroute mcp status | restart # MCP સર્વર સ્થિતિ / પુનઃપ્રારંભ
|
||||
omniroute a2a status | card # A2A સર્વર સ્થિતિ / એજન્ટ કાર્ડ
|
||||
|
||||
omniroute tunnel list | create | stop # ટનલ્સનું વ્યવસ્થાપન (ક્લાઉડફ્લેર/ટેઇલસ્કેલ/ngrok)
|
||||
omniroute env show | get <k> | set <k> <v> # પર્યાવરણ ચલ તપાસો / સેટ કરો (તાત્કાલિક)
|
||||
|
||||
omniroute test # પ્રદાતા કનેક્ટિવિટી સ્મોક ટેસ્ટ
|
||||
omniroute update # અપડેટ્સ માટે તપાસો
|
||||
omniroute completion # શેલ પૂર્ણતા જનરેટ કરો
|
||||
```
|
||||
|
||||
### સામાન્ય ફ્લેગ્સ
|
||||
|
||||
| ફ્લેગ | વર્ણન |
|
||||
| ------------------- | ---------------------------------------------------------- |
|
||||
| `--no-open` | શરૂ થતાં બ્રાઉઝર ઓટોમેટિક ખોલવા નથી |
|
||||
| `--port <n>` | API પોર્ટને ઓવરરાઈડ કરો (ડિફોલ્ટ 20128) |
|
||||
| `--mcp` | stdio પર MCP સર્વર તરીકે ચલાવો (IDE માટે) |
|
||||
| `--non-interactive` | CI મોડ (કોઈ પ્રોમ્પ્ટ નથી; પર્યાવરણ/ફ્લેગ્સમાંથી વાંચે છે) |
|
||||
| `--json` | મશીન-વાંચનક્ષમ JSON આઉટપુટ (ડોક્ટર, પ્રદાતાઓ, વગેરે) |
|
||||
| `--help`, `-h` | આદેશ-વિશિષ્ટ મદદ બતાવો |
|
||||
| `--version`, `-v` | સ્થાપિત સંસ્કરણ છાપો |
|
||||
1. Go to `http://localhost:20128/dashboard/cli-tools`
|
||||
2. Expand any tool card
|
||||
3. Select your API key from the dropdown
|
||||
4. Click **Apply Config** (if tool is detected as installed)
|
||||
5. Or copy the generated config snippet manually
|
||||
|
||||
---
|
||||
|
||||
## ઉપલબ્ધ API એન્ડપોઈન્ટ્સ
|
||||
## Built-in Agents: Droid & OpenClaw
|
||||
|
||||
| એન્ડપોઈન્ટ | વર્ણન | ઉપયોગ માટે |
|
||||
| -------------------------- | ----------------------------- | --------------------------------------- |
|
||||
| `/v1/chat/completions` | માનક ચેટ (બધા પ્રદાતાઓ) | તમામ આધુનિક સાધનો |
|
||||
| `/v1/responses` | પ્રતિસાદ API (OpenAI ફોર્મેટ) | કોડેક્સ, એજન્ટિક વર્કફ્લો |
|
||||
| `/v1/completions` | વારસાગત ટેક્સ્ટ પૂર્ણતાઓ | જૂના સાધનો જે `prompt:` નો ઉપયોગ કરે છે |
|
||||
| `/v1/embeddings` | ટેક્સ્ટ એમ્બેડિંગ્સ | RAG, શોધ |
|
||||
| `/v1/images/generations` | છબી જનરેશન | GPT-Image, Flux, વગેરે |
|
||||
| `/v1/audio/speech` | ટેક્સ્ટ-થી-સ્પીચ | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | સ્પીચ-થી-ટેક્સ્ટ | Deepgram, AssemblyAI |
|
||||
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
|
||||
They run as internal routes and use OmniRoute's model routing automatically.
|
||||
|
||||
ટોકનાઇઝ્ડ ઓમ્નીરૂટ URL સાથે તૈયાર-થી-પેસ્ટ ઉદાહરણો:
|
||||
|
||||
```txt
|
||||
ટોકન ઉદાહરણ: sk-a3ab3c080beaee3a-69f4a4-070d71af
|
||||
|
||||
માનક OpenAI આધાર: http://localhost:20128/v1
|
||||
VS Code મોડેલ્સ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
|
||||
VS Code ચેટ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
|
||||
VS Code પ્રતિસાદ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
|
||||
Ollama ટેગ્સ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
|
||||
Ollama ચેટ: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
|
||||
```
|
||||
- Access: `http://localhost:20128/dashboard/agents`
|
||||
- Configure: same combos and providers as all other tools
|
||||
- No API key or CLI install required
|
||||
|
||||
---
|
||||
|
||||
## સમસ્યાઓનું નિરાકરણ
|
||||
## Available API Endpoints
|
||||
|
||||
| ભૂલ | કારણ | સુધારો |
|
||||
| --------------------------------------------- | -------------------------- | ---------------------------------------------------------------- |
|
||||
| `Connection refused` | OmniRoute ચલાવી રહ્યું નથી | `omniroute serve` |
|
||||
| `401 Unauthorized` | ખોટો API કી | `/dashboard/api-manager` માં તપાસો |
|
||||
| `No combo configured` | કોઈ સક્રિય રૂટિંગ કોમ્બો | `/dashboard/combos` માં સેટ કરો |
|
||||
| CLI "not installed" બતાવે છે | બાયનરી PATH માં નથી | `which <command>` તપાસો |
|
||||
| ડેશબોર્ડ ઇન્સ્ટોલ પછી "not detected" બતાવે છે | કેશ જૂનો | ડેશબોર્ડમાં "⟳ Refresh detection" પર ક્લિક કરો |
|
||||
| જૂનો લિંક `/dashboard/cli-tools` | Pre-v3.8.6 બુકમાર્ક | `/dashboard/cli-code` (308) પર આપોઆપ રીડાયરેક્ટ કરવામાં આવ્યું |
|
||||
| જૂનો લિંક `/dashboard/agents` | Pre-v3.8.6 બુકમાર્ક | `/dashboard/acp-agents` (308) પર આપોઆપ રીડાયરેક્ટ કરવામાં આવ્યું |
|
||||
| Endpoint | Description | Use For |
|
||||
| -------------------------- | ----------------------------- | --------------------------- |
|
||||
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
|
||||
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
|
||||
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
|
||||
| `/v1/embeddings` | Text embeddings | RAG, search |
|
||||
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
|
||||
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
|
||||
|
||||
---
|
||||
|
||||
## Solución de Problemas
|
||||
|
||||
| Error | Cause | Fix |
|
||||
| ------------------------- | ----------------------- | ------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
|
||||
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
|
||||
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
|
||||
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
|
||||
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
|
||||
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup Script (One Command)
|
||||
|
||||
```bash
|
||||
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
|
||||
OMNIROUTE_URL="http://localhost:20128/v1"
|
||||
OMNIROUTE_KEY="sk-your-omniroute-key"
|
||||
|
||||
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
|
||||
|
||||
# Kiro CLI
|
||||
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
|
||||
|
||||
# Write configs
|
||||
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
|
||||
|
||||
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
|
||||
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
|
||||
cat >> ~/.bashrc << EOF
|
||||
export OPENAI_BASE_URL="$OMNIROUTE_URL"
|
||||
export OPENAI_API_KEY="$OMNIROUTE_KEY"
|
||||
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
|
||||
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
|
||||
EOF
|
||||
|
||||
source ~/.bashrc
|
||||
echo "✅ All CLIs installed and configured for OmniRoute"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,309 +0,0 @@
|
||||
# CLI-INTEGRATIONS (עברית)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "אינטגרציות CLI — הפנה כל CLI קוד ל-OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# אינטגרציות CLI
|
||||
|
||||
OmniRoute מספקת משפחה של פקודות `setup-*` שמגדירות CLI קוד (Codex, Claude Code, OpenCode, Cline, …) להשתמש ב-OmniRoute כ-backend שלה — כך שהכלי מדבר עם **נקודת קצה אחת** ו-OmniRoute מנתבת לספק הנכון עם חזרה אוטומטית. כל פקודה קוראת את הקטלוג של המודל **החי** מ-OmniRoute פועל (מקומי או מרוחק) וכותבת את קובץ הקונפיגורציה של הכלי על **המחשב שלך**. מפתח ה-API מתייחס על ידי משתנה סביבה בכל מקום שהכלי תומך בו. פקודות ששומרות קובץ סביבה מקומי של הכלי מצוינות למטה.
|
||||
|
||||
יש גם מפעיל כללי — `omniroute run <target>` — שמפעיל `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` או `gemini` עם הסביבה הנכונה מוזרקת, מבלי לכתוב שום קונפיגורציה בכלל. היעדים והכינויים שלהם מגיעים מהמניפסט הקנוני `bin/cli/cli-manifest.mjs`
|
||||
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
|
||||
`open-code`, `qwen-code`, `gemini-cli`), ו-`omniroute completion` מציע את
|
||||
אותן מילים נגזרות מהמניפסט. המפעילים הישנים לכל כלי —
|
||||
`omniroute launch` (Claude Code) ו-`omniroute launch-codex` (Codex) — נשארים
|
||||
זמינים.
|
||||
|
||||
הכנסת ספקים זמינה מאותו הקשר מקומי/מרוחק. הפקודות API-first למטה שומרות על אימות ניהול בנפרד מהאישורים של הספקים ואינן מדפיסות אישור בפלט מובנה:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
לסקריפטים, העדיף `--credential-stdin` או `--credential-env`; `--credential`
|
||||
נשמר לשימוש מקומי מבוקר. `providers remove` דורש `--yes` בטרמינל שאינו אינטראקטיבי, וכל חמש הפקודות מכבדות את ההקשר הפעיל או את האפשרויות הגלובליות `--base-url`/`--api-key`.
|
||||
|
||||
להגדרה חד פעמית, כתובה ביד של שתי האינטגרציות העשירות ביותר, ראה את
|
||||
העומק של כל כלי:
|
||||
|
||||
- [הגדרת Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [הגדרת Codex CLI](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [מצב מרוחק](./REMOTE-MODE.md) — הפעל OmniRoute מרוחק (VPS / Tailnet) מהמחשב הנייד שלך
|
||||
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — תוסף OmniCopilot; הוא יכול גם להריץ את הפקודות
|
||||
`setup-*` עבורך מתוך העורך
|
||||
|
||||
---
|
||||
|
||||
## טבלת מאסטר
|
||||
|
||||
כל פקודה מכבדת את **ההקשר הפעיל** (מוגדר עם `omniroute connect`, ראה
|
||||
[מצב מרוחק](./REMOTE-MODE.md)) או את הדגלים המפורשים `--remote <url> --api-key <key>`.
|
||||
"מקומי מול מרוחק" למטה פירושו: ללא דגלים זה מכוון ל-`http://localhost:20128`;
|
||||
עם `--remote` (או הקשר מרוחק פעיל) זה שולף את הקטלוג מהשרת ההוא וכותב את הקונפיגורציה מקומית.
|
||||
|
||||
| פקודה | כלי | מה היא כותבת | דגלים מרכזיים | מקומי מול מרוחק |
|
||||
| -------------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — פרופיל אחד לכל מודל טקסט תואם (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | שניהם |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — פרופיל אחד לכל מודל תואם (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | שניהם |
|
||||
| `omniroute setup-opencode` | OpenCode (תואם ל-openai) | `~/.config/opencode/opencode.json` — ספק `omniroute` עם כל מודל בקטלוג (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | שניהם |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (מצב CLI) + מדפיס הגדרות תוסף VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | שניהם |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + ממזג `kilocode.*` לתוך `settings.json` של VS Code אם קיים | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | שניהם |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — מודלים `provider: openai`, מפתח דרך `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | שניהם |
|
||||
| `omniroute setup-cursor` | Cursor | כלום — מדפיס את הצעדים באפליקציה (הגדרת Cursor היא SQLite אטומה) | `--remote` `--api-key` `--only` `--port` | שניהם |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (מסמך ייבוא) + קובע `roo-cline.autoImportSettingsPath` אם קיים `settings.json` של VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | שניהם |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — ספק תואם ל-openai, מפתח דרך `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | שניהם |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + מדפיס מתכון סביבה | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | שניהם |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + מדפיס מתכון סביבה | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | שניהם |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — מערך `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` ב-`~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | שניהם |
|
||||
| `omniroute run <target>` | הפעלת זמן ריצה (כללית) | כלום — מפעיל `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` עם הסביבה והארגומנטים הנכונים; Qwen ו-Gemini משתמשים בבית מבודד זמני | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | שניהם |
|
||||
| `omniroute launch` | Claude Code | כלום — מפעיל `claude` עם `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` מוזרקים | `--remote` `--api-key` `--token` `--profile` `--port` | שניהם |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | כלום — מפעיל `codex` עם ספק `omniroute` מוזרק דרך דגלי `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | שניהם |
|
||||
|
||||
הערות על דגלים (מאומתים במקור הפקודה):
|
||||
|
||||
- `--remote <url>` — שולף את הקטלוג מ-OmniRoute מרוחק (מחליף את `--port`
|
||||
ואת ההקשר הפעיל). `--api-key <key>` מספק את האישור עבור השרת
|
||||
(ברירת מחדל היא משתנה הסביבה `OMNIROUTE_API_KEY`, או הטוקן של ההקשר הפעיל).
|
||||
- `--only <patterns>` — תתי מחרוזות מופרדות בפסיקים; שומר רק על מזהי המודלים שמתאימים
|
||||
(למשל `--only glm,kimi`). זמינה על `setup-codex`, `setup-claude`,
|
||||
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
|
||||
- `--dry-run` — מדפיס בדיוק מה ייכתב מבלי לגעת ב
|
||||
מערכת הקבצים. זמינה על כל פקודות `setup-*` **מלבד** `setup-cursor`
|
||||
(שלעולם אינה כותבת קובץ).
|
||||
- `--model <id>` — דרוש (או נבחר אינטראקטיבית) עבור הכלים שאין להם
|
||||
גילוי אוטומטי של מודלים: Cline, Kilo, Roo, Goose, Qwen, Aider. כלים אלה
|
||||
גם מקבלים `--yes` עבור ריצות לא אינטראקטיביות (שאז דורשות `--model`).
|
||||
`setup-opencode` לוקחת `--model` כדי לקבוע את המודל העליון ברירת המחדל.
|
||||
- `--model <id>` על `omniroute run` עוקבת אחרי החיווט לפי המניפסט
|
||||
(`bin/cli/cli-manifest.mjs`): **aider** מקבלת `--model openai/<id>` ו
|
||||
**opencode** `--model omniroute/<id>` (הקידומת מתווספת רק כאשר ה-id
|
||||
אינו נושא אותה כבר); **qwen** ו**gemini** מקבלות את ה-id כפי שהוא;
|
||||
**claude** מקבלת אותו דרך `ANTHROPIC_MODEL`, **goose** דרך `GOOSE_MODEL`, ו
|
||||
**codex** דרך `-c model_providers.omniroute.*` args. **Qwen הוא היעד היחיד
|
||||
שדורש באופן מוחלט `--model`** — `omniroute run qwen` בלעדיו יוצא
|
||||
`2` עם שגיאה מפורשת.
|
||||
- `--port <port>` — פורט OmniRoute מקומי (ברירת מחדל `20128`, מתעלם כאשר `--remote`
|
||||
מוגדר). נוכח על כל `setup-*` ועל שני המפעילים.
|
||||
- קודי יציאה של `omniroute run`: קוד היציאה של ה-CLI הילד מועבר
|
||||
כפי שהוא; `2` = ארגומנטים לא חוקיים (יעד לא נתמך, חסר `--model` נדרש,
|
||||
שמירה על מיכל); `127` = הבינארי של היעד אינו ב-`PATH`;
|
||||
`130`/`143`/`129` כאשר ההפעלה מסתיימת על ידי `SIGINT`/`SIGTERM`/`SIGHUP`;
|
||||
`1` = כישלון אחר בהפעלה.
|
||||
- שני המפעילים (`launch`, `launch-codex`) מקבלים `--profile <name>` כדי לבחור
|
||||
פרופיל שנכתב על ידי `setup-claude` / `setup-codex`, בנוסף לארגומנטים להעברה עבור
|
||||
הבינארי הבסיסי `claude` / `codex`.
|
||||
|
||||
הבוחר האינטראקטיבי משותף גם למתכוני ההגדרה:
|
||||
|
||||
```bash
|
||||
# בחר מתוך הקטלוג המקומי או המרוחק הפעיל והגדר את היעד.
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
`configure` כרגע מפנה למתכונים שנבדקו עבור `codex`, `claude`,
|
||||
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, ו`kilo`. רשומות קטלוג
|
||||
שמיועדות רק ל-IDE, MITM, ומדריך נשארות זרימות `setup-*`/ידניות מפורשות ואינן מוצגות
|
||||
כיעדים שניתן להפעיל.
|
||||
|
||||
> `setup-opencode` היא האינטגרציה **הקלה התואמת ל-openai** של OpenCode.
|
||||
> יש גם אינטגרציה עשירה יותר של תוסף — `omniroute setup opencode` — שמתקינה
|
||||
> `@omniroute/opencode-plugin`. אלו פקודות שונות; הטבלה
|
||||
> למעלה מתעדת את `setup-opencode`.
|
||||
|
||||
---
|
||||
|
||||
## שימוש מקומי
|
||||
|
||||
עם OmniRoute פועל על `localhost:20128`, פשוט הרץ את פקודת ההגדרה עבור הכלי שלך. הקטלוג נמשך מהשרת המקומי.
|
||||
|
||||
```bash
|
||||
# Codex: כתוב פרופיל עבור מודל תואם לתוך ~/.codex/
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # השתמש בפרופיל שנוצר
|
||||
|
||||
# Claude Code: כתוב פרופילים לפי מודל, ואז השק את אחד
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: כתוב את הספק התואם ל-openai עם כל מודלי הקטלוג
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # מתייחס דרך {env:OMNIROUTE_API_KEY}, אף פעם לא על דיסק
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# כלים ללא גילוי אוטומטי זקוקים למודל מפורש:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# תצוגה מקדימה ללא כתיבה של שום דבר:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
השק ללא כתיבה של שום קונפיגורציה בכלל (הזרקת env בלבד):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → OmniRoute המקומי
|
||||
omniroute launch-codex # Codex CLI → OmniRoute המקומי
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
|
||||
|
||||
# נתיב פקודה מפורש: העבר כל מה שבא אחרי --
|
||||
omniroute run claude -- --print-system-prompt "review this diff"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## שימוש מרחוק
|
||||
|
||||
כוון כל פקודת הגדרה ל-OmniRoute מרחוק עם `--remote` + `--api-key`. הקטלוג נמשך מהמרחוק; הקונפיגורציה נכתבת במחשב המקומי שלך.
|
||||
|
||||
```bash
|
||||
# OpenCode נגד VPS מרחוק, שמור רק מודלים glm/kimi
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # ייצא קודם את OMNIROUTE_API_KEY
|
||||
|
||||
# פרופילי Codex מקטלוג מרחוק
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# השקת CLI ישירות נגד המרחק
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
במקום להעביר `--remote`/`--api-key` בכל פעם, התחבר פעם אחת ותן ל
|
||||
**הקשר הפעיל** לספק אותם אוטומטית:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # מייצר טוקן עם טווח, שומר את ההקשר
|
||||
omniroute setup-codex # ← עכשיו משתמש בקטלוג המרוחק
|
||||
omniroute setup-opencode # ← אותו דבר
|
||||
omniroute launch # ← Claude Code נגד המרוחק
|
||||
```
|
||||
|
||||
ראה [מצב מרוחק](./REMOTE-MODE.md) עבור הקשרים, טווחים, וניהול טוקנים.
|
||||
|
||||
---
|
||||
|
||||
## מסורות URL בסיסיות (אילו כלים רוצים `/v1`)
|
||||
|
||||
OmniRoute מציע את הממשק של OpenAI ב-`/v1`, את הממשק של Anthropic בשורש,
|
||||
ואת הממשק של Gemini ב-`/v1beta`. כל אינטגרציה מחוברת לצורתה
|
||||
שהכלי מצפה (מאומת במקור הפקודה):
|
||||
|
||||
| אינטגרציה | URL בסיסי שנכתב | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | --------------- | ----------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | שורש | לא — Cline מוסיף `/v1/chat/completions` |
|
||||
| `setup-goose` (`OPENAI_HOST`) | שורש | לא — Goose מוסיף את הנתיב |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | שורש | לא — LiteLLM מוסיף `/v1/chat/completions` |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | עם `/v1` | כן |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | שורש | לא — Claude Code מוסיף `/v1/messages` |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | עם `/v1` | כן |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | עם `/v1` | כן |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | שורש | לא — ה-SDK מוסיף `/v1beta/models/…` |
|
||||
|
||||
---
|
||||
|
||||
## שמירה על תלותים מקומיים בעדכון: `--include=optional`
|
||||
|
||||
כאשר אתה מעדכן עם `omniroute update` (לאחר אישור, או עם `--apply`),
|
||||
OmniRoute מריץ את ההתקנה עם `--include=optional` כלול:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
זה **לא** דגל שאתה מעביר ל`omniroute update` — הוא תמיד מוחל על ידי
|
||||
המעדכן. זה מבטיח שה`optionalDependencies` (`better-sqlite3`, `keytar`,
|
||||
`tls-client`, ערכת LLMLingua SLM) שורדות את העדכון גם אם הגדרות ה-npm שלך
|
||||
מכילות `omit=optional`, מה שהיה אחרת משאיר בשקט את מנהל ההתקנה SQLite
|
||||
המקומי ואת חיבור ה-OS-keyring. כדי להציג את הפקודה המדויקת מבלי להחיל:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] Would run: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
דגלים אחרים של `omniroute update` (מאומתים במקור): `--check` (יוצא 1 אם
|
||||
מעודכן), `--apply` (מתקין מבלי לבקש אישור), `--changelog`, `--no-backup`,
|
||||
`--yes`.
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI דרך `omniroute run gemini`
|
||||
|
||||
החוזה מאומת מול `@google/gemini-cli` 0.50.0: ה-CLI מכבד את
|
||||
`GOOGLE_GEMINI_BASE_URL` ומנפיק `POST /v1beta/models/<model>:generateContent`
|
||||
(וגם `:streamGenerateContent?alt=sse`) נגדו — בדיוק כמו הממשק המקומי של OmniRoute
|
||||
(`/v1beta`). `omniroute run gemini` מחבר את זה אוטומטית:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → ה-URL הבסיסי הפעיל של OmniRoute (שורש, ללא `/v1`);
|
||||
- `GEMINI_API_KEY` → האישור שנפתר של OmniRoute (אפשרות/סביבה/הקשר);
|
||||
- **`GEMINI_CLI_HOME` מבודד זמני** שבו `.gemini/settings.json`
|
||||
בוחר באימות `gemini-api-key`, כך שסשן OAuth של Google מאוחסן (Code Assist)
|
||||
לא יחליף את ההשקה המנוהלת על ידי OmniRoute — נמחק לאחר היציאה;
|
||||
- **היגיינת סביבה**: הסביבה של הילד מנוקה מ`GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` ו`GOOGLE_GENAI_USE_GCA` (שיכוונו את
|
||||
האימות ל-Vortex/Code Assist), ו`GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` מוגדר
|
||||
כהגנה נוספת — שאר היעדים של `run` מקבלים את אותו טיפול עבור המשתנים המנוגדים שלהם;
|
||||
- הזרקת `--model <id>` מ`--provider`/`--model`.
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
שומר האמון של Gemini עדיין חל במצב ללא ראש — העבר
|
||||
`--skip-trust` (או סמוך על התיקייה באופן אינטראקטיבי) בעצמך; המפעיל
|
||||
בכוונה לא עוקף את זה. מפעיל זה שונה מ**הרישום ACP**
|
||||
(`src/lib/acp/registry.ts`, `gemini --acp`), אשר נשאר האינטגרציה של פרוטוקול הסוכן עבור `/dashboard/acp-agents`.
|
||||
|
||||
---
|
||||
|
||||
## סוויפ עשן אמיתי (אופציה)
|
||||
|
||||
הרצת תכנית השקה דטרמיניסטית מתבצעת ב-CI (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`). כדי לאמת את הבינארים האמיתיים מול שרת
|
||||
OmniRoute אמיתי, קיים מנגנון אופציה ב
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts`. הוא אף פעם לא רץ אוטומטית
|
||||
(כל תת-מבחן מדלג אלא אם `RUN_CLI_SMOKE=1`), מעביר את האישור דרך משתנה סביבה
|
||||
NAME (לעולם לא לפי ערך), מסנן מחרוזות בצורת מפתח מכל פלט מוקלט, מדלג
|
||||
על יעדים שהבינארי שלהם לא מותקן, ומסווג כישלונות כ
|
||||
אימות / עליון / הגדרה במקום בוליאני פשוט:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
אופציונלי: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` מגביל את הסוויפ;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` עוקף את מגבלת הזמן של 120 שניות לכל יעד.
|
||||
|
||||
## ראה גם
|
||||
|
||||
- [הגדרת קוד קלוד](./CLAUDE-CODE-CONFIGURATION.md) — המדריך העמוק יותר לקוד קלוד
|
||||
- [הגדרת CLI של קודקס](./CODEX-CLI-CONFIGURATION.md) — ההגדרה הבסיסית של `[model_providers.omniroute]` פעם אחת
|
||||
- [מצב מרוחק](./REMOTE-MODE.md) — הקשרים, אסימוני גישה עם טווח, הפעלת שרת מרוחק
|
||||
- [הפניה לכלי CLI](../reference/CLI-TOOLS.md) — הקטלוג המלא של כלים נתמכים + דפי לוח מחוונים
|
||||
- [מדריך התקנה](./SETUP_GUIDE.md) — שיטות התקנה והדרכה לריצה ראשונה
|
||||
@@ -1,318 +1,86 @@
|
||||
# CLI-TOOLS (עברית)
|
||||
# CLI Tools Setup Guide — OmniRoute (עברית)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "כלי CLI — OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# כלי CLI — OmniRoute
|
||||
|
||||
עודכן לאחרונה: 2026-08-18
|
||||
|
||||
OmniRoute משתלב עם שלוש קטגוריות של כלי CLI המפוזרים על פני שלוש דפי לוח מחוונים ייעודיים:
|
||||
|
||||
| דף | מסלול | רעיון | מספר |
|
||||
| ------------- | ----------------------- | ------------------------------------------------------------------- | --------- |
|
||||
| **קוד CLI** | `/dashboard/cli-code` | כלים לקידוד שאתה מפנה ל-OmniRoute (לקוח → CLI → OmniRoute → ספק) | 26 |
|
||||
| **סוכני CLI** | `/dashboard/cli-agents` | סוכנים אוטונומיים שאתה מפנה ל-OmniRoute (אותו זרימה, טווח רחב יותר) | 8 |
|
||||
| **סוכני ACP** | `/dashboard/acp-agents` | CLIs ש-OmniRoute מפעיל כ-backend דרך stdio/ACP (זרימה הפוכה) | ראה רישום |
|
||||
|
||||
מסלולים ישנים מפנים דרך 308: `/dashboard/cli-tools` → `/dashboard/cli-code`, `/dashboard/agents` → `/dashboard/acp-agents`.
|
||||
This guide explains how to install and configure all supported AI coding CLI tools
|
||||
to use **OmniRoute** as the unified backend, giving you centralized key management,
|
||||
cost tracking, model switching, and request logging across every tool.
|
||||
|
||||
---
|
||||
|
||||
## איך זה עובד
|
||||
## How It Works
|
||||
|
||||
```
|
||||
קוד CLI / סוכני CLI (זרימת צריכה):
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
|
||||
│
|
||||
▼ (כולם מפנים ל-OmniRoute)
|
||||
▼ (all point to OmniRoute)
|
||||
http://YOUR_SERVER:20128/v1
|
||||
│
|
||||
▼ (OmniRoute מפנה לספק הנכון)
|
||||
▼ (OmniRoute routes to the right provider)
|
||||
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
|
||||
|
||||
סוכני ACP (זרימת הפעלה הפוכה):
|
||||
בקשת לקוח → OmniRoute → מפעיל CLI דרך stdio/ACP → תגובה
|
||||
```
|
||||
|
||||
**יתרונות:**
|
||||
**Benefits:**
|
||||
|
||||
- מפתח API אחד לניהול כל הכלים
|
||||
- מעקב על עלויות בכל ה-CLIs בלוח המחוונים
|
||||
- החלפת מודלים ללא צורך בהגדרת כל כלי מחדש
|
||||
- עובד מקומית ובשרתים מרוחקים (VPS, Docker, Akamai, Cloudflare Tunnel)
|
||||
- One API key to manage all tools
|
||||
- Cost tracking across all CLIs in the dashboard
|
||||
- Model switching without reconfiguring every tool
|
||||
- Works locally and on remote servers (VPS)
|
||||
|
||||
---
|
||||
|
||||
## קונפיגורציה אוטומטית עם `setup-*`
|
||||
## Supported Tools (Dashboard Source of Truth)
|
||||
|
||||
אינך צריך לכתוב את הקונפיגורציה של כל כלי ביד. OmniRoute מספקת פקודת `setup-*`
|
||||
לכל CLI נתמך שקוראת את קטלוג המודלים **החי** מ-OmniRoute פועל (מקומי או מרוחק) וכותבת את הקונפיגורציה של הכלי שלך במחשב שלך:
|
||||
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
|
||||
Current list (v3.0.0-rc.16):
|
||||
|
||||
```bash
|
||||
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
|
||||
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
|
||||
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
|
||||
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
|
||||
```
|
||||
| Tool | ID | Command | Setup Mode | Install Method |
|
||||
| ------------------ | ------------- | ---------- | ---------- | -------------- |
|
||||
| **Claude Code** | `claude` | `claude` | env | npm |
|
||||
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
|
||||
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
|
||||
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
|
||||
| **Cursor** | `cursor` | app | guide | desktop app |
|
||||
| **Cline** | `cline` | `cline` | custom | npm |
|
||||
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
|
||||
| **Continue** | `continue` | extension | guide | VS Code |
|
||||
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
|
||||
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
|
||||
| **OpenCode** | `opencode` | `opencode` | guide | npm |
|
||||
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
|
||||
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
|
||||
|
||||
כל אחת מקבלת `--remote <url> --api-key <key>` (להגדיר כלי מקומי מול OmniRoute מרוחק), `--dry-run` (תצוגה מקדימה ללא כתיבה), ו-`--port`. כלים ללא גילוי אוטומטי של מודלים (Cline, Kilo, Roo, Goose, Aider, Qwen) לוקחים
|
||||
`--model <id>` (ו-`--yes` להרצות לא אינטראקטיביות). כדי להפעיל CLI עם הסביבה הנכונה מוזרקת וללא קונפיגורציה שנכתבה כלל, השתמש במפעיל הכללי
|
||||
`omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
|
||||
gemini — מטרות וכינויים מגיעים מ-`bin/cli/cli-manifest.mjs`); המפעילים הישנים לכל כלי `omniroute launch` (Claude Code) ו-`omniroute launch-codex`
|
||||
(Codex) נשארים זמינים. CLI של Gemini הוא רק להפעלה: הוא יעד של `omniroute run`
|
||||
אבל אין לו מתכון `setup-*`/`configure`.
|
||||
### CLI fingerprint sync (Agents + Settings)
|
||||
|
||||
> **הפניה מלאה:** הטבלה הראשית — מה כל פקודה כותבת, כל דגל,
|
||||
> מקומי מול מרוחק, ואילו כלים רוצים סיומת `/v1` — נמצאת ב
|
||||
> **[אינטגרציות CLI](../guides/CLI-INTEGRATIONS.md)**.
|
||||
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
|
||||
This keeps provider IDs aligned with CLI cards and legacy IDs.
|
||||
|
||||
### הרצת אלה בתוך מיכל
|
||||
| CLI ID | Fingerprint Provider ID |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `kilo` | `kilocode` |
|
||||
| `copilot` | `github` |
|
||||
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
|
||||
|
||||
פקודת `setup-*` המבוצעת בתוך מיכל OmniRoute כותבת לתוך הבית של המיכל עצמו, שאף CLI מארח לא קורא אליו ונעלמת עם המיכל. OmniRoute מזהה זאת ויוצאת `2` עם הוראות במקום לכתוב. שתי דרכים נתמכות קדימה — התקן את ה-CLI על המחשב המארח ו
|
||||
`omniroute connect` למיכל, או חיבור-הרכבה של תיקי הקונפיגורציה והגדרת
|
||||
`CLI_CONFIG_HOME` (פרופיל המארח של ההרכבה). כל פקודת `setup-*`, בנוסף ל-`omniroute configure` ו-`omniroute config set`, מקבלת
|
||||
`--allow-container-write` כאשר הכוונה שלך היא להגדיר את ה-CLIs של המיכל; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` עושה את אותו הדבר עבור השרת. ראה
|
||||
[מדריך Docker → קונפיגורציה של כלי CLI מארח](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
|
||||
|
||||
נקודת היישום של לוח המחוונים **(`POST /api/cli-tools/apply`)** אוכפת את
|
||||
אותו שומר: במיכל, כתיבה שהמטרה שלה אינה מחוברת מהמארח עונה **`422`** עם `containerEphemeralTarget: true`, טקסט השגיאה הבטוח ו — עבור הכלים עם מתכון מארח (claude, codex, opencode, cline,
|
||||
kilo, continue) — פקודת `hostSetupCommand` (למשל `omniroute setup-opencode`) להרצה על המארח במקום; שום דבר לא נכתב. `dryRun: true` ממשיך לעבוד במצב מיכל
|
||||
ומחזיר את התוכן שנוצר + נתיב היעד מבלי לגעת בדיסק, כך שתוכל להציג מלוח המחוונים וליישם על המארח. התנהגות זו היא מכוונת ומוגנת רגרסיה על ידי
|
||||
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — אל תנסה "לתקן" 422 על ידי הסרת השומר.
|
||||
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
|
||||
|
||||
---
|
||||
|
||||
## מקור האמת
|
||||
## Step 1 — Get an OmniRoute API Key
|
||||
|
||||
הקטלוג המאוחד נמצא ב-`src/shared/constants/cliTools.ts` כ-`CLI_TOOLS: Record<string, CliCatalogEntry>`.
|
||||
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
|
||||
2. Click **Create API Key**
|
||||
3. Give it a name (e.g. `cli-tools`) and select all permissions
|
||||
4. Copy the key — you'll need it for every CLI below
|
||||
|
||||
כל רשומה מכילה את השדות הבאים (מוגדרים ב-`src/shared/schemas/cliCatalog.ts`):
|
||||
|
||||
| שדה | סוג | תיאור |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------- |
|
||||
| `category` | `"code" \| "agent"` | באיזו דף הכלי מופיע |
|
||||
| `vendor` | `string` | מקור הכלי ("Anthropic", "OSS (P. Gauthier)") |
|
||||
| `acpSpawnable` | `boolean` | ניתן גם להשתמש בו כ-Agent של ACP (סמל מוצג) |
|
||||
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | רמת תמיכה בנקודת קצה מותאמת. `"none"` = MITM backlog |
|
||||
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | מנגנון קונפיגורציה |
|
||||
| `id`, `name`, `color`, `description`, `docsUrl` | סטנדרטי | שדות תצוגה מרכזיים |
|
||||
|
||||
רשומות עם `baseUrlSupport: "none"` **אינן מוצגות** בדפי הלוח — הן רשומות ב-MITM backlog עבור תכנית 11 (ראה `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
|
||||
|
||||
### רמות יכולת (מקטלגות × ניתנות לזיהוי × ניתנות לקונפיגורציה × ניתנות להשקה)
|
||||
|
||||
לא כל כלי מקטלגי ניתן לזיהוי, קונפיגורציה או השקה. כל רמה יש לה מקור המצהיר, ובדיקת סטייה שומרת עליהם מסונכרנים:
|
||||
|
||||
| רמה | משמעות | מצהיר ב |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------- |
|
||||
| **מקטלג** | מופיע בקטלוג הלוח (שם, ספק, מסמכים, סוג קונפיגורציה) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
|
||||
| **ניתן לזיהוי** | זיהוי בינארי/קונפיגורציה, בדיקות בריאות, נתיבי קונפיגורציה | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
|
||||
| **ניתן לקונפיגורציה** | נתמך על ידי `omniroute configure <cli>` (מתכון הגדרה קיים) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
|
||||
| **ניתן להשקה** | נתמך על ידי `omniroute run <target>` (הזרקת env/args מוגדרת) | `bin/cli/cli-manifest.mjs` (`run: true`) |
|
||||
|
||||
`bin/cli/cli-manifest.mjs` הוא המניפסט ההפעלה הקנוני עבור פקודת ה-CLI: `run`, `configure` ומחוללי השלמת-shell כולם שואבים את רשימות היעדים שלהם, פתרון כינויים (למשל `kilocode`/`kilo-code`/`kilo_cli` → `kilo`) וחיווט דגל `--model` ממנו. שומר הסטייה `tests/unit/cli/cli-manifest-drift.test.ts` מאמת שהמניפסט, הקטלוג בזמן ריצה, הקטלוג של ה-UI וכל משטח צרכן נשארים מסונכרנים — יעד שנוסף למשטח אחד ללא האחרים נכשל את המבחן במקום לסטות בשקט.
|
||||
|
||||
## 1. קטלוג קוד CLI (26 כלים)
|
||||
|
||||
כל הכלים שמופיעים ב-`/dashboard/cli-code`. אלו עם `baseUrlSupport: none` מחוברים דרך MITM או מדריך ידני במקום כתובת URL מותאמת אישית:
|
||||
|
||||
| id | שם | ספק | תמיכה בכתובת בסיס | סוג קונפיגורציה | acpSpawnable |
|
||||
| ------------ | ------------------------ | ------------------- | ----------------- | --------------- | ------------ |
|
||||
| claude | קוד קלוד | אנתרופיק | מלא | env | true |
|
||||
| codex | CLI של OpenAI Codex | OpenAI | מלא | מותאם אישית | true |
|
||||
| zcode | ZCode (תוכנית קידוד GLM) | Z.ai | אין | מותאם אישית | false |
|
||||
| cline | קלין | OSS (מפתחי קלוד) | מלא | מותאם אישית | true |
|
||||
| kilo | קוד קילו | Kilo-Org | מלא | מותאם אישית | false |
|
||||
| roo | קוד Roo | Roo (OSS) | מלא | מדריך | false |
|
||||
| continue | Continue | continue.dev | מלא | מדריך | false |
|
||||
| aider | Aider | OSS (פ. גוטייה) | מלא | מדריך | true |
|
||||
| forge | ForgeCode | Antinomy HQ | מלא | מותאם אישית | true |
|
||||
| jcode | jcode | 1jehuang (OSS) | מלא | מותאם אישית | false |
|
||||
| deepseek-tui | DeepSeek TUI | האנטר בואן (OSS) | מלא | מותאם אישית | false |
|
||||
| codewhale | CodeWhale | Hmbown (OSS) | מלא | מותאם אישית | false |
|
||||
| opencode | OpenCode | Anomaly (לשעבר SST) | מלא | מדריך | true |
|
||||
| droid | Factory Droid | Factory AI | חלקי | מדריך | false |
|
||||
| copilot | CLI של GitHub Copilot | GitHub/MS | מלא | מותאם אישית | false |
|
||||
| cursor-cli | CLI של Cursor | Anysphere | חלקי | מדריך | true |
|
||||
| smelt | Smelt | leonardcser (OSS) | מלא | מותאם אישית | false |
|
||||
| pi | Pi (סוכן קידוד pi) | M. Zechner (OSS) | מלא | מותאם אישית | false |
|
||||
| grok-build | Grok Build | xAI | מלא | מותאם אישית | false |
|
||||
| crush | Crush | OSS (Charm) | מלא | מותאם אישית | false |
|
||||
| qwen | קוד Qwen | Alibaba | מלא | מדריך | true |
|
||||
| cursor | Cursor | Anysphere | אין | מדריך | false |
|
||||
| antigravity | אנטיגרביטי | Google | אין | mitm | false |
|
||||
| hermes | הרמס | Nous Research | אין | מדריך | false |
|
||||
| kiro | Kiro AI | Amazon | אין | mitm | false |
|
||||
| custom | CLI מותאם אישית | — | מלא | custom-builder | false |
|
||||
|
||||
כלים עם `baseUrlSupport: "partial"` מציגים תג "⚠ כתובת בסיס חלקית" בכרטיס הלוח.
|
||||
|
||||
## 2. קטלוג סוכני CLI (8 כלים)
|
||||
|
||||
סוכנים אוטונומיים המופיעים ב-`/dashboard/cli-agents`:
|
||||
|
||||
| id | שם | ספק | תמיכה ב-BaseUrl | ניתן להפעיל ACP |
|
||||
| ------------ | ---------------- | ------------------------ | --------------- | --------------- |
|
||||
| hermes-agent | סוכן הרמס | Nous Research | מלא | false |
|
||||
| openclaw | OpenClaw | OSS (P. Steinberger) | מלא | true |
|
||||
| goose | Goose | Block / Linux Foundation | מלא | true |
|
||||
| interpreter | Open Interpreter | OSS | מלא | true |
|
||||
| warp | Warp AI | Warp Inc. | חלקי | true |
|
||||
| agent-deck | Agent Deck | asheshgoplani (OSS) | מלא | false |
|
||||
| omp | Oh My Pi | OSS | מלא | true |
|
||||
| letta | Letta CLI | Letta | מלא | false |
|
||||
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
## 3. סוכני ACP (/dashboard/acp-agents)
|
||||
## Step 2 — Install CLI Tools
|
||||
|
||||
דף זה (ששונה מ-`/dashboard/agents`) מציג CLI ש-OminiRoute יכול **להפעיל** כמנועי ביצוע אחוריים דרך פרוטוקול stdio/ACP. הקטלוג מתוחזק בנפרד ב-`src/lib/acp/registry.ts` ואינו זהה ל-`CLI_TOOLS`.
|
||||
|
||||
---
|
||||
|
||||
## 4. backlog של MITM (לא מוצג בלוח המחוונים)
|
||||
|
||||
ה-CLI הבאים אינם תומכים ב-Base URL מותאם אישית באופן מקורי ואינם **מופיעים** בדפי קוד CLI או דפי סוכני CLI. הם מועמדים להפרעה של MITM בתוכנית 11:
|
||||
|
||||
| CLI | סיבה |
|
||||
| ------------------- | ------------------------------------------------------ |
|
||||
| windsurf | BYOK מוגבל למודלים נבחרים של Claude + URL/token ארגוני |
|
||||
| amp | אקוסיסטם סגור (Sourcegraph) |
|
||||
| amazon-q / kiro-cli | אימות AWS SSO, אין URL מותאם אישית |
|
||||
| cowork | Anthropic Desktop, אין נקודת קצה ניתנת להגדרה |
|
||||
|
||||
ראה `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` עבור הצלב המלא.
|
||||
|
||||
---
|
||||
|
||||
## 5. API לזיהוי קבוצות
|
||||
|
||||
כל זיהוי הכלים מאוגד דרך נקודת קצה אחת:
|
||||
|
||||
**`GET /api/cli-tools/all-statuses`**
|
||||
|
||||
- Auth: `requireCliToolsAuth(request)` (כמו בשאר הנתיבים של `/api/cli-tools/`)
|
||||
- מחזיר: `Record<toolId, ToolBatchStatus>` (סוג: `src/shared/types/cliBatchStatus.ts`)
|
||||
- אסטרטגיה: `Promise.all` על פני כל הכלים, 5 שניות זמן קצוב לכל כלי
|
||||
- מטמון: בזיכרון LRU ממוין לפי קובץ קונפיגורציה `mtime`. המטמון מתבטל כאשר mtime משתנה. מתאפס בהפעלה מחדש של השרת.
|
||||
|
||||
צורת התגובה לכל כלי:
|
||||
|
||||
```ts
|
||||
interface ToolBatchStatus {
|
||||
detection: {
|
||||
installed: boolean;
|
||||
runnable: boolean;
|
||||
version?: string;
|
||||
command?: string;
|
||||
commandPath?: string;
|
||||
reason?: string;
|
||||
};
|
||||
config: {
|
||||
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
|
||||
endpoint?: string | null;
|
||||
lastConfiguredAt?: string | null;
|
||||
};
|
||||
error?: string; // מנוקה, ללא עקבות שגיאה
|
||||
}
|
||||
```
|
||||
|
||||
## 6. מנהלי הגדרות עבור כלים חדשים
|
||||
|
||||
כלים חדשים עם `configType: "custom"` יש להם מסלולי API ייעודיים להגדרות:
|
||||
|
||||
| מסלול | כלי |
|
||||
| ------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
|
||||
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
|
||||
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
|
||||
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
|
||||
| `POST /api/cli-tools/smelt-settings` | Smelt |
|
||||
| `POST /api/cli-tools/pi-settings` | Pi coding agent |
|
||||
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
|
||||
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + dedicated `.env` key) |
|
||||
|
||||
כל המסלולים משתמשים ב-`sanitizeErrorMessage()` עבור תגובות שגיאה (כלל קשה #12).
|
||||
|
||||
---
|
||||
|
||||
## 7. ארכיטקטורת דפי לוח מחוונים
|
||||
|
||||
### קוד CLI (`/dashboard/cli-code`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — רכיב שרת
|
||||
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — רשת לקוח
|
||||
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — דף פרטי כלי
|
||||
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 כרטיסי כלי מיוחדים + `ToolDetailClient.tsx`
|
||||
|
||||
### סוכני CLI (`/dashboard/cli-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — רכיב שרת
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — רשת לקוח
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — עושה שימוש חוזר ב-`ToolDetailClient`
|
||||
|
||||
### סוכני ACP (`/dashboard/acp-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — רכיב שרת (הועבר מ-`agents/`)
|
||||
|
||||
### רכיבי UI משותפים (`src/shared/components/cli/`)
|
||||
|
||||
| קובץ | מטרה |
|
||||
| ----------------------- | --------------------------------------------- |
|
||||
| `CliToolCard.tsx` | כרטיס מצב חכם (זיהוי + הגדרה + נקודת קצה) |
|
||||
| `CliConceptCard.tsx` | כרטיס הסבר על מושג לדף |
|
||||
| `CliComparisonCard.tsx` | השוואה בשלוש עמודות בין סוגי CLI |
|
||||
| `BaseUrlSelect.tsx` | תפריט נפתח לנקודת קצה (מקומי/ענן/מותאם אישית) |
|
||||
| `ApiKeySelect.tsx` | בורר מפתח API |
|
||||
| `ManualConfigModal.tsx` | מודל קטע קוד שניתן להעתקה |
|
||||
|
||||
### חיבור משותף (`src/shared/hooks/cli/`)
|
||||
|
||||
| קובץ | מטרה |
|
||||
| ------------------------- | ----------------------------------------------------------- |
|
||||
| `useToolBatchStatuses.ts` | מביא את `/api/cli-tools/all-statuses`, מנהל מצב טעינה/רענון |
|
||||
|
||||
---
|
||||
|
||||
## 8. i18n
|
||||
|
||||
מרחבים חדשים נוספו בתוכנית 14 F9:
|
||||
|
||||
| Namespace | מטרה |
|
||||
| ----------- | --------------------------------------------------------------------------- |
|
||||
| `cliCommon` | מיתוגים משותפים (תוויות כרטיסים, טקסטים של מושגים/השוואות, תוויות דף פרטים) |
|
||||
| `cliCode` | מיתוגים של דף CLI Code |
|
||||
| `cliAgents` | מיתוגים של דף CLI Agents |
|
||||
| `acpAgents` | מיתוגים של דף ACP Agents |
|
||||
|
||||
תרגומים מלאים לפורטוגזית ברזילאית ואנגלית מסופקים. 39 מקומות אחרים נופלים חזרה לאנגלית אוטומטית דרך מיזוג ברמת המרחב ב- `src/i18n/request.ts`.
|
||||
|
||||
---
|
||||
|
||||
## 9. התחלה מהירה
|
||||
|
||||
### שלב 1 — קבלת מפתח API של OmniRoute
|
||||
|
||||
1. פתחו את `/dashboard/api-manager` → **צור מפתח API**
|
||||
2. תן לו שם (למשל `cli-tools`) ובחר את כל ההרשאות
|
||||
3. העתק את המפתח — תצטרך אותו עבור כל CLI למטה
|
||||
|
||||
> המפתח שלך נראה כך: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
### שלב 2 — התקנת כלים של CLI
|
||||
|
||||
כל הכלים המבוססים על npm דורשים Node.js 22.22.2+ או 24.x:
|
||||
All npm-based tools require Node.js 18+:
|
||||
|
||||
```bash
|
||||
# Claude Code (Anthropic)
|
||||
@@ -330,137 +98,96 @@ npm install -g cline
|
||||
# KiloCode
|
||||
npm install -g kilocode
|
||||
|
||||
# Qwen Code
|
||||
npm install -g @qwen-code/qwen-code
|
||||
# Kiro CLI (Amazon — requires curl + unzip)
|
||||
apt-get install -y unzip # on Debian/Ubuntu
|
||||
curl -fsSL https://cli.kiro.dev/install | bash
|
||||
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
|
||||
```
|
||||
|
||||
# Google Gemini CLI (ניתן להשקה דרך `omniroute run gemini` → /v1beta surface)
|
||||
npm install -g @google/gemini-cli
|
||||
**Verify:**
|
||||
|
||||
# Aider
|
||||
pip install aider-chat
|
||||
|
||||
# Smelt
|
||||
cargo install smelt # מבוסס Rust
|
||||
|
||||
# סוכן קידוד Pi
|
||||
# ראה https://github.com/zechnerj/pi-coding-agent להתקנה
|
||||
|
||||
# jcode
|
||||
# ראה https://github.com/1jehuang/jcode להתקנה
|
||||
```bash
|
||||
claude --version # 2.x.x
|
||||
codex --version # 0.x.x
|
||||
opencode --version # x.x.x
|
||||
cline --version # 2.x.x
|
||||
kilocode --version # x.x.x (or: kilo --version)
|
||||
kiro-cli --version # 1.x.x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### שלב 3 — קונפיגורציה דרך לוח המחוונים
|
||||
## Step 3 — Set Global Environment Variables
|
||||
|
||||
1. עבור ל- `http://localhost:20128/dashboard/cli-code`
|
||||
2. מצא את הכלי שלך ברשת
|
||||
3. לחץ על הכרטיס כדי לפתוח את דף פרטי הכלי
|
||||
4. בחר את מפתח ה-API שלך ואת כתובת ה-URL הבסיסית
|
||||
5. לחץ על **החל קונפיגורציה** או העתק את קטע הקונפיגורציה הידני
|
||||
|
||||
---
|
||||
|
||||
### שלב 4 — הגדרת משתני סביבה גלובליים
|
||||
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# נקודת קצה אוניברסלית של OmniRoute
|
||||
# OmniRoute Universal Endpoint
|
||||
export OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
export OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
|
||||
# Gemini CLI קורא GOOGLE_GEMINI_BASE_URL ב- ROOT (ה-SDK שלו מוסיף /v1beta/... בעצמו)
|
||||
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
|
||||
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
|
||||
export GEMINI_BASE_URL="http://localhost:20128/v1"
|
||||
export GEMINI_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
> עבור **שרת מרוחק** החלף `localhost:20128` עם כתובת ה-IP או הדומיין של השרת,
|
||||
> למשל `http://<your-server-ip>:20128`.
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain,
|
||||
> e.g. `http://192.168.0.15:20128`.
|
||||
|
||||
---
|
||||
|
||||
### שלב 4 — קונפיגורציה של כל כלי
|
||||
## Step 4 — Configure Each Tool
|
||||
|
||||
#### Claude Code
|
||||
### Claude Code
|
||||
|
||||
```bash
|
||||
# צור ~/.claude/settings.json:
|
||||
# Via CLI:
|
||||
claude config set --global api-base-url http://localhost:20128/v1
|
||||
|
||||
# Or create ~/.claude/settings.json:
|
||||
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:20128",
|
||||
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
|
||||
}
|
||||
"apiBaseUrl": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
השתמש בשורש שער אנתרופיק המאוחד עבור Claude Code. אל תוסיף `/v1` כאן.
|
||||
|
||||
**בדיקה:** `claude "say hello"`
|
||||
**Test:** `claude "say hello"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenAI Codex
|
||||
|
||||
Codex המודרני (v0.137+) קורא רק את `~/.codex/config.toml` — הישן
|
||||
`config.yaml` שייך ל-CLI npm הישן ומוזנח בשקט. מפתח ה-API נשאר במשתנה הסביבה `OMNIROUTE_API_KEY` (`env_key`), אף פעם
|
||||
לא בתוך הקובץ:
|
||||
### OpenAI Codex
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
|
||||
model_provider = "omniroute"
|
||||
|
||||
[model_providers.omniroute]
|
||||
name = "OmniRoute"
|
||||
base_url = "http://localhost:20128/v1"
|
||||
env_key = "OMNIROUTE_API_KEY"
|
||||
requires_openai_auth = false
|
||||
EOF
|
||||
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
הפניה מלאה (פרופילים, `wire_api`, חלונות הקשר): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
|
||||
|
||||
**בדיקה:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenCode
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
|
||||
{
|
||||
"\$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"omniroute": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "OmniRoute",
|
||||
"options": {
|
||||
"baseURL": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
},
|
||||
"models": {
|
||||
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
|
||||
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
|
||||
"gemini-3-flash": { "name": "gemini-3-flash" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
|
||||
model: auto
|
||||
apiKey: sk-your-omniroute-key
|
||||
apiBaseUrl: http://localhost:20128/v1
|
||||
EOF
|
||||
```
|
||||
|
||||
**בדיקה:** `opencode`
|
||||
|
||||
> השתמש ב- `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
|
||||
> כדי לשלוח וריאנטים של חשיבה.
|
||||
**Test:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### Cline (CLI או VS Code)
|
||||
### OpenCode
|
||||
|
||||
**מצב CLI:**
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
|
||||
[provider.openai]
|
||||
base_url = "http://localhost:20128/v1"
|
||||
api_key = "sk-your-omniroute-key"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Test:** `opencode`
|
||||
|
||||
---
|
||||
|
||||
### Cline (CLI or VS Code)
|
||||
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
@@ -472,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
EOF
|
||||
```
|
||||
|
||||
**מצב VS Code:**
|
||||
הגדרות הרחבת Cline → ספק API: `OpenAI Compatible` → כתובת URL בסיסית: `http://localhost:20128/v1`
|
||||
**VS Code mode:**
|
||||
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
|
||||
|
||||
או השתמש בלוח המחוונים של OmniRoute → **כלי CLI → Cline → החל קונפיגורציה**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### KiloCode (CLI או VS Code)
|
||||
### KiloCode (CLI or VS Code)
|
||||
|
||||
**מצב CLI:**
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
```
|
||||
|
||||
**הגדרות VS Code:**
|
||||
**VS Code settings:**
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -496,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
}
|
||||
```
|
||||
|
||||
או השתמש בלוח המחוונים של OmniRoute → **כלי CLI → KiloCode → החל קונפיגורציה**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### Continue (הרחבת VS Code)
|
||||
### Continue (VS Code Extension)
|
||||
|
||||
ערוך את `~/.continue/config.yaml`:
|
||||
Edit `~/.continue/config.yaml`:
|
||||
|
||||
```yaml
|
||||
models:
|
||||
@@ -514,255 +241,158 @@ models:
|
||||
default: true
|
||||
```
|
||||
|
||||
אתחל מחדש את VS Code לאחר העריכה.
|
||||
Restart VS Code after editing.
|
||||
|
||||
---
|
||||
|
||||
#### VS Code Insiders (`chatLanguageModels.json`)
|
||||
|
||||
השתמש בזה כאשר VS Code Insiders מוגדר עבור מודלים של נקודות קצה מותאמות ואתה רוצה ש-OmniRoute יעבוד ללא שדה כותרת מותאם.
|
||||
|
||||
**מיקום מומלץ:**
|
||||
|
||||
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
|
||||
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
|
||||
|
||||
**דוגמה באמצעות הכינוי המוטבע של OmniRoute:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"vendor": "customendpoint",
|
||||
"id": "auto",
|
||||
"name": "OmniRoute Auto",
|
||||
"family": "gpt-4",
|
||||
"version": "1.0.0",
|
||||
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
|
||||
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
|
||||
"requestFormat": "openai-chat-completions",
|
||||
"contextWindow": 256000,
|
||||
"maxOutputTokens": 32768,
|
||||
"auth": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**הערות:**
|
||||
|
||||
- החלף `sk-your-omniroute-key` עם מפתח API שנוצר ב-OmniRoute.
|
||||
- שדה ה-`url` צריך להצביע על `/api/v1/vscode/{token}/chat/completions`.
|
||||
- שדה ה-`modelsUrl` צריך להצביע על `/api/v1/vscode/{token}/models`.
|
||||
- העדף את הזרימה הרגילה של `/v1` + כותרת Bearer כאשר הלקוח תומך בכותרות מותאמות.
|
||||
- טוקנים מוטבעים ב-URL הם פתרון תאימות ועשויים להופיע ביומני עורך או בהיסטוריית פרוקסי.
|
||||
|
||||
---
|
||||
|
||||
#### Kiro CLI (אמזון)
|
||||
### Kiro CLI (Amazon)
|
||||
|
||||
```bash
|
||||
# התחבר לחשבון AWS/Kiro שלך:
|
||||
# Login to your AWS/Kiro account:
|
||||
kiro-cli login
|
||||
|
||||
# ה-CLI משתמש באותנטיקציה משלו — OmniRoute לא נדרשת כ-backend עבור Kiro CLI עצמו.
|
||||
# השתמש ב-kiro-cli לצד OmniRoute עבור כלים אחרים.
|
||||
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
|
||||
# Use kiro-cli alongside OmniRoute for other tools.
|
||||
kiro-cli status
|
||||
```
|
||||
|
||||
עבור אפליקציית שולחן העבודה **Kiro IDE**, השתמש בנקודת הקצה MITM שנחשפת על ידי OmniRoute
|
||||
מתחת ל- `/dashboard/cli-tools → Kiro`.
|
||||
---
|
||||
|
||||
### Qwen Code (Alibaba)
|
||||
|
||||
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
|
||||
|
||||
**Option 1: Environment variables (`~/.qwen/.env`)**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
|
||||
OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
OPENAI_MODEL="auto"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Option 2: `settings.json` with model providers**
|
||||
|
||||
```json
|
||||
// ~/.qwen/settings.json
|
||||
{
|
||||
"env": {
|
||||
"OPENAI_API_KEY": "sk-your-omniroute-key",
|
||||
"OPENAI_BASE_URL": "http://localhost:20128/v1"
|
||||
},
|
||||
"modelProviders": {
|
||||
"openai": [
|
||||
{
|
||||
"id": "omniroute-default",
|
||||
"name": "OmniRoute (Auto)",
|
||||
"envKey": "OPENAI_API_KEY",
|
||||
"baseUrl": "http://localhost:20128/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Option 3: Inline CLI flags**
|
||||
|
||||
```bash
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1" \
|
||||
OPENAI_API_KEY="sk-your-omniroute-key" \
|
||||
OPENAI_MODEL="auto" \
|
||||
qwen
|
||||
```
|
||||
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain.
|
||||
|
||||
**Test:** `qwen "say hello"`
|
||||
|
||||
### Cursor (Desktop App)
|
||||
|
||||
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
|
||||
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
|
||||
|
||||
Via GUI: **Settings → Models → OpenAI API Key**
|
||||
|
||||
- Base URL: `https://your-domain.com/v1`
|
||||
- API Key: your OmniRoute key
|
||||
|
||||
---
|
||||
|
||||
## 10. OmniRoute CLI פנימי
|
||||
## Dashboard Auto-Configuration
|
||||
|
||||
הבינארי `omniroute` מספק פקודות עבור מחזור חיי השרת, התקנה, אבחון, וניהול ספקים. נקודת כניסה: `bin/omniroute.mjs`.
|
||||
The OmniRoute dashboard automates configuration for most tools:
|
||||
|
||||
```bash
|
||||
omniroute # הפעל את השרת (פורט ברירת מחדל 20128)
|
||||
omniroute setup # אשף התקנה אינטראקטיבי
|
||||
omniroute doctor # בדוק קונפיגורציה, DB, פורטים, זמן ריצה
|
||||
omniroute providers list # חיבורים לספקים שהוגדרו
|
||||
omniroute providers test-all # בדוק כל חיבור פעיל
|
||||
omniroute reset-password # אפס את סיסמת המנהל
|
||||
omniroute logs # זרם יומני בקשות
|
||||
omniroute health # בריאות מפורטת (מפסקי זרם, מטמון, זיכרון)
|
||||
omniroute --version # הדפס גרסה
|
||||
omniroute --help # הצג את כל הפקודות
|
||||
```
|
||||
|
||||
### התקנה והתחלה
|
||||
|
||||
```bash
|
||||
omniroute setup # אשף התקנה אינטראקטיבי
|
||||
omniroute setup --non-interactive # מצב CI/אוטומציה (קורא משתני סביבה + דגלים)
|
||||
omniroute setup --password '<value>' # הגדר סיסמת מנהל ישירות
|
||||
omniroute setup --add-provider \
|
||||
--provider openai \
|
||||
--api-key '<value>' \
|
||||
--test-provider # הוסף ובדוק ספק במכה אחת
|
||||
```
|
||||
|
||||
משתני סביבה מוכרים עבור התקנה לא אינטראקטיבית:
|
||||
|
||||
| Var | מטרה |
|
||||
| ------------------- | ------------------------------------------------------------ |
|
||||
| `OMNIROUTE_API_KEY` | מפתח API של הספק (מחובר ל`--api-key` דרך Commander `.env()`) |
|
||||
| `DATA_DIR` | החלף את תיקיית הנתונים של OmniRoute |
|
||||
|
||||
כל שאר הקלטים הלא אינטראקטיביים מועברים כדגלים, לא משתני סביבה:
|
||||
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
|
||||
(ראה את אפשרויות `omniroute setup` למעלה).
|
||||
|
||||
### אבחון
|
||||
|
||||
```bash
|
||||
omniroute doctor # בדוק קונפיגורציה, DB, פורטים, זמן ריצה, זיכרון, חיות
|
||||
omniroute doctor --json # JSON קריא למכונה
|
||||
omniroute doctor --no-liveness # דלג על בדיקת בריאות HTTP
|
||||
omniroute doctor --host 0.0.0.0 # החלף את מארח החיות
|
||||
omniroute doctor --liveness-url <url> # החלף את כתובת ה-URL של נקודת הבריאות המלאה
|
||||
```
|
||||
|
||||
הדוקטור מבצע את הבדיקות הללו: `קונפיגורציה`, `מסד נתונים`, `אחסון/הצפנה`,
|
||||
`זמינות פורטים`, `זמן ריצה של Node`, `בינארי מקורי` (better-sqlite3),
|
||||
`זיכרון`, ו`חיות השרת`. הוא יוצא עם קוד שגיאה אם כל בדיקה היא `נכשל`.
|
||||
|
||||
### ניהול ספקים
|
||||
|
||||
```bash
|
||||
omniroute providers available # קטלוג ספקי OmniRoute
|
||||
omniroute providers available --search openai # סנן קטלוג לפי id/name/alias/category
|
||||
omniroute providers available --category api-key # סנן לפי קטגוריה (api-key, oauth, free, ...)
|
||||
omniroute providers available --json # JSON קריא למכונה
|
||||
|
||||
omniroute providers list # חיבורים לספקים שהוגדרו
|
||||
omniroute providers list --json
|
||||
|
||||
omniroute providers test <id|name> # בדוק חיבור אחד שהוגדר
|
||||
omniroute providers test-all # בדוק כל חיבור פעיל
|
||||
omniroute providers validate # אימות מבני מקומי בלבד
|
||||
omniroute providers add <provider> --credential-env PROVIDER_KEY
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth <provider> # זרימת OAuth קיימת
|
||||
omniroute providers edit <id|name> --default-model <model>
|
||||
omniroute providers remove <id|name> --yes
|
||||
```
|
||||
|
||||
`providers add/import/auth/edit/remove` הם API-first ולכן פועלים נגד
|
||||
ההקשר המקומי או המרוחק הפעיל. קלט ההסמכה צריך להשתמש ב
|
||||
`--credential-stdin` או `--credential-env`; `--dry-run --json` מדווח רק על
|
||||
נוכחות/צורה מחוקה. `providers available` קורא את קטלוג OmniRoute;
|
||||
`providers list/test/test-all/validate` שומרים על ההתנהגות המקומית של SQLite שלהם ואינם דורשים שהשרת יהיה פועל.
|
||||
|
||||
### שחזור ואיפוס
|
||||
|
||||
```bash
|
||||
omniroute reset-password # אפס את סיסמת המנהל (גם: omniroute-reset-password)
|
||||
omniroute reset-encrypted-columns # הצג אזהרה + דלג עבור איפוס הסמכה מוצפנת
|
||||
omniroute reset-encrypted-columns --force # באמת נעל את ההסמכות המוצפנות ב-SQLite
|
||||
```
|
||||
|
||||
### ייצוא הסמכה (⚠ יש לטפל בזה בזהירות)
|
||||
|
||||
```bash
|
||||
omniroute auth export # הצג אזהרה + שער אישור — אין גישה ל-DB
|
||||
omniroute auth export --force # ייצא את כל ההסמכות המפוענחות של כל החיבורים ל-stdout כ-JSON
|
||||
omniroute auth export --force --id <id> # ייצא רק את החיבור התואם
|
||||
omniroute auth export --force --format env # פלט OMNIROUTE_<PROVIDER>_<FIELD>=<value> שורות
|
||||
omniroute auth export --force --out creds.json # כתוב לקובץ (נוצר עם הרשאות 0600)
|
||||
```
|
||||
|
||||
`auth export` הוא **מקומי בלבד** (קריאה ישירה מ-SQLite, ללא נתיב HTTP) ומדפיס/כותב
|
||||
**טקסט ברור** של ערכי `apiKey`/`accessToken`/`refreshToken`/`idToken` — זו התכונה, לא
|
||||
באג. שום דבר לא נקרא מהמסד נתונים, ושום דבר לא מפוענח, ללא `--force`. תמיד מודפס דגל אזהרה ב-stderr לפני כל פלט טקסט ברור. נדרש להגדיר את `STORAGE_ENCRYPTION_KEY`.
|
||||
שדה שנכשל לפענח (מפתח ישן, טקסט מוצפן פגום) מדווח כ
|
||||
`<field>DecryptFailed: true` במקום להפסיק את כל הייצוא או לדלוף את השגיאה הבסיסית.
|
||||
|
||||
### פקודות משנה אחרות
|
||||
|
||||
אלו מניחות ששרת OmniRoute פועל, אלא אם כן צוין אחרת:
|
||||
|
||||
```bash
|
||||
omniroute status # מצב ריצה מקיף
|
||||
omniroute logs # זרם יומני בקשות (--json, --search, --follow)
|
||||
omniroute config show # הצג קונפיגורציה נוכחית
|
||||
|
||||
omniroute provider list # רשום ספקים זמינים (כינוי של providers list)
|
||||
omniroute provider add # רשם את OmniRoute כספק על כלי
|
||||
omniroute keys add | list | remove # ניהול מפתחות API
|
||||
omniroute models [provider] # רשום מודלים (--json, --search)
|
||||
omniroute combo list | switch | create | delete
|
||||
|
||||
omniroute backup # צלם קונפיגורציה + DB
|
||||
omniroute restore # שחזר מצילום קודם
|
||||
|
||||
omniroute health # בריאות מפורטת (מפסקי זרם, מטמון, זיכרון)
|
||||
omniroute quota # שימוש במכסה של הספק
|
||||
omniroute cache # מצב המטמון
|
||||
omniroute cache clear # נקה את המטמון הסמנטי + החתימות
|
||||
|
||||
omniroute mcp status | restart # מצב שרת MCP / הפעלה מחדש
|
||||
omniroute a2a status | card # מצב שרת A2A / כרטיס סוכן
|
||||
|
||||
omniroute tunnel list | create | stop # ניהול מנהרות (cloudflare/tailscale/ngrok)
|
||||
omniroute env show | get <k> | set <k> <v> # בדוק / הגדר משתני סביבה (זמני)
|
||||
|
||||
omniroute test # בדיקת חיבוריות ספק
|
||||
omniroute update # בדוק אם יש עדכונים
|
||||
omniroute completion # צור השלמה של shell
|
||||
```
|
||||
|
||||
### דגלים נפוצים
|
||||
|
||||
| דגל | תיאור |
|
||||
| ------------------- | ---------------------------------------------- |
|
||||
| `--no-open` | אל תפתח אוטומטית את הדפדפן בהפעלה |
|
||||
| `--port <n>` | החלף את פורט ה-API (ברירת מחדל 20128) |
|
||||
| `--mcp` | פעל כשרת MCP דרך stdio (עבור IDEs) |
|
||||
| `--non-interactive` | מצב CI (ללא הנחיות; קורא ממשתני סביבה/דגלים) |
|
||||
| `--json` | פלט JSON קריא למכונה (doctor, providers, וכו') |
|
||||
| `--help`, `-h` | הצג עזרה ספציפית לפקודה |
|
||||
| `--version`, `-v` | הדפס את הגרסה המותקנת |
|
||||
1. Go to `http://localhost:20128/dashboard/cli-tools`
|
||||
2. Expand any tool card
|
||||
3. Select your API key from the dropdown
|
||||
4. Click **Apply Config** (if tool is detected as installed)
|
||||
5. Or copy the generated config snippet manually
|
||||
|
||||
---
|
||||
|
||||
## נקודות קצה זמינות של API
|
||||
## Built-in Agents: Droid & OpenClaw
|
||||
|
||||
| נקודת קצה | תיאור | שימוש עבור |
|
||||
| -------------------------- | ------------------------- | ------------------------------ |
|
||||
| `/v1/chat/completions` | צ'אט סטנדרטי (כל הספקים) | כל הכלים המודרניים |
|
||||
| `/v1/responses` | API תגובות (פורמט OpenAI) | Codex, זרימות עבודה אגנטיות |
|
||||
| `/v1/completions` | השלמות טקסט ישנות | כלים ישנים המשתמשים ב`prompt:` |
|
||||
| `/v1/embeddings` | הטמעות טקסט | RAG, חיפוש |
|
||||
| `/v1/images/generations` | יצירת תמונות | GPT-Image, Flux, וכו' |
|
||||
| `/v1/audio/speech` | טקסט לדיבור | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | דיבור לטקסט | Deepgram, AssemblyAI |
|
||||
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
|
||||
They run as internal routes and use OmniRoute's model routing automatically.
|
||||
|
||||
דוגמאות מוכנות להדבקה עם URL של OmniRoute עם טוקנים:
|
||||
- Access: `http://localhost:20128/dashboard/agents`
|
||||
- Configure: same combos and providers as all other tools
|
||||
- No API key or CLI install required
|
||||
|
||||
```txt
|
||||
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
|
||||
---
|
||||
|
||||
Standard OpenAI base: http://localhost:20128/v1
|
||||
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
|
||||
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
|
||||
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
|
||||
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
|
||||
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
|
||||
```
|
||||
## Available API Endpoints
|
||||
|
||||
| Endpoint | Description | Use For |
|
||||
| -------------------------- | ----------------------------- | --------------------------- |
|
||||
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
|
||||
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
|
||||
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
|
||||
| `/v1/embeddings` | Text embeddings | RAG, search |
|
||||
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
|
||||
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
|
||||
|
||||
---
|
||||
|
||||
## פתרון בעיות
|
||||
|
||||
| שגיאה | סיבה | תיקון |
|
||||
| -------------------------------------------- | ------------------- | --------------------------------------------- |
|
||||
| `Connection refused` | OmniRoute לא פועל | `omniroute serve` |
|
||||
| `401 Unauthorized` | מפתח API שגוי | בדוק ב`/dashboard/api-manager` |
|
||||
| `No combo configured` | אין קומבינציה פעילה | הגדר ב`/dashboard/combos` |
|
||||
| CLI shows "not installed" | בינארי לא ב-PATH | בדוק `which <command>` |
|
||||
| Dashboard shows "not detected" after install | מטמון ישן | לחץ על "⟳ רענן גילוי" בלוח המחוונים |
|
||||
| Old link `/dashboard/cli-tools` | סימניה לפני v3.8.6 | מופנה אוטומטית ל`/dashboard/cli-code` (308) |
|
||||
| Old link `/dashboard/agents` | סימניה לפני v3.8.6 | מופנה אוטומטית ל`/dashboard/acp-agents` (308) |
|
||||
| Error | Cause | Fix |
|
||||
| ------------------------- | ----------------------- | ------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
|
||||
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
|
||||
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
|
||||
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
|
||||
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
|
||||
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup Script (One Command)
|
||||
|
||||
```bash
|
||||
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
|
||||
OMNIROUTE_URL="http://localhost:20128/v1"
|
||||
OMNIROUTE_KEY="sk-your-omniroute-key"
|
||||
|
||||
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
|
||||
|
||||
# Kiro CLI
|
||||
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
|
||||
|
||||
# Write configs
|
||||
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
|
||||
|
||||
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
|
||||
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
|
||||
cat >> ~/.bashrc << EOF
|
||||
export OPENAI_BASE_URL="$OMNIROUTE_URL"
|
||||
export OPENAI_API_KEY="$OMNIROUTE_KEY"
|
||||
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
|
||||
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
|
||||
EOF
|
||||
|
||||
source ~/.bashrc
|
||||
echo "✅ All CLIs installed and configured for OmniRoute"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,315 +0,0 @@
|
||||
# CLI-INTEGRATIONS (हिन्दी)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "CLI इंटीग्रेशन — किसी भी कोडिंग CLI को OmniRoute पर पॉइंट करें"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# CLI इंटीग्रेशन
|
||||
|
||||
OmniRoute एक परिवार के `setup-*` कमांड्स के साथ आता है जो एक कोडिंग
|
||||
CLI (Codex, Claude Code, OpenCode, Cline, …) को OmniRoute को उसके बैकएंड के रूप में उपयोग करने के लिए कॉन्फ़िगर करता है — ताकि
|
||||
उपकरण **एक** एंडपॉइंट से बात करे और OmniRoute सही प्रदाता की ओर रूट करता है
|
||||
ऑटो-फॉलबैक के साथ। प्रत्येक कमांड एक चल रहे
|
||||
OmniRoute (स्थानीय या दूरस्थ) से **लाइव** मॉडल कैटलॉग पढ़ता है और **आपके**
|
||||
मशीन पर उपकरण की अपनी कॉन्फ़िग फ़ाइल लिखता है। API कुंजी को एक पर्यावरण चर द्वारा संदर्भित किया जाता है जहाँ भी उपकरण
|
||||
इसे समर्थन करता है। उपकरण-स्थानीय पर्यावरण फ़ाइल को बनाए रखने वाले कमांड नीचे नोट किए गए हैं।
|
||||
|
||||
एक सामान्य लॉन्चर भी है — `omniroute run <target>` — जो
|
||||
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` या `gemini` को सही वातावरण के साथ इंजेक्ट करता है, बिना किसी कॉन्फ़िगरेशन को लिखे। लक्ष्यों और उनके
|
||||
उपनामों को मानक मैनिफेस्ट `bin/cli/cli-manifest.mjs`
|
||||
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
|
||||
`open-code`, `qwen-code`, `gemini-cli`) से प्राप्त किया जाता है, और `omniroute completion` वही मैनिफेस्ट-व्युत्पन्न लक्ष्य शब्द प्रदान करता है। पुराने प्रति-उपकरण लॉन्चर —
|
||||
`omniroute launch` (Claude Code) और `omniroute launch-codex` (Codex) — उपलब्ध रहते हैं।
|
||||
|
||||
प्रदाता ऑनबोर्डिंग उसी स्थानीय/दूरस्थ संदर्भ से उपलब्ध है। नीचे दिए गए
|
||||
API-प्रथम कमांड प्रबंधन प्रमाणीकरण को प्रदाता
|
||||
क्रेडेंशियल्स से अलग रखते हैं और कभी भी संरचित आउटपुट में क्रेडेंशियल नहीं प्रिंट करते हैं:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
स्क्रिप्ट के लिए, `--credential-stdin` या `--credential-env` को प्राथमिकता दें; `--credential`
|
||||
नियंत्रित स्थानीय उपयोग के लिए बनाए रखा गया है। `providers remove` को एक
|
||||
गैर-इंटरैक्टिव टर्मिनल पर `--yes` की आवश्यकता होती है, और सभी पांच कमांड सक्रिय संदर्भ या वैश्विक `--base-url`/`--api-key` विकल्पों का सम्मान करते हैं।
|
||||
|
||||
दो सबसे समृद्ध इंटीग्रेशनों की एक बार की, हाथ से लिखी गई बेस सेटअप के लिए, प्रति-उपकरण गहरे डाइव देखें:
|
||||
|
||||
- [Claude Code कॉन्फ़िगरेशन](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [Codex CLI कॉन्फ़िगरेशन](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [दूरस्थ मोड](./REMOTE-MODE.md) — अपने लैपटॉप से एक दूरस्थ OmniRoute (VPS / Tailnet) चलाएं
|
||||
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — OmniCopilot एक्सटेंशन; यह आपके लिए संपादक के अंदर से भी इन
|
||||
`setup-*` कमांड्स को चला सकता है
|
||||
|
||||
---
|
||||
|
||||
## मास्टर तालिका
|
||||
|
||||
हर कमांड **सक्रिय संदर्भ** का सम्मान करता है (जिसे `omniroute connect` के साथ सेट किया गया है, देखें
|
||||
[दूरस्थ मोड](./REMOTE-MODE.md)) या स्पष्ट `--remote <url> --api-key <key>` फ्लैग। "स्थानीय बनाम दूरस्थ" का अर्थ है: बिना किसी फ्लैग के यह `http://localhost:20128` को लक्षित करता है;
|
||||
`--remote` (या एक सक्रिय दूरस्थ संदर्भ) के साथ यह उस सर्वर से कैटलॉग लाता है और कॉन्फ़िगरेशन को स्थानीय रूप से लिखता है।
|
||||
|
||||
| कमांड | उपकरण | यह क्या लिखता | प्रमुख फ्लैग्स | स्थानीय बनाम दूरस्थ |
|
||||
| -------------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — एक संगत पाठ मॉडल के लिए एक प्रोफ़ाइल (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | दोनों |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — एक मेल खाने वाले मॉडल के लिए एक प्रोफ़ाइल (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | दोनों |
|
||||
| `omniroute setup-opencode` | OpenCode (openai-compatible) | `~/.config/opencode/opencode.json` — `omniroute` प्रदाता के साथ हर कैटलॉग मॉडल (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | दोनों |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI मोड) + VS Code एक्सटेंशन सेटिंग्स प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | दोनों |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + यदि मौजूद हो तो VS Code `settings.json` में `kilocode.*` को मर्ज करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | दोनों |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — `provider: openai` मॉडल, कुंजी के माध्यम से `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोनों |
|
||||
| `omniroute setup-cursor` | Cursor | कुछ नहीं — ऐप में चरणों को प्रिंट करता है (Cursor कॉन्फ़िगरेशन अपारदर्शी SQLite है) | `--remote` `--api-key` `--only` `--port` | दोनों |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (आयात दस्तावेज़) + यदि एक VS Code `settings.json` मौजूद है तो `roo-cline.autoImportSettingsPath` सेट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | दोनों |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — `openai-compat` प्रदाता, कुंजी के माध्यम से `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | दोनों |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + पर्यावरण नुस्खा प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोनों |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + पर्यावरण नुस्खा प्रिंट करता है | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | दोनों |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` ऐरे + `OMNIROUTE_API_KEY` `~/.qwen/.env` में | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | दोनों |
|
||||
| `omniroute run <target>` | रनटाइम लॉन्च (सामान्य) | कुछ नहीं — सही वातावरण और तर्कों के साथ `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` को स्पॉन करता है; Qwen और Gemini अस्थायी अलग घर का उपयोग करते हैं | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | दोनों |
|
||||
| `omniroute launch` | Claude Code | कुछ नहीं — `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` को इंजेक्ट करके `claude` को स्पॉन करता है | `--remote` `--api-key` `--token` `--profile` `--port` | दोनों |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | कुछ नहीं — `-c` फ्लैग्स के माध्यम से `omniroute` प्रदाता को इंजेक्ट करके `codex` को स्पॉन करता है | `--remote` `--api-key` `--profile` (`-p`) `--port` | दोनों |
|
||||
|
||||
फ्लैग्स पर नोट्स (कमांड स्रोत में सत्यापित):
|
||||
|
||||
- `--remote <url>` — एक दूरस्थ OmniRoute से कैटलॉग लाता है (यह `--port`
|
||||
और सक्रिय संदर्भ को ओवरराइड करता है)। `--api-key <key>` उस
|
||||
सर्वर के लिए क्रेडेंशियल प्रदान करता है (डिफ़ॉल्ट रूप से `OMNIROUTE_API_KEY` पर्यावरण चर, या सक्रिय संदर्भ के टोकन पर)।
|
||||
- `--only <patterns>` — अल्पविराम से अलग उपस्ट्रिंग्स; केवल उन मॉडल आईडी को रखें जो मेल खाते हैं
|
||||
(जैसे `--only glm,kimi`)। `setup-codex`, `setup-claude`,
|
||||
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` पर उपलब्ध है।
|
||||
- `--dry-run` — फ़ाइल सिस्टम को छुए बिना ठीक वही प्रिंट करें जो लिखा जाएगा। हर `setup-*` कमांड पर उपलब्ध है **सिवाय** `setup-cursor`
|
||||
(जो कभी भी फ़ाइल नहीं लिखता)।
|
||||
- `--model <id>` — आवश्यक (या इंटरैक्टिव रूप से चुना गया) उन उपकरणों के लिए जिनमें कोई
|
||||
मॉडल ऑटो-डिस्कवरी नहीं है: Cline, Kilo, Roo, Goose, Qwen, Aider। उन उपकरणों को
|
||||
गैर-इंटरैक्टिव रन के लिए `--yes` भी स्वीकार करते हैं (जिसके लिए फिर `--model` की आवश्यकता होती है)।
|
||||
`setup-opencode` डिफ़ॉल्ट शीर्ष-स्तरीय मॉडल सेट करने के लिए `--model` लेता है।
|
||||
- `--model <id>` पर `omniroute run` मैनिफेस्ट के प्रति-लक्ष्य वायरिंग का पालन करता है
|
||||
(`bin/cli/cli-manifest.mjs`): **aider** को `--model openai/<id>` प्राप्त होता है और
|
||||
**opencode** को `--model omniroute/<id>` (प्रिफिक्स केवल तब जोड़ा जाता है जब आईडी
|
||||
पहले से ही इसे नहीं ले जाती); **qwen** और **gemini** को आईडी वर्बटिम प्राप्त होता है;
|
||||
**claude** को `ANTHROPIC_MODEL` के माध्यम से मिलता है, **goose** को `GOOSE_MODEL` के माध्यम से, और
|
||||
**codex** को `-c model_providers.omniroute.*` तर्कों के माध्यम से। **Qwen एकमात्र रन
|
||||
लक्ष्य है जिसे `--model` की सख्त आवश्यकता है** — `omniroute run qwen` इसके बिना `2` के साथ
|
||||
स्पष्ट त्रुटि के साथ समाप्त होता है।
|
||||
- `--port <port>` — स्थानीय OmniRoute पोर्ट (डिफ़ॉल्ट `20128`, जब `--remote`
|
||||
सेट होता है तो अनदेखा किया जाता है)। सभी `setup-*` और दोनों लॉन्चरों पर मौजूद है।
|
||||
- `omniroute run` निकासी कोड: बच्चे CLI का अपना निकासी कोड वर्बटिम प्रकट होता है;
|
||||
`2` = अमान्य तर्क (असमर्थित लक्ष्य, आवश्यक `--model` गायब, कंटेनर गार्ड); `127` = लक्ष्य बाइनरी `PATH` में नहीं है;
|
||||
`130`/`143`/`129` जब लॉन्च को `SIGINT`/`SIGTERM`/`SIGHUP` द्वारा समाप्त किया जाता है;
|
||||
`1` = अन्य रनटाइम लॉन्च विफलता।
|
||||
- दोनों लॉन्चर (`launch`, `launch-codex`) `--profile <name>` को स्वीकार करते हैं ताकि
|
||||
`setup-claude` / `setup-codex` द्वारा लिखी गई प्रोफ़ाइल का चयन किया जा सके, साथ ही
|
||||
अंतर्निहित `claude` / `codex` बाइनरी के लिए पास-थ्रू तर्क।
|
||||
|
||||
इंटरएक्टिव पिकर सेटअप व्यंजनों द्वारा भी साझा किया गया है:
|
||||
|
||||
```bash
|
||||
# सक्रिय स्थानीय या दूरस्थ मॉडल कैटलॉग से चुनें और लक्ष्य को कॉन्फ़िगर करें।
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
`configure` वर्तमान में `codex`, `claude`,
|
||||
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, और `kilo` के लिए परीक्षण किए गए व्यंजनों को सौंपता है। IDE-केवल,
|
||||
MITM, और गाइड-केवल कैटलॉग प्रविष्टियाँ स्पष्ट `setup-*`/मैनुअल प्रवाह के रूप में बनी रहती हैं और लॉन्च करने योग्य लक्ष्यों के रूप में प्रस्तुत नहीं की जाती हैं।
|
||||
|
||||
> `setup-opencode` **हल्का openai-संगत** OpenCode इंटीग्रेशन है।
|
||||
> एक समृद्ध प्लगइन इंटीग्रेशन भी है — `omniroute setup opencode` — जो
|
||||
> `@omniroute/opencode-plugin` स्थापित करता है। ये अलग-अलग कमांड हैं; ऊपर की तालिका
|
||||
> `setup-opencode` का दस्तावेजीकरण करती है।
|
||||
|
||||
---
|
||||
|
||||
## स्थानीय उपयोग
|
||||
|
||||
जब OmniRoute `localhost:20128` पर चल रहा हो, तो बस अपने टूल के लिए सेटअप कमांड चलाएँ। कैटलॉग स्थानीय सर्वर से लाया जाता है।
|
||||
|
||||
```bash
|
||||
# Codex: मेल खाने वाले मॉडल के लिए ~/.codex/ में एक प्रोफ़ाइल लिखें
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # एक उत्पन्न प्रोफ़ाइल का उपयोग करें
|
||||
|
||||
# Claude Code: प्रति-मॉडल प्रोफ़ाइल लिखें, फिर एक लॉन्च करें
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: सभी कैटलॉग मॉडलों के साथ openai-संगत प्रदाता लिखें
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # {env:OMNIROUTE_API_KEY} के माध्यम से संदर्भित, कभी भी डिस्क पर नहीं
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# ऑटो-डिस्कवरी के बिना टूल को एक स्पष्ट मॉडल की आवश्यकता होती है:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# कुछ भी लिखे बिना पूर्वावलोकन करें:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
बिल्कुल भी कॉन्फ़िगरेशन लिखे बिना लॉन्च करें (केवल env-injection):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → स्थानीय OmniRoute
|
||||
omniroute launch-codex # Codex CLI → स्थानीय OmniRoute
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
|
||||
|
||||
# स्पष्ट कमांड पथ: जो भी -- के बाद आता है उसे पास करें
|
||||
omniroute run claude -- --print-system-prompt "इस अंतर की समीक्षा करें"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## दूरस्थ उपयोग
|
||||
|
||||
किसी भी सेटअप कमांड को `--remote` + `--api-key` के साथ एक दूरस्थ OmniRoute पर इंगित करें। कैटलॉग दूरस्थ से लाया जाता है; कॉन्फ़िगरेशन आपके स्थानीय मशीन पर लिखा जाता है।
|
||||
|
||||
```bash
|
||||
# एक दूरस्थ VPS के खिलाफ OpenCode, केवल glm/kimi मॉडल रखें
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # पहले OMNIROUTE_API_KEY निर्यात करें
|
||||
|
||||
# एक दूरस्थ कैटलॉग से Codex प्रोफ़ाइल
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# सीधे दूरस्थ के खिलाफ एक CLI लॉन्च करें
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
हर बार `--remote`/`--api-key` पास करने के बजाय, एक बार लॉगिन करें और **सक्रिय संदर्भ** उन्हें स्वचालित रूप से प्रदान करने दें:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # एक स्कोप्ड टोकन बनाता है, संदर्भ को संग्रहीत करता है
|
||||
omniroute setup-codex # ← अब दूरस्थ कैटलॉग का उपयोग करता है
|
||||
omniroute setup-opencode # ← वही
|
||||
omniroute launch # ← Claude Code दूरस्थ के खिलाफ
|
||||
```
|
||||
|
||||
संदर्भ, स्कोप और टोकन प्रबंधन के लिए [दूरस्थ मोड](./REMOTE-MODE.md) देखें।
|
||||
|
||||
---
|
||||
|
||||
## बेस URL परंपराएँ (जो टूल `/v1` चाहते हैं)
|
||||
|
||||
OmniRoute OpenAI सतह को `/v1` पर, एंथ्रोपिक सतह को रूट पर, और एक मूल जेमिनी सतह को `/v1beta` पर उजागर करता है। प्रत्येक एकीकरण उस रूप में वायर्ड है जिसकी इसकी टूल अपेक्षा करती है (कमांड स्रोत में सत्यापित):
|
||||
|
||||
| एकीकरण | बेस URL लिखा गया | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | ---------------- | ----------------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | रूट | नहीं — Cline `/v1/chat/completions` जोड़ता है |
|
||||
| `setup-goose` (`OPENAI_HOST`) | रूट | नहीं — Goose पथ जोड़ता है |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | रूट | नहीं — LiteLLM `/v1/chat/completions` जोड़ता है |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1` के साथ | हाँ |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | रूट | नहीं — Claude Code `/v1/messages` जोड़ता है |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1` के साथ | हाँ |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1` के साथ | हाँ |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | रूट | नहीं — SDK `/v1beta/models/…` जोड़ता है |
|
||||
|
||||
---
|
||||
|
||||
## अपडेट पर स्थानीय निर्भरताएँ बनाए रखना: `--include=optional`
|
||||
|
||||
जब आप `omniroute update` के साथ अपडेट करते हैं (पुष्टि करने के बाद, या `--apply` के साथ),
|
||||
OmniRoute `--include=optional` के साथ इंस्टॉल चलाता है:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
यह **नहीं** है एक ध्वज जिसे आप `omniroute update` को पास करते हैं — यह हमेशा
|
||||
अपडेटर द्वारा लागू किया जाता है। यह सुनिश्चित करता है कि `optionalDependencies`
|
||||
(`better-sqlite3`, `keytar`, `tls-client`, LLMLingua SLM स्टैक) अपडेट के दौरान जीवित
|
||||
रहें, भले ही आपकी npm कॉन्फ़िगरेशन में `omit=optional` सेट हो, जो अन्यथा
|
||||
स्थानीय SQLite ड्राइवर और OS-keyring बाइंडिंग को चुपचाप हटा देगा। बिना लागू किए
|
||||
सटीक कमांड का पूर्वावलोकन करने के लिए:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] चलाएगा: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
अन्य `omniroute update` ध्वज (स्रोत में सत्यापित): `--check` (यदि पुराना है तो
|
||||
एक्ज़िट 1), `--apply` (बिना संकेत के इंस्टॉल करें), `--changelog`, `--no-backup`,
|
||||
`--yes`।
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI के माध्यम से `omniroute run gemini`
|
||||
|
||||
`@google/gemini-cli` 0.50.0 के खिलाफ अनुबंध सत्यापित: CLI
|
||||
`GOOGLE_GEMINI_BASE_URL` का सम्मान करता है और `POST /v1beta/models/<model>:generateContent`
|
||||
(और `:streamGenerateContent?alt=sse`) इसके खिलाफ जारी करता है — बिल्कुल OmniRoute का
|
||||
स्थानीय Gemini सतह (`/v1beta`)। `omniroute run gemini` इसे स्वचालित रूप से कनेक्ट करता है:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → सक्रिय OmniRoute बेस URL (रूट, कोई `/v1` नहीं);
|
||||
- `GEMINI_API_KEY` → हल किया गया OmniRoute क्रेडेंशियल (विकल्प/पर्यावरण/संदर्भ);
|
||||
- एक **अस्थायी अलग `GEMINI_CLI_HOME`** जिसका `.gemini/settings.json`
|
||||
`gemini-api-key` प्रमाणीकरण का चयन करता है, ताकि एक संग्रहीत Google OAuth सत्र
|
||||
(कोड सहायता) कभी भी OmniRoute-निर्देशित लॉन्च को ओवरराइड न करे — निकासी के बाद हटा दिया जाता है;
|
||||
- **पर्यावरण स्वच्छता**: बच्चे का पर्यावरण `GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` और `GOOGLE_GENAI_USE_GCA` से साफ किया गया है (जो
|
||||
प्रमाणीकरण को Vertex/Code Assist पर पुनर्निर्देशित करेगा), और `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` को
|
||||
बेल्ट-और-सस्पेंडर्स बैकअप के रूप में सेट किया गया है — अन्य `run` लक्ष्य अपने
|
||||
स्वयं के संघर्षशील चर के लिए समान उपचार प्राप्त करते हैं;
|
||||
- `--model <id>` का इंजेक्शन `--provider`/`--model` से।
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
Gemini का कार्यक्षेत्र-विश्वास गार्ड अभी भी हेडलेस मोड में लागू होता है —
|
||||
`--skip-trust` पास करें (या इंटरैक्टिव रूप से निर्देशिका पर विश्वास करें); लॉन्चर
|
||||
जानबूझकर इसे बायपास नहीं करता है। यह लॉन्चर **ACP पंजीकरण** (`src/lib/acp/registry.ts`, `gemini --acp`) से भिन्न है,
|
||||
जो `/dashboard/acp-agents` के लिए एजेंट-प्रोटोकॉल एकीकरण बना रहता है।
|
||||
|
||||
---
|
||||
|
||||
## वास्तविक धुआँ स्वेप (ऑप्ट-इन)
|
||||
|
||||
निर्धारणीय लॉन्च-प्लान रिग्रेशन CI में चलता है (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`)। एक वास्तविक OmniRoute सर्वर के खिलाफ वास्तविक
|
||||
बाइनरी को मान्य करने के लिए, एक ऑप्ट-इन हार्नेस है
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts` पर। यह स्वचालित रूप से कभी नहीं चलता
|
||||
(हर उप-परीक्षण छोड़ दिया जाता है जब तक `RUN_CLI_SMOKE=1` न हो), क्रेडेंशियल को
|
||||
पर्यावरण-चर नाम द्वारा पास करता है (कभी भी मान द्वारा नहीं), किसी भी रिकॉर्ड किए गए
|
||||
आउटपुट से कुंजी-आकार की स्ट्रिंग को छुपाता है, उन लक्ष्यों को छोड़ देता है जिनका
|
||||
बाइनरी स्थापित नहीं है, और विफलताओं को प्रमाणीकरण / अपस्ट्रीम / कॉन्फ़िगरेशन के रूप में वर्गीकृत करता है
|
||||
न कि एक साधारण बूलियन के रूप में:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
वैकल्पिक: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` स्वेप को सीमित करता है;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` 120 सेकंड प्रति-लक्ष्य टाइमआउट को ओवरराइड करता है।
|
||||
|
||||
---
|
||||
|
||||
## अन्य देखें
|
||||
|
||||
- [Claude Code कॉन्फ़िगरेशन](./CLAUDE-CODE-CONFIGURATION.md) — गहरे Claude Code गाइड
|
||||
- [Codex CLI कॉन्फ़िगरेशन](./CODEX-CLI-CONFIGURATION.md) — एक बार का `[model_providers.omniroute]` बेस सेटअप
|
||||
- [Remote Mode](./REMOTE-MODE.md) — संदर्भ, स्कोप्ड एक्सेस टोकन, एक दूरस्थ सर्वर को चलाना
|
||||
- [CLI Tools संदर्भ](../reference/CLI-TOOLS.md) — समर्थित उपकरणों + डैशबोर्ड पृष्ठों की पूरी सूची
|
||||
- [सेटअप गाइड](./SETUP_GUIDE.md) — इंस्टॉलेशन विधियाँ और पहले रन का ऑनबोर्डिंग
|
||||
@@ -1,313 +1,86 @@
|
||||
# CLI-TOOLS (हिन्दी)
|
||||
# CLI Tools Setup Guide — OmniRoute (हिन्दी)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "CLI उपकरण — OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# CLI उपकरण — OmniRoute
|
||||
|
||||
अंतिम अपडेट: 2026-08-18
|
||||
|
||||
OmniRoute तीन श्रेणियों के CLI उपकरणों के साथ एकीकृत होता है जो तीन समर्पित डैशबोर्ड पृष्ठों में फैले होते हैं:
|
||||
|
||||
| पृष्ठ | मार्ग | अवधारणा | संख्या |
|
||||
| ------------- | ----------------------- | ------------------------------------------------------------------------------------------ | --------------- |
|
||||
| **CLI कोड** | `/dashboard/cli-code` | कोडिंग उपकरण जिन्हें आप OmniRoute पर इंगित करते हैं (क्लाइंट → CLI → OmniRoute → प्रदाता) | 26 |
|
||||
| **CLI एजेंट** | `/dashboard/cli-agents` | स्वायत्त एजेंट जिन्हें आप OmniRoute पर इंगित करते हैं (समान प्रवाह, व्यापक दायरा) | 8 |
|
||||
| **ACP एजेंट** | `/dashboard/acp-agents` | CLIs जो OmniRoute stdio/ACP के माध्यम से बैकएंड के रूप में उत्पन्न करता है (विपरीत प्रवाह) | रजिस्ट्रि देखें |
|
||||
|
||||
विरासत मार्ग 308 के माध्यम से पुनर्निर्देशित होते हैं: `/dashboard/cli-tools` → `/dashboard/cli-code`, `/dashboard/agents` → `/dashboard/acp-agents`।
|
||||
This guide explains how to install and configure all supported AI coding CLI tools
|
||||
to use **OmniRoute** as the unified backend, giving you centralized key management,
|
||||
cost tracking, model switching, and request logging across every tool.
|
||||
|
||||
---
|
||||
|
||||
## यह कैसे काम करता है
|
||||
## How It Works
|
||||
|
||||
```
|
||||
CLI कोड / CLI एजेंट (उपभोग प्रवाह):
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
|
||||
│
|
||||
▼ (सभी OmniRoute पर इंगित करते हैं)
|
||||
▼ (all point to OmniRoute)
|
||||
http://YOUR_SERVER:20128/v1
|
||||
│
|
||||
▼ (OmniRoute सही प्रदाता की ओर मार्ग करता है)
|
||||
▼ (OmniRoute routes to the right provider)
|
||||
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
|
||||
|
||||
ACP एजेंट (विपरीत उत्पन्न प्रवाह):
|
||||
क्लाइंट अनुरोध → OmniRoute → stdio/ACP के माध्यम से CLI उत्पन्न करता है → प्रतिक्रिया
|
||||
```
|
||||
|
||||
**लाभ:**
|
||||
**Benefits:**
|
||||
|
||||
- सभी उपकरणों को प्रबंधित करने के लिए एक API कुंजी
|
||||
- डैशबोर्ड में सभी CLIs के बीच लागत ट्रैकिंग
|
||||
- हर उपकरण को फिर से कॉन्फ़िगर किए बिना मॉडल स्विचिंग
|
||||
- स्थानीय और दूरस्थ सर्वरों (VPS, Docker, Akamai, Cloudflare Tunnel) पर काम करता है
|
||||
- One API key to manage all tools
|
||||
- Cost tracking across all CLIs in the dashboard
|
||||
- Model switching without reconfiguring every tool
|
||||
- Works locally and on remote servers (VPS)
|
||||
|
||||
---
|
||||
|
||||
## `setup-*` के साथ स्वचालित कॉन्फ़िगर करें
|
||||
## Supported Tools (Dashboard Source of Truth)
|
||||
|
||||
आपको प्रत्येक उपकरण की कॉन्फ़िगरेशन हाथ से लिखने की आवश्यकता नहीं है। OmniRoute एक `setup-*`
|
||||
कमांड प्रदान करता है जो एक चल रहे OmniRoute (स्थानीय या दूरस्थ) से **लाइव** मॉडल कैटलॉग पढ़ता है
|
||||
और आपके मशीन पर उपकरण की अपनी कॉन्फ़िगरेशन लिखता है:
|
||||
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
|
||||
Current list (v3.0.0-rc.16):
|
||||
|
||||
```bash
|
||||
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
|
||||
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
|
||||
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
|
||||
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
|
||||
```
|
||||
| Tool | ID | Command | Setup Mode | Install Method |
|
||||
| ------------------ | ------------- | ---------- | ---------- | -------------- |
|
||||
| **Claude Code** | `claude` | `claude` | env | npm |
|
||||
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
|
||||
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
|
||||
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
|
||||
| **Cursor** | `cursor` | app | guide | desktop app |
|
||||
| **Cline** | `cline` | `cline` | custom | npm |
|
||||
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
|
||||
| **Continue** | `continue` | extension | guide | VS Code |
|
||||
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
|
||||
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
|
||||
| **OpenCode** | `opencode` | `opencode` | guide | npm |
|
||||
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
|
||||
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
|
||||
|
||||
प्रत्येक `--remote <url> --api-key <key>` स्वीकार करता है (एक दूरस्थ OmniRoute के खिलाफ एक स्थानीय उपकरण कॉन्फ़िगर करें), `--dry-run` (लिखे बिना पूर्वावलोकन), और `--port`। मॉडल स्वचालित खोज के बिना उपकरण (Cline, Kilo, Roo, Goose, Aider, Qwen) `--model <id>` लेते हैं (और गैर-इंटरैक्टिव रन के लिए `--yes`)। CLI को सही वातावरण के साथ लॉन्च करने के लिए और बिना किसी कॉन्फ़िगरेशन के, सामान्य `omniroute run <target>` लॉन्चर का उपयोग करें (claude, codex, aider, goose, opencode, qwen, gemini — लक्ष्य और उपनाम `bin/cli/cli-manifest.mjs` से आते हैं); विरासत प्रति-उपकरण लॉन्चर `omniroute launch` (Claude Code) और `omniroute launch-codex` (Codex) उपलब्ध रहते हैं। Gemini CLI केवल लॉन्च-केवल है: यह एक `omniroute run` लक्ष्य है लेकिन इसका कोई `setup-*`/`configure` नुस्खा नहीं है।
|
||||
### CLI fingerprint sync (Agents + Settings)
|
||||
|
||||
> **पूर्ण संदर्भ:** मास्टर तालिका — प्रत्येक कमांड क्या लिखता है, हर ध्वज,
|
||||
> स्थानीय बनाम दूरस्थ, और कौन से उपकरण `/v1` उपसर्ग चाहते हैं —
|
||||
> **[CLI Integrations](../guides/CLI-INTEGRATIONS.md)** में उपलब्ध है।
|
||||
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
|
||||
This keeps provider IDs aligned with CLI cards and legacy IDs.
|
||||
|
||||
### कंटेनर के अंदर इन्हें चलाना
|
||||
| CLI ID | Fingerprint Provider ID |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `kilo` | `kilocode` |
|
||||
| `copilot` | `github` |
|
||||
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
|
||||
|
||||
OmniRoute कंटेनर के अंदर निष्पादित `setup-*` कमांड कंटेनर के अपने होम में लिखता है, जिसे कोई होस्ट CLI नहीं पढ़ता है और जो कंटेनर के साथ गायब हो जाता है। OmniRoute इसे पहचानता है और लिखने के बजाय निर्देशों के साथ `2` के साथ बाहर निकलता है। आगे बढ़ने के दो समर्थित तरीके हैं — होस्ट पर CLI स्थापित करें और कंटेनर से `omniroute connect` करें, या कॉन्फ़िगरेशन डायरियों को बाइंड-माउंट करें और `CLI_CONFIG_HOME` सेट करें (कॉम्पोज़ `host` प्रोफ़ाइल)। प्रत्येक `setup-*` कमांड, साथ ही `omniroute configure` और `omniroute config set`, `--allow-container-write` स्वीकार करता है जब आप वास्तव में कंटेनर के अपने CLIs को कॉन्फ़िगर करना चाहते थे; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` सर्वर के लिए वही करता है। देखें
|
||||
[Docker Guide → होस्ट CLI उपकरणों को कॉन्फ़िगर करना](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker)।
|
||||
|
||||
डैशबोर्ड का **apply endpoint** (`POST /api/cli-tools/apply`) वही सुरक्षा लागू करता है: एक कंटेनर में, एक लिखना जिसका लक्ष्य होस्ट से बाइंड-माउंट नहीं किया गया है, **`422`** के साथ उत्तर देता है जिसमें `containerEphemeralTarget: true`, सुरक्षित त्रुटि पाठ और — उन उपकरणों के लिए जिनका होस्ट नुस्खा है (claude, codex, opencode, cline, kilo, continue) — एक `hostSetupCommand` (जैसे `omniroute setup-opencode`) जो होस्ट पर चलाने के लिए है; कुछ भी नहीं लिखा गया है। `dryRun: true` कंटेनर मोड में काम करता रहता है और उत्पन्न सामग्री + लक्ष्य पथ को बिना डिस्क को छुए लौटाता है, ताकि आप डैशबोर्ड से पूर्वावलोकन कर सकें और होस्ट पर लागू कर सकें। यह व्यवहार जानबूझकर है और
|
||||
`tests/unit/api/cli-tools/apply-container-guard.test.ts` द्वारा पुनरावृत्ति-रक्षा की गई है — कभी भी "फिक्स" न करें 422 को सुरक्षा को हटाकर।
|
||||
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
|
||||
|
||||
---
|
||||
|
||||
## सत्य का स्रोत
|
||||
## Step 1 — Get an OmniRoute API Key
|
||||
|
||||
एकीकृत कैटलॉग `src/shared/constants/cliTools.ts` में `CLI_TOOLS: Record<string, CliCatalogEntry>` के रूप में स्थित है।
|
||||
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
|
||||
2. Click **Create API Key**
|
||||
3. Give it a name (e.g. `cli-tools`) and select all permissions
|
||||
4. Copy the key — you'll need it for every CLI below
|
||||
|
||||
प्रत्येक प्रविष्टि में ये फ़ील्ड होते हैं (जो `src/shared/schemas/cliCatalog.ts` में परिभाषित हैं):
|
||||
|
||||
| फ़ील्ड | प्रकार | विवरण |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------- |
|
||||
| `category` | `"code" \| "agent"` | उपकरण किस पृष्ठ पर दिखाई देता है |
|
||||
| `vendor` | `string` | उपकरण का मूल ("Anthropic", "OSS (P. Gauthier)") |
|
||||
| `acpSpawnable` | `boolean` | ACP एजेंट के रूप में भी उपयोग किया जा सकता है (बैज दिखाया गया) |
|
||||
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | कस्टम एंडपॉइंट समर्थन स्तर। `"none"` = MITM बैकलॉग |
|
||||
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | कॉन्फ़िगरेशन तंत्र |
|
||||
| `id`, `name`, `color`, `description`, `docsUrl` | मानक | मुख्य प्रदर्शन फ़ील्ड |
|
||||
|
||||
जिन प्रविष्टियों में `baseUrlSupport: "none"` है, वे **डैशबोर्ड पृष्ठों** में **नहीं दिखाई देती** हैं — वे योजना 11 के लिए MITM बैकलॉग में पंजीकृत हैं (देखें `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`)।
|
||||
|
||||
### क्षमता स्तर (कैटलॉग किए गए × पता लगाने योग्य × कॉन्फ़िगर करने योग्य × लॉन्च करने योग्य)
|
||||
|
||||
हर कैटलॉग किए गए उपकरण को पता लगाया जा सकता है, कॉन्फ़िगर किया जा सकता है या लॉन्च किया जा सकता है। प्रत्येक स्तर में एक
|
||||
घोषित स्रोत होता है, और एक ड्रिफ्ट परीक्षण उन्हें संरेखित रखता है:
|
||||
|
||||
| स्तर | अर्थ | घोषित किया गया |
|
||||
| ------------------------ | ----------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
||||
| **कैटलॉग किए गए** | डैशबोर्ड कैटलॉग में दिखाई देता है (नाम, विक्रेता, दस्तावेज़, कॉन्फ़िग प्रकार) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
|
||||
| **पता लगाने योग्य** | बाइनरी/कॉन्फ़िगरेशन पहचान, स्वास्थ्य जांच, कॉन्फ़िग पथ | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` रनटाइम कैटलॉग) |
|
||||
| **कॉन्फ़िगर करने योग्य** | `omniroute configure <cli>` द्वारा समर्थित (सेटअप नुस्खा मौजूद है) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
|
||||
| **लॉन्च करने योग्य** | `omniroute run <target>` द्वारा समर्थित (env/args इंजेक्शन परिभाषित) | `bin/cli/cli-manifest.mjs` (`run: true`) |
|
||||
|
||||
`bin/cli/cli-manifest.mjs` CLI कमांड के लिए मानक निष्पादन योग्य मैनिफेस्ट है
|
||||
सतहें: `run`, `configure` और शेल-पूर्णता जनरेटर सभी अपने
|
||||
लक्ष्य सूचियों, उपनाम समाधान (उदाहरण के लिए `kilocode`/`kilo-code`/`kilo_cli` → `kilo`)
|
||||
और `--model` ध्वज वायरिंग से इसे प्राप्त करते हैं। ड्रिफ्ट गार्ड
|
||||
`tests/unit/cli/cli-manifest-drift.test.ts` यह सुनिश्चित करता है कि मैनिफेस्ट, रनटाइम
|
||||
कैटलॉग, UI कैटलॉग और प्रत्येक उपभोक्ता सतह समन्वय में रहें — एक लक्ष्य जो
|
||||
एक सतह में जोड़ा गया है, बिना अन्य के विफलता की श्रृंखला को चुपचाप नहीं छोड़ता।
|
||||
|
||||
## 1. CLI कोड का कैटलॉग (26 उपकरण)
|
||||
|
||||
सभी उपकरण जो `/dashboard/cli-code` में दिखाई देते हैं। जिनके पास `baseUrlSupport: none` है, वे MITM या एक मैनुअल गाइड के माध्यम से जुड़े हुए हैं, न कि एक कस्टम बेस URL के माध्यम से:
|
||||
|
||||
| id | नाम | विक्रेता | baseUrlSupport | configType | acpSpawnable |
|
||||
| ------------ | ------------------------ | ------------------------ | -------------- | ------------ | ------------ |
|
||||
| claude | क्लॉड कोड | एंथ्रोपिक | पूर्ण | env | सच |
|
||||
| codex | OpenAI Codex CLI | OpenAI | पूर्ण | कस्टम | सच |
|
||||
| zcode | ZCode (GLM कोडिंग योजना) | Z.ai | कोई नहीं | कस्टम | झूठ |
|
||||
| cline | क्लाइन | OSS (पूर्व- क्लॉड डेवलप) | पूर्ण | कस्टम | सच |
|
||||
| kilo | किलो कोड | किलो-ऑर्ग | पूर्ण | कस्टम | झूठ |
|
||||
| roo | रू कोड | रू (OSS) | पूर्ण | गाइड | झूठ |
|
||||
| continue | कंटिन्यू | continue.dev | पूर्ण | गाइड | झूठ |
|
||||
| aider | आइडर | OSS (P. गॉथियर) | पूर्ण | गाइड | सच |
|
||||
| forge | फोर्जकोड | एंटिनोमी HQ | पूर्ण | कस्टम | सच |
|
||||
| jcode | jcode | 1jehuang (OSS) | पूर्ण | कस्टम | झूठ |
|
||||
| deepseek-tui | डीपसीक TUI | हंटर बाउन (OSS) | पूर्ण | कस्टम | झूठ |
|
||||
| codewhale | कोडव्हेल | एचएमबॉउन (OSS) | पूर्ण | कस्टम | झूठ |
|
||||
| opencode | ओपनकोड | एनामली (पूर्व-SST) | पूर्ण | गाइड | सच |
|
||||
| droid | फैक्ट्री ड्रॉइड | फैक्ट्री एआई | आंशिक | गाइड | झूठ |
|
||||
| copilot | GitHub Copilot CLI | GitHub/MS | पूर्ण | कस्टम | झूठ |
|
||||
| cursor-cli | कर्सर CLI | एनिस्फीयर | आंशिक | गाइड | सच |
|
||||
| smelt | स्मेल्ट | लियोनार्डसीसर (OSS) | पूर्ण | कस्टम | झूठ |
|
||||
| pi | पाई (pi-coding-agent) | M. ज़ेच्नर (OSS) | पूर्ण | कस्टम | झूठ |
|
||||
| grok-build | ग्रोक बिल्ड | xAI | पूर्ण | कस्टम | झूठ |
|
||||
| crush | क्रश | OSS (चार्म) | पूर्ण | कस्टम | झूठ |
|
||||
| qwen | क्यूवेन कोड | अलीबाबा | पूर्ण | गाइड | सच |
|
||||
| cursor | कर्सर | एनिस्फीयर | कोई नहीं | गाइड | झूठ |
|
||||
| antigravity | एंटीग्रेविटी | गूगल | कोई नहीं | mitm | झूठ |
|
||||
| hermes | हर्मेस | नॉस रिसर्च | कोई नहीं | गाइड | झूठ |
|
||||
| kiro | कीरो एआई | अमेज़न | कोई नहीं | mitm | झूठ |
|
||||
| custom | कस्टम CLI | — | पूर्ण | कस्टम-बिल्डर | झूठ |
|
||||
|
||||
जिन उपकरणों में `baseUrlSupport: "partial"` है, वे डैशबोर्ड कार्ड में "⚠ बेस URL आंशिक" बैज दिखाते हैं।
|
||||
|
||||
## 2. CLI एजेंटों की सूची (8 उपकरण)
|
||||
|
||||
स्वायत्त एजेंट जो `/dashboard/cli-agents` में दिखाई देते हैं:
|
||||
|
||||
| id | नाम | विक्रेता | baseUrlSupport | acpSpawnable |
|
||||
| ------------ | -------------- | ------------------------ | -------------- | ------------ |
|
||||
| hermes-agent | हर्मेस एजेंट | Nous Research | पूर्ण | झूठा |
|
||||
| openclaw | ओपनक्लॉ | OSS (P. Steinberger) | पूर्ण | सच |
|
||||
| goose | गूज | Block / Linux Foundation | पूर्ण | सच |
|
||||
| interpreter | ओपन इंटरप्रेटर | OSS | पूर्ण | सच |
|
||||
| warp | वार्प एआई | Warp Inc. | आंशिक | सच |
|
||||
| agent-deck | एजेंट डेक | asheshgoplani (OSS) | पूर्ण | झूठा |
|
||||
| omp | ओह माय पाई | OSS | पूर्ण | सच |
|
||||
| letta | लेटा CLI | लेटा | पूर्ण | झूठा |
|
||||
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
## 3. ACP एजेंट (/dashboard/acp-agents)
|
||||
## Step 2 — Install CLI Tools
|
||||
|
||||
यह पृष्ठ (जिसका नाम `/dashboard/agents` से बदला गया है) CLIs को दिखाता है जिन्हें OmniRoute **स्पॉन** कर सकता है बैकएंड निष्पादन इंजन के रूप में stdio/ACP प्रोटोकॉल के माध्यम से। सूची को `src/lib/acp/registry.ts` में अलग से बनाए रखा गया है और यह `CLI_TOOLS` के समान **नहीं** है।
|
||||
|
||||
---
|
||||
|
||||
## 4. MITM बैकलॉग (डैशबोर्ड में नहीं दिखाया गया)
|
||||
|
||||
निम्नलिखित CLIs स्वदेशी रूप से कस्टम बेस URL का समर्थन नहीं करते हैं और CLI कोड या CLI एजेंटों के पृष्ठों में **सूचीबद्ध नहीं** हैं। ये योजना 11 में MITM इंटरसेप्शन के लिए उम्मीदवार हैं:
|
||||
|
||||
| CLI | कारण |
|
||||
| ------------------- | ---------------------------------------------------------- |
|
||||
| windsurf | BYOK केवल चयनित क्लॉड मॉडल + कॉर्पोरेट URL/token |
|
||||
| amp | बंद पारिस्थितिकी तंत्र (Sourcegraph) |
|
||||
| amazon-q / kiro-cli | AWS SSO प्रमाणीकरण, कोई कस्टम URL नहीं |
|
||||
| cowork | एंथ्रोपिक डेस्कटॉप, कोई कॉन्फ़िगर करने योग्य एंडपॉइंट नहीं |
|
||||
|
||||
पूर्ण क्रॉस-रेफरेंस के लिए `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` देखें।
|
||||
|
||||
---
|
||||
|
||||
## 5. बैच डिटेक्शन API
|
||||
|
||||
सभी उपकरण पहचान एकल एंडपॉइंट के माध्यम से एकत्रित की जाती है:
|
||||
|
||||
**`GET /api/cli-tools/all-statuses`**
|
||||
|
||||
- प्रमाणीकरण: `requireCliToolsAuth(request)` (अन्य `/api/cli-tools/` मार्गों के समान)
|
||||
- लौटाता है: `Record<toolId, ToolBatchStatus>` (प्रकार: `src/shared/types/cliBatchStatus.ts`)
|
||||
- रणनीति: सभी उपकरणों पर `Promise.all`, प्रति उपकरण 5 सेकंड का टाइमआउट
|
||||
- कैश: इन-मेमोरी LRU कॉन्फ़िग फ़ाइल `mtime` द्वारा अनुक्रमित। जब mtime बदलता है तो कैश अमान्य हो जाता है। सर्वर पुनः आरंभ पर रीसेट होता है।
|
||||
|
||||
प्रत्येक उपकरण के लिए प्रतिक्रिया आकार:
|
||||
|
||||
```ts
|
||||
interface ToolBatchStatus {
|
||||
detection: {
|
||||
installed: boolean;
|
||||
runnable: boolean;
|
||||
version?: string;
|
||||
command?: string;
|
||||
commandPath?: string;
|
||||
reason?: string;
|
||||
};
|
||||
config: {
|
||||
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
|
||||
endpoint?: string | null;
|
||||
lastConfiguredAt?: string | null;
|
||||
};
|
||||
error?: string; // साफ किया गया, कोई स्टैक ट्रेस नहीं
|
||||
}
|
||||
```
|
||||
|
||||
## 6. नए उपकरणों के लिए सेटिंग हैंडलर
|
||||
|
||||
`configType: "custom"` वाले नए उपकरणों के लिए समर्पित सेटिंग्स API रूट हैं:
|
||||
|
||||
| रूट | उपकरण |
|
||||
| ------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
|
||||
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url फ्लैग) |
|
||||
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, विरासती) |
|
||||
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, प्राथमिक + विरासती `~/.deepseek` समन्वय) |
|
||||
| `POST /api/cli-tools/smelt-settings` | Smelt |
|
||||
| `POST /api/cli-tools/pi-settings` | Pi कोडिंग एजेंट |
|
||||
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
|
||||
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + समर्पित `.env` कुंजी) |
|
||||
|
||||
सभी रूट्स त्रुटि प्रतिक्रियाओं के लिए `sanitizeErrorMessage()` का उपयोग करते हैं (कठोर नियम #12)।
|
||||
|
||||
---
|
||||
|
||||
## 7. डैशबोर्ड पृष्ठों की वास्तुकला
|
||||
|
||||
### CLI कोड (`/dashboard/cli-code`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — सर्वर घटक
|
||||
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — क्लाइंट ग्रिड
|
||||
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — उपकरण विवरण पृष्ठ
|
||||
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 विशेष उपकरण कार्ड + `ToolDetailClient.tsx`
|
||||
|
||||
### CLI एजेंट (`/dashboard/cli-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — सर्वर घटक
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — क्लाइंट ग्रिड
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — `ToolDetailClient` का पुन: उपयोग करता है
|
||||
|
||||
### ACP एजेंट (`/dashboard/acp-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — सर्वर घटक ( `agents/` से स्थानांतरित)
|
||||
|
||||
### साझा UI घटक (`src/shared/components/cli/`)
|
||||
|
||||
| फ़ाइल | उद्देश्य |
|
||||
| ----------------------- | ------------------------------------------------------ |
|
||||
| `CliToolCard.tsx` | स्मार्ट स्थिति कार्ड (पता लगाना + कॉन्फ़िग + एंडपॉइंट) |
|
||||
| `CliConceptCard.tsx` | प्रति-पृष्ठ अवधारणा व्याख्या कार्ड |
|
||||
| `CliComparisonCard.tsx` | CLI प्रकारों के बीच तीन-स्तंभ तुलना |
|
||||
| `BaseUrlSelect.tsx` | एंडपॉइंट ड्रॉपडाउन (स्थानीय/क्लाउड/कस्टम) |
|
||||
| `ApiKeySelect.tsx` | API कुंजी चयनकर्ता |
|
||||
| `ManualConfigModal.tsx` | कॉपी करने योग्य कॉन्फ़िग स्निपेट मोडल |
|
||||
|
||||
### साझा हुक (`src/shared/hooks/cli/`)
|
||||
|
||||
| फ़ाइल | उद्देश्य |
|
||||
| ------------------------- | ----------------------------------------------------------------------------- |
|
||||
| `useToolBatchStatuses.ts` | `/api/cli-tools/all-statuses` लाता है, लोडिंग/रीफ्रेश स्थिति प्रबंधित करता है |
|
||||
|
||||
## 8. i18n
|
||||
|
||||
योजना 14 F9 में नए नामस्थान जोड़े गए:
|
||||
|
||||
| Namespace | Purpose |
|
||||
| ----------- | ----------------------------------------------------------------- |
|
||||
| `cliCommon` | साझा स्ट्रिंग्स (कार्ड लेबल, अवधारणा/तुलना पाठ, विवरण पृष्ठ लेबल) |
|
||||
| `cliCode` | CLI कोड के पृष्ठ स्ट्रिंग्स |
|
||||
| `cliAgents` | CLI एजेंट्स पृष्ठ स्ट्रिंग्स |
|
||||
| `acpAgents` | ACP एजेंट्स पृष्ठ स्ट्रिंग्स |
|
||||
|
||||
पूर्ण PT-BR और EN अनुवाद प्रदान किए गए हैं। 39 अन्य स्थानीयताएँ स्वचालित रूप से `src/i18n/request.ts` में नामस्थान-स्तरीय मर्ज के माध्यम से EN पर वापस जाती हैं।
|
||||
|
||||
---
|
||||
|
||||
## 9. त्वरित प्रारंभ
|
||||
|
||||
### चरण 1 — OmniRoute API कुंजी प्राप्त करें
|
||||
|
||||
1. `/dashboard/api-manager` खोलें → **API कुंजी बनाएँ**
|
||||
2. इसे एक नाम दें (जैसे `cli-tools`) और सभी अनुमतियाँ चुनें
|
||||
3. कुंजी कॉपी करें — आपको नीचे दिए गए हर CLI के लिए इसकी आवश्यकता होगी
|
||||
|
||||
> आपकी कुंजी इस तरह दिखती है: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
### चरण 2 — CLI उपकरण स्थापित करें
|
||||
|
||||
सभी npm-आधारित उपकरणों के लिए Node.js 22.22.2+ या 24.x की आवश्यकता है:
|
||||
All npm-based tools require Node.js 18+:
|
||||
|
||||
```bash
|
||||
# Claude Code (Anthropic)
|
||||
@@ -325,137 +98,96 @@ npm install -g cline
|
||||
# KiloCode
|
||||
npm install -g kilocode
|
||||
|
||||
# Qwen Code
|
||||
npm install -g @qwen-code/qwen-code
|
||||
# Kiro CLI (Amazon — requires curl + unzip)
|
||||
apt-get install -y unzip # on Debian/Ubuntu
|
||||
curl -fsSL https://cli.kiro.dev/install | bash
|
||||
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
|
||||
```
|
||||
|
||||
# Google Gemini CLI (launchable via `omniroute run gemini` → /v1beta surface)
|
||||
npm install -g @google/gemini-cli
|
||||
**Verify:**
|
||||
|
||||
# Aider
|
||||
pip install aider-chat
|
||||
|
||||
# Smelt
|
||||
cargo install smelt # Rust-आधारित
|
||||
|
||||
# Pi coding agent
|
||||
# स्थापना के लिए https://github.com/zechnerj/pi-coding-agent देखें
|
||||
|
||||
# jcode
|
||||
# स्थापना के लिए https://github.com/1jehuang/jcode देखें
|
||||
```bash
|
||||
claude --version # 2.x.x
|
||||
codex --version # 0.x.x
|
||||
opencode --version # x.x.x
|
||||
cline --version # 2.x.x
|
||||
kilocode --version # x.x.x (or: kilo --version)
|
||||
kiro-cli --version # 1.x.x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### चरण 3 — डैशबोर्ड के माध्यम से कॉन्फ़िगर करें
|
||||
## Step 3 — Set Global Environment Variables
|
||||
|
||||
1. `http://localhost:20128/dashboard/cli-code` पर जाएं
|
||||
2. ग्रिड में अपने उपकरण को खोजें
|
||||
3. उपकरण विवरण पृष्ठ खोलने के लिए कार्ड पर क्लिक करें
|
||||
4. अपनी API कुंजी और बेस URL चुनें
|
||||
5. **कॉन्फ़िग लागू करें** पर क्लिक करें या मैनुअल कॉन्फ़िग स्निपेट कॉपी करें
|
||||
|
||||
---
|
||||
|
||||
### चरण 4 — वैश्विक पर्यावरण चर सेट करें
|
||||
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# OmniRoute यूनिवर्सल एंडपॉइंट
|
||||
# OmniRoute Universal Endpoint
|
||||
export OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
export OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
|
||||
# Gemini CLI ROOT पर GOOGLE_GEMINI_BASE_URL पढ़ता है (इसका SDK स्वयं /v1beta/... जोड़ता है)
|
||||
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
|
||||
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
|
||||
export GEMINI_BASE_URL="http://localhost:20128/v1"
|
||||
export GEMINI_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
> **दूरस्थ सर्वर** के लिए `localhost:20128` को सर्वर IP या डोमेन से बदलें,
|
||||
> जैसे `http://<your-server-ip>:20128`।
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain,
|
||||
> e.g. `http://192.168.0.15:20128`.
|
||||
|
||||
---
|
||||
|
||||
### चरण 4 — प्रत्येक उपकरण को कॉन्फ़िगर करें
|
||||
## Step 4 — Configure Each Tool
|
||||
|
||||
#### Claude Code
|
||||
### Claude Code
|
||||
|
||||
```bash
|
||||
# ~/.claude/settings.json बनाएँ:
|
||||
# Via CLI:
|
||||
claude config set --global api-base-url http://localhost:20128/v1
|
||||
|
||||
# Or create ~/.claude/settings.json:
|
||||
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:20128",
|
||||
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
|
||||
}
|
||||
"apiBaseUrl": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Claude Code के लिए एकीकृत Anthropic गेटवे रूट का उपयोग करें। यहाँ `/v1` न जोड़ें।
|
||||
|
||||
**परीक्षण:** `claude "say hello"`
|
||||
**Test:** `claude "say hello"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenAI Codex
|
||||
|
||||
आधुनिक Codex (v0.137+) केवल `~/.codex/config.toml` पढ़ता है — पुराना
|
||||
`config.yaml` विरासती npm CLI का है और चुपचाप अनदेखा किया जाता है। API
|
||||
कुंजी `OMNIROUTE_API_KEY` पर्यावरण चर (`env_key`) में रहती है, कभी भी
|
||||
फाइल के अंदर नहीं:
|
||||
### OpenAI Codex
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
|
||||
model_provider = "omniroute"
|
||||
|
||||
[model_providers.omniroute]
|
||||
name = "OmniRoute"
|
||||
base_url = "http://localhost:20128/v1"
|
||||
env_key = "OMNIROUTE_API_KEY"
|
||||
requires_openai_auth = false
|
||||
EOF
|
||||
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
पूर्ण संदर्भ (प्रोफाइल, `wire_api`, संदर्भ विंडो): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
|
||||
|
||||
**परीक्षण:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenCode
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
|
||||
{
|
||||
"\$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"omniroute": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "OmniRoute",
|
||||
"options": {
|
||||
"baseURL": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
},
|
||||
"models": {
|
||||
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
|
||||
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
|
||||
"gemini-3-flash": { "name": "gemini-3-flash" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
|
||||
model: auto
|
||||
apiKey: sk-your-omniroute-key
|
||||
apiBaseUrl: http://localhost:20128/v1
|
||||
EOF
|
||||
```
|
||||
|
||||
**परीक्षण:** `opencode`
|
||||
|
||||
> सोचने के वेरिएंट भेजने के लिए `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high` का उपयोग करें।
|
||||
**Test:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### Cline (CLI या VS कोड)
|
||||
### OpenCode
|
||||
|
||||
**CLI मोड:**
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
|
||||
[provider.openai]
|
||||
base_url = "http://localhost:20128/v1"
|
||||
api_key = "sk-your-omniroute-key"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Test:** `opencode`
|
||||
|
||||
---
|
||||
|
||||
### Cline (CLI or VS Code)
|
||||
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
@@ -467,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
EOF
|
||||
```
|
||||
|
||||
**VS कोड मोड:**
|
||||
Cline एक्सटेंशन सेटिंग्स → API प्रदाता: `OpenAI Compatible` → बेस URL: `http://localhost:20128/v1`
|
||||
**VS Code mode:**
|
||||
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
|
||||
|
||||
या OmniRoute डैशबोर्ड का उपयोग करें → **CLI Tools → Cline → Apply Config**।
|
||||
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### KiloCode (CLI या VS कोड)
|
||||
### KiloCode (CLI or VS Code)
|
||||
|
||||
**CLI मोड:**
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
```
|
||||
|
||||
**VS कोड सेटिंग्स:**
|
||||
**VS Code settings:**
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -491,13 +223,13 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
}
|
||||
```
|
||||
|
||||
या OmniRoute डैशबोर्ड का उपयोग करें → **CLI Tools → KiloCode → Apply Config**।
|
||||
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### Continue (VS कोड एक्सटेंशन)
|
||||
### Continue (VS Code Extension)
|
||||
|
||||
`~/.continue/config.yaml` संपादित करें:
|
||||
Edit `~/.continue/config.yaml`:
|
||||
|
||||
```yaml
|
||||
models:
|
||||
@@ -509,244 +241,158 @@ models:
|
||||
default: true
|
||||
```
|
||||
|
||||
संपादन के बाद VS कोड को पुनः प्रारंभ करें।
|
||||
Restart VS Code after editing.
|
||||
|
||||
---
|
||||
|
||||
#### VS कोड इंसाइडर्स (`chatLanguageModels.json`)
|
||||
|
||||
जब VS कोड इंसाइडर्स को कस्टम एंडपॉइंट मॉडल के लिए कॉन्फ़िगर किया गया है और आप OmniRoute को बिना कस्टम हेडर फ़ील्ड के काम करना चाहते हैं, तो इसका उपयोग करें।
|
||||
|
||||
**सिफारिश की गई स्थान:**
|
||||
|
||||
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
|
||||
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
|
||||
|
||||
**टोकनयुक्त OmniRoute उपनाम का उपयोग करते हुए उदाहरण:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"vendor": "customendpoint",
|
||||
"id": "auto",
|
||||
"name": "OmniRoute Auto",
|
||||
"family": "gpt-4",
|
||||
"version": "1.0.0",
|
||||
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
|
||||
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
|
||||
"requestFormat": "openai-chat-completions",
|
||||
"contextWindow": 256000,
|
||||
"maxOutputTokens": 32768,
|
||||
"auth": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**नोट्स:**
|
||||
|
||||
- `sk-your-omniroute-key` को OmniRoute में बनाई गई API कुंजी से बदलें।
|
||||
- `url` फ़ील्ड को `/api/v1/vscode/{token}/chat/completions` की ओर इंगित करना चाहिए।
|
||||
- `modelsUrl` फ़ील्ड को `/api/v1/vscode/{token}/models` की ओर इंगित करना चाहिए।
|
||||
- जब क्लाइंट कस्टम हेडर का समर्थन करता है, तो सामान्य `/v1` + Bearer हेडर प्रवाह को प्राथमिकता दें।
|
||||
- URL-embedded टोकन संगतता बैकफॉल हैं और संपादक लॉग या प्रॉक्सी इतिहास में दिखाई दे सकते हैं।
|
||||
|
||||
---
|
||||
|
||||
#### Kiro CLI (Amazon)
|
||||
### Kiro CLI (Amazon)
|
||||
|
||||
```bash
|
||||
# अपने AWS/Kiro खाते में लॉगिन करें:
|
||||
# Login to your AWS/Kiro account:
|
||||
kiro-cli login
|
||||
|
||||
# CLI अपनी स्वयं की प्रमाणीकरण का उपयोग करता है — Kiro CLI के लिए OmniRoute की आवश्यकता नहीं है।
|
||||
# अन्य उपकरणों के लिए OmniRoute के साथ kiro-cli का उपयोग करें।
|
||||
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
|
||||
# Use kiro-cli alongside OmniRoute for other tools.
|
||||
kiro-cli status
|
||||
```
|
||||
|
||||
**Kiro IDE** डेस्कटॉप ऐप के लिए, OmniRoute द्वारा `/dashboard/cli-tools → Kiro` के तहत प्रदर्शित MITM एंडपॉइंट का उपयोग करें।
|
||||
---
|
||||
|
||||
## 10. आंतरिक OmniRoute CLI
|
||||
### Qwen Code (Alibaba)
|
||||
|
||||
`omniroute` बाइनरी सर्वर जीवनचक्र, सेटअप, डायग्नोस्टिक्स, और प्रदाता प्रबंधन के लिए कमांड प्रदान करता है। प्रवेश बिंदु: `bin/omniroute.mjs`।
|
||||
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
|
||||
|
||||
**Option 1: Environment variables (`~/.qwen/.env`)**
|
||||
|
||||
```bash
|
||||
omniroute # सर्वर शुरू करें (डिफ़ॉल्ट पोर्ट 20128)
|
||||
omniroute setup # इंटरैक्टिव सेटअप विज़ार्ड
|
||||
omniroute doctor # कॉन्फ़िग, DB, पोर्ट, रनटाइम की जांच करें
|
||||
omniroute providers list # कॉन्फ़िगर किए गए प्रदाता कनेक्शन
|
||||
omniroute providers test-all # हर सक्रिय कनेक्शन का परीक्षण करें
|
||||
omniroute reset-password # व्यवस्थापक पासवर्ड रीसेट करें
|
||||
omniroute logs # अनुरोध लॉग स्ट्रीम करें
|
||||
omniroute health # विस्तृत स्वास्थ्य (ब्रेकर्स, कैश, मेमोरी)
|
||||
omniroute --version # संस्करण प्रिंट करें
|
||||
omniroute --help # सभी कमांड दिखाएं
|
||||
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
|
||||
OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
OPENAI_MODEL="auto"
|
||||
EOF
|
||||
```
|
||||
|
||||
### सेटअप और प्रारंभिककरण
|
||||
**Option 2: `settings.json` with model providers**
|
||||
|
||||
```json
|
||||
// ~/.qwen/settings.json
|
||||
{
|
||||
"env": {
|
||||
"OPENAI_API_KEY": "sk-your-omniroute-key",
|
||||
"OPENAI_BASE_URL": "http://localhost:20128/v1"
|
||||
},
|
||||
"modelProviders": {
|
||||
"openai": [
|
||||
{
|
||||
"id": "omniroute-default",
|
||||
"name": "OmniRoute (Auto)",
|
||||
"envKey": "OPENAI_API_KEY",
|
||||
"baseUrl": "http://localhost:20128/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Option 3: Inline CLI flags**
|
||||
|
||||
```bash
|
||||
omniroute setup # इंटरैक्टिव सेटअप विज़ार्ड
|
||||
omniroute setup --non-interactive # CI/स्वचालन मोड (env vars + फ्लैग पढ़ता है)
|
||||
omniroute setup --password '<value>' # सीधे व्यवस्थापक पासवर्ड सेट करें
|
||||
omniroute setup --add-provider \
|
||||
--provider openai \
|
||||
--api-key '<value>' \
|
||||
--test-provider # एक ही बार में प्रदाता जोड़ें और परीक्षण करें
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1" \
|
||||
OPENAI_API_KEY="sk-your-omniroute-key" \
|
||||
OPENAI_MODEL="auto" \
|
||||
qwen
|
||||
```
|
||||
|
||||
गैर-इंटरैक्टिव सेटअप के लिए मान्यता प्राप्त पर्यावरण चर:
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain.
|
||||
|
||||
| Var | उद्देश्य |
|
||||
| ------------------- | -------------------------------------------------------------------- |
|
||||
| `OMNIROUTE_API_KEY` | प्रदाता API कुंजी (कमांडर `.env()` के माध्यम से `--api-key` से बंधी) |
|
||||
| `DATA_DIR` | OmniRoute डेटा निर्देशिका को ओवरराइड करें |
|
||||
**Test:** `qwen "say hello"`
|
||||
|
||||
अन्य सभी गैर-इंटरैक्टिव इनपुट को फ्लैग के रूप में पास किया जाता है, पर्यावरण चर के रूप में नहीं:
|
||||
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
|
||||
(ऊपर `omniroute setup` विकल्प देखें)।
|
||||
### Cursor (Desktop App)
|
||||
|
||||
### डायग्नोस्टिक्स
|
||||
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
|
||||
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
|
||||
|
||||
```bash
|
||||
omniroute doctor # कॉन्फ़िग, DB, पोर्ट, रनटाइम, मेमोरी, जीवितता की जांच करें
|
||||
omniroute doctor --json # मशीन-पठनीय JSON
|
||||
omniroute doctor --no-liveness # HTTP स्वास्थ्य जांच छोड़ें
|
||||
omniroute doctor --host 0.0.0.0 # जीवितता होस्ट को ओवरराइड करें
|
||||
omniroute doctor --liveness-url <url> # पूर्ण स्वास्थ्य एंडपॉइंट URL ओवरराइड
|
||||
```
|
||||
Via GUI: **Settings → Models → OpenAI API Key**
|
||||
|
||||
डॉक्टर ये जांच करता है: `कॉन्फ़िग`, `डेटाबेस`, `स्टोरेज/एन्क्रिप्शन`,
|
||||
`पोर्ट उपलब्धता`, `नोड रनटाइम`, `नेटिव बाइनरी` (better-sqlite3),
|
||||
`मेमोरी`, और `सर्वर जीवितता`। यदि कोई जांच `फेल` है तो यह गैर-शून्य पर समाप्त होता है।
|
||||
|
||||
### प्रदाता प्रबंधन
|
||||
|
||||
```bash
|
||||
omniroute providers available # OmniRoute प्रदाता कैटलॉग
|
||||
omniroute providers available --search openai # आईडी/नाम/उपनाम/श्रेणी द्वारा कैटलॉग को फ़िल्टर करें
|
||||
omniroute providers available --category api-key # श्रेणी द्वारा फ़िल्टर करें (api-key, oauth, free, ...)
|
||||
omniroute providers available --json # मशीन-पठनीय JSON
|
||||
|
||||
omniroute providers list # कॉन्फ़िगर किए गए प्रदाता कनेक्शन
|
||||
omniroute providers list --json
|
||||
|
||||
omniroute providers test <id|name> # एक कॉन्फ़िगर किए गए कनेक्शन का परीक्षण करें
|
||||
omniroute providers test-all # हर सक्रिय कनेक्शन का परीक्षण करें
|
||||
omniroute providers validate # स्थानीय-केवल संरचनात्मक मान्यता
|
||||
omniroute providers add <provider> --credential-env PROVIDER_KEY
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth <provider> # मौजूदा OAuth प्रवाह
|
||||
omniroute providers edit <id|name> --default-model <model>
|
||||
omniroute providers remove <id|name> --yes
|
||||
```
|
||||
|
||||
`providers add/import/auth/edit/remove` API-प्रथम हैं और इसलिए सक्रिय स्थानीय या दूरस्थ संदर्भ के खिलाफ काम करते हैं। क्रेडेंशियल इनपुट को `--credential-stdin` या `--credential-env` का उपयोग करना चाहिए; `--dry-run --json` केवल छिपी हुई उपस्थिति/आकार की रिपोर्ट करता है। `providers available` OmniRoute कैटलॉग को पढ़ता है; `providers list/test/test-all/validate` अपनी स्थानीय SQLite व्यवहार को बनाए रखते हैं और सर्वर के चलने की आवश्यकता नहीं होती है।
|
||||
|
||||
### पुनर्प्राप्ति और रीसेट
|
||||
|
||||
```bash
|
||||
omniroute reset-password # व्यवस्थापक पासवर्ड रीसेट करें (अन्य: omniroute-reset-password)
|
||||
omniroute reset-encrypted-columns # एन्क्रिप्टेड क्रेडेंशियल रीसेट के लिए चेतावनी + ड्राई-रन दिखाएं
|
||||
omniroute reset-encrypted-columns --force # वास्तव में SQLite में एन्क्रिप्टेड क्रेडेंशियल को शून्य करें
|
||||
```
|
||||
|
||||
### क्रेडेंशियल निर्यात (⚠ सावधानी से संभालें)
|
||||
|
||||
```bash
|
||||
omniroute auth export # चेतावनी + पुष्टि गेट दिखाएं — कोई DB एक्सेस नहीं
|
||||
omniroute auth export --force # सभी कनेक्शनों के DECRYPTED क्रेडेंशियल को stdout पर JSON के रूप में निर्यात करें
|
||||
omniroute auth export --force --id <id> # केवल मिलान करने वाले कनेक्शन को निर्यात करें
|
||||
omniroute auth export --force --format env # OMNIROUTE_<PROVIDER>_<FIELD>=<value> पंक्तियाँ उत्पन्न करें
|
||||
omniroute auth export --force --out creds.json # एक फ़ाइल में लिखें (0600 अनुमतियों के साथ बनाई गई)
|
||||
```
|
||||
|
||||
`auth export` **स्थानीय-केवल** है (प्रत्यक्ष SQLite पढ़ें, कोई HTTP मार्ग नहीं) और जानबूझकर **प्लेनटेक्स्ट** `apiKey`/`accessToken`/`refreshToken`/`idToken` मानों को प्रिंट/लिखता है — यह विशेषता है, बग नहीं। बिना `--force` के कुछ भी डेटाबेस से नहीं पढ़ा जाता है, और कुछ भी डिक्रिप्ट नहीं किया जाता है। किसी भी प्लेनटेक्स्ट को उत्पन्न करने से पहले हमेशा एक stderr चेतावनी बैनर प्रिंट होता है। `STORAGE_ENCRYPTION_KEY` सेट होना आवश्यक है। एक फ़ील्ड जो डिक्रिप्ट करने में विफल होती है (पुराना कुंजी, भ्रष्ट ciphertext) को `"<field>DecryptFailed: true"` के रूप में रिपोर्ट किया जाता है, न कि पूरे निर्यात को रोकने या अंतर्निहित त्रुटि को लीक करने के लिए।
|
||||
|
||||
### अन्य उपकमांड
|
||||
|
||||
ये एक चल रहे OmniRoute सर्वर को मानते हैं, जब तक कि अन्यथा नोट न किया गया हो:
|
||||
|
||||
```bash
|
||||
omniroute status # व्यापक रनटाइम स्थिति
|
||||
omniroute logs # अनुरोध लॉग स्ट्रीम करें (--json, --search, --follow)
|
||||
omniroute config show # वर्तमान कॉन्फ़िगरेशन प्रदर्शित करें
|
||||
|
||||
omniroute provider list # उपलब्ध प्रदाताओं की सूची (providers list का उपनाम)
|
||||
omniroute provider add # एक उपकरण पर प्रदाता के रूप में OmniRoute को पंजीकृत करें
|
||||
omniroute keys add | list | remove # API कुंजी प्रबंधित करें
|
||||
omniroute models [provider] # मॉडल सूचीबद्ध करें (--json, --search)
|
||||
omniroute combo list | switch | create | delete
|
||||
|
||||
omniroute backup # कॉन्फ़िग + DB का स्नैपशॉट
|
||||
omniroute restore # पिछले स्नैपशॉट से पुनर्स्थापित करें
|
||||
|
||||
omniroute health # विस्तृत स्वास्थ्य (ब्रेकर्स, कैश, मेमोरी)
|
||||
omniroute quota # प्रदाता कोटा उपयोग
|
||||
omniroute cache # कैश स्थिति
|
||||
omniroute cache clear # सेमांटिक + सिग्नेचर कैश साफ करें
|
||||
|
||||
omniroute mcp status | restart # MCP सर्वर स्थिति / पुनः प्रारंभ
|
||||
omniroute a2a status | card # A2A सर्वर स्थिति / एजेंट कार्ड
|
||||
|
||||
omniroute tunnel list | create | stop # टनल प्रबंधित करें (cloudflare/tailscale/ngrok)
|
||||
omniroute env show | get <k> | set <k> <v> # env vars का निरीक्षण / सेट करें (अस्थायी)
|
||||
|
||||
omniroute test # प्रदाता कनेक्टिविटी स्मोक टेस्ट
|
||||
omniroute update # अपडेट के लिए जांचें
|
||||
omniroute completion # शेल पूर्णता उत्पन्न करें
|
||||
```
|
||||
|
||||
### सामान्य फ्लैग
|
||||
|
||||
| फ्लैग | विवरण |
|
||||
| ------------------- | ---------------------------------------------------------- |
|
||||
| `--no-open` | प्रारंभ पर ब्राउज़र को स्वचालित रूप से न खोलें |
|
||||
| `--port <n>` | API पोर्ट को ओवरराइड करें (डिफ़ॉल्ट 20128) |
|
||||
| `--mcp` | stdio के माध्यम से MCP सर्वर के रूप में चलाएँ (IDE के लिए) |
|
||||
| `--non-interactive` | CI मोड (कोई संकेत नहीं; env/flags से पढ़ता है) |
|
||||
| `--json` | मशीन-पठनीय JSON आउटपुट (doctor, providers, आदि) |
|
||||
| `--help`, `-h` | कमांड-विशिष्ट सहायता दिखाएं |
|
||||
| `--version`, `-v` | स्थापित संस्करण प्रिंट करें |
|
||||
- Base URL: `https://your-domain.com/v1`
|
||||
- API Key: your OmniRoute key
|
||||
|
||||
---
|
||||
|
||||
## उपलब्ध API एंडपॉइंट्स
|
||||
## Dashboard Auto-Configuration
|
||||
|
||||
| एंडपॉइंट | विवरण | उपयोग के लिए |
|
||||
| -------------------------- | ---------------------------------- | ------------------------------------------- |
|
||||
| `/v1/chat/completions` | मानक चैट (सभी प्रदाता) | सभी आधुनिक उपकरण |
|
||||
| `/v1/responses` | प्रतिक्रियाएँ API (OpenAI प्रारूप) | कोडेक्स, एजेंटिक वर्कफ़्लो |
|
||||
| `/v1/completions` | विरासत टेक्स्ट पूर्णताएँ | पुराने उपकरण जो `prompt:` का उपयोग करते हैं |
|
||||
| `/v1/embeddings` | टेक्स्ट एम्बेडिंग | RAG, खोज |
|
||||
| `/v1/images/generations` | छवि निर्माण | GPT-Image, फ्लक्स, आदि |
|
||||
| `/v1/audio/speech` | टेक्स्ट-से-भाषण | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | भाषण-से-टेक्स्ट | Deepgram, AssemblyAI |
|
||||
The OmniRoute dashboard automates configuration for most tools:
|
||||
|
||||
पेस्ट करने के लिए तैयार उदाहरणों के साथ एक टोकनयुक्त OmniRoute URL:
|
||||
1. Go to `http://localhost:20128/dashboard/cli-tools`
|
||||
2. Expand any tool card
|
||||
3. Select your API key from the dropdown
|
||||
4. Click **Apply Config** (if tool is detected as installed)
|
||||
5. Or copy the generated config snippet manually
|
||||
|
||||
```txt
|
||||
Token example: sk-a3ab3c080beaee3a-69f4a4-070d71af
|
||||
---
|
||||
|
||||
Standard OpenAI base: http://localhost:20128/v1
|
||||
VS Code models: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
|
||||
VS Code chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
|
||||
VS Code responses: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
|
||||
Ollama tags: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
|
||||
Ollama chat: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
|
||||
```
|
||||
## Built-in Agents: Droid & OpenClaw
|
||||
|
||||
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
|
||||
They run as internal routes and use OmniRoute's model routing automatically.
|
||||
|
||||
- Access: `http://localhost:20128/dashboard/agents`
|
||||
- Configure: same combos and providers as all other tools
|
||||
- No API key or CLI install required
|
||||
|
||||
---
|
||||
|
||||
## Available API Endpoints
|
||||
|
||||
| Endpoint | Description | Use For |
|
||||
| -------------------------- | ----------------------------- | --------------------------- |
|
||||
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
|
||||
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
|
||||
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
|
||||
| `/v1/embeddings` | Text embeddings | RAG, search |
|
||||
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
|
||||
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
|
||||
|
||||
---
|
||||
|
||||
## समस्या निवारण
|
||||
|
||||
| त्रुटि | कारण | समाधान |
|
||||
| -------------------------------------------- | ------------------------ | ------------------------------------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute चल नहीं रहा | `omniroute serve` |
|
||||
| `401 Unauthorized` | गलत API कुंजी | `/dashboard/api-manager` में जांचें |
|
||||
| `No combo configured` | कोई सक्रिय रूटिंग कॉम्बो | `/dashboard/combos` में सेट करें |
|
||||
| CLI shows "not installed" | बाइनरी PATH में नहीं है | `which <command>` में जांचें |
|
||||
| Dashboard shows "not detected" after install | कैश पुराना | डैशबोर्ड में "⟳ Refresh detection" पर क्लिक करें |
|
||||
| पुराना लिंक `/dashboard/cli-tools` | Pre-v3.8.6 बुकमार्क | स्वचालित रूप से `/dashboard/cli-code` (308) पर पुनर्निर्देशित किया गया |
|
||||
| पुराना लिंक `/dashboard/agents` | Pre-v3.8.6 बुकमार्क | स्वचालित रूप से `/dashboard/acp-agents` (308) पर पुनर्निर्देशित किया गया |
|
||||
| Error | Cause | Fix |
|
||||
| ------------------------- | ----------------------- | ------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
|
||||
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
|
||||
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
|
||||
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
|
||||
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
|
||||
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup Script (One Command)
|
||||
|
||||
```bash
|
||||
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
|
||||
OMNIROUTE_URL="http://localhost:20128/v1"
|
||||
OMNIROUTE_KEY="sk-your-omniroute-key"
|
||||
|
||||
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
|
||||
|
||||
# Kiro CLI
|
||||
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
|
||||
|
||||
# Write configs
|
||||
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
|
||||
|
||||
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
|
||||
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
|
||||
cat >> ~/.bashrc << EOF
|
||||
export OPENAI_BASE_URL="$OMNIROUTE_URL"
|
||||
export OPENAI_API_KEY="$OMNIROUTE_KEY"
|
||||
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
|
||||
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
|
||||
EOF
|
||||
|
||||
source ~/.bashrc
|
||||
echo "✅ All CLIs installed and configured for OmniRoute"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
# CLI-INTEGRATIONS (Magyar)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "CLI Integrációk — bármilyen kódoló CLI irányítása az OmniRoute-ra"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# CLI Integrációk
|
||||
|
||||
Az OmniRoute egy sor `setup-*` parancsot kínál, amelyek egy kódoló CLI-t (Codex, Claude Code, OpenCode, Cline, …) konfigurálnak, hogy az OmniRoute-ot használja háttérként — így az eszköz **egy** végponthoz kapcsolódik, és az OmniRoute a megfelelő szolgáltatóhoz irányít automatikus visszaeséssel. Minden parancs a **valós idejű** modell katalógust olvassa egy futó OmniRoute-ból (helyi vagy távoli), és a saját konfigurációs fájlját írja a **te** gépedre. Az API kulcsot egy környezeti változó hivatkozza, ahol az eszköz támogatja azt. Az alábbiakban a helyi környezeti fájlt megőrző parancsok találhatók.
|
||||
|
||||
Van egy általános indító is — `omniroute run <target>` — amely elindítja a `claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` vagy `gemini` eszközöket a megfelelő környezettel, anélkül, hogy bármilyen konfigurációt írna. A célok és azok aliasai a kanonikus manifestből származnak `bin/cli/cli-manifest.mjs` (`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`, `open-code`, `qwen-code`, `gemini-cli`), és az `omniroute completion` ugyanazokat a manifestből származó cél szavakat kínálja. A régi, eszközspecifikus indítók — `omniroute launch` (Claude Code) és `omniroute launch-codex` (Codex) — továbbra is elérhetők.
|
||||
|
||||
A szolgáltatók bevezetése ugyanabból a helyi/távoli kontextusból elérhető. Az alábbi API-első parancsok elkülönítik a kezelési hitelesítést a szolgáltató hitelesítő adataitól, és soha nem nyomtatnak ki hitelesítő adatokat strukturált kimenetben:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
A szkriptekhez a `--credential-stdin` vagy `--credential-env` használatát javasoljuk; a `--credential` a helyi, kontrollált használatra marad meg. A `providers remove` parancs `--yes`-t igényel nem interaktív terminálon, és mind az öt parancs tiszteletben tartja az aktív kontextust vagy a globális `--base-url`/`--api-key` opciókat.
|
||||
|
||||
A két leggazdagabb integráció egyszeri, kézzel írt alapbeállításához lásd az eszközspecifikus mélymerüléseket:
|
||||
|
||||
- [Claude Code konfiguráció](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [Codex CLI konfiguráció](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [Távoli Mód](./REMOTE-MODE.md) — vezérelj egy távoli OmniRoute-ot (VPS / Tailnet) a laptopodról
|
||||
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — az OmniCopilot kiterjesztés; ez is képes futtatni ezeket a `setup-*` parancsokat az editoron belül
|
||||
|
||||
---
|
||||
|
||||
## Fő táblázat
|
||||
|
||||
Minden parancs tiszteletben tartja az **aktív kontextust** (amelyet az `omniroute connect`-tel állítanak be, lásd [Távoli Mód](./REMOTE-MODE.md)) vagy az explicit `--remote <url> --api-key <key>` zászlókat. Az alábbi "Helyi vs távoli" azt jelenti: zászlók nélkül a `http://localhost:20128` címet célozza meg; `--remote` (vagy egy aktív távoli kontextus) esetén a katalógust onnan szerzi be, és helyben írja a konfigurációt.
|
||||
|
||||
| Parancs | Eszköz | Amit ír | Kulcs zászlók | Helyi vs távoli |
|
||||
| -------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — egy profil minden kompatibilis szövegmintához (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Mindkettő |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — egy profil minden egyező modellhez (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Mindkettő |
|
||||
| `omniroute setup-opencode` | OpenCode (openai-kompatibilis) | `~/.config/opencode/opencode.json` — `omniroute` szolgáltató minden katalógus modellel (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Mindkettő |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (CLI mód) + nyomtatja a VS Code kiterjesztés beállításait | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Mindkettő |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + egyesíti a `kilocode.*` fájlokat a VS Code `settings.json`-ba, ha létezik | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Mindkettő |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — `provider: openai` modellek, kulcs a `${{ secrets.OMNIROUTE_API_KEY }}` által | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Mindkettő |
|
||||
| `omniroute setup-cursor` | Cursor | Semmi — nyomtatja az alkalmazáson belüli lépéseket (Cursor konfigurációja átláthatatlan SQLite) | `--remote` `--api-key` `--only` `--port` | Mindkettő |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (import doc) + beállítja a `roo-cline.autoImportSettingsPath`-t, ha létezik egy VS Code `settings.json` fájl | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Mindkettő |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — `openai-compat` szolgáltató, kulcs a `$OMNIROUTE_API_KEY` által | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Mindkettő |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + nyomtatja a környezeti receptet | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Mindkettő |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + nyomtatja a környezeti receptet | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Mindkettő |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — V4 `modelProviders.openai` tömb + `OMNIROUTE_API_KEY` a `~/.qwen/.env` fájlban | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Mindkettő |
|
||||
| `omniroute run <target>` | Futási indítás (általános) | Semmi — elindítja a `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` eszközöket a megfelelő környezettel és argumentumokkal; a Qwen és a Gemini ideiglenes, elszigetelt otthont használnak | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Mindkettő |
|
||||
| `omniroute launch` | Claude Code | Semmi — elindítja a `claude`-t az `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` injektálásával | `--remote` `--api-key` `--token` `--profile` `--port` | Mindkettő |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | Semmi — elindítja a `codex`-t az `omniroute` szolgáltató injektálásával `-c` zászlók segítségével | `--remote` `--api-key` `--profile` (`-p`) `--port` | Mindkettő |
|
||||
|
||||
Zászlók megjegyzései (ellenőrizve a parancs forrásában):
|
||||
|
||||
- `--remote <url>` — a katalógust egy távoli OmniRoute-ból szerzi be (felülírja a `--port`-ot és az aktív kontextust). A `--api-key <key>` biztosítja a hitelesítő adatokat a szerverhez (alapértelmezés szerint az `OMNIROUTE_API_KEY` környezeti változót, vagy az aktív kontextus tokenjét használja).
|
||||
- `--only <patterns>` — vesszővel elválasztott részstringek; csak azokat a modell azonosítókat tartja meg, amelyek egyeznek (pl. `--only glm,kimi`). Elérhető a `setup-codex`, `setup-claude`, `setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush` parancsoknál.
|
||||
- `--dry-run` — pontosan azt nyomtatja ki, ami íródna, anélkül, hogy a fájlrendszert megérintené. Minden `setup-*` parancsnál elérhető **kivéve** a `setup-cursor`-t (amely soha nem ír fájlt).
|
||||
- `--model <id>` — kötelező (vagy interaktívan kiválasztott) azoknál az eszközöknél, amelyek nem rendelkeznek automatikus modell felfedezéssel: Cline, Kilo, Roo, Goose, Qwen, Aider. Ezek az eszközök a `--yes`-t is elfogadják nem interaktív futtatásokhoz (ami akkor `--model`-t igényel). A `setup-opencode` a `--model`-t használja az alapértelmezett legfelső szintű modell beállításához.
|
||||
- A `--model <id>` az `omniroute run` parancsnál követi a manifest per-cél vezetékezését (`bin/cli/cli-manifest.mjs`): **aider** a `--model openai/<id>`-t, **opencode** a `--model omniroute/<id>`-t kap (a prefix csak akkor kerül hozzáadásra, ha az azonosító nem tartalmazza azt); **qwen** és **gemini** az azonosítót szó szerint kapja; **claude** az `ANTHROPIC_MODEL`-on keresztül, **goose** a `GOOSE_MODEL`-on keresztül, és **codex** a `-c model_providers.omniroute.*` argumentumokon keresztül. **A Qwen az egyetlen futási cél, amely kifejezetten megköveteli a `--model`-t** — az `omniroute run qwen` nélküle `2`-t ad vissza egy explicit hibával.
|
||||
- `--port <port>` — helyi OmniRoute port (alapértelmezett `20128`, figyelmen kívül hagyva, ha a `--remote` be van állítva). Minden `setup-*` és mindkét indító esetén jelen van.
|
||||
- Az `omniroute run` kilépési kódok: a gyermek CLI saját kilépési kódja verbatim módon propagálódik; `2` = érvénytelen argumentumok (támogatott cél hiánya, kötelező `--model` hiánya, konténer őr); `127` = a cél bináris nem található a `PATH`-ban; `130`/`143`/`129` amikor a launch-t a `SIGINT`/`SIGTERM`/`SIGHUP` zárja le; `1` = egyéb futási indítási hiba.
|
||||
- A két indító (`launch`, `launch-codex`) elfogadja a `--profile <name>`-t, hogy kiválasszon egy profilt, amelyet a `setup-claude` / `setup-codex` írt, plusz átjáró argumentumokat az alapul szolgáló `claude` / `codex` bináris számára.
|
||||
|
||||
Az interaktív választó a beállítási receptekhez is megosztott:
|
||||
|
||||
```bash
|
||||
# Válassz az aktív helyi vagy távoli modell katalógusból, és konfiguráld a célt.
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
A `configure` jelenleg a tesztelt receptekhez delegál a `codex`, `claude`, `opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, és `kilo` esetében. Az IDE-hez tartozó, MITM, és csak útmutató katalógus bejegyzések továbbra is explicit `setup-*`/kézi folyamatok, és nem jelennek meg indítható célokként.
|
||||
|
||||
> A `setup-opencode` a **könnyű openai-kompatibilis** OpenCode integráció.
|
||||
> Van egy gazdagabb plugin integráció is — `omniroute setup opencode` — amely
|
||||
> telepíti az `@omniroute/opencode-plugin`-t. Ezek különböző parancsok; a fenti táblázat a `setup-opencode`-t dokumentálja.
|
||||
|
||||
---
|
||||
|
||||
## Helyi használat
|
||||
|
||||
Az OmniRoute `localhost:20128` címen fut, csak futtasd a beállító parancsot az eszközödhöz. A katalógus a helyi szerverről kerül lekérésre.
|
||||
|
||||
```bash
|
||||
# Codex: írj egy profilt a megfelelő modellhez a ~/.codex/ könyvtárba
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # használd a generált profilt
|
||||
|
||||
# Claude Code: írj modellenkénti profilokat, majd indíts egyet
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: írd az openai-kompatibilis szolgáltatót az összes katalógusmodellel
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # hivatkozva {env:OMNIROUTE_API_KEY}, soha nem lemezen
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# Az automatikus felfedezéssel nem rendelkező eszközöknek explicit modell szükséges:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# Előnézet írás nélkül:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
Indítás írás nélkül (csak környezeti injekció):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → helyi OmniRoute
|
||||
omniroute launch-codex # Codex CLI → helyi OmniRoute
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "válasz OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "válasz OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "válasz OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "válasz OK"
|
||||
|
||||
# Explicit parancs útvonal: átad minden, ami a -- után jön
|
||||
omniroute run claude -- --print-system-prompt "ellenőrizd ezt a diffet"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Távoli használat
|
||||
|
||||
Bármely beállító parancsot irányíts egy távoli OmniRoute-ra `--remote` + `--api-key` használatával. A katalógus a távoli szerverről kerül lekérésre; a konfiguráció a helyi gépeden kerül írásra.
|
||||
|
||||
```bash
|
||||
# OpenCode távoli VPS ellen, csak glm/kimi modellek megtartása
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # először exportáld az OMNIROUTE_API_KEY-t
|
||||
|
||||
# Codex profilok egy távoli katalógusból
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# CLI indítása közvetlenül a távoli ellen
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
A `--remote`/`--api-key` átadása helyett egyszer jelentkezz be, és hagyd, hogy az **aktív kontextus** automatikusan biztosítsa őket:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # létrehoz egy hatókörös tokent, tárolja a kontextust
|
||||
omniroute setup-codex # ← most a távoli katalógust használja
|
||||
omniroute setup-opencode # ← ugyanaz
|
||||
omniroute launch # ← Claude Code a távoli ellen
|
||||
```
|
||||
|
||||
Lásd a [Távoli Mód](./REMOTE-MODE.md) dokumentációt a kontextusok, hatókörök és token kezelésről.
|
||||
|
||||
---
|
||||
|
||||
## Alap URL konvenciók (mely eszközök akarják a `/v1`-et)
|
||||
|
||||
Az OmniRoute az OpenAI felületet a `/v1`-en, az Anthropic felületet a gyökérnél, és egy natív Gemini felületet a `/v1beta`-n kínál. Minden integráció a formátumhoz van kötve, amit az eszköz elvár (ellenőrizve a parancs forrásában):
|
||||
|
||||
| Integráció | Alap URL írása | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | -------------- | -------------------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | gyökér | Nem — Cline hozzáfűzi a `/v1/chat/completions`-t |
|
||||
| `setup-goose` (`OPENAI_HOST`) | gyökér | Nem — Goose hozzáfűzi az útvonalat |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | gyökér | Nem — LiteLLM hozzáfűzi a `/v1/chat/completions`-t |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | `/v1`-el | Igen |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | gyökér | Nem — Claude Code hozzáfűzi a `/v1/messages`-t |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | `/v1`-el | Igen |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | `/v1`-el | Igen |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | gyökér | Nem — az SDK hozzáfűzi a `/v1beta/models/…`-t |
|
||||
|
||||
---
|
||||
|
||||
## A natív függőségek frissítése: `--include=optional`
|
||||
|
||||
Amikor frissítesz az `omniroute update` paranccsal (miután megerősítetted, vagy a `--apply` használatával),
|
||||
az OmniRoute a frissítést `--include=optional` opcióval futtatja:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Ez **nem** egy olyan zászló, amelyet az `omniroute update` parancshoz adsz — ez mindig alkalmazásra kerül a
|
||||
frissítő által. Garantálja, hogy az `optionalDependencies` (`better-sqlite3`, `keytar`,
|
||||
`tls-client`, az LLMLingua SLM stack) megmarad a frissítés során, még akkor is, ha az npm konfigurációd
|
||||
`omit=optional` beállítással rendelkezik, ami egyébként csendben eltávolítaná a natív SQLite
|
||||
illesztőt és az OS-kulcstartó kötést. Az pontos parancs előnézetéhez anélkül, hogy alkalmaznád:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] Futna: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Más `omniroute update` zászlók (forrásban ellenőrizve): `--check` (1-es kilépés, ha
|
||||
elavult), `--apply` (telepítés kérdés nélkül), `--changelog`, `--no-backup`,
|
||||
`--yes`.
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI az `omniroute run gemini` segítségével
|
||||
|
||||
A szerződés ellenőrizve az `@google/gemini-cli` 0.50.0 verzióval: a CLI tiszteletben tartja
|
||||
`GOOGLE_GEMINI_BASE_URL`-t, és `POST /v1beta/models/<model>:generateContent`
|
||||
(és `:streamGenerateContent?alt=sse`) kéréseket küld rá — pontosan az OmniRoute natív
|
||||
Gemini felületének (`/v1beta`) megfelelően. Az `omniroute run gemini` ezt automatikusan összeköti:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → az aktív OmniRoute alap URL (gyökér, nincs `/v1`);
|
||||
- `GEMINI_API_KEY` → a megoldott OmniRoute hitelesítő (opció/env/környezet);
|
||||
- egy **ideiglenes elszigetelt `GEMINI_CLI_HOME`**, amelynek `.gemini/settings.json`
|
||||
a `gemini-api-key` hitelesítést választja, így egy tárolt Google OAuth munkamenet (Code Assist)
|
||||
soha nem írja felül az OmniRoute által irányított indítást — a kilépés után eltávolítva;
|
||||
- **környezeti higiénia**: a gyermek környezetből eltávolítva a `GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` és `GOOGLE_GENAI_USE_GCA` (amelyek az
|
||||
auth-ot a Vertex/Code Assist-ra irányítanák), és a `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key`
|
||||
beállítva van, mint egy biztonsági mentés — a többi `run` cél ugyanazt a kezelést kapja
|
||||
a saját ellentmondó változóikra;
|
||||
- `--model <id>` injekció a `--provider`/`--model`-ből.
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
A Gemini munkaterület-bizalom védelme továbbra is érvényes a fej nélküli módban — add meg
|
||||
a `--skip-trust`-ot (vagy bízz a könyvtárban interaktívan); az indító szándékosan nem kerüli meg ezt. Ez az indító különbözik a **ACP
|
||||
regisztrációtól** (`src/lib/acp/registry.ts`, `gemini --acp`), amely továbbra is az
|
||||
ügynök-protokoll integráció a `/dashboard/acp-agents` számára.
|
||||
|
||||
---
|
||||
|
||||
## Valódi füst teszt (opcionális)
|
||||
|
||||
Determinista indítási terv regressziós tesztek a CI-ben (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`). A VALÓDI binárisok érvényesítéséhez egy VALÓDI
|
||||
OmniRoute szerverrel, egy opcionális keretrendszer létezik a
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts` fájlban. Ez soha nem fut automatikusan
|
||||
(minden al-teszt átugrik, hacsak `RUN_CLI_SMOKE=1` nincs beállítva), a hitelesítőt környezeti változó
|
||||
NÉV-en keresztül adja át (soha nem értéken), eltávolítja a kulcsformájú karakterláncokat a rögzített kimenetből, átugorja
|
||||
azokat a célokat, amelyek binárisa nincs telepítve, és a hibákat auth / upstream / config
|
||||
kategóriákba sorolja, nem pedig egy egyszerű logikai értékként:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
Opcionális: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` korlátozza a tesztelést;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` felülírja a 120 másodperces célonkénti időkorlátot.
|
||||
|
||||
---
|
||||
|
||||
## Lásd még
|
||||
|
||||
- [Claude Code konfiguráció](./CLAUDE-CODE-CONFIGURATION.md) — a mélyebb Claude Code útmutató
|
||||
- [Codex CLI konfiguráció](./CODEX-CLI-CONFIGURATION.md) — az egyszeri `[model_providers.omniroute]` alapbeállítás
|
||||
- [Távvezérlő mód](./REMOTE-MODE.md) — kontextusok, terjedelmi hozzáférési tokenek, távoli szerver vezérlése
|
||||
- [CLI Eszközök hivatkozás](../reference/CLI-TOOLS.md) — a támogatott eszközök teljes katalógusa + irányítópult oldalak
|
||||
- [Telepítési útmutató](./SETUP_GUIDE.md) — telepítési módszerek és első indítási onboarding
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,318 +0,0 @@
|
||||
# CLI-INTEGRATIONS (Bahasa Indonesia)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [in](../../../in/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "Integrasi CLI — arahkan CLI pengkodean ke OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# Integrasi CLI
|
||||
|
||||
OmniRoute menyediakan serangkaian perintah `setup-*` yang mengonfigurasi CLI pengkodean
|
||||
(Codex, Claude Code, OpenCode, Cline, …) untuk menggunakan OmniRoute sebagai backend-nya — sehingga
|
||||
alat tersebut berbicara ke **satu** endpoint dan OmniRoute mengarahkan ke penyedia yang tepat dengan
|
||||
fallback otomatis. Setiap perintah membaca katalog model **langsung** dari OmniRoute yang berjalan
|
||||
(lokal atau jarak jauh) dan menulis file konfigurasi alat itu sendiri di **mesin Anda**. Kunci API dirujuk oleh variabel lingkungan di mana pun alat tersebut mendukungnya. Perintah yang mempertahankan file lingkungan lokal alat dicatat di bawah.
|
||||
|
||||
Ada juga peluncur generik — `omniroute run <target>` — yang memunculkan
|
||||
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` atau `gemini` dengan
|
||||
lingkungan yang tepat disuntikkan, tanpa menulis konfigurasi sama sekali. Target dan aliasnya berasal dari manifest kanonik `bin/cli/cli-manifest.mjs`
|
||||
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
|
||||
`open-code`, `qwen-code`, `gemini-cli`), dan `omniroute completion` menawarkan
|
||||
kata target yang sama yang berasal dari manifest. Peluncur per-alat yang lama —
|
||||
`omniroute launch` (Claude Code) dan `omniroute launch-codex` (Codex) — tetap
|
||||
tersedia.
|
||||
|
||||
Onboarding penyedia tersedia dari konteks lokal/remote yang sama. Perintah
|
||||
API-first di bawah ini menjaga otentikasi manajemen terpisah dari kredensial penyedia
|
||||
dan tidak pernah mencetak kredensial dalam output terstruktur:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
Untuk skrip, lebih baik menggunakan `--credential-stdin` atau `--credential-env`; `--credential`
|
||||
dipertahankan untuk penggunaan lokal yang terkontrol. `providers remove` memerlukan `--yes` pada terminal
|
||||
non-interaktif, dan semua lima perintah menghormati konteks aktif atau opsi global `--base-url`/`--api-key`.
|
||||
|
||||
Untuk pengaturan dasar satu kali yang ditulis tangan dari dua integrasi terkaya, lihat
|
||||
penjelasan mendalam per-alat:
|
||||
|
||||
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [Mode Jarak Jauh](./REMOTE-MODE.md) — mengendalikan OmniRoute jarak jauh (VPS / Tailnet) dari laptop Anda
|
||||
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ekstensi OmniCopilot; ini juga dapat menjalankan perintah
|
||||
`setup-*` ini untuk Anda dari dalam editor
|
||||
|
||||
---
|
||||
|
||||
## Tabel Master
|
||||
|
||||
Setiap perintah menghormati **konteks aktif** (diatur dengan `omniroute connect`, lihat
|
||||
[Mode Jarak Jauh](./REMOTE-MODE.md)) atau bendera eksplisit `--remote <url> --api-key <key>`.
|
||||
"Local vs remote" di bawah ini berarti: tanpa bendera, itu menargetkan `http://localhost:20128`;
|
||||
dengan `--remote` (atau konteks jarak jauh yang aktif) itu mengambil katalog dari server tersebut dan menulis konfigurasi secara lokal.
|
||||
|
||||
| Perintah | Alat | Apa yang ditulis | Bendera kunci | Local vs remote |
|
||||
| -------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — satu profil per model teks yang kompatibel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Keduanya |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — satu profil per model yang cocok (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Keduanya |
|
||||
| `omniroute setup-opencode` | OpenCode (kompatibel dengan openai) | `~/.config/opencode/opencode.json` — penyedia `omniroute` dengan setiap model katalog (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Keduanya |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mode CLI) + mencetak pengaturan ekstensi VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Keduanya |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + menggabungkan `kilocode.*` ke dalam `settings.json` VS Code jika ada | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Keduanya |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — model `provider: openai`, kunci melalui `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-cursor` | Cursor | Tidak ada — mencetak langkah-langkah dalam aplikasi (konfigurasi Cursor tidak transparan SQLite) | `--remote` `--api-key` `--only` `--port` | Keduanya |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dokumen impor) + mengatur `roo-cline.autoImportSettingsPath` jika ada `settings.json` VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Keduanya |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — penyedia `openai-compat`, kunci melalui `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` di `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Keduanya |
|
||||
| `omniroute run <target>` | Peluncuran runtime (generik) | Tidak ada — memunculkan `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` dengan lingkungan dan argumen yang tepat; Qwen dan Gemini menggunakan rumah sementara yang terisolasi | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Keduanya |
|
||||
| `omniroute launch` | Claude Code | Tidak ada — memunculkan `claude` dengan `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` disuntikkan | `--remote` `--api-key` `--token` `--profile` `--port` | Keduanya |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | Tidak ada — memunculkan `codex` dengan penyedia `omniroute` disuntikkan melalui bendera `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Keduanya |
|
||||
|
||||
Catatan tentang bendera (diverifikasi dalam sumber perintah):
|
||||
|
||||
- `--remote <url>` — mengambil katalog dari OmniRoute jarak jauh (mengganti `--port`
|
||||
dan konteks aktif). `--api-key <key>` menyediakan kredensial untuk server tersebut
|
||||
(default ke variabel lingkungan `OMNIROUTE_API_KEY`, atau token konteks aktif).
|
||||
- `--only <patterns>` — substring yang dipisahkan koma; hanya menyimpan ID model yang cocok
|
||||
(misalnya `--only glm,kimi`). Tersedia pada `setup-codex`, `setup-claude`,
|
||||
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
|
||||
- `--dry-run` — mencetak persis apa yang akan ditulis tanpa menyentuh
|
||||
sistem file. Tersedia pada setiap perintah `setup-*` **kecuali** `setup-cursor`
|
||||
(yang tidak pernah menulis file).
|
||||
- `--model <id>` — diperlukan (atau dipilih secara interaktif) untuk alat yang tidak memiliki
|
||||
penemuan model otomatis: Cline, Kilo, Roo, Goose, Qwen, Aider. Alat-alat tersebut
|
||||
juga menerima `--yes` untuk eksekusi non-interaktif (yang kemudian memerlukan `--model`).
|
||||
`setup-opencode` mengambil `--model` untuk mengatur model tingkat atas default.
|
||||
- `--model <id>` pada `omniroute run` mengikuti pengkabelan per-target dari manifest
|
||||
(`bin/cli/cli-manifest.mjs`): **aider** menerima `--model openai/<id>` dan
|
||||
**opencode** `--model omniroute/<id>` (awalan hanya ditambahkan ketika id
|
||||
tidak sudah membawanya); **qwen** dan **gemini** menerima id apa adanya;
|
||||
**claude** mendapatkannya melalui `ANTHROPIC_MODEL`, **goose** melalui `GOOSE_MODEL`, dan
|
||||
**codex** melalui argumen `-c model_providers.omniroute.*`. **Qwen adalah satu-satunya target run
|
||||
yang secara keras memerlukan `--model`** — `omniroute run qwen` tanpa itu keluar
|
||||
`2` dengan kesalahan eksplisit.
|
||||
- `--port <port>` — port OmniRoute lokal (default `20128`, diabaikan saat `--remote`
|
||||
diatur). Tersedia pada semua `setup-*` dan kedua peluncur.
|
||||
- Kode keluar `omniroute run`: kode keluar CLI anak disebarkan
|
||||
apa adanya; `2` = argumen tidak valid (target tidak didukung, `--model` yang diperlukan hilang, penjaga kontainer); `127` = biner target tidak ada di `PATH`;
|
||||
`130`/`143`/`129` ketika peluncuran diakhiri oleh `SIGINT`/`SIGTERM`/`SIGHUP`;
|
||||
`1` = kegagalan peluncuran runtime lainnya.
|
||||
- Kedua peluncur (`launch`, `launch-codex`) menerima `--profile <name>` untuk memilih
|
||||
profil yang ditulis oleh `setup-claude` / `setup-codex`, plus argumen pass-through untuk
|
||||
biner `claude` / `codex` yang mendasarinya.
|
||||
|
||||
Pemilih interaktif juga dibagikan oleh resep pengaturan:
|
||||
|
||||
```bash
|
||||
# Pilih dari katalog model lokal atau jarak jauh yang aktif dan konfigurasikan target.
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
`configure` saat ini mendelegasikan ke resep yang diuji untuk `codex`, `claude`,
|
||||
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, dan `kilo`. Entri katalog yang hanya untuk IDE,
|
||||
MITM, dan panduan tetap menjadi alur `setup-*`/manual yang eksplisit dan
|
||||
tidak disajikan sebagai target yang dapat diluncurkan.
|
||||
|
||||
> `setup-opencode` adalah integrasi OpenCode **ringan yang kompatibel dengan openai**.
|
||||
> Ada juga integrasi plugin yang lebih kaya — `omniroute setup opencode` — yang
|
||||
> menginstal `@omniroute/opencode-plugin`. Mereka adalah perintah yang berbeda; tabel
|
||||
> di atas mendokumentasikan `setup-opencode`.
|
||||
|
||||
---
|
||||
|
||||
## Penggunaan lokal
|
||||
|
||||
Dengan OmniRoute berjalan di `localhost:20128`, cukup jalankan perintah setup untuk alat Anda. Katalog diambil dari server lokal.
|
||||
|
||||
```bash
|
||||
# Codex: tulis profil per model yang cocok ke ~/.codex/
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # gunakan profil yang dihasilkan
|
||||
|
||||
# Claude Code: tulis profil per model, lalu luncurkan satu
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: tulis penyedia yang kompatibel dengan openai dengan semua model katalog
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # dirujuk melalui {env:OMNIROUTE_API_KEY}, tidak pernah di disk
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# Alat tanpa penemuan otomatis memerlukan model eksplisit:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# Prabaca tanpa menulis apa pun:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
Luncurkan tanpa menulis konfigurasi sama sekali (hanya injeksi-env):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → OmniRoute lokal
|
||||
omniroute launch-codex # Codex CLI → OmniRoute lokal
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
|
||||
|
||||
# Jalur perintah eksplisit: lewati apa pun yang datang setelah --
|
||||
omniroute run claude -- --print-system-prompt "review this diff"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Penggunaan jarak jauh
|
||||
|
||||
Arahkan perintah setup apa pun ke OmniRoute jarak jauh dengan `--remote` + `--api-key`. Katalog diambil dari jarak jauh; konfigurasi ditulis di mesin lokal Anda.
|
||||
|
||||
```bash
|
||||
# OpenCode terhadap VPS jarak jauh, simpan hanya model glm/kimi
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # ekspor OMNIROUTE_API_KEY terlebih dahulu
|
||||
|
||||
# Profil Codex dari katalog jarak jauh
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# Luncurkan CLI langsung terhadap jarak jauh
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
Alih-alih melewatkan `--remote`/`--api-key` setiap kali, masuk sekali dan biarkan **konteks aktif** menyediakannya secara otomatis:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # membuat token terikat, menyimpan konteks
|
||||
omniroute setup-codex # ← sekarang menggunakan katalog jarak jauh
|
||||
omniroute setup-opencode # ← sama
|
||||
omniroute launch # ← Claude Code terhadap jarak jauh
|
||||
```
|
||||
|
||||
Lihat [Mode Jarak Jauh](./REMOTE-MODE.md) untuk konteks, cakupan, dan manajemen token.
|
||||
|
||||
---
|
||||
|
||||
## Konvensi URL Dasar (alat mana yang menginginkan `/v1`)
|
||||
|
||||
OmniRoute mengekspos permukaan OpenAI di `/v1`, permukaan Anthropic di root, dan permukaan Gemini asli di `/v1beta`. Setiap integrasi terhubung ke bentuk yang diharapkan alatnya (diverifikasi dalam sumber perintah):
|
||||
|
||||
| Integrasi | URL Dasar yang ditulis | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | root | Tidak — Cline menambahkan `/v1/chat/completions` |
|
||||
| `setup-goose` (`OPENAI_HOST`) | root | Tidak — Goose menambahkan jalur |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | root | Tidak — LiteLLM menambahkan `/v1/chat/completions` |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | dengan `/v1` | Ya |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Tidak — Claude Code menambahkan `/v1/messages` |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | dengan `/v1` | Ya |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | dengan `/v1` | Ya |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Tidak — SDK menambahkan `/v1beta/models/…` |
|
||||
|
||||
---
|
||||
|
||||
## Menjaga dependensi native saat pembaruan: `--include=optional`
|
||||
|
||||
Saat Anda memperbarui dengan `omniroute update` (setelah mengonfirmasi, atau dengan `--apply`),
|
||||
OmniRoute menjalankan instalasi dengan `--include=optional` yang sudah terintegrasi:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Ini **bukan** sebuah flag yang Anda berikan ke `omniroute update` — ini selalu diterapkan oleh
|
||||
updater. Ini menjamin bahwa `optionalDependencies` (`better-sqlite3`, `keytar`,
|
||||
`tls-client`, tumpukan LLMLingua SLM) bertahan setelah pembaruan meskipun konfigurasi npm Anda
|
||||
memiliki `omit=optional` yang akan secara diam-diam menghapus driver SQLite native
|
||||
dan binding OS-keyring. Untuk melihat perintah yang tepat tanpa menerapkannya:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] Akan menjalankan: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Flag `omniroute update` lainnya (terverifikasi dalam sumber): `--check` (keluar 1 jika
|
||||
kadaluwarsa), `--apply` (instal tanpa meminta), `--changelog`, `--no-backup`,
|
||||
`--yes`.
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI melalui `omniroute run gemini`
|
||||
|
||||
Kontrak diverifikasi terhadap `@google/gemini-cli` 0.50.0: CLI menghormati
|
||||
`GOOGLE_GEMINI_BASE_URL` dan mengeluarkan `POST /v1beta/models/<model>:generateContent`
|
||||
(dan `:streamGenerateContent?alt=sse`) terhadapnya — persis seperti permukaan
|
||||
Gemini native OmniRoute (`/v1beta`). `omniroute run gemini` menghubungkan itu secara otomatis:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → URL dasar OmniRoute yang aktif (root, tanpa `/v1`);
|
||||
- `GEMINI_API_KEY` → kredensial OmniRoute yang terpecahkan (opsi/env/konteks);
|
||||
- **sebuah `GEMINI_CLI_HOME` yang terisolasi sementara** yang `.gemini/settings.json`
|
||||
memilih otentikasi `gemini-api-key`, sehingga sesi Google OAuth yang disimpan (Code Assist)
|
||||
tidak pernah menggantikan peluncuran yang diarahkan oleh OmniRoute — dihapus setelah keluar;
|
||||
- **kebersihan env**: lingkungan anak dibersihkan dari `GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` dan `GOOGLE_GENAI_USE_GCA` (yang akan mengalihkan
|
||||
otentikasi ke Vertex/Code Assist), dan `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` diatur
|
||||
sebagai cadangan — target `run` lainnya mendapatkan perlakuan yang sama untuk variabel yang
|
||||
bertentangan;
|
||||
- injeksi `--model <id>` dari `--provider`/`--model`.
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
Pengaman kepercayaan workspace Gemini masih berlaku dalam mode headless — berikan
|
||||
`--skip-trust` (atau percayakan direktori secara interaktif) sendiri; peluncur
|
||||
dengan sengaja tidak melewatinya. Peluncur ini berbeda dari **registrasi ACP**
|
||||
(`src/lib/acp/registry.ts`, `gemini --acp`), yang tetap menjadi
|
||||
integrasi protokol agen untuk `/dashboard/acp-agents`.
|
||||
|
||||
---
|
||||
|
||||
## Pembersihan asap nyata (opt-in)
|
||||
|
||||
Regresi rencana peluncuran deterministik berjalan di CI (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`). Untuk memvalidasi biner REAL terhadap server
|
||||
OmniRoute yang REAL, terdapat harness opt-in di
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts`. Ini tidak pernah berjalan secara otomatis
|
||||
(setiap sub-tes dilewati kecuali `RUN_CLI_SMOKE=1`), meneruskan kredensial melalui variabel-env
|
||||
NAMA (tidak pernah melalui nilai), menyensor string berbentuk kunci dari output yang tercatat,
|
||||
melewati target yang biner-nya tidak terinstal, dan mengklasifikasikan kegagalan sebagai
|
||||
otentikasi / upstream / konfigurasi alih-alih boolean kosong:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
Opsional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` membatasi pembersihan;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` menggantikan batas waktu 120 detik per-target.
|
||||
|
||||
---
|
||||
|
||||
## Lihat juga
|
||||
|
||||
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md) — panduan mendalam tentang Claude Code
|
||||
- [Konfigurasi Codex CLI](./CODEX-CLI-CONFIGURATION.md) — pengaturan dasar `[model_providers.omniroute]` sekali saja
|
||||
- [Mode Jarak Jauh](./REMOTE-MODE.md) — konteks, token akses terbatas, mengendalikan server jarak jauh
|
||||
- [Referensi Alat CLI](../reference/CLI-TOOLS.md) — katalog lengkap alat yang didukung + halaman dasbor
|
||||
- [Panduan Pengaturan](./SETUP_GUIDE.md) — metode instalasi dan onboarding saat pertama kali menjalankan
|
||||
@@ -1,332 +1,86 @@
|
||||
# CLI-TOOLS (Bahasa Indonesia)
|
||||
# Panduan Pengaturan Alat CLI — OmniRoute (Bahasa Indonesia)
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [in](../../../in/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇧🇩 [bn](../../bn/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇮🇷 [fa](../../fa/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇮🇳 [gu](../../gu/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇮🇳 [mr](../../mr/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇰🇪 [sw](../../sw/docs/CLI-TOOLS.md) · 🇮🇳 [ta](../../ta/docs/CLI-TOOLS.md) · 🇮🇳 [te](../../te/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇵🇰 [ur](../../ur/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "Alat CLI — OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# Alat CLI — OmniRoute
|
||||
|
||||
Terakhir diperbarui: 2026-08-18
|
||||
|
||||
OmniRoute terintegrasi dengan tiga kategori alat CLI yang tersebar di tiga halaman dasbor khusus:
|
||||
|
||||
| Halaman | Rute | Konsep | Jumlah |
|
||||
| ------------ | ----------------------- | ----------------------------------------------------------------------------------- | -------------- |
|
||||
| **Kode CLI** | `/dashboard/cli-code` | Alat pengkodean yang Anda arahkan ke OmniRoute (Klien → CLI → OmniRoute → Penyedia) | 26 |
|
||||
| **Agen CLI** | `/dashboard/cli-agents` | Agen otonom yang Anda arahkan ke OmniRoute (alur yang sama, cakupan lebih luas) | 8 |
|
||||
| **Agen ACP** | `/dashboard/acp-agents` | CLI yang diluncurkan OmniRoute sebagai backend melalui stdio/ACP (alur terbalik) | lihat registri |
|
||||
|
||||
Rute warisan mengalihkan melalui 308: `/dashboard/cli-tools` → `/dashboard/cli-code`, `/dashboard/agents` → `/dashboard/acp-agents`.
|
||||
Panduan ini menjelaskan cara menginstal dan mengonfigurasi semua alat CLI coding AI yang didukung
|
||||
untuk menggunakan **OmniRoute** sebagai backend terpadu, memberikan manajemen kunci terpusat,
|
||||
pelacakan biaya, pergantian model, dan pencatatan permintaan di semua alat.
|
||||
|
||||
---
|
||||
|
||||
## Cara Kerjanya
|
||||
|
||||
```
|
||||
Kode CLI / Agen CLI (alur konsumsi):
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
|
||||
│
|
||||
▼ (semua mengarah ke OmniRoute)
|
||||
http://YOUR_SERVER:20128/v1
|
||||
│
|
||||
▼ (OmniRoute mengarahkan ke penyedia yang tepat)
|
||||
▼ (OmniRoute meneruskan ke penyedia yang tepat)
|
||||
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
|
||||
|
||||
Agen ACP (alur peluncuran terbalik):
|
||||
Permintaan Klien → OmniRoute → meluncurkan CLI melalui stdio/ACP → respons
|
||||
```
|
||||
|
||||
**Manfaat:**
|
||||
|
||||
- Satu kunci API untuk mengelola semua alat
|
||||
- Pelacakan biaya di seluruh CLI di dasbor
|
||||
- Satu API key untuk mengelola semua alat
|
||||
- Pelacakan biaya di semua CLI melalui dashboard
|
||||
- Pergantian model tanpa mengonfigurasi ulang setiap alat
|
||||
- Bekerja secara lokal dan di server jarak jauh (VPS, Docker, Akamai, Cloudflare Tunnel)
|
||||
- Berjalan secara lokal maupun di server jarak jauh (VPS)
|
||||
|
||||
---
|
||||
|
||||
## Konfigurasi otomatis dengan `setup-*`
|
||||
## Alat yang Didukung (Sumber Kebenaran Dashboard)
|
||||
|
||||
Anda tidak perlu menulis konfigurasi setiap alat dengan tangan. OmniRoute menyediakan perintah `setup-*`
|
||||
untuk setiap CLI yang didukung yang membaca katalog model **langsung** dari OmniRoute yang berjalan
|
||||
(lokal atau jarak jauh) dan menulis konfigurasi alat itu sendiri di mesin Anda:
|
||||
Kartu dashboard di `/dashboard/cli-tools` dibuat dari `src/shared/constants/cliTools.ts`.
|
||||
Daftar saat ini (v3.0.0-rc.16):
|
||||
|
||||
```bash
|
||||
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
|
||||
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
|
||||
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
|
||||
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
|
||||
```
|
||||
| Alat | ID | Perintah | Mode Pengaturan | Metode Instalasi |
|
||||
| ------------------ | ------------- | ---------- | --------------- | ---------------- |
|
||||
| **Claude Code** | `claude` | `claude` | env | npm |
|
||||
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
|
||||
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
|
||||
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
|
||||
| **Cursor** | `cursor` | app | guide | desktop app |
|
||||
| **Cline** | `cline` | `cline` | custom | npm |
|
||||
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
|
||||
| **Continue** | `continue` | extension | guide | VS Code |
|
||||
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
|
||||
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
|
||||
| **OpenCode** | `opencode` | `opencode` | guide | npm |
|
||||
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
|
||||
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
|
||||
|
||||
Setiap perintah menerima `--remote <url> --api-key <key>` (mengonfigurasi alat lokal terhadap
|
||||
OmniRoute jarak jauh), `--dry-run` (prabaca tanpa menulis), dan `--port`. Alat
|
||||
tanpa penemuan model otomatis (Cline, Kilo, Roo, Goose, Aider, Qwen) menggunakan
|
||||
`--model <id>` (dan `--yes` untuk eksekusi non-interaktif). Untuk meluncurkan CLI dengan
|
||||
lingkungan yang tepat disuntikkan dan tanpa konfigurasi yang ditulis sama sekali, gunakan
|
||||
peluncur generik `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
|
||||
gemini — target dan alias berasal dari `bin/cli/cli-manifest.mjs`); peluncur per-alat warisan
|
||||
`omniroute launch` (Claude Code) dan `omniroute launch-codex`
|
||||
(Codex) tetap tersedia. CLI Gemini hanya untuk peluncuran: itu adalah target `omniroute run`
|
||||
tetapi tidak memiliki resep `setup-*`/`configure`.
|
||||
### Sinkronisasi fingerprint CLI (Agents + Pengaturan)
|
||||
|
||||
> **Referensi lengkap:** tabel utama — apa yang ditulis setiap perintah, setiap flag,
|
||||
> lokal vs jarak jauh, dan alat mana yang memerlukan akhiran `/v1` — ada di
|
||||
> **[Integrasi CLI](../guides/CLI-INTEGRATIONS.md)**.
|
||||
`/dashboard/agents` dan `Settings > CLI Fingerprint` menggunakan `src/shared/constants/cliCompatProviders.ts`.
|
||||
Ini menjaga ID penyedia tetap selaras dengan kartu CLI dan ID lama.
|
||||
|
||||
### Menjalankan ini di dalam kontainer
|
||||
| CLI ID | ID Penyedia Fingerprint |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `kilo` | `kilocode` |
|
||||
| `copilot` | `github` |
|
||||
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
|
||||
|
||||
Perintah `setup-*` yang dieksekusi di dalam kontainer OmniRoute menulis ke
|
||||
rumah kontainer itu sendiri, yang tidak dibaca oleh CLI host dan yang menghilang bersama
|
||||
kontainer. OmniRoute mendeteksi itu dan keluar dengan kode `2` dengan instruksi daripada
|
||||
menulis. Dua cara yang didukung untuk melanjutkan — instal CLI di host dan
|
||||
`omniroute connect` ke kontainer, atau bind-mount direktori konfigurasi dan set
|
||||
`CLI_CONFIG_HOME` (profil `host` compose). Setiap perintah `setup-*`, ditambah
|
||||
`omniroute configure` dan `omniroute config set`, menerima
|
||||
`--allow-container-write` ketika mengonfigurasi CLI kontainer itu sendiri adalah apa yang sebenarnya Anda maksud; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` melakukan hal yang sama untuk
|
||||
server. Lihat
|
||||
[Panduan Docker → Mengonfigurasi alat CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
|
||||
|
||||
**Titik akhir apply** di dasbor (`POST /api/cli-tools/apply`) menerapkan
|
||||
pengaman yang sama: di dalam kontainer, penulisan yang targetnya tidak bind-mounted dari
|
||||
host menjawab **`422`** dengan `containerEphemeralTarget: true`, teks kesalahan yang aman
|
||||
dan — untuk alat dengan resep host (claude, codex, opencode, cline,
|
||||
kilo, continue) — sebuah `hostSetupCommand` (misalnya `omniroute setup-opencode`) untuk dijalankan
|
||||
di host sebagai gantinya; tidak ada yang ditulis. `dryRun: true` tetap berfungsi dalam
|
||||
mode kontainer dan mengembalikan konten yang dihasilkan + jalur target tanpa menyentuh disk, sehingga
|
||||
Anda dapat prabaca dari dasbor dan menerapkan di host. Perilaku ini
|
||||
sengaja dan dilindungi regresi oleh
|
||||
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — jangan pernah "memperbaiki" 422
|
||||
dengan menghapus pengaman.
|
||||
ID lama yang masih diterima untuk kompatibilitas: `copilot`, `kimi-coding`, `qwen`.
|
||||
|
||||
---
|
||||
|
||||
## Sumber Kebenaran
|
||||
## Langkah 1 — Dapatkan API Key OmniRoute
|
||||
|
||||
Katalog terpadu berada di `src/shared/constants/cliTools.ts` sebagai `CLI_TOOLS: Record<string, CliCatalogEntry>`.
|
||||
|
||||
Setiap entri memiliki bidang-bidang berikut (didefinisikan di `src/shared/schemas/cliCatalog.ts`):
|
||||
|
||||
| Bidang | Tipe | Deskripsi |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------- |
|
||||
| `category` | `"code" \| "agent"` | Halaman mana alat tersebut muncul |
|
||||
| `vendor` | `string` | Asal alat ("Anthropic", "OSS (P. Gauthier)") |
|
||||
| `acpSpawnable` | `boolean` | Juga dapat digunakan sebagai ACP Agent (badge ditampilkan) |
|
||||
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tingkat dukungan endpoint kustom. `"none"` = backlog MITM |
|
||||
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mekanisme konfigurasi |
|
||||
| `id`, `name`, `color`, `description`, `docsUrl` | standar | Bidang tampilan inti |
|
||||
|
||||
Entri dengan `baseUrlSupport: "none"` **tidak ditampilkan** di halaman dasbor — mereka terdaftar di backlog MITM untuk rencana 11 (lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
|
||||
|
||||
### Tingkatan Kapabilitas (tercatalog × terdeteksi × dapat dikonfigurasi × dapat diluncurkan)
|
||||
|
||||
Tidak semua alat yang tercatalog dapat terdeteksi, dapat dikonfigurasi, atau dapat diluncurkan. Setiap tingkatan memiliki satu sumber deklarasi, dan tes drift menjaga agar mereka tetap selaras:
|
||||
|
||||
| Tingkatan | Arti | Dideklarasikan di |
|
||||
| ---------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| **Cataloged** | Muncul di katalog dasbor (nama, vendor, dokumen, tipe konfigurasi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
|
||||
| **Detectable** | Deteksi biner/konfigurasi, pemeriksaan kesehatan, jalur konfigurasi | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
|
||||
| **Configurable** | Didukung oleh `omniroute configure <cli>` (resep pengaturan ada) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
|
||||
| **Launchable** | Didukung oleh `omniroute run <target>` (injeksi env/args didefinisikan) | `bin/cli/cli-manifest.mjs` (`run: true`) |
|
||||
|
||||
`bin/cli/cli-manifest.mjs` adalah manifest eksekusi kanonik untuk perintah CLI yang muncul: `run`, `configure` dan generator penyelesaian shell semuanya mengambil daftar target, resolusi alias (misalnya `kilocode`/`kilo-code`/`kilo_cli` → `kilo`) dan pengkabelan flag `--model` darinya. Penjaga drift `tests/unit/cli/cli-manifest-drift.test.ts` memastikan bahwa manifest, katalog runtime, katalog UI, dan setiap permukaan konsumen tetap sinkron — target yang ditambahkan ke satu permukaan tanpa yang lainnya akan gagal dalam suite alih-alih mengalir diam-diam.
|
||||
|
||||
## 1. Katalog Kode CLI (26 alat)
|
||||
|
||||
Semua alat yang muncul di `/dashboard/cli-code`. Alat yang memiliki `baseUrlSupport: none` terhubung melalui MITM atau panduan manual alih-alih URL dasar kustom:
|
||||
|
||||
| id | nama | vendor | baseUrlSupport | configType | acpSpawnable |
|
||||
| ------------ | -------------------------- | ------------------- | -------------- | -------------- | ------------ |
|
||||
| claude | Claude Code | Anthropic | penuh | env | true |
|
||||
| codex | OpenAI Codex CLI | OpenAI | penuh | kustom | true |
|
||||
| zcode | ZCode (Rencana Koding GLM) | Z.ai | tidak ada | kustom | false |
|
||||
| cline | Cline | OSS (ex-Claude Dev) | penuh | kustom | true |
|
||||
| kilo | Kilo Code | Kilo-Org | penuh | kustom | false |
|
||||
| roo | Roo Code | Roo (OSS) | penuh | panduan | false |
|
||||
| continue | Continue | continue.dev | penuh | panduan | false |
|
||||
| aider | Aider | OSS (P. Gauthier) | penuh | panduan | true |
|
||||
| forge | ForgeCode | Antinomy HQ | penuh | kustom | true |
|
||||
| jcode | jcode | 1jehuang (OSS) | penuh | kustom | false |
|
||||
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | penuh | kustom | false |
|
||||
| codewhale | CodeWhale | Hmbown (OSS) | penuh | kustom | false |
|
||||
| opencode | OpenCode | Anomaly (ex-SST) | penuh | panduan | true |
|
||||
| droid | Factory Droid | Factory AI | sebagian | panduan | false |
|
||||
| copilot | GitHub Copilot CLI | GitHub/MS | penuh | kustom | false |
|
||||
| cursor-cli | Cursor CLI | Anysphere | sebagian | panduan | true |
|
||||
| smelt | Smelt | leonardcser (OSS) | penuh | kustom | false |
|
||||
| pi | Pi (agen-koding-pi) | M. Zechner (OSS) | penuh | kustom | false |
|
||||
| grok-build | Grok Build | xAI | penuh | kustom | false |
|
||||
| crush | Crush | OSS (Charm) | penuh | kustom | false |
|
||||
| qwen | Qwen Code | Alibaba | penuh | panduan | true |
|
||||
| cursor | Cursor | Anysphere | tidak ada | panduan | false |
|
||||
| antigravity | Antigravity | Google | tidak ada | mitm | false |
|
||||
| hermes | Hermes | Nous Research | tidak ada | panduan | false |
|
||||
| kiro | Kiro AI | Amazon | tidak ada | mitm | false |
|
||||
| custom | Custom CLI | — | penuh | pembuat-kustom | false |
|
||||
|
||||
Alat dengan `baseUrlSupport: "partial"` menunjukkan lencana "⚠ Base URL parcial" di kartu dasbor.
|
||||
|
||||
## 2. Katalog Agen CLI (8 alat)
|
||||
|
||||
Agen otonom yang muncul di `/dashboard/cli-agents`:
|
||||
|
||||
| id | nama | vendor | dukunganBaseUrl | dapatDibuatACP |
|
||||
| ------------ | ---------------- | ------------------------ | --------------- | -------------- |
|
||||
| hermes-agent | Hermes Agent | Nous Research | penuh | false |
|
||||
| openclaw | OpenClaw | OSS (P. Steinberger) | penuh | true |
|
||||
| goose | Goose | Block / Linux Foundation | penuh | true |
|
||||
| interpreter | Open Interpreter | OSS | penuh | true |
|
||||
| warp | Warp AI | Warp Inc. | sebagian | true |
|
||||
| agent-deck | Agent Deck | asheshgoplani (OSS) | penuh | false |
|
||||
| omp | Oh My Pi | OSS | penuh | true |
|
||||
| letta | Letta CLI | Letta | penuh | false |
|
||||
|
||||
---
|
||||
|
||||
## 3. Agen ACP (/dashboard/acp-agents)
|
||||
|
||||
Halaman ini (yang diubah namanya dari `/dashboard/agents`) menunjukkan CLI yang dapat **dibuat** oleh OmniRoute sebagai mesin eksekusi backend melalui protokol stdio/ACP. Katalog ini dikelola secara terpisah di `src/lib/acp/registry.ts` dan **tidak** sama dengan `CLI_TOOLS`.
|
||||
|
||||
---
|
||||
|
||||
## 4. Daftar Tugas MITM (tidak ditampilkan di dashboard)
|
||||
|
||||
CLI berikut tidak mendukung URL dasar kustom secara native dan **tidak terdaftar** di halaman Kode CLI atau Agen CLI. Mereka adalah kandidat untuk intersepsi MITM dalam rencana 11:
|
||||
|
||||
| CLI | Alasan |
|
||||
| ------------------- | ----------------------------------------------------------------- |
|
||||
| windsurf | BYOK terbatas pada model Claude tertentu + URL/token perusahaan |
|
||||
| amp | Ekosistem tertutup (Sourcegraph) |
|
||||
| amazon-q / kiro-cli | Autentikasi AWS SSO, tidak ada URL kustom |
|
||||
| cowork | Anthropic Desktop, tidak ada titik akhir yang dapat dikonfigurasi |
|
||||
|
||||
Lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` untuk referensi silang lengkap.
|
||||
|
||||
---
|
||||
|
||||
## 5. API Deteksi Batch
|
||||
|
||||
Semua deteksi alat digabungkan melalui satu titik akhir:
|
||||
|
||||
**`GET /api/cli-tools/all-statuses`**
|
||||
|
||||
- Auth: `requireCliToolsAuth(request)` (sama seperti rute `/api/cli-tools/` lainnya)
|
||||
- Mengembalikan: `Record<toolId, ToolBatchStatus>` (tipe: `src/shared/types/cliBatchStatus.ts`)
|
||||
- Strategi: `Promise.all` untuk semua alat, batas waktu 5 detik per alat
|
||||
- Cache: LRU dalam memori yang diindeks oleh file konfigurasi `mtime`. Cache tidak valid ketika mtime berubah. Reset saat server di-restart.
|
||||
|
||||
Bentuk respons per alat:
|
||||
|
||||
```ts
|
||||
interface ToolBatchStatus {
|
||||
detection: {
|
||||
installed: boolean;
|
||||
runnable: boolean;
|
||||
version?: string;
|
||||
command?: string;
|
||||
commandPath?: string;
|
||||
reason?: string;
|
||||
};
|
||||
config: {
|
||||
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
|
||||
endpoint?: string | null;
|
||||
lastConfiguredAt?: string | null;
|
||||
};
|
||||
error?: string; // disanitasi, tanpa jejak tumpukan
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Pengatur Pengaturan untuk Alat Baru
|
||||
|
||||
Alat baru dengan `configType: "custom"` memiliki rute API pengaturan khusus:
|
||||
|
||||
| Rute | Alat |
|
||||
| ------------------------------------------- | ---------------------------------------------------------------- |
|
||||
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
|
||||
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
|
||||
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
|
||||
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
|
||||
| `POST /api/cli-tools/smelt-settings` | Smelt |
|
||||
| `POST /api/cli-tools/pi-settings` | Agen pemrograman Pi |
|
||||
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
|
||||
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + kunci `.env` khusus) |
|
||||
|
||||
Semua rute menggunakan `sanitizeErrorMessage()` untuk respons kesalahan (Aturan Keras #12).
|
||||
|
||||
---
|
||||
|
||||
## 7. Arsitektur Halaman Dasbor
|
||||
|
||||
### Kode CLI (`/dashboard/cli-code`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponen server
|
||||
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grid klien
|
||||
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — halaman detail alat
|
||||
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 kartu alat khusus + `ToolDetailClient.tsx`
|
||||
|
||||
### Agen CLI (`/dashboard/cli-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponen server
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grid klien
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — menggunakan kembali `ToolDetailClient`
|
||||
|
||||
### Agen ACP (`/dashboard/acp-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponen server (dipindahkan dari `agents/`)
|
||||
|
||||
### Komponen UI Bersama (`src/shared/components/cli/`)
|
||||
|
||||
| File | Tujuan |
|
||||
| ----------------------- | ------------------------------------------------------ |
|
||||
| `CliToolCard.tsx` | Kartu status pintar (deteksi + konfigurasi + endpoint) |
|
||||
| `CliConceptCard.tsx` | Kartu penjelasan konsep per halaman |
|
||||
| `CliComparisonCard.tsx` | Perbandingan tiga kolom antar jenis CLI |
|
||||
| `BaseUrlSelect.tsx` | Dropdown endpoint (Lokal/Awan/Kustom) |
|
||||
| `ApiKeySelect.tsx` | Pemilih kunci API |
|
||||
| `ManualConfigModal.tsx` | Modal cuplikan konfigurasi yang dapat disalin |
|
||||
|
||||
### Hook Bersama (`src/shared/hooks/cli/`)
|
||||
|
||||
| File | Tujuan |
|
||||
| ------------------------- | --------------------------------------------------------------------------- |
|
||||
| `useToolBatchStatuses.ts` | Mengambil `/api/cli-tools/all-statuses`, mengelola status pemuatan/segarkan |
|
||||
|
||||
## 8. i18n
|
||||
|
||||
Namespace baru ditambahkan dalam rencana 14 F9:
|
||||
|
||||
| Namespace | Tujuan |
|
||||
| ----------- | ----------------------------------------------------------------------------------- |
|
||||
| `cliCommon` | String yang dibagikan (label kartu, teks konsep/perbandingan, label halaman detail) |
|
||||
| `cliCode` | String halaman CLI Code |
|
||||
| `cliAgents` | String halaman CLI Agents |
|
||||
| `acpAgents` | String halaman ACP Agents |
|
||||
|
||||
Terjemahan lengkap PT-BR dan EN disediakan. 39 lokalitas lainnya secara otomatis menggunakan EN melalui penggabungan tingkat namespace di `src/i18n/request.ts`.
|
||||
|
||||
---
|
||||
|
||||
## 9. Memulai dengan Cepat
|
||||
|
||||
### Langkah 1 — Dapatkan Kunci API OmniRoute
|
||||
|
||||
1. Buka `/dashboard/api-manager` → **Buat Kunci API**
|
||||
2. Beri nama (misalnya `cli-tools`) dan pilih semua izin
|
||||
3. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah ini
|
||||
1. Buka dashboard OmniRoute → **API Manager** (`/dashboard/api-manager`)
|
||||
2. Klik **Create API Key**
|
||||
3. Beri nama (misalnya `cli-tools`) dan pilih semua izin
|
||||
4. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah
|
||||
|
||||
> Kunci Anda terlihat seperti: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
### Langkah 2 — Instal Alat CLI
|
||||
## Langkah 2 — Instal Alat CLI
|
||||
|
||||
Semua alat berbasis npm memerlukan Node.js 22.22.2+ atau 24.x:
|
||||
Semua alat berbasis npm memerlukan Node.js 18+:
|
||||
|
||||
```bash
|
||||
# Claude Code (Anthropic)
|
||||
@@ -344,133 +98,94 @@ npm install -g cline
|
||||
# KiloCode
|
||||
npm install -g kilocode
|
||||
|
||||
# Qwen Code
|
||||
npm install -g @qwen-code/qwen-code
|
||||
# Kiro CLI (Amazon — requires curl + unzip)
|
||||
apt-get install -y unzip # on Debian/Ubuntu
|
||||
curl -fsSL https://cli.kiro.dev/install | bash
|
||||
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
|
||||
```
|
||||
|
||||
# Google Gemini CLI (dapat diluncurkan melalui `omniroute run gemini` → /v1beta surface)
|
||||
npm install -g @google/gemini-cli
|
||||
**Verifikasi:**
|
||||
|
||||
# Aider
|
||||
pip install aider-chat
|
||||
|
||||
# Smelt
|
||||
cargo install smelt # Berbasis Rust
|
||||
|
||||
# Agen pemrograman Pi
|
||||
# lihat https://github.com/zechnerj/pi-coding-agent untuk instalasi
|
||||
|
||||
# jcode
|
||||
# lihat https://github.com/1jehuang/jcode untuk instalasi
|
||||
```bash
|
||||
claude --version # 2.x.x
|
||||
codex --version # 0.x.x
|
||||
opencode --version # x.x.x
|
||||
cline --version # 2.x.x
|
||||
kilocode --version # x.x.x (or: kilo --version)
|
||||
kiro-cli --version # 1.x.x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Langkah 3 — Konfigurasi melalui Dashboard
|
||||
## Langkah 3 — Tetapkan Variabel Lingkungan Global
|
||||
|
||||
1. Pergi ke `http://localhost:20128/dashboard/cli-code`
|
||||
2. Temukan alat Anda di grid
|
||||
3. Klik kartu untuk membuka halaman detail alat
|
||||
4. Pilih kunci API dan URL dasar Anda
|
||||
5. Klik **Terapkan Konfigurasi** atau salin cuplikan konfigurasi manual
|
||||
|
||||
---
|
||||
|
||||
### Langkah 4 — Atur Variabel Lingkungan Global
|
||||
Tambahkan ke `~/.bashrc` (atau `~/.zshrc`), lalu jalankan `source ~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# OmniRoute Universal Endpoint
|
||||
export OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
export OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
|
||||
# Gemini CLI membaca GOOGLE_GEMINI_BASE_URL di ROOT (SDK-nya menambahkan /v1beta/... sendiri)
|
||||
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
|
||||
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
|
||||
export GEMINI_BASE_URL="http://localhost:20128/v1"
|
||||
export GEMINI_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
> Untuk **server jarak jauh** ganti `localhost:20128` dengan IP atau domain server,
|
||||
> misalnya `http://<your-server-ip>:20128`.
|
||||
> Untuk **server jarak jauh**, ganti `localhost:20128` dengan IP atau domain server,
|
||||
> misalnya `http://192.168.0.15:20128`.
|
||||
|
||||
---
|
||||
|
||||
### Langkah 4 — Konfigurasi Setiap Alat
|
||||
## Langkah 4 — Konfigurasi Setiap Alat
|
||||
|
||||
#### Claude Code
|
||||
### Claude Code
|
||||
|
||||
```bash
|
||||
# Buat ~/.claude/settings.json:
|
||||
# Melalui CLI:
|
||||
claude config set --global api-base-url http://localhost:20128/v1
|
||||
|
||||
# Atau buat ~/.claude/settings.json:
|
||||
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:20128",
|
||||
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
|
||||
}
|
||||
"apiBaseUrl": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Gunakan root gateway Anthropic yang bersatu untuk Claude Code. Jangan tambahkan `/v1` di sini.
|
||||
|
||||
**Uji:** `claude "say hello"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenAI Codex
|
||||
|
||||
Codex modern (v0.137+) hanya membaca `~/.codex/config.toml` — `config.yaml` lama milik CLI npm warisan dan diabaikan tanpa suara. Kunci API tetap di variabel lingkungan `OMNIROUTE_API_KEY` (`env_key`), tidak pernah di dalam file:
|
||||
### OpenAI Codex
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
|
||||
model_provider = "omniroute"
|
||||
|
||||
[model_providers.omniroute]
|
||||
name = "OmniRoute"
|
||||
base_url = "http://localhost:20128/v1"
|
||||
env_key = "OMNIROUTE_API_KEY"
|
||||
requires_openai_auth = false
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
|
||||
model: auto
|
||||
apiKey: sk-your-omniroute-key
|
||||
apiBaseUrl: http://localhost:20128/v1
|
||||
EOF
|
||||
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
Referensi lengkap (profil, `wire_api`, jendela konteks): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
|
||||
|
||||
**Uji:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenCode
|
||||
### OpenCode
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
|
||||
{
|
||||
"\$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"omniroute": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "OmniRoute",
|
||||
"options": {
|
||||
"baseURL": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
},
|
||||
"models": {
|
||||
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
|
||||
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
|
||||
"gemini-3-flash": { "name": "gemini-3-flash" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
|
||||
[provider.openai]
|
||||
base_url = "http://localhost:20128/v1"
|
||||
api_key = "sk-your-omniroute-key"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Uji:** `opencode`
|
||||
|
||||
> Gunakan `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
|
||||
> untuk mengirim varian berpikir.
|
||||
|
||||
---
|
||||
|
||||
#### Cline (CLI atau VS Code)
|
||||
### Cline (CLI atau VS Code)
|
||||
|
||||
**Mode CLI:**
|
||||
|
||||
@@ -485,13 +200,13 @@ EOF
|
||||
```
|
||||
|
||||
**Mode VS Code:**
|
||||
Pengaturan ekstensi Cline → Penyedia API: `OpenAI Compatible` → URL Dasar: `http://localhost:20128/v1`
|
||||
Pengaturan ekstensi Cline → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
|
||||
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Terapkan Konfigurasi**.
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### KiloCode (CLI atau VS Code)
|
||||
### KiloCode (CLI atau VS Code)
|
||||
|
||||
**Mode CLI:**
|
||||
|
||||
@@ -508,11 +223,11 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
}
|
||||
```
|
||||
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Terapkan Konfigurasi**.
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### Continue (Ekstensi VS Code)
|
||||
### Continue (Ekstensi VS Code)
|
||||
|
||||
Edit `~/.continue/config.yaml`:
|
||||
|
||||
@@ -526,255 +241,158 @@ models:
|
||||
default: true
|
||||
```
|
||||
|
||||
Restart VS Code setelah mengedit.
|
||||
Mulai ulang VS Code setelah mengedit.
|
||||
|
||||
---
|
||||
|
||||
#### VS Code Insiders (`chatLanguageModels.json`)
|
||||
|
||||
Gunakan ini ketika VS Code Insiders dikonfigurasi untuk model endpoint kustom dan Anda ingin OmniRoute berfungsi tanpa bidang header kustom.
|
||||
|
||||
**Lokasi yang Disarankan:**
|
||||
|
||||
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
|
||||
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
|
||||
|
||||
**Contoh menggunakan alias OmniRoute yang ditokenisasi:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"vendor": "customendpoint",
|
||||
"id": "auto",
|
||||
"name": "OmniRoute Auto",
|
||||
"family": "gpt-4",
|
||||
"version": "1.0.0",
|
||||
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
|
||||
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
|
||||
"requestFormat": "openai-chat-completions",
|
||||
"contextWindow": 256000,
|
||||
"maxOutputTokens": 32768,
|
||||
"auth": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**Catatan:**
|
||||
|
||||
- Ganti `sk-your-omniroute-key` dengan kunci API yang dibuat di OmniRoute.
|
||||
- Bidang `url` harus mengarah ke `/api/v1/vscode/{token}/chat/completions`.
|
||||
- Bidang `modelsUrl` harus mengarah ke `/api/v1/vscode/{token}/models`.
|
||||
- Utamakan alur normal `/v1` + header Bearer ketika klien mendukung header kustom.
|
||||
- Token yang tertanam dalam URL adalah fallback kompatibilitas dan mungkin muncul dalam log editor atau riwayat proxy.
|
||||
|
||||
---
|
||||
|
||||
#### Kiro CLI (Amazon)
|
||||
### Kiro CLI (Amazon)
|
||||
|
||||
```bash
|
||||
# Masuk ke akun AWS/Kiro Anda:
|
||||
# Login ke akun AWS/Kiro Anda:
|
||||
kiro-cli login
|
||||
|
||||
# CLI menggunakan otentikasi sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
|
||||
# Gunakan kiro-cli bersamaan dengan OmniRoute untuk alat lainnya.
|
||||
# CLI ini menggunakan autentikasinya sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
|
||||
# Gunakan kiro-cli bersama OmniRoute untuk alat lainnya.
|
||||
kiro-cli status
|
||||
```
|
||||
|
||||
Untuk aplikasi desktop **Kiro IDE**, gunakan endpoint MITM yang diekspos oleh OmniRoute
|
||||
di bawah `/dashboard/cli-tools → Kiro`.
|
||||
---
|
||||
|
||||
### Qwen Code (Alibaba)
|
||||
|
||||
Qwen Code mendukung endpoint API yang kompatibel dengan OpenAI melalui variabel lingkungan atau `settings.json`.
|
||||
|
||||
**Opsi 1: Variabel lingkungan (`~/.qwen/.env`)**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
|
||||
OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
OPENAI_MODEL="auto"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Opsi 2: `settings.json` dengan penyedia model**
|
||||
|
||||
```json
|
||||
// ~/.qwen/settings.json
|
||||
{
|
||||
"env": {
|
||||
"OPENAI_API_KEY": "sk-your-omniroute-key",
|
||||
"OPENAI_BASE_URL": "http://localhost:20128/v1"
|
||||
},
|
||||
"modelProviders": {
|
||||
"openai": [
|
||||
{
|
||||
"id": "omniroute-default",
|
||||
"name": "OmniRoute (Auto)",
|
||||
"envKey": "OPENAI_API_KEY",
|
||||
"baseUrl": "http://localhost:20128/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Opsi 3: Flag CLI langsung**
|
||||
|
||||
```bash
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1" \
|
||||
OPENAI_API_KEY="sk-your-omniroute-key" \
|
||||
OPENAI_MODEL="auto" \
|
||||
qwen
|
||||
```
|
||||
|
||||
> Untuk **server jarak jauh**, ganti `localhost:20128` dengan IP atau domain server.
|
||||
|
||||
**Uji:** `qwen "say hello"`
|
||||
|
||||
### Cursor (Aplikasi Desktop)
|
||||
|
||||
> **Catatan:** Cursor merutekan permintaan melalui cloudnya sendiri. Untuk integrasi OmniRoute,
|
||||
> aktifkan **Cloud Endpoint** di Pengaturan OmniRoute dan gunakan URL domain publik Anda.
|
||||
|
||||
Melalui GUI: **Settings → Models → OpenAI API Key**
|
||||
|
||||
- Base URL: `https://your-domain.com/v1`
|
||||
- API Key: kunci OmniRoute Anda
|
||||
|
||||
---
|
||||
|
||||
## 10. Internal OmniRoute CLI
|
||||
## Konfigurasi Otomatis Dashboard
|
||||
|
||||
Biner `omniroute` menyediakan perintah untuk siklus hidup server, pengaturan, diagnostik, dan manajemen penyedia. Titik masuk: `bin/omniroute.mjs`.
|
||||
Dashboard OmniRoute mengotomatiskan konfigurasi untuk sebagian besar alat:
|
||||
|
||||
```bash
|
||||
omniroute # Mulai server (port default 20128)
|
||||
omniroute setup # Wizard pengaturan interaktif
|
||||
omniroute doctor # Periksa konfigurasi, DB, port, runtime
|
||||
omniroute providers list # Koneksi penyedia yang dikonfigurasi
|
||||
omniroute providers test-all # Uji setiap koneksi aktif
|
||||
omniroute reset-password # Atur ulang kata sandi admin
|
||||
omniroute logs # Streaming log permintaan
|
||||
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
|
||||
omniroute --version # Cetak versi
|
||||
omniroute --help # Tampilkan semua perintah
|
||||
```
|
||||
1. Buka `http://localhost:20128/dashboard/cli-tools`
|
||||
2. Perluas kartu alat mana pun
|
||||
3. Pilih API key Anda dari menu tarik-turun
|
||||
4. Klik **Apply Config** (jika alat terdeteksi telah terinstal)
|
||||
5. Atau salin cuplikan konfigurasi yang dihasilkan secara manual
|
||||
|
||||
### Pengaturan & Inisialisasi
|
||||
---
|
||||
|
||||
```bash
|
||||
omniroute setup # Wizard pengaturan interaktif
|
||||
omniroute setup --non-interactive # Mode CI/automasi (membaca variabel env + flag)
|
||||
omniroute setup --password '<value>' # Atur kata sandi admin langsung
|
||||
omniroute setup --add-provider \
|
||||
--provider openai \
|
||||
--api-key '<value>' \
|
||||
--test-provider # Tambah dan uji penyedia dalam satu langkah
|
||||
```
|
||||
## Agen Bawaan: Droid & OpenClaw
|
||||
|
||||
Variabel lingkungan yang dikenali untuk pengaturan non-interaktif:
|
||||
**Droid** dan **OpenClaw** adalah agen AI yang dibangun langsung ke dalam OmniRoute — tidak perlu instalasi.
|
||||
Keduanya berjalan sebagai rute internal dan menggunakan perutean model OmniRoute secara otomatis.
|
||||
|
||||
| Var | Tujuan |
|
||||
| ------------------- | ---------------------------------------------------------------------- |
|
||||
| `OMNIROUTE_API_KEY` | Kunci API penyedia (terikat ke `--api-key` melalui Commander `.env()`) |
|
||||
| `DATA_DIR` | Ganti direktori data OmniRoute |
|
||||
- Akses: `http://localhost:20128/dashboard/agents`
|
||||
- Konfigurasi: combo dan penyedia yang sama seperti semua alat lainnya
|
||||
- Tidak memerlukan API key atau instalasi CLI
|
||||
|
||||
Semua input non-interaktif lainnya diteruskan sebagai flag, bukan variabel lingkungan:
|
||||
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
|
||||
(lihat opsi `omniroute setup` di atas).
|
||||
|
||||
### Diagnostik
|
||||
|
||||
```bash
|
||||
omniroute doctor # Periksa konfigurasi, DB, port, runtime, memori, kelangsungan
|
||||
omniroute doctor --json # JSON yang dapat dibaca mesin
|
||||
omniroute doctor --no-liveness # Lewati probe kesehatan HTTP
|
||||
omniroute doctor --host 0.0.0.0 # Ganti host kelangsungan
|
||||
omniroute doctor --liveness-url <url> # Ganti URL endpoint kesehatan penuh
|
||||
```
|
||||
|
||||
Dokter menjalankan pemeriksaan ini: `Konfigurasi`, `Database`, `Penyimpanan/enkripsi`,
|
||||
`Ketersediaan Port`, `Runtime Node`, `Biner asli` (better-sqlite3),
|
||||
`Memori`, dan `Kelangsungan Server`. Ia keluar dengan status non-nol jika ada pemeriksaan yang `gagal`.
|
||||
|
||||
### Manajemen Penyedia
|
||||
|
||||
```bash
|
||||
omniroute providers available # Katalog penyedia OmniRoute
|
||||
omniroute providers available --search openai # Filter katalog berdasarkan id/nama/alias/kategori
|
||||
omniroute providers available --category api-key # Filter berdasarkan kategori (api-key, oauth, gratis, ...)
|
||||
omniroute providers available --json # JSON yang dapat dibaca mesin
|
||||
|
||||
omniroute providers list # Koneksi penyedia yang dikonfigurasi
|
||||
omniroute providers list --json
|
||||
|
||||
omniroute providers test <id|name> # Uji satu koneksi yang dikonfigurasi
|
||||
omniroute providers test-all # Uji setiap koneksi aktif
|
||||
omniroute providers validate # Validasi struktural hanya lokal
|
||||
omniroute providers add <provider> --credential-env PROVIDER_KEY
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth <provider> # Alur OAuth yang ada
|
||||
omniroute providers edit <id|name> --default-model <model>
|
||||
omniroute providers remove <id|name> --yes
|
||||
```
|
||||
|
||||
`providers add/import/auth/edit/remove` adalah API-first dan oleh karena itu bekerja terhadap
|
||||
konteks lokal atau jarak jauh yang aktif. Input kredensial harus menggunakan
|
||||
`--credential-stdin` atau `--credential-env`; `--dry-run --json` hanya melaporkan
|
||||
keberadaan/bentuk yang disunting. `providers available` membaca katalog OmniRoute;
|
||||
`providers list/test/test-all/validate` mempertahankan perilaku SQLite lokal mereka dan
|
||||
tidak memerlukan server untuk berjalan.
|
||||
|
||||
### Pemulihan & Atur Ulang
|
||||
|
||||
```bash
|
||||
omniroute reset-password # Atur ulang kata sandi admin (juga: omniroute-reset-password)
|
||||
omniroute reset-encrypted-columns # Tampilkan peringatan + dry-run untuk atur ulang kredensial terenkripsi
|
||||
omniroute reset-encrypted-columns --force # Benar-benar menghapus kredensial terenkripsi di SQLite
|
||||
```
|
||||
|
||||
### Ekspor Kredensial (⚠ tangani dengan hati-hati)
|
||||
|
||||
```bash
|
||||
omniroute auth export # Tampilkan peringatan + gerbang konfirmasi — tidak ada akses DB
|
||||
omniroute auth export --force # Ekspor SEMUA kredensial DECRYPTED koneksi ke stdout sebagai JSON
|
||||
omniroute auth export --force --id <id> # Ekspor hanya koneksi yang cocok
|
||||
omniroute auth export --force --format env # Emit OMNIROUTE_<PROVIDER>_<FIELD>=<value> baris
|
||||
omniroute auth export --force --out creds.json # Tulis ke file (dibuat dengan izin 0600)
|
||||
```
|
||||
|
||||
`auth export` adalah **hanya lokal** (baca SQLite langsung, tidak ada rute HTTP) dan dengan sengaja mencetak/menulis
|
||||
nilai **plaintext** `apiKey`/`accessToken`/`refreshToken`/`idToken` — itu adalah fitur, bukan
|
||||
bug. Tidak ada yang dibaca dari database, dan tidak ada yang didekripsi, tanpa `--force`. Sebuah banner peringatan stderr
|
||||
selalu dicetak sebelum ada plaintext yang dikeluarkan. Memerlukan `STORAGE_ENCRYPTION_KEY` untuk
|
||||
diatur. Sebuah field yang gagal untuk didekripsi (kunci kadaluarsa, ciphertext rusak) dilaporkan sebagai
|
||||
`<field>DecryptFailed: true` alih-alih menghentikan seluruh ekspor atau membocorkan kesalahan yang mendasarinya.
|
||||
|
||||
### Subperintah Lainnya
|
||||
|
||||
Ini mengasumsikan server OmniRoute yang berjalan, kecuali dinyatakan sebaliknya:
|
||||
|
||||
```bash
|
||||
omniroute status # Status runtime yang komprehensif
|
||||
omniroute logs # Streaming log permintaan (--json, --search, --follow)
|
||||
omniroute config show # Tampilkan konfigurasi saat ini
|
||||
|
||||
omniroute provider list # Daftar penyedia yang tersedia (alias dari providers list)
|
||||
omniroute provider add # Daftarkan OmniRoute sebagai penyedia di alat
|
||||
omniroute keys add | list | remove # Kelola kunci API
|
||||
omniroute models [provider] # Daftar model (--json, --search)
|
||||
omniroute combo list | switch | create | delete
|
||||
|
||||
omniroute backup # Snapshot konfigurasi + DB
|
||||
omniroute restore # Pulihkan dari snapshot sebelumnya
|
||||
|
||||
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
|
||||
omniroute quota # Penggunaan kuota penyedia
|
||||
omniroute cache # Status cache
|
||||
omniroute cache clear # Hapus cache semantik + tanda tangan
|
||||
|
||||
omniroute mcp status | restart # Status server MCP / restart
|
||||
omniroute a2a status | card # Status server A2A / kartu agen
|
||||
|
||||
omniroute tunnel list | create | stop # Kelola terowongan (cloudflare/tailscale/ngrok)
|
||||
omniroute env show | get <k> | set <k> <v> # Periksa / atur variabel env (sementara)
|
||||
|
||||
omniroute test # Uji konektivitas penyedia
|
||||
omniroute update # Periksa pembaruan
|
||||
omniroute completion # Hasilkan penyelesaian shell
|
||||
```
|
||||
|
||||
### Flag Umum
|
||||
|
||||
| Flag | Deskripsi |
|
||||
| ------------------- | ------------------------------------------------------------- |
|
||||
| `--no-open` | Jangan otomatis membuka browser saat mulai |
|
||||
| `--port <n>` | Ganti port API (default 20128) |
|
||||
| `--mcp` | Jalankan sebagai server MCP melalui stdio (untuk IDE) |
|
||||
| `--non-interactive` | Mode CI (tanpa prompt; membaca dari env/flags) |
|
||||
| `--json` | Output JSON yang dapat dibaca mesin (doctor, providers, dll.) |
|
||||
| `--help`, `-h` | Tampilkan bantuan spesifik perintah |
|
||||
| `--version`, `-v` | Cetak versi yang terinstal |
|
||||
---
|
||||
|
||||
## Endpoint API yang Tersedia
|
||||
|
||||
| Endpoint | Deskripsi | Digunakan Untuk |
|
||||
| -------------------------- | -------------------------------- | ------------------------------------ |
|
||||
| `/v1/chat/completions` | Obrolan standar (semua penyedia) | Semua alat modern |
|
||||
| `/v1/responses` | API Respons (format OpenAI) | Codex, alur kerja agentik |
|
||||
| `/v1/completions` | Penyelesaian teks warisan | Alat lama yang menggunakan `prompt:` |
|
||||
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
|
||||
| `/v1/images/generations` | Generasi gambar | GPT-Image, Flux, dll. |
|
||||
| `/v1/audio/speech` | Teks-ke-suara | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Suara-ke-teks | Deepgram, AssemblyAI |
|
||||
|
||||
Contoh siap-tempel dengan URL OmniRoute yang ter-tokenisasi:
|
||||
|
||||
```txt
|
||||
Token contoh: sk-a3ab3c080beaee3a-69f4a4-070d71af
|
||||
|
||||
Basis OpenAI standar: http://localhost:20128/v1
|
||||
Model VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
|
||||
Obrolan VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
|
||||
Respons VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
|
||||
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
|
||||
Obrolan Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
|
||||
```
|
||||
| Endpoint | Deskripsi | Digunakan Untuk |
|
||||
| -------------------------- | --------------------------------- | --------------------------- |
|
||||
| `/v1/chat/completions` | Chat standar (semua penyedia) | Semua alat modern |
|
||||
| `/v1/responses` | Responses API (format OpenAI) | Codex, alur kerja agentik |
|
||||
| `/v1/completions` | Penyelesaian teks lama | Alat lama yang menggunakan `prompt:` |
|
||||
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
|
||||
| `/v1/images/generations` | Pembuatan gambar | GPT-Image, Flux, dll. |
|
||||
| `/v1/audio/speech` | Teks ke ucapan | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Ucapan ke teks | Deepgram, AssemblyAI |
|
||||
|
||||
---
|
||||
|
||||
## Pemecahan Masalah
|
||||
|
||||
| Kesalahan | Penyebab | Perbaikan |
|
||||
| ------------------------------------------------------ | --------------------------------- | ---------------------------------------------------------- |
|
||||
| `Connection refused` | OmniRoute tidak berjalan | `omniroute serve` |
|
||||
| `401 Unauthorized` | Kunci API salah | Periksa di `/dashboard/api-manager` |
|
||||
| `No combo configured` | Tidak ada kombinasi routing aktif | Siapkan di `/dashboard/combos` |
|
||||
| CLI menunjukkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
|
||||
| Dashboard menunjukkan "not detected" setelah instalasi | Cache usang | Klik "⟳ Refresh detection" di dashboard |
|
||||
| Tautan lama `/dashboard/cli-tools` | Bookmark pra-v3.8.6 | Dialihkan secara otomatis ke `/dashboard/cli-code` (308) |
|
||||
| Tautan lama `/dashboard/agents` | Bookmark pra-v3.8.6 | Dialihkan secara otomatis ke `/dashboard/acp-agents` (308) |
|
||||
| Error | Penyebab | Solusi |
|
||||
| ------------------------- | --------------------------------- | ------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute tidak berjalan | `pm2 start omniroute` |
|
||||
| `401 Unauthorized` | API key salah | Periksa di `/dashboard/api-manager` |
|
||||
| `No combo configured` | Tidak ada combo perutean aktif | Atur di `/dashboard/combos` |
|
||||
| `invalid model` | Model tidak ada dalam katalog | Gunakan `auto` atau periksa `/dashboard/providers` |
|
||||
| CLI menampilkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
|
||||
| `kiro-cli: not found` | Tidak ada di PATH | `export PATH="$HOME/.local/bin:$PATH"` |
|
||||
|
||||
---
|
||||
|
||||
## Skrip Pengaturan Cepat (Satu Perintah)
|
||||
|
||||
```bash
|
||||
# Instal semua CLI dan konfigurasi untuk OmniRoute (ganti dengan kunci dan URL server Anda)
|
||||
OMNIROUTE_URL="http://localhost:20128/v1"
|
||||
OMNIROUTE_KEY="sk-your-omniroute-key"
|
||||
|
||||
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
|
||||
|
||||
# Kiro CLI
|
||||
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
|
||||
|
||||
# Tulis konfigurasi
|
||||
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
|
||||
|
||||
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
|
||||
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
|
||||
cat >> ~/.bashrc << EOF
|
||||
export OPENAI_BASE_URL="$OMNIROUTE_URL"
|
||||
export OPENAI_API_KEY="$OMNIROUTE_KEY"
|
||||
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
|
||||
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
|
||||
EOF
|
||||
|
||||
source ~/.bashrc
|
||||
echo "✅ All CLIs installed and configured for OmniRoute"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||
@@ -1,315 +0,0 @@
|
||||
# CLI-INTEGRATIONS (Bahasa Indonesia (Alt))
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../guides/CLI-INTEGRATIONS.md) · 🇸🇦 [ar](../../../ar/docs/guides/CLI-INTEGRATIONS.md) · 🇦🇿 [az](../../../az/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇬 [bg](../../../bg/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇩 [bn](../../../bn/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇿 [cs](../../../cs/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇰 [da](../../../da/docs/guides/CLI-INTEGRATIONS.md) · 🇩🇪 [de](../../../de/docs/guides/CLI-INTEGRATIONS.md) · 🇪🇸 [es](../../../es/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇷 [fa](../../../fa/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇮 [fi](../../../fi/docs/guides/CLI-INTEGRATIONS.md) · 🇫🇷 [fr](../../../fr/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [gu](../../../gu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇱 [he](../../../he/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [hi](../../../hi/docs/guides/CLI-INTEGRATIONS.md) · 🇭🇺 [hu](../../../hu/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇩 [id](../../../id/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇹 [it](../../../it/docs/guides/CLI-INTEGRATIONS.md) · 🇯🇵 [ja](../../../ja/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇷 [ko](../../../ko/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [mr](../../../mr/docs/guides/CLI-INTEGRATIONS.md) · 🇲🇾 [ms](../../../ms/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇱 [nl](../../../nl/docs/guides/CLI-INTEGRATIONS.md) · 🇳🇴 [no](../../../no/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇭 [phi](../../../phi/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇱 [pl](../../../pl/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇹 [pt](../../../pt/docs/guides/CLI-INTEGRATIONS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇴 [ro](../../../ro/docs/guides/CLI-INTEGRATIONS.md) · 🇷🇺 [ru](../../../ru/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇰 [sk](../../../sk/docs/guides/CLI-INTEGRATIONS.md) · 🇸🇪 [sv](../../../sv/docs/guides/CLI-INTEGRATIONS.md) · 🇰🇪 [sw](../../../sw/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [ta](../../../ta/docs/guides/CLI-INTEGRATIONS.md) · 🇮🇳 [te](../../../te/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇭 [th](../../../th/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇷 [tr](../../../tr/docs/guides/CLI-INTEGRATIONS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/guides/CLI-INTEGRATIONS.md) · 🇵🇰 [ur](../../../ur/docs/guides/CLI-INTEGRATIONS.md) · 🇻🇳 [vi](../../../vi/docs/guides/CLI-INTEGRATIONS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/guides/CLI-INTEGRATIONS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/guides/CLI-INTEGRATIONS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "Integrasi CLI — arahkan CLI pengkodean ke OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# Integrasi CLI
|
||||
|
||||
OmniRoute menyediakan serangkaian perintah `setup-*` yang mengonfigurasi CLI pengkodean
|
||||
(Codex, Claude Code, OpenCode, Cline, …) untuk menggunakan OmniRoute sebagai backend-nya — sehingga
|
||||
alat tersebut berkomunikasi dengan **satu** endpoint dan OmniRoute mengarahkan ke penyedia yang tepat dengan
|
||||
fallback otomatis. Setiap perintah membaca katalog model **langsung** dari OmniRoute yang sedang berjalan
|
||||
(lokal atau jarak jauh) dan menulis file konfigurasi alat itu sendiri di **mesin Anda**. Kunci API dirujuk oleh variabel lingkungan di mana pun alat tersebut mendukungnya. Perintah yang mempertahankan file lingkungan lokal alat dicatat di bawah.
|
||||
|
||||
Ada juga peluncur generik — `omniroute run <target>` — yang memunculkan
|
||||
`claude`, `codex`, `aider`, `goose`, `opencode`, `qwen` atau `gemini` dengan
|
||||
lingkungan yang tepat disuntikkan, tanpa menulis konfigurasi sama sekali. Target dan aliasnya berasal dari manifest kanonik `bin/cli/cli-manifest.mjs`
|
||||
(`claude-code|cc|anthropic`, `codex-cli|openai-codex|openai`, `goose-cli`,
|
||||
`open-code`, `qwen-code`, `gemini-cli`), dan `omniroute completion` menawarkan
|
||||
kata target yang sama yang berasal dari manifest. Peluncur per-alat yang lama —
|
||||
`omniroute launch` (Claude Code) dan `omniroute launch-codex` (Codex) — tetap
|
||||
tersedia.
|
||||
|
||||
Onboarding penyedia tersedia dari konteks lokal/remote yang sama. Perintah
|
||||
API-first di bawah ini menjaga autentikasi manajemen terpisah dari kredensial penyedia
|
||||
dan tidak pernah mencetak kredensial dalam output terstruktur:
|
||||
|
||||
```bash
|
||||
omniroute providers add glm --credential-env GLM_API_KEY --name work
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth openai
|
||||
omniroute providers edit <connection-id> --default-model glm/glm-5.2
|
||||
omniroute providers remove <connection-id> --yes
|
||||
```
|
||||
|
||||
Untuk skrip, lebih baik menggunakan `--credential-stdin` atau `--credential-env`; `--credential`
|
||||
dipertahankan untuk penggunaan lokal yang terkontrol. `providers remove` memerlukan `--yes` pada terminal
|
||||
non-interaktif, dan kelima perintah menghormati konteks aktif atau opsi global `--base-url`/`--api-key`.
|
||||
|
||||
Untuk pengaturan dasar satu kali yang ditulis tangan dari dua integrasi terkaya, lihat
|
||||
penjelasan mendalam per-alat:
|
||||
|
||||
- [Konfigurasi Claude Code](./CLAUDE-CODE-CONFIGURATION.md)
|
||||
- [Konfigurasi CLI Codex](./CODEX-CLI-CONFIGURATION.md)
|
||||
- [Mode Jarak Jauh](./REMOTE-MODE.md) — mengendalikan OmniRoute jarak jauh (VPS / Tailnet) dari laptop Anda
|
||||
- [VS Code Copilot Chat](./VSCODE-COPILOT.md) — ekstensi OmniCopilot; ini juga dapat menjalankan
|
||||
perintah `setup-*` ini untuk Anda dari dalam editor
|
||||
|
||||
---
|
||||
|
||||
## Tabel Master
|
||||
|
||||
Setiap perintah menghormati **konteks aktif** (diatur dengan `omniroute connect`, lihat
|
||||
[Mode Jarak Jauh](./REMOTE-MODE.md)) atau bendera eksplisit `--remote <url> --api-key <key>`.
|
||||
"Local vs remote" di bawah ini berarti: tanpa bendera, itu menargetkan `http://localhost:20128`;
|
||||
dengan `--remote` (atau konteks jarak jauh yang aktif) itu mengambil katalog dari server tersebut dan menulis konfigurasi secara lokal.
|
||||
|
||||
| Perintah | Alat | Apa yang ditulis | Bendera kunci | Local vs remote |
|
||||
| -------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | --------------- |
|
||||
| `omniroute setup-codex` | OpenAI Codex CLI | `~/.codex/<name>.config.toml` — satu profil per model teks yang kompatibel (`codex --profile <name>`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--codex-home` | Keduanya |
|
||||
| `omniroute setup-claude` | Claude Code | `~/.claude/profiles/<name>/settings.json` — satu profil per model yang cocok (`CLAUDE_CONFIG_DIR`) | `--remote` `--api-key` `--only` `--dry-run` `--port` `--claude-home` | Keduanya |
|
||||
| `omniroute setup-opencode` | OpenCode (kompatibel dengan openai) | `~/.config/opencode/opencode.json` — penyedia `omniroute` dengan setiap model katalog (`opencode -m omniroute/<model>`) | `--remote` `--api-key` `--only` `--model` `--dry-run` `--port` | Keduanya |
|
||||
| `omniroute setup-cline` | Cline | `~/.cline/data/{globalState,secrets}.json` (mode CLI) + mencetak pengaturan ekstensi VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--cline-dir` | Keduanya |
|
||||
| `omniroute setup-kilo` | Kilo Code | `~/.local/share/kilo/auth.json` (CLI) + menggabungkan `kilocode.*` ke dalam `settings.json` VS Code jika ada | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--auth-path` `--vscode-settings` | Keduanya |
|
||||
| `omniroute setup-continue` | Continue / `cn` CLI | `~/.continue/config.yaml` — model `provider: openai`, kunci melalui `${{ secrets.OMNIROUTE_API_KEY }}` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-cursor` | Cursor | Tidak ada — mencetak langkah-langkah dalam aplikasi (konfigurasi Cursor tidak terlihat) | `--remote` `--api-key` `--only` `--port` | Keduanya |
|
||||
| `omniroute setup-roo` | Roo Code | `~/.omniroute/roo-settings.json` (dokumen impor) + mengatur `roo-cline.autoImportSettingsPath` jika ada `settings.json` VS Code | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--import-path` `--vscode-settings` | Keduanya |
|
||||
| `omniroute setup-crush` | Crush | `~/.config/crush/crush.json` — penyedia `openai-compat`, kunci melalui `$OMNIROUTE_API_KEY` | `--remote` `--api-key` `--only` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-goose` | Goose | `~/.config/goose/config.yaml` (`GOOSE_PROVIDER`/`OPENAI_HOST`/`GOOSE_MODEL`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-aider` | Aider | `~/.aider.conf.yml` (`openai-api-base` + `model: openai/<id>`) + mencetak resep env | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` | Keduanya |
|
||||
| `omniroute setup-qwen` | Qwen Code | `~/.qwen/settings.json` — array `modelProviders.openai` V4 + `OMNIROUTE_API_KEY` di `~/.qwen/.env` | `--remote` `--api-key` `--model` `--yes` `--dry-run` `--port` `--config-path` `--env-path` | Keduanya |
|
||||
| `omniroute run <target>` | Peluncuran runtime (generik) | Tidak ada — memunculkan `claude`/`codex`/`aider`/`goose`/`opencode`/`qwen`/`gemini` dengan env dan argumen yang tepat; Qwen dan Gemini menggunakan home terisolasi sementara | `--remote` `--base-url` `--context` `--provider` `--model` `--api-key` `--api-key-env` `--dry-run` `--json` `--port` `--profile` `--token` | Keduanya |
|
||||
| `omniroute launch` | Claude Code | Tidak ada — memunculkan `claude` dengan `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN` disuntikkan | `--remote` `--api-key` `--token` `--profile` `--port` | Keduanya |
|
||||
| `omniroute launch-codex` | OpenAI Codex CLI | Tidak ada — memunculkan `codex` dengan penyedia `omniroute` disuntikkan melalui bendera `-c` | `--remote` `--api-key` `--profile` (`-p`) `--port` | Keduanya |
|
||||
|
||||
Catatan tentang bendera (diverifikasi dalam sumber perintah):
|
||||
|
||||
- `--remote <url>` — mengambil katalog dari OmniRoute jarak jauh (mengganti `--port`
|
||||
dan konteks aktif). `--api-key <key>` menyediakan kredensial untuk server tersebut
|
||||
(default ke variabel lingkungan `OMNIROUTE_API_KEY`, atau token konteks aktif).
|
||||
- `--only <patterns>` — substring yang dipisahkan koma; hanya menyimpan ID model yang cocok
|
||||
(misalnya `--only glm,kimi`). Tersedia pada `setup-codex`, `setup-claude`,
|
||||
`setup-opencode`, `setup-continue`, `setup-cursor`, `setup-crush`.
|
||||
- `--dry-run` — mencetak persis apa yang akan ditulis tanpa menyentuh
|
||||
sistem file. Tersedia pada setiap perintah `setup-*` **kecuali** `setup-cursor`
|
||||
(yang tidak pernah menulis file).
|
||||
- `--model <id>` — diperlukan (atau dipilih secara interaktif) untuk alat yang tidak memiliki
|
||||
penemuan model otomatis: Cline, Kilo, Roo, Goose, Qwen, Aider. Alat-alat tersebut
|
||||
juga menerima `--yes` untuk penggunaan non-interaktif (yang kemudian memerlukan `--model`).
|
||||
`setup-opencode` mengambil `--model` untuk mengatur model tingkat atas default.
|
||||
- `--model <id>` pada `omniroute run` mengikuti pengkabelan per-target manifest
|
||||
(`bin/cli/cli-manifest.mjs`): **aider** menerima `--model openai/<id>` dan
|
||||
**opencode** `--model omniroute/<id>` (awalan hanya ditambahkan ketika id
|
||||
tidak sudah membawanya); **qwen** dan **gemini** menerima id secara verbatim;
|
||||
**claude** mendapatkannya melalui `ANTHROPIC_MODEL`, **goose** melalui `GOOSE_MODEL`, dan
|
||||
**codex** melalui argumen `-c model_providers.omniroute.*`. **Qwen adalah satu-satunya target run
|
||||
yang secara keras memerlukan `--model`** — `omniroute run qwen` tanpa itu keluar
|
||||
`2` dengan kesalahan eksplisit.
|
||||
- `--port <port>` — port OmniRoute lokal (default `20128`, diabaikan saat `--remote`
|
||||
diatur). Tersedia pada semua `setup-*` dan kedua peluncur.
|
||||
- Kode keluar `omniroute run`: kode keluar CLI anak disebarkan
|
||||
secara verbatim; `2` = argumen tidak valid (target tidak didukung, `--model` yang diperlukan hilang, penjaga kontainer); `127` = biner target tidak ada di `PATH`;
|
||||
`130`/`143`/`129` ketika peluncuran diakhiri oleh `SIGINT`/`SIGTERM`/`SIGHUP`;
|
||||
`1` = kegagalan peluncuran runtime lainnya.
|
||||
- Kedua peluncur (`launch`, `launch-codex`) menerima `--profile <name>` untuk memilih
|
||||
profil yang ditulis oleh `setup-claude` / `setup-codex`, ditambah argumen pass-through untuk
|
||||
biner `claude` / `codex` yang mendasarinya.
|
||||
|
||||
Pemilih interaktif juga dibagikan oleh resep pengaturan:
|
||||
|
||||
```bash
|
||||
# Pilih dari katalog model lokal atau jarak jauh yang aktif dan konfigurasikan target.
|
||||
omniroute configure claude
|
||||
omniroute configure opencode --provider glm
|
||||
omniroute configure qwen --model qwen/qwen3.8-max-preview --yes
|
||||
```
|
||||
|
||||
`configure` saat ini mendelegasikan ke resep yang diuji untuk `codex`, `claude`,
|
||||
`opencode`, `qwen`, `aider`, `goose`, `cline`, `continue`, dan `kilo`. Entri katalog yang hanya untuk IDE,
|
||||
MITM, dan hanya panduan tetap sebagai alur `setup-*`/manual yang eksplisit dan
|
||||
tidak disajikan sebagai target yang dapat diluncurkan.
|
||||
|
||||
> `setup-opencode` adalah integrasi OpenCode **ringan yang kompatibel dengan openai**.
|
||||
> Ada juga integrasi plugin yang lebih kaya — `omniroute setup opencode` — yang
|
||||
> menginstal `@omniroute/opencode-plugin`. Mereka adalah perintah yang berbeda; tabel
|
||||
> di atas mendokumentasikan `setup-opencode`.
|
||||
|
||||
---
|
||||
|
||||
## Penggunaan Lokal
|
||||
|
||||
Dengan OmniRoute berjalan di `localhost:20128`, cukup jalankan perintah setup untuk alat Anda. Katalog diambil dari server lokal.
|
||||
|
||||
```bash
|
||||
# Codex: tulis profil per model yang cocok ke ~/.codex/
|
||||
omniroute setup-codex
|
||||
codex --profile glm52 # gunakan profil yang dihasilkan
|
||||
|
||||
# Claude Code: tulis profil per-model, lalu luncurkan satu
|
||||
omniroute setup-claude
|
||||
omniroute launch --profile glm52
|
||||
|
||||
# OpenCode: tulis penyedia yang kompatibel dengan openai dengan semua model katalog
|
||||
omniroute setup-opencode
|
||||
export OMNIROUTE_API_KEY=sk-... # dirujuk melalui {env:OMNIROUTE_API_KEY}, tidak pernah di disk
|
||||
opencode -m omniroute/glm/glm-5.2 "..."
|
||||
|
||||
# Alat tanpa penemuan otomatis memerlukan model eksplisit:
|
||||
omniroute setup-aider --model glm/glm-5.2
|
||||
omniroute setup-qwen --model qwen/qwen3.8-max-preview
|
||||
|
||||
# Prabaca tanpa menulis apa pun:
|
||||
omniroute setup-continue --dry-run
|
||||
```
|
||||
|
||||
Luncurkan tanpa menulis konfigurasi sama sekali (hanya injeksi-env):
|
||||
|
||||
```bash
|
||||
omniroute launch # Claude Code → OmniRoute lokal
|
||||
omniroute launch-codex # Codex CLI → OmniRoute lokal
|
||||
omniroute launch-codex --profile glm52
|
||||
omniroute run claude --model openai/gpt-5.4
|
||||
omniroute run codex --model openai/gpt-5.4 --dry-run --json
|
||||
omniroute run aider --model glm/glm-5.2 -- --message "reply OK"
|
||||
omniroute run goose --model glm/glm-5.2
|
||||
omniroute run opencode --model glm/glm-5.2 -- run "reply OK"
|
||||
omniroute run qwen --model glm/glm-5.2 -- -p "reply OK"
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "reply OK"
|
||||
|
||||
# Jalur perintah eksplisit: teruskan apa pun yang datang setelah --
|
||||
omniroute run claude -- --print-system-prompt "review this diff"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Penggunaan Jarak Jauh
|
||||
|
||||
Arahkan perintah setup apa pun ke OmniRoute jarak jauh dengan `--remote` + `--api-key`. Katalog diambil dari jarak jauh; konfigurasi ditulis di mesin lokal Anda.
|
||||
|
||||
```bash
|
||||
# OpenCode terhadap VPS jarak jauh, simpan hanya model glm/kimi
|
||||
omniroute setup-opencode --remote http://192.168.0.15:20128 --api-key oma_live_xxx \
|
||||
--only glm,kimi
|
||||
opencode -m omniroute/glm/glm-5.2 "..." # ekspor OMNIROUTE_API_KEY terlebih dahulu
|
||||
|
||||
# Profil Codex dari katalog jarak jauh
|
||||
omniroute setup-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
|
||||
# Luncurkan CLI langsung terhadap jarak jauh
|
||||
omniroute launch --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
omniroute launch-codex --remote http://192.168.0.15:20128 --api-key oma_live_xxx
|
||||
```
|
||||
|
||||
Alih-alih melewatkan `--remote`/`--api-key` setiap kali, masuk sekali dan biarkan **konteks aktif** menyediakannya secara otomatis:
|
||||
|
||||
```bash
|
||||
omniroute connect 192.168.0.15 # menciptakan token terikat, menyimpan konteks
|
||||
omniroute setup-codex # ← sekarang menggunakan katalog jarak jauh
|
||||
omniroute setup-opencode # ← sama
|
||||
omniroute launch # ← Claude Code terhadap jarak jauh
|
||||
```
|
||||
|
||||
Lihat [Mode Jarak Jauh](./REMOTE-MODE.md) untuk konteks, ruang lingkup, dan manajemen token.
|
||||
|
||||
---
|
||||
|
||||
## Konvensi URL Dasar (alat yang menginginkan `/v1`)
|
||||
|
||||
OmniRoute mengekspos permukaan OpenAI di `/v1`, permukaan Anthropic di root, dan permukaan Gemini asli di `/v1beta`. Setiap integrasi terhubung ke bentuk yang diharapkan alatnya (diverifikasi di sumber perintah):
|
||||
|
||||
| Integrasi | URL Dasar yang ditulis | `/v1`? |
|
||||
| -------------------------------------------------------------------------- | ---------------------- | -------------------------------------------------- |
|
||||
| `setup-cline` (`openAiBaseUrl`) | root | Tidak — Cline menambahkan `/v1/chat/completions` |
|
||||
| `setup-goose` (`OPENAI_HOST`) | root | Tidak — Goose menambahkan jalur |
|
||||
| `setup-aider` (`OPENAI_API_BASE`) | root | Tidak — LiteLLM menambahkan `/v1/chat/completions` |
|
||||
| `setup-kilo`, `setup-roo`, `setup-continue`, `setup-crush`, `setup-cursor` | dengan `/v1` | Ya |
|
||||
| `setup-claude` (`ANTHROPIC_BASE_URL`), `launch` | root | Tidak — Claude Code menambahkan `/v1/messages` |
|
||||
| `setup-codex`, `launch-codex` (`model_providers.omniroute.base_url`) | dengan `/v1` | Ya |
|
||||
| `setup-qwen` (`modelProviders.openai[].baseUrl`) | dengan `/v1` | Ya |
|
||||
| `run gemini` (`GOOGLE_GEMINI_BASE_URL`) | root | Tidak — SDK menambahkan `/v1beta/models/…` |
|
||||
|
||||
---
|
||||
|
||||
## Menjaga dependensi native saat pembaruan: `--include=optional`
|
||||
|
||||
Saat Anda memperbarui dengan `omniroute update` (setelah mengonfirmasi, atau dengan `--apply`),
|
||||
OmniRoute menjalankan instalasi dengan `--include=optional` yang sudah terintegrasi:
|
||||
|
||||
```bash
|
||||
npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Ini **bukan** sebuah flag yang Anda berikan ke `omniroute update` — ini selalu diterapkan oleh
|
||||
updater. Ini menjamin bahwa `optionalDependencies` (`better-sqlite3`, `keytar`,
|
||||
`tls-client`, tumpukan LLMLingua SLM) tetap ada setelah pembaruan meskipun konfigurasi npm Anda
|
||||
memiliki `omit=optional` yang akan menghapus driver SQLite native dan binding OS-keyring secara diam-diam. Untuk melihat perintah yang tepat tanpa menerapkannya:
|
||||
|
||||
```bash
|
||||
omniroute update --dry-run
|
||||
# [DRY RUN] Akan menjalankan: npm install -g omniroute@latest --include=optional
|
||||
```
|
||||
|
||||
Flag `omniroute update` lainnya (terverifikasi dalam sumber): `--check` (keluar 1 jika
|
||||
ketinggalan), `--apply` (instal tanpa meminta), `--changelog`, `--no-backup`,
|
||||
`--yes`.
|
||||
|
||||
---
|
||||
|
||||
## Google Gemini CLI melalui `omniroute run gemini`
|
||||
|
||||
Kontrak diverifikasi terhadap `@google/gemini-cli` 0.50.0: CLI menghormati
|
||||
`GOOGLE_GEMINI_BASE_URL` dan mengeluarkan `POST /v1beta/models/<model>:generateContent`
|
||||
(dan `:streamGenerateContent?alt=sse`) terhadapnya — persis seperti permukaan Gemini native OmniRoute (`/v1beta`). `omniroute run gemini` menghubungkan itu secara otomatis:
|
||||
|
||||
- `GOOGLE_GEMINI_BASE_URL` → URL dasar OmniRoute yang aktif (root, tanpa `/v1`);
|
||||
- `GEMINI_API_KEY` → kredensial OmniRoute yang terpecahkan (opsi/env/konteks);
|
||||
- **`GEMINI_CLI_HOME` sementara yang terisolasi** yang `.gemini/settings.json`
|
||||
memilih otentikasi `gemini-api-key`, sehingga sesi OAuth Google yang disimpan (Code Assist)
|
||||
tidak pernah menimpa peluncuran yang diarahkan oleh OmniRoute — dihapus setelah keluar;
|
||||
- **kebersihan env**: lingkungan anak dibersihkan dari `GOOGLE_API_KEY`,
|
||||
`GOOGLE_GENAI_USE_VERTEXAI` dan `GOOGLE_GENAI_USE_GCA` (yang akan mengalihkan
|
||||
otentikasi ke Vertex/Code Assist), dan `GEMINI_DEFAULT_AUTH_TYPE=gemini-api-key` diatur sebagai
|
||||
cadangan — target `run` lainnya mendapatkan perlakuan yang sama untuk variabel yang bertentangan;
|
||||
- injeksi `--model <id>` dari `--provider`/`--model`.
|
||||
|
||||
```bash
|
||||
omniroute run gemini --model glm/glm-5.2 -- --skip-trust -p "hello"
|
||||
```
|
||||
|
||||
Pengaman kepercayaan workspace Gemini masih berlaku dalam mode headless — berikan
|
||||
`--skip-trust` (atau percayakan direktori secara interaktif) sendiri; peluncur
|
||||
dengan sengaja tidak melewatinya. Peluncur ini berbeda dari **registrasi ACP**
|
||||
(`src/lib/acp/registry.ts`, `gemini --acp`), yang tetap menjadi
|
||||
integrasi protokol agen untuk `/dashboard/acp-agents`.
|
||||
|
||||
---
|
||||
|
||||
## Pembersihan asap nyata (opt-in)
|
||||
|
||||
Regresi rencana peluncuran deterministik berjalan di CI (`tests/unit/cli/run-command.test.ts`,
|
||||
`tests/unit/cli/run-execution.test.ts`). Untuk memvalidasi biner REAL terhadap server
|
||||
OmniRoute yang REAL, ada harness opt-in di
|
||||
`tests/integration/upstream-cli-smoke.int.test.ts`. Ini tidak pernah berjalan secara otomatis
|
||||
(setiap sub-tes dilewati kecuali `RUN_CLI_SMOKE=1`), meneruskan kredensial melalui variabel-env
|
||||
NAMA (tidak pernah melalui nilai), menyensor string berbentuk kunci dari output yang tercatat,
|
||||
melewati target yang biner-nya tidak terinstal, dan mengklasifikasikan kegagalan sebagai
|
||||
otentikasi / upstream / konfigurasi alih-alih boolean kosong:
|
||||
|
||||
```bash
|
||||
RUN_CLI_SMOKE=1 \
|
||||
OMNIROUTE_SMOKE_BASE_URL="http://localhost:20128" \
|
||||
OMNIROUTE_SMOKE_MODEL="<provider/model>" \
|
||||
OMNIROUTE_SMOKE_API_KEY_ENV="OMNIROUTE_API_KEY" \
|
||||
node --import tsx/esm --test tests/integration/upstream-cli-smoke.int.test.ts
|
||||
```
|
||||
|
||||
Opsional: `OMNIROUTE_SMOKE_TARGETS="codex,opencode,qwen"` membatasi pembersihan;
|
||||
`OMNIROUTE_SMOKE_TIMEOUT_MS` menggantikan batas waktu 120 detik per-target.
|
||||
|
||||
---
|
||||
|
||||
## Lihat juga
|
||||
|
||||
- [Konfigurasi Kode Claude](./CLAUDE-CODE-CONFIGURATION.md) — panduan lebih dalam tentang Kode Claude
|
||||
- [Konfigurasi CLI Codex](./CODEX-CLI-CONFIGURATION.md) — pengaturan dasar `[model_providers.omniroute]` sekali saja
|
||||
- [Mode Jarak Jauh](./REMOTE-MODE.md) — konteks, token akses terbatas, mengendalikan server jarak jauh
|
||||
- [Referensi Alat CLI](../reference/CLI-TOOLS.md) — katalog lengkap alat yang didukung + halaman dasbor
|
||||
- [Panduan Pengaturan](./SETUP_GUIDE.md) — metode instalasi dan onboarding saat pertama kali menjalankan
|
||||
@@ -1,330 +1,86 @@
|
||||
# CLI-TOOLS (Bahasa Indonesia (Alt))
|
||||
# CLI Tools Setup Guide — OmniRoute (हिन्दी (IN))
|
||||
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../reference/CLI-TOOLS.md) · 🇸🇦 [ar](../../../ar/docs/reference/CLI-TOOLS.md) · 🇦🇿 [az](../../../az/docs/reference/CLI-TOOLS.md) · 🇧🇬 [bg](../../../bg/docs/reference/CLI-TOOLS.md) · 🇧🇩 [bn](../../../bn/docs/reference/CLI-TOOLS.md) · 🇨🇿 [cs](../../../cs/docs/reference/CLI-TOOLS.md) · 🇩🇰 [da](../../../da/docs/reference/CLI-TOOLS.md) · 🇩🇪 [de](../../../de/docs/reference/CLI-TOOLS.md) · 🇪🇸 [es](../../../es/docs/reference/CLI-TOOLS.md) · 🇮🇷 [fa](../../../fa/docs/reference/CLI-TOOLS.md) · 🇫🇮 [fi](../../../fi/docs/reference/CLI-TOOLS.md) · 🇫🇷 [fr](../../../fr/docs/reference/CLI-TOOLS.md) · 🇮🇳 [gu](../../../gu/docs/reference/CLI-TOOLS.md) · 🇮🇱 [he](../../../he/docs/reference/CLI-TOOLS.md) · 🇮🇳 [hi](../../../hi/docs/reference/CLI-TOOLS.md) · 🇭🇺 [hu](../../../hu/docs/reference/CLI-TOOLS.md) · 🇮🇩 [id](../../../id/docs/reference/CLI-TOOLS.md) · 🇮🇹 [it](../../../it/docs/reference/CLI-TOOLS.md) · 🇯🇵 [ja](../../../ja/docs/reference/CLI-TOOLS.md) · 🇰🇷 [ko](../../../ko/docs/reference/CLI-TOOLS.md) · 🇮🇳 [mr](../../../mr/docs/reference/CLI-TOOLS.md) · 🇲🇾 [ms](../../../ms/docs/reference/CLI-TOOLS.md) · 🇳🇱 [nl](../../../nl/docs/reference/CLI-TOOLS.md) · 🇳🇴 [no](../../../no/docs/reference/CLI-TOOLS.md) · 🇵🇭 [phi](../../../phi/docs/reference/CLI-TOOLS.md) · 🇵🇱 [pl](../../../pl/docs/reference/CLI-TOOLS.md) · 🇵🇹 [pt](../../../pt/docs/reference/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../../pt-BR/docs/reference/CLI-TOOLS.md) · 🇷🇴 [ro](../../../ro/docs/reference/CLI-TOOLS.md) · 🇷🇺 [ru](../../../ru/docs/reference/CLI-TOOLS.md) · 🇸🇰 [sk](../../../sk/docs/reference/CLI-TOOLS.md) · 🇸🇪 [sv](../../../sv/docs/reference/CLI-TOOLS.md) · 🇰🇪 [sw](../../../sw/docs/reference/CLI-TOOLS.md) · 🇮🇳 [ta](../../../ta/docs/reference/CLI-TOOLS.md) · 🇮🇳 [te](../../../te/docs/reference/CLI-TOOLS.md) · 🇹🇭 [th](../../../th/docs/reference/CLI-TOOLS.md) · 🇹🇷 [tr](../../../tr/docs/reference/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../../uk-UA/docs/reference/CLI-TOOLS.md) · 🇵🇰 [ur](../../../ur/docs/reference/CLI-TOOLS.md) · 🇻🇳 [vi](../../../vi/docs/reference/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../../zh-CN/docs/reference/CLI-TOOLS.md) · 🇹🇼 [zh-TW](../../../zh-TW/docs/reference/CLI-TOOLS.md)
|
||||
🌐 **Languages:** 🇺🇸 [English](../../../../docs/CLI-TOOLS.md) · 🇪🇸 [es](../../es/docs/CLI-TOOLS.md) · 🇫🇷 [fr](../../fr/docs/CLI-TOOLS.md) · 🇩🇪 [de](../../de/docs/CLI-TOOLS.md) · 🇮🇹 [it](../../it/docs/CLI-TOOLS.md) · 🇷🇺 [ru](../../ru/docs/CLI-TOOLS.md) · 🇨🇳 [zh-CN](../../zh-CN/docs/CLI-TOOLS.md) · 🇯🇵 [ja](../../ja/docs/CLI-TOOLS.md) · 🇰🇷 [ko](../../ko/docs/CLI-TOOLS.md) · 🇸🇦 [ar](../../ar/docs/CLI-TOOLS.md) · 🇮🇳 [hi](../../hi/docs/CLI-TOOLS.md) · 🇮🇳 [in](../../in/docs/CLI-TOOLS.md) · 🇹🇭 [th](../../th/docs/CLI-TOOLS.md) · 🇻🇳 [vi](../../vi/docs/CLI-TOOLS.md) · 🇮🇩 [id](../../id/docs/CLI-TOOLS.md) · 🇲🇾 [ms](../../ms/docs/CLI-TOOLS.md) · 🇳🇱 [nl](../../nl/docs/CLI-TOOLS.md) · 🇵🇱 [pl](../../pl/docs/CLI-TOOLS.md) · 🇸🇪 [sv](../../sv/docs/CLI-TOOLS.md) · 🇳🇴 [no](../../no/docs/CLI-TOOLS.md) · 🇩🇰 [da](../../da/docs/CLI-TOOLS.md) · 🇫🇮 [fi](../../fi/docs/CLI-TOOLS.md) · 🇵🇹 [pt](../../pt/docs/CLI-TOOLS.md) · 🇷🇴 [ro](../../ro/docs/CLI-TOOLS.md) · 🇭🇺 [hu](../../hu/docs/CLI-TOOLS.md) · 🇧🇬 [bg](../../bg/docs/CLI-TOOLS.md) · 🇸🇰 [sk](../../sk/docs/CLI-TOOLS.md) · 🇺🇦 [uk-UA](../../uk-UA/docs/CLI-TOOLS.md) · 🇮🇱 [he](../../he/docs/CLI-TOOLS.md) · 🇵🇭 [phi](../../phi/docs/CLI-TOOLS.md) · 🇧🇷 [pt-BR](../../pt-BR/docs/CLI-TOOLS.md) · 🇨🇿 [cs](../../cs/docs/CLI-TOOLS.md) · 🇹🇷 [tr](../../tr/docs/CLI-TOOLS.md)
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
title: "Alat CLI — OmniRoute"
|
||||
version: 3.8.50
|
||||
lastUpdated: 2026-08-18
|
||||
---
|
||||
|
||||
# Alat CLI — OmniRoute
|
||||
|
||||
Terakhir diperbarui: 2026-08-18
|
||||
|
||||
OmniRoute terintegrasi dengan tiga kategori alat CLI yang tersebar di tiga halaman dasbor khusus:
|
||||
|
||||
| Halaman | Rute | Konsep | Jumlah |
|
||||
| ------------ | ----------------------- | ----------------------------------------------------------------------------------- | -------------- |
|
||||
| **Kode CLI** | `/dashboard/cli-code` | Alat pengkodean yang Anda arahkan ke OmniRoute (Klien → CLI → OmniRoute → Penyedia) | 26 |
|
||||
| **Agen CLI** | `/dashboard/cli-agents` | Agen otonom yang Anda arahkan ke OmniRoute (alur yang sama, cakupan lebih luas) | 8 |
|
||||
| **Agen ACP** | `/dashboard/acp-agents` | CLI yang diluncurkan OmniRoute sebagai backend melalui stdio/ACP (alur terbalik) | lihat registri |
|
||||
|
||||
Rute warisan mengalihkan melalui 308: `/dashboard/cli-tools` → `/dashboard/cli-code`, `/dashboard/agents` → `/dashboard/acp-agents`.
|
||||
This guide explains how to install and configure all supported AI coding CLI tools
|
||||
to use **OmniRoute** as the unified backend, giving you centralized key management,
|
||||
cost tracking, model switching, and request logging across every tool.
|
||||
|
||||
---
|
||||
|
||||
## Cara Kerjanya
|
||||
## How It Works
|
||||
|
||||
```
|
||||
Kode CLI / Agen CLI (alur konsumsi):
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Hermes Agent / Goose / ...
|
||||
Claude / Codex / OpenCode / Cline / KiloCode / Continue / Kiro / Cursor / Copilot
|
||||
│
|
||||
▼ (semua mengarah ke OmniRoute)
|
||||
▼ (all point to OmniRoute)
|
||||
http://YOUR_SERVER:20128/v1
|
||||
│
|
||||
▼ (OmniRoute mengarahkan ke penyedia yang tepat)
|
||||
▼ (OmniRoute routes to the right provider)
|
||||
Anthropic / OpenAI / Gemini / DeepSeek / Groq / Mistral / ...
|
||||
|
||||
Agen ACP (alur peluncuran terbalik):
|
||||
Permintaan Klien → OmniRoute → meluncurkan CLI melalui stdio/ACP → respons
|
||||
```
|
||||
|
||||
**Manfaat:**
|
||||
**Benefits:**
|
||||
|
||||
- Satu kunci API untuk mengelola semua alat
|
||||
- Pelacakan biaya di semua CLI di dasbor
|
||||
- Pergantian model tanpa mengonfigurasi ulang setiap alat
|
||||
- Bekerja secara lokal dan di server jarak jauh (VPS, Docker, Akamai, Cloudflare Tunnel)
|
||||
- One API key to manage all tools
|
||||
- Cost tracking across all CLIs in the dashboard
|
||||
- Model switching without reconfiguring every tool
|
||||
- Works locally and on remote servers (VPS)
|
||||
|
||||
---
|
||||
|
||||
## Konfigurasi otomatis dengan `setup-*`
|
||||
## Supported Tools (Dashboard Source of Truth)
|
||||
|
||||
Anda tidak perlu menulis konfigurasi setiap alat dengan tangan. OmniRoute menyediakan perintah `setup-*`
|
||||
untuk setiap CLI yang didukung yang membaca katalog model **langsung** dari OmniRoute yang berjalan
|
||||
(lokal atau jarak jauh) dan menulis konfigurasi alat itu sendiri di mesin Anda:
|
||||
The dashboard cards in `/dashboard/cli-tools` are generated from `src/shared/constants/cliTools.ts`.
|
||||
Current list (v3.0.0-rc.16):
|
||||
|
||||
```bash
|
||||
omniroute setup-codex omniroute setup-claude omniroute setup-opencode
|
||||
omniroute setup-cline omniroute setup-kilo omniroute setup-continue
|
||||
omniroute setup-cursor omniroute setup-roo omniroute setup-crush
|
||||
omniroute setup-goose omniroute setup-qwen omniroute setup-aider
|
||||
```
|
||||
| Tool | ID | Command | Setup Mode | Install Method |
|
||||
| ------------------ | ------------- | ---------- | ---------- | -------------- |
|
||||
| **Claude Code** | `claude` | `claude` | env | npm |
|
||||
| **OpenAI Codex** | `codex` | `codex` | custom | npm |
|
||||
| **Factory Droid** | `droid` | `droid` | custom | bundled/CLI |
|
||||
| **OpenClaw** | `openclaw` | `openclaw` | custom | bundled/CLI |
|
||||
| **Cursor** | `cursor` | app | guide | desktop app |
|
||||
| **Cline** | `cline` | `cline` | custom | npm |
|
||||
| **Kilo Code** | `kilo` | `kilocode` | custom | npm |
|
||||
| **Continue** | `continue` | extension | guide | VS Code |
|
||||
| **Antigravity** | `antigravity` | internal | mitm | OmniRoute |
|
||||
| **GitHub Copilot** | `copilot` | extension | custom | VS Code |
|
||||
| **OpenCode** | `opencode` | `opencode` | guide | npm |
|
||||
| **Kiro AI** | `kiro` | app/cli | mitm | desktop/CLI |
|
||||
| **Qwen Code** | `qwen` | `qwen` | custom | npm |
|
||||
|
||||
Setiap perintah menerima `--remote <url> --api-key <key>` (mengonfigurasi alat lokal terhadap
|
||||
OmniRoute jarak jauh), `--dry-run` (prabaca tanpa menulis), dan `--port`. Alat
|
||||
tanpa penemuan model otomatis (Cline, Kilo, Roo, Goose, Aider, Qwen) menggunakan
|
||||
`--model <id>` (dan `--yes` untuk eksekusi non-interaktif). Untuk meluncurkan CLI dengan
|
||||
lingkungan yang tepat disuntikkan dan tanpa konfigurasi yang ditulis sama sekali, gunakan
|
||||
peluncur generik `omniroute run <target>` (claude, codex, aider, goose, opencode, qwen,
|
||||
gemini — target dan alias berasal dari `bin/cli/cli-manifest.mjs`); peluncur per-alat warisan
|
||||
`omniroute launch` (Claude Code) dan `omniroute launch-codex`
|
||||
(Codex) tetap tersedia. CLI Gemini hanya untuk peluncuran: ini adalah target `omniroute run`
|
||||
tetapi tidak memiliki resep `setup-*`/`configure`.
|
||||
### CLI fingerprint sync (Agents + Settings)
|
||||
|
||||
> **Referensi lengkap:** tabel master — apa yang ditulis setiap perintah, setiap bendera,
|
||||
> lokal vs jarak jauh, dan alat mana yang memerlukan akhiran `/v1` — ada di
|
||||
> **[Integrasi CLI](../guides/CLI-INTEGRATIONS.md)**.
|
||||
`/dashboard/agents` and `Settings > CLI Fingerprint` use `src/shared/constants/cliCompatProviders.ts`.
|
||||
This keeps provider IDs aligned with CLI cards and legacy IDs.
|
||||
|
||||
### Menjalankan ini di dalam kontainer
|
||||
| CLI ID | Fingerprint Provider ID |
|
||||
| ---------------------------------------------------------------------------------------------------- | ----------------------- |
|
||||
| `kilo` | `kilocode` |
|
||||
| `copilot` | `github` |
|
||||
| `claude` / `codex` / `antigravity` / `kiro` / `cursor` / `cline` / `opencode` / `droid` / `openclaw` | same ID |
|
||||
|
||||
Perintah `setup-*` yang dieksekusi di dalam kontainer OmniRoute menulis ke
|
||||
rumah kontainer itu sendiri, yang tidak dibaca oleh CLI host dan yang menghilang dengan
|
||||
kontainer. OmniRoute mendeteksi hal itu dan keluar dengan `2` dengan instruksi daripada
|
||||
menulis. Dua cara yang didukung untuk melanjutkan — instal CLI di host dan
|
||||
`omniroute connect` ke kontainer, atau bind-mount direktori konfigurasi dan set
|
||||
`CLI_CONFIG_HOME` (profil `host` compose). Setiap perintah `setup-*`, ditambah
|
||||
`omniroute configure` dan `omniroute config set`, menerima
|
||||
`--allow-container-write` ketika mengonfigurasi CLI kontainer itu sendiri adalah yang sebenarnya Anda maksud; `OMNIROUTE_ALLOW_CONTAINER_CONFIG_WRITE=true` melakukan hal yang sama untuk
|
||||
server. Lihat
|
||||
[Panduan Docker → Mengonfigurasi alat CLI host](../guides/DOCKER_GUIDE.md#configuring-host-cli-tools-when-omniroute-runs-in-docker).
|
||||
|
||||
**Endpoint terapkan** di dasbor (`POST /api/cli-tools/apply`) menerapkan
|
||||
penjagaan yang sama: di dalam kontainer, penulisan yang targetnya tidak bind-mounted dari
|
||||
host menjawab **`422`** dengan `containerEphemeralTarget: true`, teks kesalahan yang aman
|
||||
dan — untuk alat dengan resep host (claude, codex, opencode, cline,
|
||||
kilo, continue) — sebuah `hostSetupCommand` (misalnya `omniroute setup-opencode`) untuk dijalankan
|
||||
di host sebagai gantinya; tidak ada yang ditulis. `dryRun: true` tetap berfungsi dalam mode
|
||||
kontainer dan mengembalikan konten yang dihasilkan + jalur target tanpa menyentuh disk, sehingga
|
||||
Anda dapat prabaca dari dasbor dan menerapkan di host. Perilaku ini
|
||||
sengaja dan dilindungi regresi oleh
|
||||
`tests/unit/api/cli-tools/apply-container-guard.test.ts` — jangan pernah "memperbaiki" 422
|
||||
dengan menghapus penjagaan.
|
||||
|
||||
## Sumber Kebenaran
|
||||
|
||||
Katalog terpadu berada di `src/shared/constants/cliTools.ts` sebagai `CLI_TOOLS: Record<string, CliCatalogEntry>`.
|
||||
|
||||
Setiap entri memiliki bidang-bidang berikut (didefinisikan di `src/shared/schemas/cliCatalog.ts`):
|
||||
|
||||
| Bidang | Tipe | Deskripsi |
|
||||
| ----------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| `category` | `"code" \| "agent"` | Halaman mana alat tersebut muncul |
|
||||
| `vendor` | `string` | Asal alat ("Anthropic", "OSS (P. Gauthier)") |
|
||||
| `acpSpawnable` | `boolean` | Juga dapat digunakan sebagai ACP Agent (lencana ditampilkan) |
|
||||
| `baseUrlSupport` | `"full" \| "partial" \| "none"` | Tingkat dukungan endpoint kustom. `"none"` = backlog MITM |
|
||||
| `configType` | `"env" \| "custom" \| "guide" \| "custom-builder" \| "mitm"` | Mekanisme konfigurasi |
|
||||
| `id`, `name`, `color`, `description`, `docsUrl` | standar | Bidang tampilan inti |
|
||||
|
||||
Entri dengan `baseUrlSupport: "none"` **tidak ditampilkan** di halaman dasbor — mereka terdaftar di backlog MITM untuk rencana 11 (lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md`).
|
||||
|
||||
### Tingkatan Kapabilitas (tercatalog × terdeteksi × terkonfigurasi × dapat diluncurkan)
|
||||
|
||||
Tidak setiap alat yang tercatalog dapat terdeteksi, terkonfigurasi, atau dapat diluncurkan. Setiap tingkatan memiliki satu sumber deklarasi, dan tes drift menjaga mereka tetap selaras:
|
||||
|
||||
| Tingkatan | Arti | Dideklarasikan di |
|
||||
| ---------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
||||
| **Cataloged** | Muncul di katalog dasbor (nama, vendor, dokumen, tipe konfigurasi) | `src/shared/constants/cliTools.ts` (`CLI_TOOLS`) |
|
||||
| **Detectable** | Deteksi biner/konfigurasi, pemeriksaan kesehatan, jalur konfigurasi | `src/shared/services/cliRuntime.ts` (`CLI_TOOLS` runtime catalog) |
|
||||
| **Configurable** | Didukung oleh `omniroute configure <cli>` (resep pengaturan ada) | `bin/cli/cli-manifest.mjs` (`configure: true`) |
|
||||
| **Launchable** | Didukung oleh `omniroute run <target>` (injeksi env/args didefinisikan) | `bin/cli/cli-manifest.mjs` (`run: true`) |
|
||||
|
||||
`bin/cli/cli-manifest.mjs` adalah manifest eksekusi kanonik untuk perintah CLI yang muncul: `run`, `configure` dan generator penyelesaian shell semuanya mengambil daftar target, resolusi alias (misalnya `kilocode`/`kilo-code`/`kilo_cli` → `kilo`) dan pengkabelan flag `--model` darinya. Penjaga drift `tests/unit/cli/cli-manifest-drift.test.ts` memastikan bahwa manifest, katalog runtime, katalog UI, dan setiap permukaan konsumen tetap sinkron — target yang ditambahkan ke satu permukaan tanpa yang lainnya akan gagal dalam suite alih-alih mengalir diam-diam.
|
||||
|
||||
## 1. Katalog Kode CLI (26 alat)
|
||||
|
||||
Semua alat yang muncul di `/dashboard/cli-code`. Alat yang memiliki `baseUrlSupport: none` terhubung melalui MITM atau panduan manual alih-alih URL dasar kustom:
|
||||
|
||||
| id | nama | vendor | baseUrlSupport | configType | acpSpawnable |
|
||||
| ------------ | -------------------------- | ------------------------------ | -------------- | -------------- | ------------ |
|
||||
| claude | Claude Code | Anthropic | penuh | env | true |
|
||||
| codex | OpenAI Codex CLI | OpenAI | penuh | kustom | true |
|
||||
| zcode | ZCode (Rencana Koding GLM) | Z.ai | tidak ada | kustom | false |
|
||||
| cline | Cline | OSS (mantan-Pengembang Claude) | penuh | kustom | true |
|
||||
| kilo | Kilo Code | Kilo-Org | penuh | kustom | false |
|
||||
| roo | Roo Code | Roo (OSS) | penuh | panduan | false |
|
||||
| continue | Continue | continue.dev | penuh | panduan | false |
|
||||
| aider | Aider | OSS (P. Gauthier) | penuh | panduan | true |
|
||||
| forge | ForgeCode | Antinomy HQ | penuh | kustom | true |
|
||||
| jcode | jcode | 1jehuang (OSS) | penuh | kustom | false |
|
||||
| deepseek-tui | DeepSeek TUI | Hunter Bown (OSS) | penuh | kustom | false |
|
||||
| codewhale | CodeWhale | Hmbown (OSS) | penuh | kustom | false |
|
||||
| opencode | OpenCode | Anomaly (mantan-SST) | penuh | panduan | true |
|
||||
| droid | Factory Droid | Factory AI | sebagian | panduan | false |
|
||||
| copilot | GitHub Copilot CLI | GitHub/MS | penuh | kustom | false |
|
||||
| cursor-cli | Cursor CLI | Anysphere | sebagian | panduan | true |
|
||||
| smelt | Smelt | leonardcser (OSS) | penuh | kustom | false |
|
||||
| pi | Pi (agen-koding-pi) | M. Zechner (OSS) | penuh | kustom | false |
|
||||
| grok-build | Grok Build | xAI | penuh | kustom | false |
|
||||
| crush | Crush | OSS (Charm) | penuh | kustom | false |
|
||||
| qwen | Qwen Code | Alibaba | penuh | panduan | true |
|
||||
| cursor | Cursor | Anysphere | tidak ada | panduan | false |
|
||||
| antigravity | Antigravity | Google | tidak ada | mitm | false |
|
||||
| hermes | Hermes | Nous Research | tidak ada | panduan | false |
|
||||
| kiro | Kiro AI | Amazon | tidak ada | mitm | false |
|
||||
| custom | Custom CLI | — | penuh | pembuat-kustom | false |
|
||||
|
||||
Alat dengan `baseUrlSupport: "partial"` menunjukkan lencana "⚠ Base URL parcial" di kartu dasbor.
|
||||
|
||||
## 2. Katalog Agen CLI (8 alat)
|
||||
|
||||
Agen otonom yang muncul di `/dashboard/cli-agents`:
|
||||
|
||||
| id | nama | vendor | dukunganBaseUrl | dapatDibuatACP |
|
||||
| ------------ | ---------------- | ------------------------ | --------------- | -------------- |
|
||||
| hermes-agent | Hermes Agent | Nous Research | penuh | false |
|
||||
| openclaw | OpenClaw | OSS (P. Steinberger) | penuh | true |
|
||||
| goose | Goose | Block / Linux Foundation | penuh | true |
|
||||
| interpreter | Open Interpreter | OSS | penuh | true |
|
||||
| warp | Warp AI | Warp Inc. | sebagian | true |
|
||||
| agent-deck | Agent Deck | asheshgoplani (OSS) | penuh | false |
|
||||
| omp | Oh My Pi | OSS | penuh | true |
|
||||
| letta | Letta CLI | Letta | penuh | false |
|
||||
Legacy IDs still accepted for compatibility: `copilot`, `kimi-coding`, `qwen`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Agen ACP (/dashboard/acp-agents)
|
||||
## Step 1 — Get an OmniRoute API Key
|
||||
|
||||
Halaman ini (yang diganti namanya dari `/dashboard/agents`) menunjukkan CLI yang dapat **dibuat** oleh OmniRoute sebagai mesin eksekusi backend melalui protokol stdio/ACP. Katalog ini dikelola secara terpisah di `src/lib/acp/registry.ts` dan **tidak** sama dengan `CLI_TOOLS`.
|
||||
1. Open the OmniRoute dashboard → **API Manager** (`/dashboard/api-manager`)
|
||||
2. Click **Create API Key**
|
||||
3. Give it a name (e.g. `cli-tools`) and select all permissions
|
||||
4. Copy the key — you'll need it for every CLI below
|
||||
|
||||
> Your key looks like: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
## 4. Daftar Tugas MITM (tidak ditampilkan di dasbor)
|
||||
## Step 2 — Install CLI Tools
|
||||
|
||||
CLI berikut tidak mendukung URL dasar kustom secara native dan **tidak terdaftar** di halaman Kode CLI atau Agen CLI. Mereka adalah kandidat untuk intersepsi MITM dalam rencana 11:
|
||||
|
||||
| CLI | Alasan |
|
||||
| ------------------- | ----------------------------------------------------------------- |
|
||||
| windsurf | BYOK terbatas pada model Claude tertentu + URL/token perusahaan |
|
||||
| amp | Ekosistem tertutup (Sourcegraph) |
|
||||
| amazon-q / kiro-cli | Autentikasi AWS SSO, tidak ada URL kustom |
|
||||
| cowork | Anthropic Desktop, tidak ada titik akhir yang dapat dikonfigurasi |
|
||||
|
||||
Lihat `_tasks/features-v3.8.6/refactorpages/_orchestration/_plan11-mitm-backlog.md` untuk referensi silang lengkap.
|
||||
|
||||
---
|
||||
|
||||
## 5. API Deteksi Batch
|
||||
|
||||
Semua deteksi alat digabungkan melalui satu titik akhir:
|
||||
|
||||
**`GET /api/cli-tools/all-statuses`**
|
||||
|
||||
- Auth: `requireCliToolsAuth(request)` (sama seperti rute `/api/cli-tools/` lainnya)
|
||||
- Mengembalikan: `Record<toolId, ToolBatchStatus>` (tipe: `src/shared/types/cliBatchStatus.ts`)
|
||||
- Strategi: `Promise.all` untuk semua alat, timeout 5s per alat
|
||||
- Cache: dalam memori LRU yang diindeks oleh file konfigurasi `mtime`. Cache tidak valid ketika mtime berubah. Reset saat server di-restart.
|
||||
|
||||
Bentuk respons per alat:
|
||||
|
||||
```ts
|
||||
interface ToolBatchStatus {
|
||||
detection: {
|
||||
installed: boolean;
|
||||
runnable: boolean;
|
||||
version?: string;
|
||||
command?: string;
|
||||
commandPath?: string;
|
||||
reason?: string;
|
||||
};
|
||||
config: {
|
||||
status: "configured" | "not_configured" | "not_installed" | "unknown" | "other";
|
||||
endpoint?: string | null;
|
||||
lastConfiguredAt?: string | null;
|
||||
};
|
||||
error?: string; // disanitasi, tidak ada jejak tumpukan
|
||||
}
|
||||
```
|
||||
|
||||
## 6. Pengatur Pengaturan untuk Alat Baru
|
||||
|
||||
Alat baru dengan `configType: "custom"` memiliki rute API pengaturan yang didedikasikan:
|
||||
|
||||
| Rute | Alat |
|
||||
| ------------------------------------------- | --------------------------------------------------------------------- |
|
||||
| `POST /api/cli-tools/forge-settings` | ForgeCode (.forge.toml) |
|
||||
| `POST /api/cli-tools/jcode-settings` | jcode (--base-url flag) |
|
||||
| `POST /api/cli-tools/deepseek-tui-settings` | DeepSeek TUI (OPENAI_BASE_URL, legacy) |
|
||||
| `POST /api/cli-tools/codewhale-settings` | CodeWhale (OPENAI_BASE_URL, primary + legacy `~/.deepseek` sync) |
|
||||
| `POST /api/cli-tools/smelt-settings` | Smelt |
|
||||
| `POST /api/cli-tools/pi-settings` | Agen pengkodean Pi |
|
||||
| `POST /api/cli-tools/grok-build-settings` | Grok Build (~/.grok/config.toml, `[model.omniroute]`) |
|
||||
| `POST /api/cli-tools/qwen-settings` | Qwen Code (`~/.qwen/settings.json` + kunci `.env` yang didedikasikan) |
|
||||
|
||||
Semua rute menggunakan `sanitizeErrorMessage()` untuk respons kesalahan (Aturan Keras #12).
|
||||
|
||||
---
|
||||
|
||||
## 7. Arsitektur Halaman Dasbor
|
||||
|
||||
### Kode CLI (`/dashboard/cli-code`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-code/page.tsx` — komponen server
|
||||
- `src/app/(dashboard)/dashboard/cli-code/CliCodePageClient.tsx` — grid klien
|
||||
- `src/app/(dashboard)/dashboard/cli-code/[id]/page.tsx` — halaman detail alat
|
||||
- `src/app/(dashboard)/dashboard/cli-code/components/` — 12 kartu alat khusus + `ToolDetailClient.tsx`
|
||||
|
||||
### Agen CLI (`/dashboard/cli-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/page.tsx` — komponen server
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/CliAgentsPageClient.tsx` — grid klien
|
||||
- `src/app/(dashboard)/dashboard/cli-agents/[id]/page.tsx` — menggunakan kembali `ToolDetailClient`
|
||||
|
||||
### Agen ACP (`/dashboard/acp-agents`)
|
||||
|
||||
- `src/app/(dashboard)/dashboard/acp-agents/page.tsx` — komponen server (dipindahkan dari `agents/`)
|
||||
|
||||
### Komponen UI Bersama (`src/shared/components/cli/`)
|
||||
|
||||
| File | Tujuan |
|
||||
| ----------------------- | ------------------------------------------------------ |
|
||||
| `CliToolCard.tsx` | Kartu status pintar (deteksi + konfigurasi + endpoint) |
|
||||
| `CliConceptCard.tsx` | Kartu penjelasan konsep per halaman |
|
||||
| `CliComparisonCard.tsx` | Perbandingan tiga kolom di berbagai jenis CLI |
|
||||
| `BaseUrlSelect.tsx` | Dropdown endpoint (Lokal/Awan/Kustom) |
|
||||
| `ApiKeySelect.tsx` | Pemilih kunci API |
|
||||
| `ManualConfigModal.tsx` | Modal cuplikan konfigurasi yang dapat disalin |
|
||||
|
||||
### Hook Bersama (`src/shared/hooks/cli/`)
|
||||
|
||||
| File | Tujuan |
|
||||
| ------------------------- | ------------------------------------------------------------------------- |
|
||||
| `useToolBatchStatuses.ts` | Mengambil `/api/cli-tools/all-statuses`, mengelola status loading/refresh |
|
||||
|
||||
## 8. i18n
|
||||
|
||||
Namespace baru ditambahkan dalam rencana 14 F9:
|
||||
|
||||
| Namespace | Tujuan |
|
||||
| ----------- | ----------------------------------------------------------------------------------- |
|
||||
| `cliCommon` | String yang dibagikan (label kartu, teks konsep/perbandingan, label halaman detail) |
|
||||
| `cliCode` | String halaman CLI Code |
|
||||
| `cliAgents` | String halaman CLI Agents |
|
||||
| `acpAgents` | String halaman ACP Agents |
|
||||
|
||||
Terjemahan lengkap PT-BR dan EN disediakan. 39 lokal lainnya secara otomatis menggunakan EN melalui penggabungan tingkat namespace di `src/i18n/request.ts`.
|
||||
|
||||
---
|
||||
|
||||
## 9. Memulai dengan Cepat
|
||||
|
||||
### Langkah 1 — Dapatkan Kunci API OmniRoute
|
||||
|
||||
1. Buka `/dashboard/api-manager` → **Buat Kunci API**
|
||||
2. Beri nama (misalnya `cli-tools`) dan pilih semua izin
|
||||
3. Salin kunci tersebut — Anda akan membutuhkannya untuk setiap CLI di bawah ini
|
||||
|
||||
> Kunci Anda terlihat seperti: `sk-xxxxxxxxxxxxxxxx-xxxxxxxxx`
|
||||
|
||||
---
|
||||
|
||||
### Langkah 2 — Instal Alat CLI
|
||||
|
||||
Semua alat berbasis npm memerlukan Node.js 22.22.2+ atau 24.x:
|
||||
All npm-based tools require Node.js 18+:
|
||||
|
||||
```bash
|
||||
# Claude Code (Anthropic)
|
||||
@@ -342,135 +98,96 @@ npm install -g cline
|
||||
# KiloCode
|
||||
npm install -g kilocode
|
||||
|
||||
# Qwen Code
|
||||
npm install -g @qwen-code/qwen-code
|
||||
# Kiro CLI (Amazon — requires curl + unzip)
|
||||
apt-get install -y unzip # on Debian/Ubuntu
|
||||
curl -fsSL https://cli.kiro.dev/install | bash
|
||||
export PATH="$HOME/.local/bin:$PATH" # add to ~/.bashrc
|
||||
```
|
||||
|
||||
# Google Gemini CLI (dapat diluncurkan melalui `omniroute run gemini` → /v1beta surface)
|
||||
npm install -g @google/gemini-cli
|
||||
**Verify:**
|
||||
|
||||
# Aider
|
||||
pip install aider-chat
|
||||
|
||||
# Smelt
|
||||
cargo install smelt # Berbasis Rust
|
||||
|
||||
# Agen pemrograman Pi
|
||||
# lihat https://github.com/zechnerj/pi-coding-agent untuk instalasi
|
||||
|
||||
# jcode
|
||||
# lihat https://github.com/1jehuang/jcode untuk instalasi
|
||||
```bash
|
||||
claude --version # 2.x.x
|
||||
codex --version # 0.x.x
|
||||
opencode --version # x.x.x
|
||||
cline --version # 2.x.x
|
||||
kilocode --version # x.x.x (or: kilo --version)
|
||||
kiro-cli --version # 1.x.x
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Langkah 3 — Konfigurasi melalui Dashboard
|
||||
## Step 3 — Set Global Environment Variables
|
||||
|
||||
1. Pergi ke `http://localhost:20128/dashboard/cli-code`
|
||||
2. Temukan alat Anda di grid
|
||||
3. Klik kartu untuk membuka halaman detail alat
|
||||
4. Pilih kunci API dan URL dasar Anda
|
||||
5. Klik **Terapkan Konfigurasi** atau salin potongan konfigurasi manual
|
||||
|
||||
---
|
||||
|
||||
### Langkah 4 — Atur Variabel Lingkungan Global
|
||||
Add to `~/.bashrc` (or `~/.zshrc`), then run `source ~/.bashrc`:
|
||||
|
||||
```bash
|
||||
# OmniRoute Universal Endpoint
|
||||
export OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
export OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_AUTH_TOKEN="sk-your-omniroute-key"
|
||||
# Gemini CLI membaca GOOGLE_GEMINI_BASE_URL di ROOT (SDK-nya menambahkan /v1beta/... sendiri)
|
||||
export GOOGLE_GEMINI_BASE_URL="http://localhost:20128"
|
||||
export ANTHROPIC_BASE_URL="http://localhost:20128/v1"
|
||||
export ANTHROPIC_API_KEY="sk-your-omniroute-key"
|
||||
export GEMINI_BASE_URL="http://localhost:20128/v1"
|
||||
export GEMINI_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
> Untuk **server jarak jauh** ganti `localhost:20128` dengan IP atau domain server,
|
||||
> misalnya `http://<your-server-ip>:20128`.
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain,
|
||||
> e.g. `http://192.168.0.15:20128`.
|
||||
|
||||
---
|
||||
|
||||
### Langkah 4 — Konfigurasi Setiap Alat
|
||||
## Step 4 — Configure Each Tool
|
||||
|
||||
#### Claude Code
|
||||
### Claude Code
|
||||
|
||||
```bash
|
||||
# Buat ~/.claude/settings.json:
|
||||
# Via CLI:
|
||||
claude config set --global api-base-url http://localhost:20128/v1
|
||||
|
||||
# Or create ~/.claude/settings.json:
|
||||
mkdir -p ~/.claude && cat > ~/.claude/settings.json << EOF
|
||||
{
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:20128",
|
||||
"ANTHROPIC_AUTH_TOKEN": "sk-your-omniroute-key"
|
||||
}
|
||||
"apiBaseUrl": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Gunakan root gateway Anthropic yang terpadu untuk Claude Code. Jangan tambahkan `/v1` di sini.
|
||||
|
||||
**Uji:** `claude "say hello"`
|
||||
**Test:** `claude "say hello"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenAI Codex
|
||||
|
||||
Codex modern (v0.137+) hanya membaca `~/.codex/config.toml` — `config.yaml` lama milik CLI npm warisan dan diabaikan tanpa suara. Kunci API tetap di variabel lingkungan `OMNIROUTE_API_KEY` (`env_key`), tidak pernah di dalam file:
|
||||
### OpenAI Codex
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.toml << EOF
|
||||
model_provider = "omniroute"
|
||||
|
||||
[model_providers.omniroute]
|
||||
name = "OmniRoute"
|
||||
base_url = "http://localhost:20128/v1"
|
||||
env_key = "OMNIROUTE_API_KEY"
|
||||
requires_openai_auth = false
|
||||
EOF
|
||||
export OMNIROUTE_API_KEY="sk-your-omniroute-key"
|
||||
```
|
||||
|
||||
Referensi lengkap (profil, `wire_api`, jendela konteks): [CODEX-CLI-CONFIGURATION.md](../guides/CODEX-CLI-CONFIGURATION.md).
|
||||
|
||||
**Uji:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### OpenCode
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/opencode.json << EOF
|
||||
{
|
||||
"\$schema": "https://opencode.ai/config.json",
|
||||
"provider": {
|
||||
"omniroute": {
|
||||
"npm": "@ai-sdk/openai-compatible",
|
||||
"name": "OmniRoute",
|
||||
"options": {
|
||||
"baseURL": "http://localhost:20128/v1",
|
||||
"apiKey": "sk-your-omniroute-key"
|
||||
},
|
||||
"models": {
|
||||
"claude-sonnet-4-5": { "name": "claude-sonnet-4-5" },
|
||||
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
|
||||
"gemini-3-flash": { "name": "gemini-3-flash" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mkdir -p ~/.codex && cat > ~/.codex/config.yaml << EOF
|
||||
model: auto
|
||||
apiKey: sk-your-omniroute-key
|
||||
apiBaseUrl: http://localhost:20128/v1
|
||||
EOF
|
||||
```
|
||||
|
||||
**Uji:** `opencode`
|
||||
|
||||
> Gunakan `opencode run "your prompt" --model omniroute/claude-sonnet-4-5-thinking --variant high`
|
||||
> untuk mengirim varian berpikir.
|
||||
**Test:** `codex "what is 2+2?"`
|
||||
|
||||
---
|
||||
|
||||
#### Cline (CLI atau VS Code)
|
||||
### OpenCode
|
||||
|
||||
**Mode CLI:**
|
||||
```bash
|
||||
mkdir -p ~/.config/opencode && cat > ~/.config/opencode/config.toml << EOF
|
||||
[provider.openai]
|
||||
base_url = "http://localhost:20128/v1"
|
||||
api_key = "sk-your-omniroute-key"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Test:** `opencode`
|
||||
|
||||
---
|
||||
|
||||
### Cline (CLI or VS Code)
|
||||
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
@@ -482,22 +199,22 @@ mkdir -p ~/.cline/data && cat > ~/.cline/data/globalState.json << EOF
|
||||
EOF
|
||||
```
|
||||
|
||||
**Mode VS Code:**
|
||||
Pengaturan ekstensi Cline → Penyedia API: `OpenAI Compatible` → URL Dasar: `http://localhost:20128/v1`
|
||||
**VS Code mode:**
|
||||
Cline extension settings → API Provider: `OpenAI Compatible` → Base URL: `http://localhost:20128/v1`
|
||||
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → Cline → Terapkan Konfigurasi**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → Cline → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### KiloCode (CLI atau VS Code)
|
||||
### KiloCode (CLI or VS Code)
|
||||
|
||||
**Mode CLI:**
|
||||
**CLI mode:**
|
||||
|
||||
```bash
|
||||
kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
```
|
||||
|
||||
**Pengaturan VS Code:**
|
||||
**VS Code settings:**
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -506,11 +223,11 @@ kilocode --api-base http://localhost:20128/v1 --api-key sk-your-omniroute-key
|
||||
}
|
||||
```
|
||||
|
||||
Atau gunakan dashboard OmniRoute → **CLI Tools → KiloCode → Terapkan Konfigurasi**.
|
||||
Or use the OmniRoute dashboard → **CLI Tools → KiloCode → Apply Config**.
|
||||
|
||||
---
|
||||
|
||||
#### Continue (Ekstensi VS Code)
|
||||
### Continue (VS Code Extension)
|
||||
|
||||
Edit `~/.continue/config.yaml`:
|
||||
|
||||
@@ -524,255 +241,158 @@ models:
|
||||
default: true
|
||||
```
|
||||
|
||||
Mulai ulang VS Code setelah mengedit.
|
||||
Restart VS Code after editing.
|
||||
|
||||
---
|
||||
|
||||
#### VS Code Insiders (`chatLanguageModels.json`)
|
||||
|
||||
Gunakan ini ketika VS Code Insiders dikonfigurasi untuk model endpoint kustom dan Anda ingin OmniRoute berfungsi tanpa bidang header kustom.
|
||||
|
||||
**Lokasi yang Disarankan:**
|
||||
|
||||
- Linux: `~/.config/Code - Insiders/User/chatLanguageModels.json`
|
||||
- Windows: `%APPDATA%/Code - Insiders/User/chatLanguageModels.json`
|
||||
|
||||
**Contoh menggunakan alias OmniRoute yang ditokenisasi:**
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"vendor": "customendpoint",
|
||||
"id": "auto",
|
||||
"name": "OmniRoute Auto",
|
||||
"family": "gpt-4",
|
||||
"version": "1.0.0",
|
||||
"url": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/chat/completions",
|
||||
"modelsUrl": "http://localhost:20128/api/v1/vscode/sk-your-omniroute-key/models",
|
||||
"requestFormat": "openai-chat-completions",
|
||||
"contextWindow": 256000,
|
||||
"maxOutputTokens": 32768,
|
||||
"auth": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
**Catatan:**
|
||||
|
||||
- Ganti `sk-your-omniroute-key` dengan kunci API yang dibuat di OmniRoute.
|
||||
- Bidang `url` harus mengarah ke `/api/v1/vscode/{token}/chat/completions`.
|
||||
- Bidang `modelsUrl` harus mengarah ke `/api/v1/vscode/{token}/models`.
|
||||
- Utamakan alur normal `/v1` + header Bearer ketika klien mendukung header kustom.
|
||||
- Token yang tertanam dalam URL adalah fallback kompatibilitas dan mungkin muncul dalam log editor atau riwayat proxy.
|
||||
|
||||
---
|
||||
|
||||
#### Kiro CLI (Amazon)
|
||||
### Kiro CLI (Amazon)
|
||||
|
||||
```bash
|
||||
# Masuk ke akun AWS/Kiro Anda:
|
||||
# Login to your AWS/Kiro account:
|
||||
kiro-cli login
|
||||
|
||||
# CLI menggunakan otentikasi sendiri — OmniRoute tidak diperlukan sebagai backend untuk Kiro CLI itu sendiri.
|
||||
# Gunakan kiro-cli bersamaan dengan OmniRoute untuk alat lainnya.
|
||||
# The CLI uses its own auth — OmniRoute is not needed as backend for Kiro CLI itself.
|
||||
# Use kiro-cli alongside OmniRoute for other tools.
|
||||
kiro-cli status
|
||||
```
|
||||
|
||||
Untuk aplikasi desktop **Kiro IDE**, gunakan endpoint MITM yang diekspos oleh OmniRoute
|
||||
di bawah `/dashboard/cli-tools → Kiro`.
|
||||
---
|
||||
|
||||
### Qwen Code (Alibaba)
|
||||
|
||||
Qwen Code supports OpenAI-compatible API endpoints via environment variables or `settings.json`.
|
||||
|
||||
**Option 1: Environment variables (`~/.qwen/.env`)**
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.qwen && cat > ~/.qwen/.env << EOF
|
||||
OPENAI_API_KEY="sk-your-omniroute-key"
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1"
|
||||
OPENAI_MODEL="auto"
|
||||
EOF
|
||||
```
|
||||
|
||||
**Option 2: `settings.json` with model providers**
|
||||
|
||||
```json
|
||||
// ~/.qwen/settings.json
|
||||
{
|
||||
"env": {
|
||||
"OPENAI_API_KEY": "sk-your-omniroute-key",
|
||||
"OPENAI_BASE_URL": "http://localhost:20128/v1"
|
||||
},
|
||||
"modelProviders": {
|
||||
"openai": [
|
||||
{
|
||||
"id": "omniroute-default",
|
||||
"name": "OmniRoute (Auto)",
|
||||
"envKey": "OPENAI_API_KEY",
|
||||
"baseUrl": "http://localhost:20128/v1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Option 3: Inline CLI flags**
|
||||
|
||||
```bash
|
||||
OPENAI_BASE_URL="http://localhost:20128/v1" \
|
||||
OPENAI_API_KEY="sk-your-omniroute-key" \
|
||||
OPENAI_MODEL="auto" \
|
||||
qwen
|
||||
```
|
||||
|
||||
> For a **remote server** replace `localhost:20128` with the server IP or domain.
|
||||
|
||||
**Test:** `qwen "say hello"`
|
||||
|
||||
### Cursor (Desktop App)
|
||||
|
||||
> **Note:** Cursor routes requests through its cloud. For OmniRoute integration,
|
||||
> enable **Cloud Endpoint** in OmniRoute Settings and use your public domain URL.
|
||||
|
||||
Via GUI: **Settings → Models → OpenAI API Key**
|
||||
|
||||
- Base URL: `https://your-domain.com/v1`
|
||||
- API Key: your OmniRoute key
|
||||
|
||||
---
|
||||
|
||||
## 10. Internal OmniRoute CLI
|
||||
## Dashboard Auto-Configuration
|
||||
|
||||
Biner `omniroute` menyediakan perintah untuk siklus hidup server, pengaturan, diagnostik, dan manajemen penyedia. Titik masuk: `bin/omniroute.mjs`.
|
||||
The OmniRoute dashboard automates configuration for most tools:
|
||||
|
||||
```bash
|
||||
omniroute # Mulai server (port default 20128)
|
||||
omniroute setup # Wizard pengaturan interaktif
|
||||
omniroute doctor # Periksa konfigurasi, DB, port, runtime
|
||||
omniroute providers list # Koneksi penyedia yang dikonfigurasi
|
||||
omniroute providers test-all # Uji setiap koneksi aktif
|
||||
omniroute reset-password # Atur ulang kata sandi admin
|
||||
omniroute logs # Streaming log permintaan
|
||||
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
|
||||
omniroute --version # Cetak versi
|
||||
omniroute --help # Tampilkan semua perintah
|
||||
```
|
||||
|
||||
### Pengaturan & Inisialisasi
|
||||
|
||||
```bash
|
||||
omniroute setup # Wizard pengaturan interaktif
|
||||
omniroute setup --non-interactive # Mode CI/automasi (membaca variabel env + flag)
|
||||
omniroute setup --password '<value>' # Atur kata sandi admin langsung
|
||||
omniroute setup --add-provider \
|
||||
--provider openai \
|
||||
--api-key '<value>' \
|
||||
--test-provider # Tambah dan uji penyedia dalam satu langkah
|
||||
```
|
||||
|
||||
Variabel lingkungan yang dikenali untuk pengaturan non-interaktif:
|
||||
|
||||
| Var | Tujuan |
|
||||
| ------------------- | ---------------------------------------------------------------------- |
|
||||
| `OMNIROUTE_API_KEY` | Kunci API penyedia (terikat ke `--api-key` melalui Commander `.env()`) |
|
||||
| `DATA_DIR` | Ganti direktori data OmniRoute |
|
||||
|
||||
Semua input non-interaktif lainnya diteruskan sebagai flag, bukan variabel lingkungan:
|
||||
`--password`, `--provider`, `--provider-name`, `--provider-base-url`, `--default-model`
|
||||
(lihat opsi `omniroute setup` di atas).
|
||||
|
||||
### Diagnostik
|
||||
|
||||
```bash
|
||||
omniroute doctor # Periksa konfigurasi, DB, port, runtime, memori, keberlangsungan
|
||||
omniroute doctor --json # JSON yang dapat dibaca mesin
|
||||
omniroute doctor --no-liveness # Lewati probe kesehatan HTTP
|
||||
omniroute doctor --host 0.0.0.0 # Ganti host keberlangsungan
|
||||
omniroute doctor --liveness-url <url> # Ganti URL endpoint kesehatan penuh
|
||||
```
|
||||
|
||||
Dokter menjalankan pemeriksaan ini: `Konfigurasi`, `Database`, `Penyimpanan/enkripsi`,
|
||||
`Ketersediaan Port`, `Runtime Node`, `Biner asli` (better-sqlite3),
|
||||
`Memori`, dan `Keberlangsungan Server`. Ia keluar dengan status non-nol jika ada pemeriksaan yang `gagal`.
|
||||
|
||||
### Manajemen Penyedia
|
||||
|
||||
```bash
|
||||
omniroute providers available # Katalog penyedia OmniRoute
|
||||
omniroute providers available --search openai # Filter katalog berdasarkan id/nama/alias/kategori
|
||||
omniroute providers available --category api-key # Filter berdasarkan kategori (api-key, oauth, gratis, ...)
|
||||
omniroute providers available --json # JSON yang dapat dibaca mesin
|
||||
|
||||
omniroute providers list # Koneksi penyedia yang dikonfigurasi
|
||||
omniroute providers list --json
|
||||
|
||||
omniroute providers test <id|name> # Uji satu koneksi yang dikonfigurasi
|
||||
omniroute providers test-all # Uji setiap koneksi aktif
|
||||
omniroute providers validate # Validasi struktural lokal saja
|
||||
omniroute providers add <provider> --credential-env PROVIDER_KEY
|
||||
omniroute providers import ./providers.json --dry-run --json
|
||||
omniroute providers auth <provider> # Alur OAuth yang ada
|
||||
omniroute providers edit <id|name> --default-model <model>
|
||||
omniroute providers remove <id|name> --yes
|
||||
```
|
||||
|
||||
`providers add/import/auth/edit/remove` bersifat API-first dan oleh karena itu bekerja terhadap
|
||||
konteks lokal atau jarak jauh yang aktif. Input kredensial harus menggunakan
|
||||
`--credential-stdin` atau `--credential-env`; `--dry-run --json` hanya melaporkan
|
||||
keberadaan/bentuk yang disunting. `providers available` membaca katalog OmniRoute;
|
||||
`providers list/test/test-all/validate` mempertahankan perilaku SQLite lokal mereka dan
|
||||
tidak memerlukan server untuk berjalan.
|
||||
|
||||
### Pemulihan & Atur Ulang
|
||||
|
||||
```bash
|
||||
omniroute reset-password # Atur ulang kata sandi admin (juga: omniroute-reset-password)
|
||||
omniroute reset-encrypted-columns # Tampilkan peringatan + dry-run untuk atur ulang kredensial terenkripsi
|
||||
omniroute reset-encrypted-columns --force # Benar-benar menghapus kredensial terenkripsi di SQLite
|
||||
```
|
||||
|
||||
### Ekspor Kredensial (⚠ tangani dengan hati-hati)
|
||||
|
||||
```bash
|
||||
omniroute auth export # Tampilkan peringatan + gerbang konfirmasi — tidak ada akses DB
|
||||
omniroute auth export --force # Ekspor SEMUA kredensial KONEKSI yang DECRYPTED ke stdout sebagai JSON
|
||||
omniroute auth export --force --id <id> # Ekspor hanya koneksi yang cocok
|
||||
omniroute auth export --force --format env # Emit OMNIROUTE_<PROVIDER>_<FIELD>=<value> baris
|
||||
omniroute auth export --force --out creds.json # Tulis ke file (dibuat dengan izin 0600)
|
||||
```
|
||||
|
||||
`auth export` bersifat **lokal saja** (baca SQLite langsung, tidak ada rute HTTP) dan sengaja mencetak/menulis
|
||||
nilai **plaintext** `apiKey`/`accessToken`/`refreshToken`/`idToken` — itu adalah fitur, bukan
|
||||
bug. Tidak ada yang dibaca dari database, dan tidak ada yang didekripsi, tanpa `--force`. Sebuah banner peringatan stderr
|
||||
selalu dicetak sebelum ada plaintext yang dikeluarkan. Memerlukan `STORAGE_ENCRYPTION_KEY` untuk
|
||||
diatur. Sebuah field yang gagal didekripsi (kunci kadaluarsa, ciphertext rusak) dilaporkan sebagai
|
||||
`<field>DecryptFailed: true` alih-alih menghentikan seluruh ekspor atau membocorkan kesalahan yang mendasarinya.
|
||||
|
||||
### Subperintah Lainnya
|
||||
|
||||
Ini mengasumsikan server OmniRoute yang berjalan, kecuali dinyatakan sebaliknya:
|
||||
|
||||
```bash
|
||||
omniroute status # Status runtime yang komprehensif
|
||||
omniroute logs # Streaming log permintaan (--json, --search, --follow)
|
||||
omniroute config show # Tampilkan konfigurasi saat ini
|
||||
|
||||
omniroute provider list # Daftar penyedia yang tersedia (alias dari providers list)
|
||||
omniroute provider add # Daftarkan OmniRoute sebagai penyedia di alat
|
||||
omniroute keys add | list | remove # Kelola kunci API
|
||||
omniroute models [provider] # Daftar model (--json, --search)
|
||||
omniroute combo list | switch | create | delete
|
||||
|
||||
omniroute backup # Snapshot konfigurasi + DB
|
||||
omniroute restore # Pulihkan dari snapshot sebelumnya
|
||||
|
||||
omniroute health # Kesehatan terperinci (pemutus, cache, memori)
|
||||
omniroute quota # Penggunaan kuota penyedia
|
||||
omniroute cache # Status cache
|
||||
omniroute cache clear # Hapus cache semantik + tanda tangan
|
||||
|
||||
omniroute mcp status | restart # Status server MCP / restart
|
||||
omniroute a2a status | card # Status server A2A / kartu agen
|
||||
|
||||
omniroute tunnel list | create | stop # Kelola terowongan (cloudflare/tailscale/ngrok)
|
||||
omniroute env show | get <k> | set <k> <v> # Periksa / atur variabel env (sementara)
|
||||
|
||||
omniroute test # Uji konektivitas penyedia
|
||||
omniroute update # Periksa pembaruan
|
||||
omniroute completion # Hasilkan penyelesaian shell
|
||||
```
|
||||
|
||||
### Flag Umum
|
||||
|
||||
| Flag | Deskripsi |
|
||||
| ------------------- | ------------------------------------------------------------ |
|
||||
| `--no-open` | Jangan otomatis membuka browser saat mulai |
|
||||
| `--port <n>` | Ganti port API (default 20128) |
|
||||
| `--mcp` | Jalankan sebagai server MCP melalui stdio (untuk IDE) |
|
||||
| `--non-interactive` | Mode CI (tanpa prompt; membaca dari env/flags) |
|
||||
| `--json` | Output JSON yang dapat dibaca mesin (dokter, penyedia, dll.) |
|
||||
| `--help`, `-h` | Tampilkan bantuan spesifik perintah |
|
||||
| `--version`, `-v` | Cetak versi yang terinstal |
|
||||
|
||||
## Endpoint API yang Tersedia
|
||||
|
||||
| Endpoint | Deskripsi | Digunakan Untuk |
|
||||
| -------------------------- | -------------------------------- | ------------------------------------ |
|
||||
| `/v1/chat/completions` | Obrolan standar (semua penyedia) | Semua alat modern |
|
||||
| `/v1/responses` | API respons (format OpenAI) | Codex, alur kerja agentik |
|
||||
| `/v1/completions` | Penyelesaian teks warisan | Alat lama yang menggunakan `prompt:` |
|
||||
| `/v1/embeddings` | Embedding teks | RAG, pencarian |
|
||||
| `/v1/images/generations` | Generasi gambar | GPT-Image, Flux, dll. |
|
||||
| `/v1/audio/speech` | Teks-ke-suara | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Suara-ke-teks | Deepgram, AssemblyAI |
|
||||
|
||||
Contoh siap-tempel dengan URL OmniRoute yang ter-tokenisasi:
|
||||
|
||||
```txt
|
||||
Token contoh: sk-a3ab3c080beaee3a-69f4a4-070d71af
|
||||
|
||||
Basis OpenAI standar: http://localhost:20128/v1
|
||||
Model VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/models
|
||||
Obrolan VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/chat/completions
|
||||
Respons VS Code: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/responses
|
||||
Tag Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/tags
|
||||
Obrolan Ollama: http://localhost:20128/api/v1/vscode/sk-a3ab3c080beaee3a-69f4a4-070d71af/api/chat
|
||||
```
|
||||
1. Go to `http://localhost:20128/dashboard/cli-tools`
|
||||
2. Expand any tool card
|
||||
3. Select your API key from the dropdown
|
||||
4. Click **Apply Config** (if tool is detected as installed)
|
||||
5. Or copy the generated config snippet manually
|
||||
|
||||
---
|
||||
|
||||
## Pemecahan Masalah
|
||||
## Built-in Agents: Droid & OpenClaw
|
||||
|
||||
| Kesalahan | Penyebab | Perbaikan |
|
||||
| ------------------------------------------------------ | --------------------------------- | --------------------------------------------------- |
|
||||
| `Connection refused` | OmniRoute tidak berjalan | `omniroute serve` |
|
||||
| `401 Unauthorized` | Kunci API salah | Periksa di `/dashboard/api-manager` |
|
||||
| `No combo configured` | Tidak ada kombinasi routing aktif | Atur di `/dashboard/combos` |
|
||||
| CLI menunjukkan "not installed" | Biner tidak ada di PATH | Periksa `which <command>` |
|
||||
| Dashboard menunjukkan "not detected" setelah instalasi | Cache usang | Klik "⟳ Refresh detection" di dashboard |
|
||||
| Tautan lama `/dashboard/cli-tools` | Bookmark sebelum v3.8.6 | Dialihkan otomatis ke `/dashboard/cli-code` (308) |
|
||||
| Tautan lama `/dashboard/agents` | Bookmark sebelum v3.8.6 | Dialihkan otomatis ke `/dashboard/acp-agents` (308) |
|
||||
**Droid** and **OpenClaw** are AI agents built directly into OmniRoute — no installation needed.
|
||||
They run as internal routes and use OmniRoute's model routing automatically.
|
||||
|
||||
- Access: `http://localhost:20128/dashboard/agents`
|
||||
- Configure: same combos and providers as all other tools
|
||||
- No API key or CLI install required
|
||||
|
||||
---
|
||||
|
||||
## Available API Endpoints
|
||||
|
||||
| Endpoint | Description | Use For |
|
||||
| -------------------------- | ----------------------------- | --------------------------- |
|
||||
| `/v1/chat/completions` | Standard chat (all providers) | All modern tools |
|
||||
| `/v1/responses` | Responses API (OpenAI format) | Codex, agentic workflows |
|
||||
| `/v1/completions` | Legacy text completions | Older tools using `prompt:` |
|
||||
| `/v1/embeddings` | Text embeddings | RAG, search |
|
||||
| `/v1/images/generations` | Image generation | GPT-Image, Flux, etc. |
|
||||
| `/v1/audio/speech` | Text-to-speech | ElevenLabs, OpenAI TTS |
|
||||
| `/v1/audio/transcriptions` | Speech-to-text | Deepgram, AssemblyAI |
|
||||
|
||||
---
|
||||
|
||||
## समस्या निवारण
|
||||
|
||||
| Error | Cause | Fix |
|
||||
| ------------------------- | ----------------------- | ------------------------------------------ |
|
||||
| `Connection refused` | OmniRoute not running | `pm2 start omniroute` |
|
||||
| `401 Unauthorized` | Wrong API key | Check in `/dashboard/api-manager` |
|
||||
| `No combo configured` | No active routing combo | Set up in `/dashboard/combos` |
|
||||
| `invalid model` | Model not in catalog | Use `auto` or check `/dashboard/providers` |
|
||||
| CLI shows "not installed" | Binary not in PATH | Check `which <command>` |
|
||||
| `kiro-cli: not found` | Not in PATH | `export PATH="$HOME/.local/bin:$PATH"` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Setup Script (One Command)
|
||||
|
||||
```bash
|
||||
# Install all CLIs and configure for OmniRoute (replace with your key and server URL)
|
||||
OMNIROUTE_URL="http://localhost:20128/v1"
|
||||
OMNIROUTE_KEY="sk-your-omniroute-key"
|
||||
|
||||
npm install -g @anthropic-ai/claude-code @openai/codex opencode-ai cline kilocode @qwen-code/qwen-code
|
||||
|
||||
# Kiro CLI
|
||||
apt-get install -y unzip 2>/dev/null; curl -fsSL https://cli.kiro.dev/install | bash
|
||||
|
||||
# Write configs
|
||||
mkdir -p ~/.claude ~/.codex ~/.config/opencode ~/.continue
|
||||
|
||||
cat > ~/.claude/settings.json <<< "{\"apiBaseUrl\":\"$OMNIROUTE_URL\",\"apiKey\":\"$OMNIROUTE_KEY\"}"
|
||||
cat > ~/.codex/config.yaml <<< "model: auto\napiKey: $OMNIROUTE_KEY\napiBaseUrl: $OMNIROUTE_URL"
|
||||
cat >> ~/.bashrc << EOF
|
||||
export OPENAI_BASE_URL="$OMNIROUTE_URL"
|
||||
export OPENAI_API_KEY="$OMNIROUTE_KEY"
|
||||
export ANTHROPIC_BASE_URL="$OMNIROUTE_URL"
|
||||
export ANTHROPIC_API_KEY="$OMNIROUTE_KEY"
|
||||
EOF
|
||||
|
||||
source ~/.bashrc
|
||||
echo "✅ All CLIs installed and configured for OmniRoute"
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
---
|
||||
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 341 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
> OmniRoute is a free, open-source AI Gateway that acts as a universal API proxy for multi-provider LLMs. It provides smart routing, automatic fallback, load balancing, and format translation across 340 AI providers — all through a single OpenAI-compatible endpoint. Includes a built-in MCP Server (109 tools), A2A v0.3 protocol, Memory/Skills systems, Cloud Agents (codex, cursor, devin, jules), Guardrails framework, and an Electron desktop app.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -18,7 +18,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
|
||||
- **Runtime:** Node.js `>=22.0.0 <23 || >=24.0.0 <27`, ES Modules (`"type": "module"`)
|
||||
- **Framework:** Next.js 16 (App Router) with TypeScript 6
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 154 migrations)
|
||||
- **Database:** SQLite via better-sqlite3 (local, zero-config, 153 migrations)
|
||||
- **State management:** Zustand (client), SQLite (server persistence)
|
||||
- **UI:** React 19, Tailwind CSS 4, Recharts for analytics, @lobehub/icons for 130+ provider SVG icons
|
||||
- **Auth:** OAuth 2.0 (PKCE) for providers, bcrypt for local user auth
|
||||
@@ -169,7 +169,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
│ │ └── manager.ts # MITM proxy manager
|
||||
│ ├── shared/ # Shared utilities, components, and constants
|
||||
│ │ ├── components/ # Reusable UI components (Card, Badge, Button, Modal, Sidebar, ProviderIcon, etc.)
|
||||
│ │ ├── constants/ # Provider definitions (341), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── constants/ # Provider definitions (340), model lists, pricing, routing strategies, MCP scopes
|
||||
│ │ ├── contracts/ # Shared API contracts
|
||||
│ │ ├── hooks/ # React hooks
|
||||
│ │ ├── middleware/ # Shared middleware utilities
|
||||
@@ -281,7 +281,7 @@ OmniRoute solves the problem of managing multiple AI provider subscriptions, quo
|
||||
## Key Features (v3.8.50)
|
||||
|
||||
### Core Proxy
|
||||
- **341 AI providers** with automatic format translation
|
||||
- **340 AI providers** with automatic format translation
|
||||
- **Provider categories**: Free (90+ free tiers), OAuth, API Key, Self-Hosted, Custom (OpenAI/Anthropic-compatible)
|
||||
- **18 routing strategies**: priority, weighted, round-robin, fill-first, p2c, random, least-used, cost-optimized, reset-aware, reset-window, headroom, strict-random, auto, lkgp, context-optimized, context-relay, fusion, pipeline
|
||||
- **4-tier fallback**: Subscription → API Key → Cheap → Free
|
||||
@@ -438,7 +438,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
4. **Environment variables:** All configuration is in `.env` (from `.env.example`). Key vars: `PORT`, `NEXT_PUBLIC_BASE_URL`, `API_KEY`, `ADMIN_PASSWORD`.
|
||||
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 154 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
5. **Database layer:** Operations go through `src/lib/db/` modules (120 domain-specific files, 153 migrations). `localDb.ts` is re-exports only — add new functions to the proper `db/*.ts` module.
|
||||
|
||||
6. **Tests** use Node.js built-in test runner + Vitest. Run `npm test`. Vitest for MCP/autoCombo (`npm run test:vitest`). Playwright for E2E (`npm run test:e2e`). Coverage gate: ratchet vs `quality-baseline.json`, absolute floor 60% statements/lines/functions/branches.
|
||||
|
||||
@@ -479,7 +479,7 @@ diagnostics) plus **memory**, **skill**, **agentSkill**, **githubSkill**, **pool
|
||||
|
||||
## v3.8.x Highlights
|
||||
|
||||
- **341-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **340-provider catalog** with 90+ free tiers, one-click account imports, and bulk key add
|
||||
- **19 routing strategies** — including `fusion` (parallel panel + judge synthesis), `pipeline`, `reset-aware`, `reset-window`, `headroom`, and `context-relay`
|
||||
- **14-factor Auto-Combo scoring** with bandit exploration and progressive cooldown
|
||||
- **MCP server expanded to 109 tools / 33 scopes** (canonical + memory/skill/agentSkill/githubSkill/pool/notion/obsidian/localCorpus/gamification/plugin modules)
|
||||
|
||||