From ab268b3825ac71b426e9cf4e423aea5aeb34f181 Mon Sep 17 00:00:00 2001 From: wuguangan Date: Tue, 17 Mar 2026 12:29:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20cc=20=E4=B8=80=E9=94=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scripts/cc.sh: 启动托盘 app + claude 调度中心 - alias cc 加入 ~/.zshrc,任何终端输入 cc 即可启动 - release 二进制编译完成 Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 1 + scripts/cc.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 scripts/cc.sh diff --git a/.gitignore b/.gitignore index 40258ff..672c212 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ sounds/ projects.yaml app/src-tauri/target/ app/node_modules/ +app/claude-hub-bin diff --git a/scripts/cc.sh b/scripts/cc.sh new file mode 100755 index 0000000..2a6adf7 --- /dev/null +++ b/scripts/cc.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# cc - Claude Hub 一键启动 +# 安装: 在 ~/.zshrc 中添加 alias cc="bash ~/Documents/code/claude-hub/scripts/cc.sh" +# +# 做三件事: +# 1. 启动 Claude Hub 托盘 app(如果没在跑) +# 2. 在 claude-hub 目录启动 claude(调度中心) + +HUB_DIR="$HOME/Documents/code/claude-hub" +APP_BIN="$HUB_DIR/app/claude-hub-bin" + +# 1. 启动托盘 app +if ! pgrep -f "claude-hub-bin" >/dev/null 2>&1; then + if [ -f "$APP_BIN" ]; then + "$APP_BIN" & + disown + echo "✓ Claude Hub 托盘已启动" + else + echo "⚠ 托盘 app 未编译,跳过" + fi +else + echo "✓ Claude Hub 托盘已在运行" +fi + +# 2. 启动 Claude 调度中心 +cd "$HUB_DIR" +exec claude