Hacker News 中文摘要

RSS订阅

Show HN:实时追踪Claude使用量的macOS菜单栏应用 -- Show HN: macOS menu bar app to track Claude usage in real time

文章摘要

GitHub平台提供AI代码生成、开发者工作流和应用安全三大类服务,包括Copilot智能编程助手、自动化工作流Actions、代码安全扫描等工具,帮助开发者提升效率并保障代码安全。

文章总结

GitHub 项目:Claude Usage - 轻量级 Claude 代码用量监控工具

项目地址:https://github.com/richhickson/claudecodeusage

项目概览

这是一个由开发者 richhickson 创建的 macOS 菜单栏应用,用于实时监控 Claude Code 服务的使用限额。项目采用 MIT 开源协议,截至 2026 年 1 月已获得 135 颗星和 4 个分支。

核心功能

  • 自动刷新:每 2 分钟更新用量数据
  • 状态可视化:通过三色标识(绿<70%/黄>70%/红>90%)直观显示用量
  • 双重限额监控:同时显示会话限额和每周限额
  • 重置倒计时:精确显示限额重置时间
  • 轻量化设计:基于 Swift 开发,资源占用极低

技术细节

  • 运行环境:macOS 13.0 (Ventura) 及以上
  • 认证方式:通过 macOS Keychain 自动读取 Claude Code OAuth 凭证
  • 数据来源:调用 Anthropic 未公开的 API 端点(api.anthropic.com/api/oauth/usage)
  • 安全特性:
    • 应用沙盒机制
    • 10秒请求/30秒资源超时控制
    • 401 认证过期处理

安装方式

  1. 直接下载:

    • 从 Releases 页面获取 ClaudeUsage.zip
    • 解压后拖拽至 Applications 文件夹
    • 首次运行需右键选择"打开"
  2. 源码编译: bash git clone https://github.com/YOUR_USERNAME/claude-usage.git cd claude-usage open ClaudeUsage.xcodeproj

隐私声明

  • 所有凭证数据仅存储在本地 Keychain
  • 无任何数据收集或分析行为
  • 仅与 Anthropic API 建立必要通信

注意事项

⚠️ 此为非官方工具,依赖的 API 可能随时变更 ⚠️ 需预先通过 npm 安装 Claude Code CLI 并完成登录

项目维护

最新版本 v1.4.0 于 2026/1/8 发布,主要更新了安全特性。开发者鼓励通过 Issues 提交改进建议,但重大修改需提前讨论。

(注:原文中大量重复的导航菜单、GitHub 通用功能说明等非核心内容已做删减,保留了项目的主要技术细节和使用说明)

评论总结

总结评论内容:

  1. 替代工具推荐
  • 推荐CodexBar作为替代方案(1.7k stars,支持更多服务) "Alternatively there's also this with 1.7k stars already and supporting more services"(评论1)
  1. 项目实用性讨论
  • 询问是否适合作为开发模板 "If I wanted to vibe code my own macOS menu bar apps is this a good starter project to use as a template?"(评论2)
  • 分享成功使用体验 "yours worked straight out of the box! Great job!"(评论6)
  1. 使用问题反馈
  • 遇到认证问题 "all I see is a red X in the toolbar...Authentication expired"(评论9)
  • 文档问题指出 "the screenshot section of the readme followed by zero screenshots"(评论10)
  1. 正面评价
  • 简单赞赏 "Love it, installed and set it to run at Login"(评论3) "i like it, thanks for sharing"(评论4) "Looks really cool"(评论7)
  1. 社交媒体争议
  • 对X平台的质疑 "Why... just why? Why do people keep insisting on using it?"(评论5)
  1. 功能需求
  • 分享相关工具 "I built another tool that should have really been part of the core Claude Code CLI"(评论6)
  • 解决特定问题 "trying to figure out a method to accurately estimate my remaining usage"(评论8)