VibeWatch
你的AI将程序员的眼睛对准你的终端
](https://www.npmjs.com/package/vibewatch) 
什么是VibeWatch?
VibeWatch是一个CLI工具,可以监控您的开发命令,并实时向Claude(或任何兼容MCP的AI助手)公开终端输出。不再有复制粘贴错误——只需告诉克劳德“检查我的终端”,它就会看到一切。
快速开始
# Install globally
npm install -g vibewatch
# Or run directly with npx
npx vibewatch npm run dev
# Your dev server runs normally, but now Claude can see it!然后问克劳德: *“我遇到错误,请检查我的终端”* -Claude通过MCP自动看到您的终端输出。
安装
选项1:全局安装
npm install -g vibewatch
vibewatch npm run dev选项2:npx(不安装)
npx vibewatch npm run dev方案3:地方发展
git clone https://github.com/krjordan/vibewatch.git
cd vibewatch
npm install
npm run build
node dist/cli.js npm run dev用法
基本用法
用以下命令包裹任何命令 vibewatch:
# JavaScript/TypeScript
vibewatch npm run dev
vibewatch npx next dev
vibewatch yarn dev
vibewatch pnpm dev
# Python
vibewatch python manage.py runserver
vibewatch uvicorn main:app --reload
vibewatch pytest
# Any command
vibewatch cargo run
vibewatch go run main.goCLI选项
vibewatch [options]
Options:
-p, --port API server port (default: 3333)
-b, --buffer-size Log buffer size (default: 100)
-v, --verbose Include node_modules in stack traces
-r, --raw Disable noise filtering (keep all output)
-k, --keep-alive Keep API alive after crash for MCP queries (default: 30)
-h, --help Display help
-V, --version Show version例子
# Next.js with custom port
vibewatch --port 4444 npx next dev
# Keep API alive for 60 seconds after crash
vibewatch --keep-alive 60 npm run dev
# Disable noise filtering for debugging
vibewatch --raw npm run build
# Larger buffer for long-running processes
vibewatch --buffer-size 500 npm testMCP集成
Claude桌面/光标配置
添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json)或光标MCP设置:
{
"mcpServers": {
"vibewatch": {
"command": "npx",
"args": ["-y", "-p", "vibewatch", "vibewatch-mcp"]
}
}
}或者,如果全局安装(npm install -g vibewatch):
{
"mcpServers": {
"vibewatch": {
"command": "vibewatch-mcp"
}
}
}可用的MCP工具
| 工具 | 说明 |
|---|---|
get_terminal_output | 使用可选过滤获取最近的终端输出 |
get_crash_context | 使用堆栈跟踪获取详细的碰撞信息 |
get_recent_errors | 仅快速查看最近的错误 |
ping | 测试连接性 |
MCP工具参数
get_terminal_output:
{
lines?: number, // Max lines to retrieve (default: 50, max: 100)
filter?: 'all' | 'errors' | 'warnings', // Filter output type
detail?: 'errors' | 'context' | 'full' // Progressive disclosure level
}get_crash_context:
{
verbose?: boolean // Include node_modules/site-packages (default: false)
}API终点
VibeWatch公开了用于直接查询的本地HTTP API:
| 端点 | 描述 |
|---|---|
GET /health | 服务器状态和缓冲区统计信息 |
GET /live?lines=50&detail=context | 近期产出,逐步披露 |
GET /crash | 崩溃快照(如果崩溃) |
GET /errors | 仅错误 |
GET /context?window=5 | 周围环境错误 |
渐进呈现
通过只请求您需要的内容来保存令牌:
# Errors only (~200 tokens)
curl 'http://localhost:3333/live?detail=errors'
# Errors with context (~500 tokens)
curl 'http://localhost:3333/live?detail=context'
# Full output (~1000 tokens)
curl 'http://localhost:3333/live?detail=full'特性
框架检测
VibeWatch会自动检测并优化:
- JavaScript: Next.js、Vite、Webpack
- python Django、FastAPI、pytest
- 概述: Node.js、Python、Rust、Go
智能过滤
- ANSI代码剥离
- 降噪(进度条、HMR更新)
- 重复的线条折叠
- 堆栈跟踪筛选(默认情况下隐藏node_modules/site包)
错误检测
- 语言感知错误模式匹配
- 特定于框架的错误模式
- 非致命错误通知
- 相关文件路径提取
碰撞处理
- 自动碰撞检测
- 缓冲区快照保存
- 崩溃后MCP查询的保持活动模式
- 出口代码和信号报告
建筑
[Your Dev Command]
↓
[VibeWatch CLI] ─── wraps process, captures output
↓
[Circular Buffer] ─── last 100 lines, noise filtering
↓
[Fastify API] ─────── localhost:3333
↓
[MCP Server] ──────── stdio transport
↓
[Claude Desktop/Cursor/Any MCP Client]发展
# Install dependencies
npm install
# Build
npm run build
# Development mode (watch)
npm run dev
# Type check
npm run typecheck
# Lint
npm run lint文档
贡献
我们欢迎捐款!看 贡献.md 作为指导方针。
快速贡献指南
- 复刻仓库
- 创建要素分支:
git checkout -b feature/amazing-feature - 进行更改
- 运行测试:
npm test - 承诺:
git commit -m 'Add amazing feature' - 推:
git push origin feature/amazing-feature - 打开拉取请求
支持
- -Bug报告和功能请求
- 讨论 -问题和想法
许可证
麻省理工学院-见 许可证 了解详情。
______________________________________________________________________
基于对vibe编码社区的热爱而构建。
