Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

88 Commits

Folders and files

NameName
Last commit message
Last commit date

⌨️ AhaKey Desktop

The official cross-platform desktop suite for the AhaKey-X1 — the Vibecoding Keyboard.

AhaKey-X1(Vibecoding Keyboard)官方跨平台桌面端 · 键盘控制 + 拨杆审批 + 本机语音 Agent

English · 简体中文


Latest ReleaseBuildLast CommitStars


macOS 12+Windows 10/11UbuntuSwift 5.9+Java 17+Python 3.10+

🇬🇧 English

AhakeyAI/desktop is the official source monorepo for the AhaKey-X1 (Vibecoding Keyboard) desktop suite — the companion software and tooling that turn the physical keyboard into a control surface for AI-assisted coding.

What it does

  1. Keyboard control — connect to the AhaKey-X1 over BLE, configure the 4-key × 3-mode mapping, push OLED art, and mirror your IDE's state onto the LED light bar.
  2. Lever-gated AI approval — the keyboard's physical lever is a hardware gate for your AI coding agent. Flip it to auto and tool calls from Claude Code / Cursor / Codex / Kimi are auto-approved; flip it back and every action is handed back for manual confirmation. A background agent reads the lever over BLE and answers each IDE hook accordingly — fail-safe by design: if the lever can't be read, it defaults to ask, never allow.
  3. On-device voice agent(macOS) — a local, voice-first assistant that talks to LLMs over the OpenAI protocol and reaches into productivity tools (e.g. Feishu / Lark) under your own identity.

Clients & components

ComponentDirectoryStackNotes
macOS appahakeyconfig-mac/Swift · SwiftUI · CoreBluetoothActively developed; built from the root Package.swift
Windows appahakeyconfig-win-java/Java · JavaFX (Maven)Windows desktop client
Windows app (legacy)ahakeyconfig-win-python/Python · PyInstallerImported baseline (Capswriter-derived)
Linux appahakeyconfig-ubuntu-java/Java · JavaFX (Maven)Ubuntu desktop client
BLE ↔ TCP bridgeBLE_tcp_bridge/C#Bridges BLE to a local TCP socket for non-native clients

The macOS client is the lead implementation: a native SwiftUI + CoreBluetooth stack (no Python / .NET / TCP bridge in the loop), shipping a signed .app plus a background ahakeyconfig-agent LaunchAgent that keeps answering IDE hooks and pushing LED state after the GUI closes.

macOS highlights

  • Native BLE stack — one signed .app bundle + a long-lived ahakeyconfig-agent.
  • AI hooks — per-IDE handlers (ClaudeHookHandler, CursorHookHandler, CodexHookHandler, KimiHookHandler) on a shared HookSupport core, driving the lever-gated approval flow.
  • Voice Agent — a VoiceAgent module with a supervisor + sub-agent orchestrator, structured tool-calling, per-agent memory, and an OpenAI-compatible LLMClient; sessions persist across launches.
  • Feishu / Lark — send messages and resolve contacts via lark-cli under your own identity; the app never stores Feishu credentials.
  • Voice input HUD — a floating push-to-talk overlay backed by Apple Speech, with relay routes for IDEs, WeChat, etc.

Build (macOS)

# from the repo root — the root Package.swift drives the macOS targets
swift build # compile all targets
swift build -c release # release build

This produces the AhaKeyConfig app executable and the ahakeyconfig-agent helper. See docs/installation.md for packaging into a .app and the other platforms' build steps.

Repository layout

desktop/
├── ahakeyconfig-mac/ # macOS client — Swift + SwiftUI (active)
├── ahakeyconfig-win-java/ # Windows client — Java
├── ahakeyconfig-win-python/ # Windows client — Python / PySide6 (legacy baseline)
├── ahakeyconfig-ubuntu-java/ # Linux client — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP bridge — C#
├── Package.swift # Root SwiftPM manifest for the macOS targets
├── docs/ # Repo-level docs (architecture, BLE protocol, releases)
└── assets/ # Shared brand / build assets

Repository scope

Source, project files, required assets, and docs only. Build artifacts should not be committed — avoid checking in .app / .dmg / .exe / .class / .o (and build dirs like */target/). Installers are distributed exclusively through GitHub Releases.

Start here


🇨🇳 简体中文

AhakeyAI/desktopAhaKey-X1(Vibecoding Keyboard) 桌面套件的官方源码 monorepo —— 把这把物理键盘变成「AI 辅助编程控制台」的配套软件与工具链。

它能做什么

  1. 键盘控制 —— 通过 BLE 连接 AhaKey-X1,配置 4 键 × 3 模式键位映射、推送 OLED 图片、把 IDE 状态映射到 LED 灯条。
  2. 拨杆审批 AI —— 键盘上的物理拨杆是 AI coding agent 的硬件闸门。拨到「自动」,Claude Code / Cursor / Codex / Kimi 的工具调用自动放行;拨回来,每个动作都交回人工确认。后台 agent 通过 BLE 读拨杆状态,据此回应各 IDE 的 hook —— 设计上 fail-safe:读不到拨杆时一律默认「交人确认」,绝不误放行。
  3. 本机语音 Agent(macOS)—— 一个本地、语音优先的助手,走 OpenAI 协议调用 LLM,并以用户自己的身份操作生产力工具(飞书 / Lark 等)。

客户端与组件

组件目录技术栈说明
macOS 应用ahakeyconfig-mac/Swift · SwiftUI · CoreBluetooth主力开发;由根 Package.swift 构建
Windows 应用ahakeyconfig-win-java/Java · JavaFX(Maven)Windows 桌面客户端
Windows 应用(旧版)ahakeyconfig-win-python/Python · PyInstaller迁入基线(源自 Capswriter)
Linux 应用ahakeyconfig-ubuntu-java/Java · JavaFX(Maven)Ubuntu 桌面客户端
BLE ↔ TCP 桥接BLE_tcp_bridge/C#把 BLE 桥接到本地 TCP,供非原生客户端使用

macOS 客户端是主力实现:原生 SwiftUI + CoreBluetooth 链路(中间没有 Python / .NET / TCP 桥接),交付一个签名 .app 加一个后台 ahakeyconfig-agent LaunchAgent —— GUI 关掉后仍持续回应 IDE hook、推送 LED 状态。

macOS 主要能力

  • 原生 BLE 栈 —— 单个签名 .app + 常驻 ahakeyconfig-agent
  • AI hook —— 各 IDE 独立 handler(ClaudeHookHandler / CursorHookHandler / CodexHookHandler / KimiHookHandler)共用 HookSupport 核心,驱动拨杆审批流程。
  • Voice Agent —— VoiceAgent 模块,supervisor + sub-agent 编排,结构化工具调用、独立记忆,配 OpenAI 协议兼容的 LLMClient;会话跨次启动保留。
  • 飞书 / Lark —— 通过 lark-cli 以用户自己的身份发消息、查联系人,App 不保存飞书凭证。
  • 语音输入 HUD —— 基于 Apple Speech 的浮动「按住说话」浮层,为 IDE / 微信等做了中继路由。

构建(macOS)

# 在仓库根目录 —— 根 Package.swift 驱动 macOS targets
swift build # 编译全部 target
swift build -c release # release 构建

产出 AhaKeyConfig 应用可执行文件与 ahakeyconfig-agent 辅助进程。打包成 .app 以及其他平台的构建步骤见 docs/installation.md

仓库结构

desktop/
├── ahakeyconfig-mac/ # macOS 客户端 — Swift + SwiftUI(活跃)
├── ahakeyconfig-win-java/ # Windows 客户端 — Java
├── ahakeyconfig-win-python/ # Windows 客户端 — Python / PySide6(旧版基线)
├── ahakeyconfig-ubuntu-java/ # Linux 客户端 — Java
├── BLE_tcp_bridge/ # BLE ↔ TCP 桥接 — C#
├── Package.swift # macOS targets 的根 SwiftPM 清单
├── docs/ # 仓库级文档(架构、BLE 协议、发布)
└── assets/ # 共享品牌 / 构建资源

仓库范围

只保留源码、工程文件、必要资源与文档。构建产物不应入库 —— 不应提交 .app / .dmg / .exe / .class / .o(以及 */target/ 等构建目录),安装包统一走 GitHub Releases

新同学先读

About

Official baseline desktop client for AhaKey hardware.

Resources

Code of conduct

Contributing

Security policy

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages