Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 27 additions & 75 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,104 +4,56 @@

# CC Buddy

### Coding CLI Buddy
**Manage and review completed Coding Agent CLI sessions.**

**Point Claude Code at any Anthropic-compatible provider — one click, all local.**
[![Platform](https://img.shields.io/badge/platform-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-5b6cff?style=flat-square)](#installation) [![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri-24C8DB?style=flat-square&logo=tauri&logoColor=white)](https://tauri.app/) [![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-3b82f6?style=flat-square)](./LICENSE)

[![Platform](https://img.shields.io/badge/platform-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-5b6cff?style=flat-square)](#-installation)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri-24C8DB?style=flat-square&logo=tauri&logoColor=white)](https://tauri.app/)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-3b82f6?style=flat-square)](./LICENSE)

[Installation](#-installation) · [Quick Start](#-quick-start) · [How it works](#-how-it-works)

**English** · [简体中文](./README.zh-CN.md)
[Download](https://github.com/ccbud/ccbud/releases) · **English** · [简体中文](./README.zh-CN.md)

</div>

---

**CC Buddy** (`CC` coding CLI + `Buddy`) is a cross-platform desktop app that runs a tiny **local gateway** between Claude Code and any Anthropic-compatible provider — Kimi, DeepSeek, GLM, MiMo and more. Add your providers once, switch with a single click, and let CC Buddy wire up Claude Code for you. **You never touch an environment variable.**

<div align="center">
<img src="docs/img/services.jpg" alt="CC Buddy — services view" width="820">
</div>

- **One-click Connect** — CC Buddy writes `~/.claude/settings.json` for you, and restores it exactly when you disconnect.
- **Switch in a click** — keep many providers side by side; tap a card to switch instantly.
- **Automatic model mapping** — Claude's default model names are routed to the active provider's models for you.
- **Stays on your machine** — the gateway binds to `127.0.0.1`; nothing leaves your computer.
**CC Buddy** is a cross-platform desktop app for managing and reviewing local Coding Agent CLI sessions. It does not run the agent for you; it turns histories already written by your CLIs into readable, searchable timelines. After a task finishes, you can trace its goal, decisions, tool calls, subagents, changes, failures, and final outcome. An optional local gateway is included for model API conversion.

## 📥 Installation
```text
CLI session histories ──▶ CC Buddy ──▶ browse · search · trace · export · review
```

### Download (recommended)
## Session review

Grab the latest build for your platform from the **[Releases page](https://github.com/ccbud/ccbud/releases)**:
Reads local histories from **Claude Code, Codex CLI, Qoder CLI, Grok Build CLI, GitHub Copilot CLI, and Antigravity CLI**.

| Platform | File |
| :-- | :-- |
| **macOS** (Apple Silicon & Intel) | `.dmg` |
| **Windows** | `.exe` installer |
| **Linux** | `.AppImage` / `.deb` |
- **Reconstruct the run** — render Markdown, thinking, tool calls and results, patches, images, recorded model/token metadata, and main/subagent threads.
- **Find the moment** — auto-discover histories, group by source and project, and search across sessions or inside one conversation.
- **Manage the archive** — rename, tag, filter, recycle, add custom history roots, follow active sessions, and import compatible JSONL/ZIP transcripts.
- **Continue the review** — export raw session files/bundles (JSONL, ZIP, or DB) or portable HTML; on macOS, open the main and subagent transcripts in Claude or ChatGPT for analysis.

> **macOS Gatekeeper:** if the first launch is blocked, right-click the app → **Open**, or run
> `xattr -dr com.apple.quarantine "/Applications/CC Buddy.app"`.
## Included: local API gateway

### Homebrew (macOS)
As a companion feature, the gateway accepts **Anthropic Messages**, **OpenAI Chat Completions**, and **OpenAI Responses** on both client and provider sides, passing through matching protocols or translating between them. It configures **Claude Code and Codex** with one click; other compatible clients can use the local endpoint manually. Preset, custom, and plugin-backed providers support switching and model mapping.

```bash
brew install --cask ccbud/tap/ccbud # first install
brew upgrade --cask ccbud # later upgrades
```
The gateway binds to `127.0.0.1`; inference requests still go to the provider you select.

### Staying up to date
## Installation

CC Buddy checks for new releases on launch (and daily) and surfaces them under **Settings → About & Updates**. App updates are delivered through the Tauri updater when available; Homebrew users can also run `brew upgrade --cask ccbud`.
Download the latest build for macOS, Windows, or Linux from [Releases](https://github.com/ccbud/ccbud/releases).

### Build from source
Homebrew (macOS):

```bash
git clone https://github.com/ccbud/ccbud.git
cd ccbud
npm install
npm start # run the Tauri app in development

# package a distributable for your OS:
npm run dist:mac # or: dist:win · dist:linux
brew install --cask ccbud/tap/ccbud
```

## 🚀 Quick Start

**1 · Add a provider**
Open CC Buddy, click **`+`**, pick a preset (GLM · DeepSeek · MiMo · Kimi …) or enter a custom base URL, and paste your API key.

<div align="center"><img src="docs/img/switch.jpg" alt="Add and switch providers" width="760"></div>

**2 · Connect**
Hit the big **Connect** button. CC Buddy points Claude Code at the local gateway by writing `env.ANTHROPIC_BASE_URL` and `env.ANTHROPIC_AUTH_TOKEN` into `~/.claude/settings.json` — backing up whatever was there before.

**3 · Use Claude Code**
Start a new Claude Code session and you're on your chosen provider. Switch anytime by clicking another card; hit **Disconnect** to restore your original settings, untouched. Keep CC Buddy running while you work — closing the window tucks it into the menu bar / tray.
## Development

## 🔧 How it works
With Node.js and the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) installed:

```text
Claude Code ──(ANTHROPIC_BASE_URL = 127.0.0.1:port)──▶ CC Buddy gateway ──▶ active provider
· swaps in the upstream's real token
· routes / maps model names
· rewrites the model name in the response
back to the name the client asked for
```bash
git clone https://github.com/ccbud/ccbud.git && cd ccbud
npm install && npm start
```

CC Buddy never edits your providers' own configs — it just runs a forwarding server on your machine. When you use a model alias, the gateway rewrites the `model` field in the response (including the streaming `message_start`) back to the alias, so Claude Code always sees the name it requested. If you don't set `ANTHROPIC_MODEL`, Claude's default `claude-*` model names are mapped to the active provider's main model (with `haiku` → its small model).

## 📸 A look inside

| | |
| :--: | :--: |
| <img src="docs/img/switch.jpg" width="420"><br>Switch providers and map models in a click | <img src="docs/img/monitor.jpg" width="420"><br>Watch every request flow through, live |
| <img src="docs/img/usage.jpg" width="420"><br>Usage at a glance — even from the menu bar | <img src="docs/img/privacy.jpg" width="420"><br>Redact sensitive data before it ever leaves |

## 📄 License
## License

Released under the [GPL-3.0](./LICENSE) license.
Released under [GPL-3.0](./LICENSE).
103 changes: 28 additions & 75 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,106 +1,59 @@
<div align="center">

<img src="docs/img/icon.png" alt="CCBuddy" width="120" height="120" style="border-radius: 26px; box-shadow: 0 12px 32px rgba(0,0,0,0.18);">
<img src="docs/img/icon.png" alt="CC Buddy" width="120" height="120" style="border-radius: 26px; box-shadow: 0 12px 32px rgba(0,0,0,0.18);">

# CCBuddy
# CC Buddy

### 编码 CLI 好搭子
**集中管理与复盘已完成的 Coding Agent CLI 会话。**

**让 Claude Code 接到任意 Anthropic 兼容服务商 —— 一键接入,全程本地。**
[![Platform](https://img.shields.io/badge/platform-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-5b6cff?style=flat-square)](#安装) [![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri-24C8DB?style=flat-square&logo=tauri&logoColor=white)](https://tauri.app/) [![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-3b82f6?style=flat-square)](./LICENSE)

[![Platform](https://img.shields.io/badge/platform-macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-5b6cff?style=flat-square)](#-安装)
[![Built with Tauri](https://img.shields.io/badge/built%20with-Tauri-24C8DB?style=flat-square&logo=tauri&logoColor=white)](https://tauri.app/)
[![License: GPL-3.0](https://img.shields.io/badge/license-GPL--3.0-3b82f6?style=flat-square)](./LICENSE)

[安装](#-安装) · [快速开始](#-快速开始) · [工作原理](#-工作原理)

[English](./README.md) · **简体中文**
[下载](https://github.com/ccbud/ccbud/releases) · [English](./README.md) · **简体中文**

</div>

---

**CCBuddy**(`CC` coding CLI + `Buddy` 伙伴)是一个跨平台桌面应用,在 Claude Code 和任意 Anthropic 兼容服务商(Kimi、DeepSeek、GLM、MiMo 等)之间起一个**本地网关**。服务商添加一次,点一下卡片就切换,Claude Code 的配置由 CCBuddy 自动写好 —— **你不用碰任何环境变量。**

<div align="center">
<img src="docs/img/services.jpg" alt="CCBuddy — 服务商" width="820">
</div>

- **一键接入** —— CCBuddy 自动写好 `~/.claude/settings.json`,断开时再原样还原。
- **即时切换** —— 多家服务并存,点一下卡片立刻换。
- **自动模型映射** —— Claude 的默认模型名自动路由到当前服务商的模型。
- **全程本地** —— 网关只绑定 `127.0.0.1`,数据不出本机。
**CC Buddy** 是一个跨平台桌面应用,核心是管理和复盘本地 Coding Agent CLI 会话。它不替代 Agent 执行任务,而是把各 CLI 已写入本机的历史记录还原成可读、可搜索的时间线。任务结束后,你可以追踪目标、决策、工具调用、子代理、文件改动、失败点与最终结果。此外还附带可选的本地网关,用于转换模型 API。

## 📥 安装
```text
CLI 会话记录 ──▶ CC Buddy ──▶ 浏览 · 搜索 · 追踪 · 导出 · 复盘
```

### 下载(推荐)
## 会话复盘

**[Releases 页面](https://github.com/ccbud/ccbud/releases)** 下载对应平台的安装包:
支持读取 **Claude Code、Codex CLI、Qoder CLI、Grok Build CLI、GitHub Copilot CLI 和 Antigravity CLI** 的本地会话。

| 平台 | 文件 |
| :-- | :-- |
| **macOS**(Apple 芯片 & Intel) | `.dmg` |
| **Windows** | `.exe` 安装包 |
| **Linux** | `.AppImage` / `.deb` |
- **还原执行过程** —— 统一展示 Markdown、思考、工具调用与结果、补丁、图片、记录中包含的模型与 token 信息,以及主会话和子代理线程。
- **快速定位问题** —— 自动发现记录,按来源和项目归类,支持跨会话全文搜索与会话内搜索。
- **管理会话档案** —— 重命名、标签、筛选、回收站、自定义历史目录、活跃会话跟随,以及兼容的 JSONL/ZIP 导入。
- **继续发起复盘** —— 导出原始会话文件或打包记录(JSONL、ZIP 或 DB),也可导出独立 HTML;在 macOS 上可将主会话和子代理记录交给 Claude 或 ChatGPT 分析。

> **macOS 首次打开被拦截:** 右键点应用 → **打开**,或执行
> `xattr -dr com.apple.quarantine "/Applications/CC Buddy.app"`。
## 附带能力:本地 API 网关

### Homebrew(macOS)
作为附带能力,网关的客户端和上游均支持 **Anthropic Messages、OpenAI Chat Completions 和 OpenAI Responses**:协议相同则直通,不同则相互转换。它能一键配置 **Claude Code 和 Codex**;其他兼容客户端可手动使用本地端点。预设、自定义和插件服务均可切换并映射模型。

```bash
brew install --cask ccbud/tap/ccbud # 首次安装
brew upgrade --cask ccbud # 后续升级
```
网关只监听 `127.0.0.1`;推理请求仍会发送给所选服务商。

### 保持最新(应用内更新)
## 安装

CCBuddy 会在启动时(以及每天)检查新版本,并在 **设置 → 关于与更新** 中提示。可用时应用内通过 Tauri updater 更新;Homebrew 用户也可以执行 `brew upgrade --cask ccbud`
前往 [Releases](https://github.com/ccbud/ccbud/releases) 下载 macOS、Windows 或 Linux 最新版本

### 从源码构建
Homebrew(仅 macOS):

```bash
git clone https://github.com/ccbud/ccbud.git
cd ccbud
npm install
npm start # 开发模式运行 Tauri 应用

# 打包当前系统的发行版:
npm run dist:mac # 或:dist:win · dist:linux
brew install --cask ccbud/tap/ccbud
```

## 🚀 快速开始

**1 · 添加服务商**
打开 CCBuddy,点 **`+`**,选预设(GLM · DeepSeek · MiMo · Kimi …)或填自定义 base URL,粘贴 API Key。

<div align="center"><img src="docs/img/switch.jpg" alt="添加并切换服务商" width="760"></div>

**2 · 接入**
点首页大按钮 **「接入」**。CCBuddy 会把网关地址写进 `~/.claude/settings.json` 的 `env.ANTHROPIC_BASE_URL` / `env.ANTHROPIC_AUTH_TOKEN`,接入前的配置会自动备份。

**3 · 用 Claude Code**
新开一个 Claude Code 会话即生效,已经在你选的服务商上。想换服务点另一张卡片即可;点 **「断开接入」** 会把你原来的配置原样还原。使用期间保持 CCBuddy 运行 —— 关闭窗口会缩到菜单栏 / 托盘继续工作。
## 开发

## 🔧 工作原理
安装 Node.js 和 [Tauri 开发环境](https://v2.tauri.app/start/prerequisites/) 后:

```text
Claude Code ──(ANTHROPIC_BASE_URL = 127.0.0.1:port)──▶ CCBuddy 网关 ──▶ 激活的服务商
· 替换为上游真实 token
· 模型名路由 / 映射
· 把响应里的 model 名改回客户端期望的值
```bash
git clone https://github.com/ccbud/ccbud.git && cd ccbud
npm install && npm start
```

CCBuddy **不修改任何第三方服务的配置**,只在本机起一个转发 server。用「别名」时,网关会把响应里的 `model` 字段(含流式 `message_start`)改回别名,保证客户端看到的就是它请求的名字。未配置 `ANTHROPIC_MODEL` 时,Claude Code 发来的 `claude-*` 默认模型名会被映射到激活服务商的主模型(含 `haiku` → 小模型)。

## 📸 走进来看看

| | |
| :--: | :--: |
| <img src="docs/img/switch.jpg" width="420"><br>一键切换服务商、映射模型 | <img src="docs/img/monitor.jpg" width="420"><br>实时看着每个请求流过 |
| <img src="docs/img/usage.jpg" width="420"><br>用量一目了然 —— 菜单栏也能看 | <img src="docs/img/privacy.jpg" width="420"><br>敏感信息出门前先抹掉 |

## 📄 许可证
## 许可证

基于 [GPL-3.0](./LICENSE) 协议开源。
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ccbud",
"version": "1.3.7",
"version": "1.3.8",
"description": "CC Buddy — Coding CLI Buddy. A cross-platform desktop app that proxies Claude Code to any Anthropic-compatible provider (one-click switching, model mapping) and browses your Claude Code & Codex session history.",
"author": {
"name": "loadchange",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "1.3.7"
version = "1.3.8"
description = "CCBuddy — Coding CLI Buddy"
authors = ["loadchange <soocto@gmail.com>"]
license = "GPL-3.0-only"
Expand Down
2 changes: 2 additions & 0 deletions src-tauri/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
<dict>
<key>CFBundleDisplayName</key>
<string>CC Buddy</string>
<key>NSAppDataUsageDescription</key>
<string>CC Buddy reads local Qoder and other coding CLI session history to display it in the app.</string>
</dict>
</plist>
Loading
Loading