效率驾驶舱
macOS原生菜单栏应用程序 被动开发人员生产力跟踪 Claude Code通过MCP(模型上下文协议)与AI集成。
特性
- 被动活动跟踪 -自动跟踪您的工作,而不会中断您的工作流程
- 应用程序切换和窗口焦点更改 - 浏览器导航(Chrome、Safari、Arc、Firefox、Brave、Edge) - IDE文件跟踪(VS代码、游标、Xcode、JetBrains IDE、Sublime、Zed) - 终端命令(终端、iTerm2、Warp、Kitty、Alacrity) - Git提交和分支切换 - AI工具使用检测(Claude、ChatGPT、Copilot等)
- MCP服务器集成 -直接从Claude Code查询您的生产力数据
- get_current_activity -你现在正在做什么 - get_today_activities -从今天开始的所有活动 - get_time_on_project -在特定项目上花费的时间 - search_activities -按关键字、应用程序或项目搜索 - get_productivity_score -计算生产率指标
- 内置“问克劳德” -直接从应用程序与Claude讨论您的生产力
- 仪表板视图
- 活动提要-跟踪活动的实时列表 - 时间跟踪-按应用程序对时间进行可视化细分 - 趋势-活动模式和统计数据 - 项目-检测到的项目和活动计数
需求
- macOS 14.0(索诺玛)或更高版本
- 可访问权限(用于窗口跟踪)
- 自动化权限(用于浏览器标签跟踪)
- Claude代码CLI(用于“Ask Claude”功能)
安装
从源代码构建
# Clone the repository
git clone https://github.com/yourusername/efficiency-cockpit.git
cd efficiency-cockpit
# Build with Swift Package Manager
swift build -c release
# Create app bundle
make app
# The app will be at ~/Applications/Efficiency Cockpit.app为Claude代码配置MCP
添加到您的 ~/.mcp.json:
{
"mcpServers": {
"efficiency-cockpit": {
"command": "~/Applications/Efficiency Cockpit.app/Contents/MacOS/EfficiencyCockpitMCPServer",
"args": []
}
}
}启用 ~/.claude/settings.json:
{
"enabledMcpjsonServers": ["efficiency-cockpit"]
}项目结构
EfficiencyCockpit/
├── App/ # App entry point and state
├── Core/
│ ├── Models/ # SwiftData models
│ │ ├── Activity.swift
│ │ ├── AppSession.swift
│ │ ├── ProductivityInsight.swift
│ │ └── DailySummary.swift
│ └── Services/
│ ├── ActivityTracker/ # Tracking services
│ │ ├── ActivityTrackingService.swift
│ │ ├── WindowTracker.swift
│ │ ├── BrowserTabTracker.swift
│ │ ├── IDEFileTracker.swift
│ │ ├── GitActivityTracker.swift
│ │ └── AIToolUsageTracker.swift
│ ├── Permissions/ # macOS permissions
│ └── ClaudeService.swift
└── UI/
├── MenuBar/ # Menu bar interface
├── Dashboard/ # Main dashboard
├── Settings/ # Settings views
└── Onboarding/ # First-run experience
EfficiencyCockpitMCPServer/ # Standalone MCP server
├── main.swift
└── DataAccess.swift用法
- 启动应用程序 -它出现在您的菜单栏中
- 授予权限 -提示时允许辅助功能和自动化访问
- 开始跟踪 -从菜单栏打开跟踪
- 查看仪表板 -单击菜单栏图标打开仪表板
- 问克劳德 -使用内置聊天功能询问您的工作效率
克劳德查询示例
- “我今天在做什么?”
- “我在VS Code上花了多少时间?”
- “本周哪个项目占用了我大部分时间?”
- “让我了解我的工作模式”
隐私
所有数据都使用SwiftData本地存储在Mac上。除非使用“Ask Claude”功能,否则不会向外部服务器发送任何数据,该功能通过CLI向Claude发送活动摘要。
发展
# Build debug version
swift build
# Run tests
swift test
# Build release
swift build -c release
# Create app bundle
make app许可证
MIT许可证-有关详细信息,请参阅许可证文件。
