MIT License

技术解读

以下内容由 GitRead 中文社区 编辑团队基于项目 README 与官方资料整理, 结合中文开发者的常见使用场景补充技术选型建议。具体以项目官方文档为准。

项目背景与痛点

在日渐复杂的软件开发环境中,开发者们亟需一个高效且功能全面的GUI界面,用于在VS Code中快速切换和管理各种编程语言及工具。LKbaba/Claude-code-ChatInWindows项目,正是一款为Windows与macOS用户打造的全功能客户端,它允许开发者通过简易的GUI界面操作Claude Code CLI。项目中包含了丰富的第三方API、MCP插件、Skills及Hooks,同时还引入了实时令牌追踪功能,旨在提供一个更直观、便捷、高效的开发体验。

该项目的痛点在于:

  • 对于Windows用户来说,传统的WSL开发环境需要额外的学习成本。这个项目免去了WSL的烦琐步骤,为开发者提供了更为直观和便捷的开发环境。
  • 提供全面的功能支持不仅限于单一的编程语言和工具,还覆盖了丰富的第三方插件和开发者需要的工具技能,大大丰富了扩展性和易用性。

核心技术揭秘

LKbaba/Claude-code-ChatInWindows的实现背后兼顾了技术的通用性和高效性。下面是一张简单的数据流图,帮助您理解其背后的技术架构:

graph TD A[用户请求] --> B{"接口调用"} B -->|"API请求"| C[端内置插件] B -->|"MCP插件"| D[动态扩展] B -->|"Skill接口"| E[插件管理] B -->|"实时追踪"| F[Token监控器] C --> H[执行任务] D --> H E --> H F --> H H --> G[执行结果]

核心技术栈包含了:

  • 动态编程语言:项目采用Python或者Node.js,便于开发API和插件之间的集成。
  • 设计模式:使用了Adapter(适配器)、Proxy(代理)模式,以保证不同系统环境交互的兼容性和透明性。
  • 数据流:采用了比较典型的微服务架构,通过接口调用与MVP方式实现数据在不同模块间的流通与处理。

功能亮点与差异

LKbaba/Claude-code-ChatInWindows与竞品相比,具有几个显著的功能亮点:

  • 实时Token追踪:实时监控和管理你在不同开发环节中所消耗的Token,保证开发效率的同时提升了系统的安全性。
  • MCP插件支持:内置多样的Micro Component Package,允许开发者方便地调用和插件管理,大大扩展了项目的功能性和灵活性。
  • 全面支持Windows和macOS:无需依赖WSL环境,轻量易用,在两个主要桌面系统中均可完美运行。

应用场景与落地建议

本项目适合用于中小型开发团队或个人开发者,优先推荐给需要高效代码管理以及能够合理利用CLI工具的开发者。建议在正式生产环境使用前做全面的测试和验证,如此才能确保系统的稳定性和安全性。开发时请注意,务必对第三方API和插件实施安全授权,并且保持定期更新插件和监控系统资源。

综合评价

LKbaba/Claude-code-ChatInWindows作为一款功能全面、扩展性强的开发环境助手,无疑为开发者提供了极大的便利。其支持的动态资源追踪和丰富的插件模式使其明显超越同类产品,然而需要开发者充分把握其原理及安全细则以发挥最大效能。总体而言,这是一款值得尝试与投入的关键开发辅助工具。

关于

GitHub 原始描述(英文)

Full-featured GUI for Claude Code CLI in VS Code — Windows (no WSL) & macOS. Third-party API, MCP plugins, Skills, Hooks, real-time token tracking. Actively maintained.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
254
价值分
139
活跃状态
活跃

语言占比

JavaScript
Shell
TypeScript

README

Claude Code GUI / ChatUI for VS Code

Claude Code ChatUI is a full-featured GUI extension for Claude Code CLI in VS Code and Cursor. Works natively on Windows (no WSL required) and macOS. Supports both official Anthropic accounts and third-party API providers with GUI configuration. Key features: MCP plugin management, Skills system, Hooks system, real-time token & cost tracking, AI Assistant integration (Gemini + Grok), and multi-language UI (English, 简体中文, 繁體中文). Actively maintained with 236+ commits.

Claude Code Chat Icon

VS Code Marketplace Installs GitHub Stars VS Code ≥ 1.94 MIT License Windows 10/11 macOS Supported Cursor Ready

🌐 Languages: English | 简体中文 | 繁體中文

Note: This extension automates the official claude interactive CLI to provide a GUI. It does not modify authentication, proxy network traffic, or touch your credentials — it reuses your already-logged-in subscription. Please review and comply with Anthropic’s Terms of Service.


Why This Extension?

Feature Official Claude Code Claude Code GUI (MaheshKok) Claude Code UI (AuraTech) This Project
Windows No WSL ❌ Requires setup ❌ Requires CLI config WSL path mapping ✅ Native
Third-party API GUI Config ❌ ❌ ❌ ✅ Exclusive
MCP Plugin GUI Management CLI-level only ✅ MCP Hub ✅ MCP commands ✅ GUI config (Global + Workspace)
Skills System GUI CLI-level only ❌ ❌ ✅ Exclusive
Hooks System GUI CLI-level only ❌ ❌ ✅ Exclusive
AI Assistant Integration ❌ ❌ ❌ ✅ Gemini + Grok
Real-time Token Tracking ❌ ✅ Usage meter ✅ Cost tracking ✅
macOS Support ✅ ✅ ✅ ✅
npm + Native Installer ✅ ✅ ✅ ✅
Actively Maintained ✅ ✅ ✅ ✅ (236+ commits)

📸 Preview

Main Interface

📅 Recent Updates

Version Date Highlights
v5.0.8 2026-06-15 Enables the 1M-token context window by default — long sessions were silently crashing into Prompt is too long at ~165K because the launched model never carried the 1M window (bare --model claude-opus-4-8 = 200K) while the progress bar could show a 1M denominator, and with auto-compaction off there was no safety net. The driver now appends the [1m] suffix for 1M-capable models (Opus 4.6/4.7/4.8, Sonnet 4.6) at spawn and on mid-session /model switch. Toggle via enable1MContext. ⚠️ 1M is in-subscription only on Max/Team/Enterprise + Opus
v5.0.7 2026-06-16 Fixes the extension failing to run on a freshly-installed machine — a new machine shows two startup gates in sequence (workspace-trust + bypass-permissions warning) but the driver only answered one, so the first prompt’s Enter hit the second dialog’s “No, exit” and claude exited code 1 in a re-spawn loop. Both gate types are now tracked independently and scanned for ~25s post-spawn
v5.0.6 2026-06-15 Fixes editing a skill/hook/any .claude/ file freezing the turn ~69s (the CLI’s self-edit confirmation menu, unanswered by the PTY driver under bypassPermissions, is now auto-accepted session-wide). Disables the framework’s lossy auto-compaction by default (DISABLE_AUTO_COMPACT=1; manual /compact still works). Restores inline rendering of subagent (Agent/Task) tool steps without double-counting their tokens. Raises the Context Window default 200K→400K
v5.0.5 2026-06-15 Fixes messages being silently swallowed after a /compact or a session switch (the provider-wide compact-mode flag now resets on every session switch, and a send during compaction is visibly rejected instead of lost). Also shrinks the oversized QUESTION option-card title (.ask-question-header 14px→13px) so it no longer towers over the conversation badges
v5.0.4 2026-06-15 Packaging fix — the v5.0.3 VSIX shipped with zero node_modules (--no-dependencies dropped the native node-pty runtime), so it installed but the chat panel wouldn’t open. node-pty’s win32-x64 binaries are now bundled correctly
v5.0.3 2026-06-15 Interactive option cards — Claude emits a fenced ```ask block (native AskUserQuestion disabled) that renders as clickable single/multi-select cards; clicking injects the chosen label as the next turn. Fixes the “still processing” lock when an ask block follows a tool call (stop_reason: null), plus card layout/typography polish
v5.0.2 2026-06-14 First-turn image vision via staged PTY injection — pasted/selected images arrive as a native [Image #N] multimodal attachment (0 Read, no “I don’t see an image”); idempotent under the reinject watchdog; graceful degrade to Read if no chip; CJK/space paths + multi-image verified
v5.0.1 2026-06-13 PTY interactive driver replaces claude -p (usage bills against your subscription); output read from transcript JSONL; permission mode setting; optional Stop hook completion fallback; win32-x64 only
v4.1.3 2026-06-02 Claude Opus 4.8 model support; Opus 4.7 demoted to Previous; Opus 4.5 hidden from UI (kept for history & pricing)
v4.1.2 2026-05-18 Security: npm audit 23→5 vulns; tsconfig strict checks (noImplicitReturns, noUnusedParameters); code dedup: unified escapeHtml, centralized MODEL_DISPLAY_NAMES, generic openModal/closeModal
v4.1.1 2026-04-21 Gemini Vertex AI ADC mode; MCP env backfill fix (APPDATA/PATH/proxy); Windows node stdio wrapper fix; hierarchical auth UI
v4.1.0 2026-04-16 Opus 4.7 model support; xHigh thinking intensity; /ultrareview command; Compute Mode restore bug fix
v4.0.10 2026-04-13 Cursor history crash fix; history panel XSS fix
v4.0.9 2026-04-02 Project metadata & README rewrite for AI search discoverability
v4.0.8 2026-04-02 Codex MCP template, CLAUDE.md conditional injection
v4.0.7 2026-04-02 Stream parser upgrade: 6 bug fixes, new CLI message types
v4.0.5 2026-03-30 AI Assistant Panel: Grok + Vertex AI support; macOS scroll fix
v4.0.2 2026-03-28 Hooks GUI management panel with 26 event types, 4 hook types, 5 templates
v3.1.9 2026-03-29 CSP security policy, XSS fixes, Windows orphan process cleanup
v3.1.8 2026-03-12 Grok MCP template, default model → Sonnet 4.6, cost bubble dedup
v3.1.7 2026-02-18 Claude Sonnet 4.6 model support, Compute Mode upgrade
v3.1.4 2026-01-29 macOS platform support added
v3.1.0 2026-01-13 Skills panel: copy, enable/disable toggle, plugin protection
v2.1.0 — MCP integration, HTTP/SSE transport, server templates
v2.0.0 — Complete UI redesign, statistics dashboard, custom API endpoint

See CHANGELOG.md for full details.

🚀 Quick Start

Step 1: Environment Setup

  1. Install Git for Windows (includes Git Bash)
  2. Install Node.js (LTS version recommended, ≥ 18)
  3. Open PowerShell as Administrator and set environment variable:
setx SHELL "C:\Program Files\Git\bin\bash.exe"
  1. Restart your computer (required for changes to take effect)

Step 2: Install Claude Code CLI

After restarting, open a new terminal window:

npm install -g @anthropic-ai/claude-code

⚠️ VPN Users: Please ensure TUN mode is enabled throughout the installation and usage process, otherwise you may not be able to connect to Claude services.

Step 3: Log in to Claude Code

Using Official Account
claude

A browser window will open for authorization. Log in and copy the token back to the terminal.

Using 🔑 Third-Party API

If you’re using a third-party API, configure it in the extension:

  1. Press Ctrl+Shift+C to open the chat interface
  2. Click the settings button ⚙️ in the top right corner
  3. Check “Use Custom API Endpoint”
  4. Enter your API key in the API Key field (e.g., sk-ant-xxxxxxxxxx)
  5. Enter the API address in the Base URL field (e.g., https://v3.codesome.cn)
  6. Settings are saved automatically. “Settings updated successfully” confirms the configuration

API Configuration

Switch back to official account: Uncheck “Use Custom API Endpoint”.

💡 Tips:

  • If the API key is incorrect, chat will show “processing” until timeout
  • You can switch between official account and third-party API anytime via the toggle

💡 This extension supports various third-party API services (e.g., v3.codesome.cn, openrouter.ai). Please consult your API provider for the specific URL.


Step 4: Install the Extension

  1. Open VS Code or Cursor
  2. Press Ctrl+Shift+X to open Extensions
  3. Search for Claude-Code ChatUI or lkbaba
  4. Click Install

Direct Link: ➡️ VS Code Marketplace

📦 Method 2: GitHub Release Download
  1. 🔗 Go to Releases page
  2. Download the .vsix file
  3. In VS Code, press Ctrl+Shift+P, select “Extensions: Install from VSIX…”
🛠️ Method 3: Build from Source
git clone https://github.com/LKbaba/Claude-code-ChatInWindows.git
cd Claude-code-ChatInWindows
npm install
npm run package
# The generated .vsix file is in the project root, install using Method 2

Step 5: Start Using

  • Open Chat Interface: Press Ctrl+Shift+C
  • File Explorer Icon: Click the icon next to the new folder button

❓ FAQ

Q: Getting "No suitable shell found" error?
  1. Make sure Git for Windows is installed
  2. Run as administrator: setx SHELL "C:\Program Files\Git\bin\bash.exe"
  3. Restart your computer (required for changes to take effect)

If the problem persists, try:

  1. Open system environment variables (Win + X → System → Advanced system settings → Environment Variables)
  2. Ensure PATH contains C:\Program Files\Git\cmd
  3. Restart your computer
Q: Third-party API configured but chat not responding?

Claude Code CLI sometimes needs to be initialized in the command line first. Run in PowerShell:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
$Env:ANTHROPIC_API_KEY  = "sk-xxxxxxxxxxxxxxxxxxxxxxxx"
$Env:ANTHROPIC_BASE_URL = "https://v3.codesome.cn"
claude

If the problem persists, try updating Claude Code CLI:

npm install -g @anthropic-ai/claude-code@latest
Q: Third-party API stops working after computer restart?

Environment variables $Env:ANTHROPIC_API_KEY and $Env:ANTHROPIC_BASE_URL are temporary and will be lost after restart.

Two solutions:

Option 1: Reset after each restart

$Env:ANTHROPIC_API_KEY  = "your API Key"
$Env:ANTHROPIC_BASE_URL = "https://v3.codesome.cn"
claude

Option 2: Set as permanent environment variables (run as administrator)

setx ANTHROPIC_API_KEY "your API Key"
setx ANTHROPIC_BASE_URL "https://v3.codesome.cn"
# Restart computer for changes to take effect
Q: Getting "rg: command not found" error?

This is optional and doesn’t affect normal usage. If you want to install ripgrep for better search performance:

# In Git Bash:
curl -L https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep-14.1.0-x86_64-pc-windows-msvc.zip -o ripgrep.zip
unzip ripgrep.zip && mkdir -p ~/bin
cp ripgrep-14.1.0-x86_64-pc-windows-msvc/rg.exe ~/bin/
echo 'alias rg="~/bin/rg"' >> ~/.bashrc && source ~/.bashrc

Note: The extension’s built-in Grep tool works fine without ripgrep.

Q: Getting "File has been unexpectedly modified" error when Claude edits files?

This error occurs when VS Code/Cursor’s auto-save feature modifies files between Claude’s Read and Edit operations.

Solution: Disable auto-save

Add this to your VS Code/Cursor settings (settings.json):

"files.autoSave": "off"

Or use a less aggressive option:

"files.autoSave": "onWindowChange"

Why this happens:

  1. Claude reads a file and stores its content hash
  2. Auto-save triggers and modifies the file on disk
  3. Claude tries to edit the file, but the hash no longer matches
  4. Claude reports “File has been unexpectedly modified”

Other settings that can cause this issue:

  • editor.formatOnSave: true - Formatters modify file content on save
  • files.trimTrailingWhitespace: true - Removes trailing spaces on save
  • files.insertFinalNewline: true - Adds newline at end of file

If you need these features, consider disabling them temporarily when using Claude Code.


🤝 How to Contribute

  1. Fork the project and create a feature branch
  2. Focus on a single new feature or improvement
  3. Test thoroughly on a real Windows environment
  4. Submit a Pull Request with clear description

Welcome all AI engineers, developers, and geeks on Windows!


📝 License

This project is licensed under the MIT License. See LICENSE for details.


🙏 Acknowledgments

  • andrepimenta – Original project claude-code-chat
  • Mrasxieyang (linux.do community) – Provided the core solution for native Windows installation
  • Anthropic – For creating the powerful Claude and Claude Code
  • All developers contributing to the Claude Code ecosystem ❤️

评论

暂无评论