diff --git a/README.md b/README.md index 04c7808f..d95ca22a 100644 --- a/README.md +++ b/README.md @@ -1,189 +1,38 @@
-**English** · [简体中文](README_ZH.md) - -[All public projects](https://github.com/honestTai) · [Star & Fork trends](#project-activity) - -
- -[![Repository summary](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/badges/HRouter-Desktop.svg)](#project-activity) - -
- -HRouter Desktop - -# HRouter Desktop + + + HRouter Desktop + -### Less configuration. More coding. +**Claude Code, Codex, Gemini CLI, Grok Build, OpenCode, and six more agents in one local app: providers, API keys, model mappings, backup routes, and usage.** -**A local desktop workbench for Claude Code, Codex, and your other AI coding agents.**
-Built on [CC Switch](https://github.com/farion1231/cc-switch). +[HRouter](https://hrouter.net/home) · [Docs](docs/access-workbench.md) · [Contact](mailto:honesttibo@mail.grokbot.com) -[![Release](https://img.shields.io/github/v/release/honestTai/HRouter-Desktop?color=16a085&label=release)](https://github.com/honestTai/HRouter-Desktop/releases/latest) -[![Download macOS](https://img.shields.io/badge/Download-macOS%20Apple%20Silicon-000000?logo=apple&logoColor=white)](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) -[![Download Windows](https://img.shields.io/badge/Download-Windows%20x64-0078D4?logo=windows&logoColor=white)](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) -[![Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Windows-5263d6)](#download) -[![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE) - -**English** | [简体中文](README_ZH.md) - -[Download v0.4.2](#download) · [Quick start](#quick-start) · [Need model API access?](#need-model-api-access) · [Why HRouter Desktop](#why-hrouter-desktop) · [Screenshots](#screenshots) · [Compared with CC Switch](#compared-with-cc-switch) +**English** · [简体中文](README_ZH.md)
-![HRouter Desktop: an agent-first configuration workbench](assets/screenshots/workbench-en.png) - -Claude Code, Codex, Gemini CLI, Grok Build, OpenCode, and six more agents in one local app: providers, API keys, model mappings, backup routes, and usage. [More screenshots](#screenshots). - -## Download +## Quick start **Current release: [v0.4.2](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2)** (2026-10-09). -| Platform | Package | Architecture | -| ----------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ | -| **macOS** | [HRouter_0.4.2_aarch64.dmg](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) | Apple Silicon (M-series) · macOS 12+ | -| **Windows** | [HRouter_0.4.2_x64-setup.exe](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) | x64 | - -Intel Macs are not a supported install target. The published updater covers signed, notarized macOS Apple Silicon and Windows x64. After you install, the app can check for a newer release. [Release notes](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2) · [all versions](https://github.com/honestTai/HRouter-Desktop/releases). +| Platform | Package | Architecture | +| :--- | :--- | :--- | +| **macOS** | [HRouter_0.4.2_aarch64.dmg](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) | Apple Silicon (M-series) · macOS 12+ | +| **Windows** | [HRouter_0.4.2_x64-setup.exe](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) | x64 | -[Changelog](CHANGELOG.md) · [Code-signing policy](CODE_SIGNING_POLICY.md) - -## Quick start +Intel Macs are not a supported install target. The published updater covers signed, notarized macOS Apple Silicon and Windows x64. -1. **Install [v0.4.2](#download).** Open the workbench and select an agent. Claude Code and Codex are the usual starting points. +1. **Install [v0.4.2](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2).** Open the workbench and select an agent. Claude Code and Codex are the usual starting points. 2. **Add a provider.** Choose an official preset, or add a custom endpoint and API key. The app can inspect the provider's model catalog so you can review the models it can actually call. Keys are stored only in the local configuration. 3. **Review, save, and enable.** Check the model mapping, then enable the provider. Refresh or restart the client if it was already open. -Official providers, a self-hosted endpoint, or another OpenAI-compatible LLM gateway all use the same workbench. - -## Need model API access? - -HRouter Desktop stays on your machine. It configures the providers you choose: official APIs, a self-hosted endpoint, or an OpenAI-compatible gateway, including [HRouter](https://hrouter.net). - -[HRouter](https://hrouter.net/home) is the companion relay for prepaid model access. One API key covers Claude, GPT, Gemini, and Grok for your coding agents. Add balance and create a key on the site, then add that provider in Desktop the same way as any other endpoint. - -HRouter account, billing, and consultation: [honesttibo@mail.grokbot.com](mailto:honesttibo@mail.grokbot.com). - -## Why HRouter Desktop? - -Different agents. Different config files. Different providers. Switching your coding setup should not mean piecing all of them together again. - -**HRouter Desktop puts the connection workflow in one place:** providers, API keys, model mappings, configuration protection, backup routes, and usage. Built on CC Switch, it is a desktop CC Switch alternative: an agent-first interface for the services you choose, including official providers and OpenAI-compatible LLM gateways. - -- **11 agents, one workbench.** Move between Claude Code, Codex, Gemini CLI, and more without learning a different configuration UI for each. -- **Switch with a preview, not a guess.** Opt into Claude / Codex configuration protection to preserve custom fields, preview changes, and keep local switch snapshots. -- **Give your models a backup plan.** Choose primary and backup providers, define exact-model routes, and use automatic failover through supported local routing. -- **Keep repeatable setups.** Save provider, MCP, and Skill selections as access profiles; review them before applying. -- **See how your tools are being used.** Inspect requests, tokens, cache usage, and estimated costs, with an agent-scoped floating usage window. -- **Use the service you want.** Official providers, self-hosted endpoints, and compatible gateways are welcome. - -## Features - -### Connect and check - -- **Provider library:** official presets and custom endpoints, multiple saved providers per agent, editable keys and model mappings. -- **Quick provider setup:** key-based model discovery and agent-specific configuration, without a platform login. -- **Connection checks:** inspect the model catalog, then optionally test text responses, streaming, tool calls, and tool-result continuation. Real-request checks support Claude / Codex API-key providers and require acknowledgement of possible charges. - -### Protect and reuse - -- **Configuration protection:** opt-in field-preserving Claude / Codex switching, change previews, local snapshots, and conflict-checked restore. -- **Lite mode:** focus on connection settings without application-managed MCP, Skills, or prompt writes. Includes prompt protection and provider-only sync scope. -- **Access profiles:** save and reapply provider, MCP, and Skill selections. Profiles reference your providers; they are not full configuration backups. -- **Environment targets:** preview and deploy supported Claude / Codex API-key configurations to existing Windows / WSL-accessible directories. - -### Route and observe - -- **Primary and backup routes:** ordered failover queues and exact-model route chains through the local proxy. You choose the providers; nothing is added automatically. -- **Usage analytics:** request logs, token and cache breakdowns, trends, provider/model summaries, and local cost estimates. -- **Provider usage:** query configured provider usage interfaces; inspect multi-key quotas with explicit rules for combining independent balances. -- **Desktop visibility:** a floating agent usage window and macOS widget integration. - -### Manage your agent workspace - -- **Sessions:** browse supported local agent conversations and resume work in the relevant client. -- **MCP and Skills:** manage shared resources with per-agent enablement, Skills discovery, and supported import/export and backup workflows. -- **Agent-specific tools:** OpenClaw workspace files, environment variables, tool permissions, and defaults; Hermes memory and user-profile editing. -- **Everyday utilities:** CLI installation/update entry points, language and theme preferences, and in-app help. - -### Supported agents - -**Claude Code · Claude Desktop · Codex · Gemini CLI · Grok Build · OpenCode · OpenClaw · Hermes · Pi Agent · DeepSeek Harness · WorkBuddy** - -Each agent has its own adapter. Routing, configuration protection, authentication, MCP, Skills, and usage support vary by agent; the CLI installer does not install every agent's desktop application. See the [integration guide](docs/access-workbench.md) for scope and behavior. - -## Screenshots - -Real macOS application captures with private configuration labels redacted. Some controls still display Chinese when the interface is set to English. [Capture details and full image index](assets/screenshots/README.md). - -| **Providers in one place** | **Provider quick setup** | -| :----------------------------------------------------------------: | :------------------------------------------------------------------: | -| ![Provider configuration](assets/screenshots/configuration-en.png) | ![Empty provider key setup form](assets/screenshots/key-setup-en.png) | -| Keep saved services and the active provider visible. | Discover models and review mappings before saving. | - -| **Reusable access profiles** | **Explicit backup routes** | -| :----------------------------------------------------: | :---------------------------------------------------------: | -| ![Access profiles](assets/screenshots/profiles-en.png) | ![Route policies](assets/screenshots/route-policies-en.png) | -| Save a setup you can return to. | Choose the order in which providers are tried. | - -
-Configuration protection, MCP, Skills, and desktop usage - -| **Protect local configuration** | **Manage MCP resources** | -| :---------------------------------------------------------------: | :----------------------------------------------: | -| ![Configuration protection](assets/screenshots/protection-en.png) | ![MCP management](assets/screenshots/mcp-en.png) | - -![Skills discovery](assets/screenshots/skills-discovery-en.png) - -Floating agent usage window showing a genuine zero-usage state - -
- -## Compared with CC Switch - -**CC Switch provides the foundation. HRouter Desktop changes how you work with it.** We retain the upstream provider, proxy, MCP, Skills, session, and usage foundations rather than presenting them as new inventions. - -| Focus | What this fork changes | -| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Agent-first interface** | A redesigned workbench and top navigation, with dedicated Configuration, Profiles, Route policies, and Usage pages. | -| **Deliberate configuration changes** | A protection workflow with previews, fingerprint checks, snapshots, guarded restores, Lite mode, and prompt protection. | -| **Repeatable access setups** | Dedicated profiles for provider, MCP, and Skill selections, with a preview before application. | -| **Model-aware routing** | Extensions to inherited routing: exact-model primary/backup chains, temporary manual preferences, and controlled multi-key quota aggregation. | -| **Compatibility and continuity** | Protocol-aware connection checks, targeted proxy transport fixes, and Codex legacy-provider compatibility without rewriting conversation history. | -| **Usage correctness** | Targeted fixes for Codex fork usage, Claude cache-TTL estimates, and OpenCode rollup/deduplication. | -| **Desktop integration** | DeepSeek Harness / WorkBuddy integration work, and agent-scoped desktop usage tools. | -| **A focused desktop** | v0.4.0 removes the account, payment, order, and cloud-billing modules from earlier **HRouter** versions—not from CC Switch. | - -This is a summary of changes maintained in this fork, not a claim that current upstream lacks every listed capability. The projects evolve independently. For implementation details and validation limits, see the [workbench guide](docs/access-workbench.md), [fix checklist](docs/issue-remediation.md), and [upstream contribution records](docs/upstream-contributions.md). - -## Get started - -1. **Install and choose an agent.** Open the workbench and select the coding tool you want to configure. -2. **Connect a service.** Add a provider preset or a custom endpoint and key, and review the discovered models. -3. **Review, save, and enable.** Check the model mapping and configuration, then enable the provider. Refresh or restart the target client if required. - -Still need a key? [HRouter](https://hrouter.net/home) is the recommended prepaid relay: one key for Claude, GPT, Gemini, and Grok. [Add it in Desktop](#need-model-api-access). - -That's the basic setup. Add protection, profiles, or backup routes when you need them; opt into a billable connection test only after checking the catalog. - -### Moving from CC Switch? +Official providers, a self-hosted endpoint, or another OpenAI-compatible LLM gateway all use the same workbench. [HRouter](https://hrouter.net/home) is the companion relay for prepaid model access. One API key covers Claude, GPT, Gemini, and Grok for your coding agents. Use **Agents → Connect → Import from CC Switch** to preview your actual `cc-switch.db` file read-only and select providers to import. The importer does not change the source database, overwrite existing entries, or activate imported providers. -This imports providers—not a whole account. Managed OAuth sessions, prompts, Skills, usage scripts, and OMO configuration are excluded. Existing HRouter users do not need to delete their keys or configuration directories to upgrade. - -## Good to know - -- **Local-first, not offline-only.** Provider calls, model discovery, usage queries, Skills discovery, pricing, and updates contact the relevant services. Treat local keys, configuration files, and snapshots as sensitive. -- **Estimates, not invoices.** Usage depends on available local records and configured prices. A passing connection check is not a guarantee of model identity, quality, or long-task reliability. -- **Protection has a scope.** It is opt-in for Claude / Codex. Restore checks preserve later edits rather than forcing an overwrite; provider-only sync and profiles are not full backups. -- **Signing types differ.** Tauri updater signatures are not Windows Authenticode signatures. macOS publication requires Developer ID signing and notarization. - -[Privacy](PRIVACY.md) · [Security](SECURITY.md) · [Support](SUPPORT.md) · [Signing](CODE_SIGNING_POLICY.md) - -## Build and contribute - -Built with **Tauri 2 · Rust · React · TypeScript**. Use the project lockfile, `pnpm@10.12.3`, and your platform's Tauri build prerequisites. +Built with **Tauri 2 · Rust · React · TypeScript**. Use the project lockfile and `pnpm@10.12.3`. ```bash git clone https://github.com/honestTai/HRouter-Desktop.git @@ -192,11 +41,30 @@ pnpm install --frozen-lockfile pnpm dev ``` -`pnpm build` builds for the host platform. See [Contributing](CONTRIBUTING.md) for checks and contribution guidelines, and [macOS signing](docs/macos-signing.md) for release setup. +`pnpm build` builds for the host platform. + +## Core features -Found a bug or have a workflow to improve? [Open an issue](https://github.com/honestTai/HRouter-Desktop/issues). If HRouter Desktop is useful to you, give the repository a star. +| Area | What it does | +| :--- | :--- | +| Providers | Official presets and custom endpoints, multiple saved providers per agent, editable keys and model mappings | +| Configuration protection | Opt-in field-preserving Claude / Codex switching, change previews, local snapshots, and conflict-checked restore | +| Routes | Primary and backup providers, exact-model route chains, and automatic failover through supported local routing. You choose the providers; nothing is added automatically | +| Usage | Request logs, token and cache breakdowns, trends, provider/model summaries, and local cost estimates | +| Profiles and workspace | Save and reapply provider, MCP, and Skill selections. Browse supported local sessions and manage MCP and Skills | -## Credits and license +**Claude Code · Claude Desktop · Codex · Gemini CLI · Grok Build · OpenCode · OpenClaw · Hermes · Pi Agent · DeepSeek Harness · WorkBuddy** + +Each agent has its own adapter. Routing, configuration protection, authentication, MCP, Skills, and usage support vary by agent. See the [integration guide](docs/access-workbench.md). + +## Docs + +- **[User manual](docs/user-manual/en/README.md)** · **[Access workbench](docs/access-workbench.md)** · **[Usage widgets](docs/usage-widgets.md)** · **[Claude Desktop sessions](docs/claude-desktop-sessions.md)** +- **[Changelog](CHANGELOG.md)** · **[Contributing](CONTRIBUTING.md)** · **[macOS signing](docs/macos-signing.md)** · **[Screenshots](assets/screenshots/README.md)** +- **[Privacy](PRIVACY.md)** · **[Security](SECURITY.md)** · **[Support](SUPPORT.md)** · **[Code-signing policy](CODE_SIGNING_POLICY.md)** +- **[Upstream contributions](docs/upstream-contributions.md)** · **[Issue remediation](docs/issue-remediation.md)** + +## License Based on **[CC Switch](https://github.com/farion1231/cc-switch)** by **Jason Young** and its contributors. HRouter Desktop is independently maintained by [honestTai](https://github.com/honestTai) and HRouter Contributors; it is not an official CC Switch release or endorsed by its maintainers. @@ -204,16 +72,16 @@ The original copyright and MIT license are preserved. Some internal `cc-switch` [MIT License](LICENSE) · [Attribution](NOTICE.md) ---- +We retain the upstream provider, proxy, MCP, Skills, session, and usage foundations rather than presenting them as new inventions. Records: [upstream contributions](docs/upstream-contributions.md). - +## Star history -## Project activity +Star history -Star / Fork totals and retained-event history, scheduled to refresh daily. +--- -[![Star and Fork history for HRouter-Desktop](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/metrics/HRouter-Desktop.svg)](https://github.com/honestTai/honestTai/blob/main/data/README.md) +
-[Observed daily totals](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/metrics/HRouter-Desktop-daily.svg) · [Methodology](https://github.com/honestTai/honestTai/blob/main/data/METHODOLOGY.md) · [All public projects](https://github.com/honestTai) +Made by **[honestTai](https://github.com/honestTai)** · [HRouter](https://hrouter.net/home) · [More projects](https://github.com/honestTai) -Historical curves reconstruct currently retained stars and visible forks, not historical net totals. Separate daily observations start on 2026-10-06; no fabricated backfill. +
diff --git a/README_ZH.md b/README_ZH.md index ee1cfba3..bf31afad 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -1,193 +1,38 @@
-[English](README.md) · **简体中文** - -[All public projects](https://github.com/honestTai) · [Star & Fork trends](#project-activity) - -
- -[![Repository summary](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/badges/HRouter-Desktop.svg)](#project-activity) - -
- -HRouter Desktop - -# HRouter Desktop - -### 少折腾配置,多专注编程。 + + + HRouter Desktop + -**面向 Claude Code、Codex 等 AI 编程 Agent 的本地桌面工作台。**
-基于 [CC Switch](https://github.com/farion1231/cc-switch)。 +**Claude Code、Codex、Gemini CLI、Grok Build、OpenCode,再加上另外 6 个 Agent,放在同一个本地应用里:供应商、API Key、模型映射、备用线路和用量。** -[![发布版本](https://img.shields.io/github/v/release/honestTai/HRouter-Desktop?color=16a085&label=release)](https://github.com/honestTai/HRouter-Desktop/releases/latest) -[![下载 macOS](https://img.shields.io/badge/Download-macOS%20Apple%20Silicon-000000?logo=apple&logoColor=white)](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) -[![下载 Windows](https://img.shields.io/badge/Download-Windows%20x64-0078D4?logo=windows&logoColor=white)](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) -[![支持平台](https://img.shields.io/badge/platforms-macOS%20%7C%20Windows-5263d6)](#下载) -[![许可证](https://img.shields.io/badge/license-MIT-blue)](LICENSE) +[HRouter](https://hrouter.net/home) · [文档](docs/access-workbench.md) · [联系](mailto:honesttibo@mail.grokbot.com) -[English](README.md) | **简体中文** - -[下载 v0.4.2](#下载) · [快速开始](#quick-start) · [需要模型 API 接入?](#model-api-access) · [为什么选择 HRouter Desktop](#为什么选择-hrouter-desktop) · [界面预览](#界面预览) · [相比 CC Switch 的改动](#相比-cc-switch-的改动) +[English](README.md) · **简体中文**
-![HRouter Desktop:以 Agent 为中心的配置工作台](assets/screenshots/workbench-en.png) - -Claude Code、Codex、Gemini CLI、Grok Build、OpenCode,再加上另外 6 个 Agent,放在同一个本地应用里:供应商、API Key、模型映射、备用线路和用量。[更多界面](#界面预览)。 - -## 下载 +## 快速开始 **当前版本:[v0.4.2](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2)**(2026-10-09)。 -| 平台 | 安装包 | 架构 | -| ----------- | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- | -| **macOS** | [HRouter_0.4.2_aarch64.dmg](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) | Apple Silicon(M 系列)· macOS 12+ | -| **Windows** | [HRouter_0.4.2_x64-setup.exe](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) | x64 | +| 平台 | 安装包 | 架构 | +| :--- | :--- | :--- | +| **macOS** | [HRouter_0.4.2_aarch64.dmg](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_aarch64.dmg) | Apple Silicon(M 系列)· macOS 12+ | +| **Windows** | [HRouter_0.4.2_x64-setup.exe](https://github.com/honestTai/HRouter-Desktop/releases/download/v0.4.2/HRouter_0.4.2_x64-setup.exe) | x64 | -不支持 Intel Mac。已发布的自动更新覆盖已签名、已公证的 macOS Apple Silicon 和 Windows x64。安装后可在应用内检查更新。[发布说明](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2) · [全部版本](https://github.com/honestTai/HRouter-Desktop/releases)。 - -[更新记录](CHANGELOG.md) · [代码签名政策](CODE_SIGNING_POLICY.md) - - - -## 快速开始 +不支持 Intel Mac。已发布的自动更新覆盖已签名、已公证的 macOS Apple Silicon 和 Windows x64。 -1. **安装 [v0.4.2](#下载)。** 打开工作台并选择 Agent。通常从 Claude Code 或 Codex 开始。 +1. **安装 [v0.4.2](https://github.com/honestTai/HRouter-Desktop/releases/tag/v0.4.2)。** 打开工作台并选择 Agent。通常从 Claude Code 或 Codex 开始。 2. **添加供应商。** 选择官方预设,或填写自定义端点与 API Key。应用可以检查供应商的模型目录,确认这把 Key 实际能调用的模型。Key 只保存在本机配置中。 3. **检查、保存、启用。** 确认模型映射后再启用供应商。客户端若已打开,按需刷新或重启。 -官方供应商、自建端点,或其他 OpenAI 兼容的 LLM 网关,都使用同一个工作台。 - - - -## 需要模型 API 接入? - -HRouter Desktop 留在本机。它可以配置你选择的供应商:官方 API、自建端点,或 OpenAI 兼容网关,包括 [HRouter](https://hrouter.net)。 - -[HRouter](https://hrouter.net/home) 是配套的预付费模型 API 中继。一把 API Key 即可在编程 Agent 中使用 Claude、GPT、Gemini 和 Grok。在网站充值并创建 Key,然后在 Desktop 里像添加其他供应商一样配置这个网关。 - -HRouter 账户、计费与使用咨询:[honesttibo@mail.grokbot.com](mailto:honesttibo@mail.grokbot.com)。 - -## 为什么选择 HRouter Desktop? - -不同的 Agent,不同的配置文件,不同的供应商。切换编程环境,不应该意味着把这些东西重新拼一遍。 - -**HRouter Desktop 把接入流程集中到一处:**供应商、API Key、模型映射、配置保护、备用线路和用量。它基于 CC Switch,可以作为 CC Switch alternative:用 Agent 优先的界面管理你选择的服务,包括官方供应商和 OpenAI 兼容的 LLM 网关(LLM gateway)。 - -- **11 个 Agent,一个工作台。** 在 Claude Code、Codex、Gemini CLI 等工具间切换,不必为每个工具重新熟悉一套配置界面。 -- **先看变更,再切配置。** 主动开启 Claude / Codex 配置保护,保留自定义字段、预览变更,并留存本地切换快照。 -- **为模型准备备用线路。** 选择主备供应商、定义精确模型路由,在支持的本地代理模式下自动故障转移。 -- **常用配置,存成方案。** 将供应商、MCP 和 Skills 的选择保存为接入方案,应用之前先检查。 -- **看清工具怎么用、用了多少。** 查看请求、Token、缓存和费用估算,用浮动窗口随时了解当前 Agent 用量。 -- **服务由你选。** 官方供应商、自建端点、兼容网关都能接入。 - -## 功能介绍 - -### 接入与验证 - -- **供应商配置库:**支持官方预设、自定义端点,以及每个 Agent 的多套供应商配置;Key 和模型映射可编辑。 -- **供应商快捷配置:**通过 Key 发现模型,生成 Agent 专属配置,无需登录平台账户。 -- **接入体检:**先检查模型目录,再按需验证普通响应、流式、工具调用及工具结果续接。真实请求体检支持 Claude / Codex API Key 供应商,执行前需确认可能产生费用。 - -### 保护与复用 - -- **配置保护:**主动开启 Claude / Codex 字段保留式切换、变更预览、本地快照及冲突检查恢复。 -- **Lite 模式:**只关注接入配置,不执行应用管理的 MCP、Skills 或提示词写入;包含提示词保护和仅供应商同步范围。 -- **接入方案:**保存并重新应用供应商、MCP 和 Skills 的选择。方案引用供应商,不是完整配置备份。 -- **多环境目标:**将支持的 Claude / Codex API Key 配置预览并部署到已有、可访问的 Windows / WSL 配置目录。 - -### 线路与用量 - -- **主备线路:**通过本地代理使用有序故障转移队列和精确模型线路链。供应商由你选择,不会自动加入任何服务。 -- **用量统计:**查看请求日志、Token 与缓存明细、趋势、供应商/模型汇总,以及本地费用估算。 -- **供应商用量:**查询已配置的用量接口;查看多 Key 额度,并按明确规则合计互相独立的余额。 -- **桌面可见:**Agent 浮动用量窗口与 macOS 小组件集成。 - -### Agent 工作区管理 - -- **会话:**浏览支持的本地 Agent 对话,在对应客户端恢复工作。 -- **MCP 与 Skills:**共享资源按 Agent 独立启用,支持 Skills 发现及相应的导入、导出和备份流程。 -- **专属工具:**OpenClaw 工作区文件、环境变量、工具权限和默认配置;Hermes 记忆与用户档案编辑。 -- **日常辅助:**CLI 安装/更新入口、语言与主题偏好、应用内帮助。 - -### 支持的 Agent - -**Claude Code · Claude Desktop · Codex · Gemini CLI · Grok Build · OpenCode · OpenClaw · Hermes · Pi Agent · DeepSeek Harness · WorkBuddy** - -每个 Agent 使用独立适配器。线路、配置保护、认证、MCP、Skills 和用量的支持范围因 Agent 而异;CLI 安装入口并不负责安装所有 Agent 的桌面应用。具体范围与行为见[接入说明](docs/access-workbench.md)。 - -## 界面预览 - -以下为真实 macOS 应用截图,私人配置名称已遮盖。切换为英文界面后,部分控件仍显示中文。[截图说明与完整图片索引](assets/screenshots/README.md)。 - -| **供应商,集中管理** | **供应商 Key,快捷接入** | -| :----------------------------------------------------: | :-------------------------------------------------------------------: | -| ![供应商配置](assets/screenshots/configuration-en.png) | ![未填写凭据的供应商 Key 表单](assets/screenshots/key-setup-en.png) | -| 已保存的服务与当前供应商一目了然。 | 保存前先发现模型、检查映射。 | - -| **常用接入,保存为方案** | **备用线路,顺序明确** | -| :---------------------------------------------: | :---------------------------------------------------: | -| ![接入方案](assets/screenshots/profiles-en.png) | ![线路策略](assets/screenshots/route-policies-en.png) | -| 保存一套下次还能用的选择。 | 自己决定供应商的尝试顺序。 | - -
-配置保护、MCP、Skills 与桌面用量 - -| **保护本地配置** | **管理 MCP 资源** | -| :-----------------------------------------------: | :----------------------------------------: | -| ![配置保护](assets/screenshots/protection-en.png) | ![MCP 管理](assets/screenshots/mcp-en.png) | - -![Skills 发现](assets/screenshots/skills-discovery-en.png) - -Agent 浮动用量窗口,展示真实零用量状态 - -
- -## 相比 CC Switch 的改动 - -**CC Switch 提供基础,HRouter Desktop 重新组织使用方式。** 我们保留上游的供应商、代理、MCP、Skills、会话和用量基础能力,不把它们包装成本项目的新发明。 - -| 方向 | 本分支的改动 | -| ---------------------- | --------------------------------------------------------------------------------------------- | -| **Agent 优先的界面** | 重做工作台与顶部导航,独立组织配置中心、接入方案、线路策略和用量页面。 | -| **明确可控的配置变更** | 引入预览、指纹检查、快照、受保护恢复、Lite 模式和提示词保护组成的配置保护流程。 | -| **可复用的接入组合** | 提供供应商、MCP 和 Skills 选择的专属方案,应用之前先预览。 | -| **按模型组织线路** | 在继承的代理基础上扩展精确模型主备链、临时手动优先和受控的多 Key 额度合计。 | -| **兼容性与会话连续性** | 按协议体检、针对性代理传输修复,以及不改写对话历史的 Codex 旧 provider 兼容。 | -| **用量准确性** | 针对 Codex fork 用量、Claude 缓存 TTL 估算、OpenCode 汇总去重的修复。 | -| **桌面集成** | DeepSeek Harness / WorkBuddy 接入工作,以及 Agent 维度桌面用量工具。 | -| **专注工具本身** | v0.4.0 移除的是旧版 **HRouter** 的账户、支付、订单和云端账单模块,而非 CC Switch 的模块。 | - -这里总结的是本分支持续维护的改动,不代表当前上游缺少表中所有能力。两个项目独立演进。实现细节与验证边界见[工作台说明](docs/access-workbench.md)、[修复清单](docs/issue-remediation.md)和[上游贡献记录](docs/upstream-contributions.md)。 - -## 开始使用 - -1. **安装并选择 Agent。** 打开工作台,选择要配置的编程工具。 -2. **接入服务。** 添加供应商预设,或填写自定义端点与 Key,检查发现的模型。 -3. **检查、保存、启用。** 确认模型映射与配置,再启用供应商。按需刷新或重启目标客户端。 - -还没有 Key?[HRouter](https://hrouter.net/home) 是推荐的预付费中继,一把 Key 覆盖 Claude、GPT、Gemini 和 Grok。[在 Desktop 中接入](#model-api-access)。 - -基本接入就完成了。需要时再添加配置保护、接入方案或备用线路;先检查模型目录,再主动选择可能计费的真实请求体检。 - -### 从 CC Switch 迁移? +官方供应商、自建端点,或其他 OpenAI 兼容的 LLM 网关,都使用同一个工作台。[HRouter](https://hrouter.net/home) 是配套的预付费模型 API 中继。一把 API Key 即可在编程 Agent 中使用 Claude、GPT、Gemini 和 Grok。 在 **工作台 → 开放接入 → 从 CC Switch 迁移** 中选择实际的 `cc-switch.db` 文件,只读预览后再导入所需供应商。导入器不会修改源数据库、覆盖已有条目或激活导入的供应商。 -迁移的是供应商,不是整个账户。托管 OAuth 登录态、提示词、Skills、用量脚本和 OMO 配置不在迁移范围内。已有 HRouter 用户升级时,无需删除 Key 或配置目录。 - -## 使用须知 - -- **本地优先,不等于完全离线。** 供应商调用、模型发现、用量查询、Skills 发现、定价和更新会访问相应服务。本地 Key、配置文件和快照都应作为敏感数据保管。 -- **费用估算,不是账单。** 用量取决于可用的本地记录与配置价格。体检通过不保证模型身份、质量或长任务稳定性。 -- **保护有明确范围。** Claude / Codex 配置保护需要主动开启。恢复检查会保留后续编辑,而非强行覆盖;仅供应商同步和接入方案不等于完整备份。 -- **签名类型有区别。** Tauri 更新签名不等于 Windows Authenticode 签名;macOS 发布要求 Developer ID 签名与公证。 - -[隐私政策](PRIVACY.md) · [安全反馈](SECURITY.md) · [获取帮助](SUPPORT.md) · [签名政策](CODE_SIGNING_POLICY.md) - -## 构建与贡献 - -技术栈:**Tauri 2 · Rust · React · TypeScript**。请使用项目锁文件、`pnpm@10.12.3`,并准备对应平台的 Tauri 构建依赖。 +技术栈:**Tauri 2 · Rust · React · TypeScript**。请使用项目锁文件、`pnpm@10.12.3`。 ```bash git clone https://github.com/honestTai/HRouter-Desktop.git @@ -196,11 +41,30 @@ pnpm install --frozen-lockfile pnpm dev ``` -`pnpm build` 为当前平台构建安装包。检查命令与贡献规范见[贡献指南](CONTRIBUTING.md),发布配置见 [macOS 签名说明](docs/macos-signing.md)。 +`pnpm build` 为当前平台构建安装包。 + +## 核心功能 -发现问题,或者有想改进的使用流程?欢迎[提交 Issue](https://github.com/honestTai/HRouter-Desktop/issues)。如果 HRouter Desktop 对你有帮助,也欢迎给仓库一个 Star。 +| 方面 | 做什么 | +| :--- | :--- | +| 供应商 | 官方预设与自定义端点,每个 Agent 可保存多套供应商,Key 和模型映射可编辑 | +| 配置保护 | 主动开启 Claude / Codex 字段保留式切换、变更预览、本地快照及冲突检查恢复 | +| 线路 | 主备供应商、精确模型线路链,以及支持的本地代理自动故障转移。供应商由你选择,不会自动加入 | +| 用量 | 请求日志、Token 与缓存明细、趋势、供应商/模型汇总,以及本地费用估算 | +| 方案与工作区 | 保存并重新应用供应商、MCP 和 Skills 选择;浏览支持的本地会话,管理 MCP 与 Skills | -## 致谢与许可证 +**Claude Code · Claude Desktop · Codex · Gemini CLI · Grok Build · OpenCode · OpenClaw · Hermes · Pi Agent · DeepSeek Harness · WorkBuddy** + +每个 Agent 使用独立适配器。线路、配置保护、认证、MCP、Skills 和用量的支持范围因 Agent 而异。具体范围与行为见[接入说明](docs/access-workbench.md)。 + +## 文档 + +- **[用户手册](docs/user-manual/zh/README.md)** · **[接入说明](docs/access-workbench.md)** · **[用量小组件](docs/usage-widgets.md)** · **[Claude Desktop 会话](docs/claude-desktop-sessions.md)** +- **[更新记录](CHANGELOG.md)** · **[贡献指南](CONTRIBUTING.md)** · **[macOS 签名说明](docs/macos-signing.md)** · **[界面截图](assets/screenshots/README.md)** +- **[隐私政策](PRIVACY.md)** · **[安全反馈](SECURITY.md)** · **[获取帮助](SUPPORT.md)** · **[代码签名政策](CODE_SIGNING_POLICY.md)** +- **[上游贡献记录](docs/upstream-contributions.md)** · **[修复清单](docs/issue-remediation.md)** + +## 许可证 基于 **Jason Young** 及贡献者开发的 **[CC Switch](https://github.com/farion1231/cc-switch)**。HRouter Desktop 由 [honestTai](https://github.com/honestTai) 与 HRouter Contributors 独立维护,不是 CC Switch 官方发行版,也不代表上游维护者背书。 @@ -208,16 +72,16 @@ pnpm dev [MIT 许可证](LICENSE) · [归属声明](NOTICE.md) ---- +我们保留上游的供应商、代理、MCP、Skills、会话和用量基础能力,不把它们包装成本项目的新发明。记录见[上游贡献记录](docs/upstream-contributions.md)。 - +## 星标历史 -## 项目动态 · Project activity +Star history -当前 Star / Fork 数量与留存事件历史,计划每日更新。 +--- -[![Star and Fork history for HRouter-Desktop](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/metrics/HRouter-Desktop.svg)](https://github.com/honestTai/honestTai/blob/main/data/README.md) +
-[每日实测趋势](https://raw.githubusercontent.com/honestTai/honestTai/main/assets/metrics/HRouter-Desktop-daily.svg) · [数据口径](https://github.com/honestTai/honestTai/blob/main/data/METHODOLOGY.zh-CN.md) · [全部公开项目](https://github.com/honestTai) +Made by **[honestTai](https://github.com/honestTai)** · [HRouter](https://hrouter.net/home) · [More projects](https://github.com/honestTai) -历史曲线仅重建当前仍保留的 Star 与可见 Fork,并非过去每日净总量。每日实测总量自 2026-10-06 开始,不伪造回填。 +
diff --git a/docs/assets/hero-light.svg b/docs/assets/hero-light.svg new file mode 100644 index 00000000..a49219cb --- /dev/null +++ b/docs/assets/hero-light.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + +HRouter Desktop +Less configuration. More coding. +A local desktop workbench for Claude Code, Codex, +and your other AI coding agents. + \ No newline at end of file diff --git a/docs/assets/hero.svg b/docs/assets/hero.svg new file mode 100644 index 00000000..7ae601b9 --- /dev/null +++ b/docs/assets/hero.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + +HRouter Desktop +Less configuration. More coding. +A local desktop workbench for Claude Code, Codex, +and your other AI coding agents. + \ No newline at end of file diff --git a/docs/assets/hero.zh-CN-light.svg b/docs/assets/hero.zh-CN-light.svg new file mode 100644 index 00000000..2be21b73 --- /dev/null +++ b/docs/assets/hero.zh-CN-light.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + +HRouter Desktop +少折腾配置,多专注编程。 +面向 Claude Code、Codex 等 AI 编程 Agent 的本地桌面工作台。 +基于 CC Switch。 + \ No newline at end of file diff --git a/docs/assets/hero.zh-CN.svg b/docs/assets/hero.zh-CN.svg new file mode 100644 index 00000000..bb0c19e3 --- /dev/null +++ b/docs/assets/hero.zh-CN.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + +HRouter Desktop +少折腾配置,多专注编程。 +面向 Claude Code、Codex 等 AI 编程 Agent 的本地桌面工作台。 +基于 CC Switch。 + \ No newline at end of file