[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-hamed-elfayome--Claude-Usage-Tracker":3,"tool-hamed-elfayome--Claude-Usage-Tracker":64},[4,17,27,35,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":10,"last_commit_at":23,"category_tags":24,"status":16},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[25,14,26,13],"插件","图像",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":10,"last_commit_at":33,"category_tags":34,"status":16},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[25,13],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":41,"last_commit_at":42,"category_tags":43,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,26,14,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":10,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[26,60,61,25,14,62,15,13,63],"数据工具","视频","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":79,"owner_website":79,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":95,"env_os":96,"env_gpu":97,"env_ram":98,"env_deps":99,"category_tags":105,"github_topics":106,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":113,"updated_at":114,"faqs":115,"releases":145},6400,"hamed-elfayome\u002FClaude-Usage-Tracker","Claude-Usage-Tracker","Native macOS menu bar app for tracking Claude AI usage limits in real-time. Built with Swift\u002FSwiftUI.","Claude-Usage-Tracker 是一款专为 macOS 设计的原生菜单栏应用，旨在帮助用户实时监控 Claude AI 的使用额度。它直观地展示了当前会话剩余时间、周用量限制以及 API 消耗情况，让用户无需频繁刷新网页即可掌握账户状态，有效避免因超额使用导致的服务中断。\n\n这款工具特别适合重度依赖 Claude 的开发者、研究人员及日常办公用户。对于需要管理多个账号或频繁切换身份的专业人士，它提供的多配置文件支持和与 Claude Code CLI 的深度集成尤为实用，能自动同步凭证并隔离不同账户数据。此外，其终端状态行功能可让开发者在命令行中直接查看模型上下文和用量进度，极大提升了工作流效率。\n\n技术亮点方面，Claude-Usage-Tracker 完全采用 Swift 和 SwiftUI 构建，确保了轻量级的运行体验和原生的系统融合度。它坚持“隐私优先”原则，所有数据仅本地存储，不上传云端也无遥测收集。应用还支持无头模式（Headless Mode），便于通过远程桌面在无显示器的 Mac 环境中运行，并提供了丰富的自定义选项，如图标风格、颜色模式及全局快捷键，满足不同","Claude-Usage-Tracker 是一款专为 macOS 设计的原生菜单栏应用，旨在帮助用户实时监控 Claude AI 的使用额度。它直观地展示了当前会话剩余时间、周用量限制以及 API 消耗情况，让用户无需频繁刷新网页即可掌握账户状态，有效避免因超额使用导致的服务中断。\n\n这款工具特别适合重度依赖 Claude 的开发者、研究人员及日常办公用户。对于需要管理多个账号或频繁切换身份的专业人士，它提供的多配置文件支持和与 Claude Code CLI 的深度集成尤为实用，能自动同步凭证并隔离不同账户数据。此外，其终端状态行功能可让开发者在命令行中直接查看模型上下文和用量进度，极大提升了工作流效率。\n\n技术亮点方面，Claude-Usage-Tracker 完全采用 Swift 和 SwiftUI 构建，确保了轻量级的运行体验和原生的系统融合度。它坚持“隐私优先”原则，所有数据仅本地存储，不上传云端也无遥测收集。应用还支持无头模式（Headless Mode），便于通过远程桌面在无显示器的 Mac 环境中运行，并提供了丰富的自定义选项，如图标风格、颜色模式及全局快捷键，满足不同用户的个性化需求。","# Claude Usage Tracker\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fcover.jpg\" alt=\"Claude Usage Tracker\" width=\"100%\">\n\n  **A native macOS menu bar application for real-time monitoring of Claude AI usage limits**\n\n  ![macOS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FmacOS-14.0+-black?style=flat-square&logo=apple)\n  ![Swift](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwift-5.0+-orange?style=flat-square&logo=swift)\n  ![SwiftUI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwiftUI-5.0+-blue?style=flat-square&logo=swift)\n  ![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green?style=flat-square)\n  ![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-3.0.3-blue?style=flat-square)\n  ![Languages](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguages-9-purple?style=flat-square)\n\n  \u003Csub>🇬🇧 English • 🇪🇸 Español • 🇫🇷 Français • 🇩🇪 Deutsch • 🇮🇹 Italiano • 🇵🇹 Português • 🇯🇵 日本語 • 🇰🇷 한국어 • 🇨🇳 简体中文\u003C\u002Fsub>\n\n  ### [Download Latest Release (v3.0.3)](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Flatest\u002Fdownload\u002FClaude-Usage.zip)\n\n  \u003Csub>macOS 14.0+ (Sonoma) | ~6 MB | Native Swift\u002FSwiftUI | Officially Signed\u003C\u002Fsub>\n\n  \u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fhamedelfayome\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" alt=\"Buy Me A Coffee\" height=\"40\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n## Overview\n\nClaude Usage Tracker is a lightweight, native macOS menu bar application that provides real-time monitoring of your Claude AI usage limits. Built entirely with Swift and SwiftUI, it offers a clean, intuitive interface to track your 5-hour session window, weekly usage limits, and Opus-specific consumption.\n\n### Key Capabilities\n\n- **Multi-Profile Support**: Manage unlimited Claude accounts with isolated credentials and settings\n- **Multi-Profile Display**: Monitor all profiles simultaneously in the menu bar\n- **Claude Code Integration**: Sync CLI accounts and auto-switch credentials when changing profiles\n- **Real-Time Monitoring**: Track session, weekly, API console usage, and API costs per profile\n- **Usage History**: Interactive charts tracking session, weekly, and billing data over time\n- **Global Shortcuts**: System-wide keyboard shortcuts (no Accessibility permission)\n- **Headless Mode**: Works on headless Macs via Remote Desktop\n- **Customizable Interface**: 5 icon styles + 3 color modes (Multi-Color\u002FGreyscale\u002FSingle Color) + remaining\u002Fused percentage toggle\n- **Smart Automation**: Auto-start sessions, auto-switch profiles, threshold notifications\n- **Developer Tools**: Terminal statusline integration with model, context, profile display, pace markers, and color modes\n- **Privacy-First**: Local storage, no telemetry, no cloud sync\n- **Native Performance**: Lightweight Swift\u002FSwiftUI design for macOS\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fsettings.gif\" alt=\"Quick Walkthrough\" width=\"600\">\n  \u003Cimg src=\".github\u002Ficon.jpg\" alt=\"Menu Bar Icon\" height=\"180\">\n  \u003Cimg src=\".github\u002Fpopover.png\" alt=\"Popover Interface\" width=\"200\">\n\n  \u003Csub>Menu bar icon and detailed usage popover\u003C\u002Fsub>\n\n  \u003Cimg src=\".github\u002Fstatusline.png\" alt=\"Claude Code Statusline\">\n  \u003Cbr>\n  \u003Csub>Live terminal statusline showing directory, branch, model, context, and color-coded usage\u003C\u002Fsub>\n\u003C\u002Fdiv>\n\n---\n\n## What's New\n\n- **v3.0.3 (2026-03-10)**: 6-tier pace system (Comfortable → Runaway) with colored pace markers on progress bars, 3 color modes (Multi-Color\u002FGreyscale\u002FSingle Color) for menu bar and statusline, label toggles (Ctx\u002FUsage\u002FReset), 24-hour time format, terminal-matching preview colors, CPU spin-loop fix in menu bar rendering\n\n- **v3.0.2 (2026-03-10)**: API cost tracking with daily chart, browser-based authentication (WKWebView sign-in), rate limit header usage for CLI OAuth, auto-sizing popover, 3-way time display picker, adaptive green color, session key expiry tracking & notifications\n\n- **v3.0.1 (2026-03-08)**: Popover settings tab (remaining time toggle), multi-display CPU fix\n\n- **v3.0.0 - Major Release (2026-03-08)**:\n  - **Headless mode**: Remote Desktop support for headless Mac environments\n  - **Usage history**: Interactive timeline charts with export to JSON\u002FCSV\n  - **Global keyboard shortcuts**: Configurable hotkeys (no Accessibility permission needed)\n  - **Auto-switch profiles**: Automatically switch when session limit reached\n  - **Borderless settings window**: Full vibrancy design with custom traffic lights\n  - **6 new statusline components**: Model name, context window, profile name, and more\n  - **Time-elapsed markers & pace-aware coloring**: Smart progress indicators\n  - **Network debug view**: Timed capture with request\u002Fresponse detail viewer\n  - **Simplified Chinese** (9th language)\n  - **12 ported improvements** from novastate fork including CLI auto-detection, wake-from-sleep refresh, and custom notification thresholds\n\n- **v2.3.0** – Multi-profile menu bar display, remaining percentage toggle\n- **v2.2.0** – Multi-profile management, CLI integration, Korean language\n- **v2.1.0** – 3-step setup wizard, smart organization preservation\n- **v2.0.0** – Apple code signing, automatic updates, Keychain security\n\n**[View Full Release History](CHANGELOG.md)**\n\n---\n\n## Getting Started\n\n### Prerequisites\n\nBefore installing Claude Usage Tracker, ensure you have:\n\n- **macOS 14.0 (Sonoma) or later** - Check: Apple menu → About This Mac\n- **Active Claude AI account** - Sign up at [claude.ai](https:\u002F\u002Fclaude.ai)\n\n**Authentication** (choose one method):\n- **Easiest**: [Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code) installed and logged in - App automatically uses CLI credentials (v2.2.2+)\n- **Browser Sign-In**: Sign in via the built-in browser — session key extracted automatically (v3.0.2+)\n- **Manual**: Web browser access to extract session key from claude.ai (Chrome, Safari, Firefox, etc.)\n\n**Note**: For terminal statusline integration, you'll still need to manually configure a session key even if using Claude Code OAuth\n\n### Installation\n\n#### Option 1: Homebrew (Recommended)\n\n```bash\nbrew install --cask hamed-elfayome\u002Fclaude-usage\u002Fclaude-usage-tracker\n```\n\nOr tap first, then install:\n\n```bash\nbrew tap hamed-elfayome\u002Fclaude-usage\nbrew install --cask claude-usage-tracker\n```\n\n**Note**: Starting with v2.0.0, the app is officially signed with an Apple Developer certificate. No security workarounds needed!\n\n**To update**:\n```bash\nbrew upgrade --cask claude-usage-tracker\n```\n\nOr use the built-in automatic update feature (Settings → Updates).\n\n**To uninstall**:\n```bash\nbrew uninstall --cask claude-usage-tracker\n```\n\n#### Option 2: Direct Download\n\n**[Download Claude-Usage.zip](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Flatest\u002Fdownload\u002FClaude-Usage.zip)**\n\n1. Download the `.zip` file from the link above\n2. Extract the zip file (double-click or use Archive Utility)\n3. Drag `Claude Usage.app` to your Applications folder\n4. Double-click to launch - that's it!\n\n**v2.0.0+ Note**: The app is now officially signed with an Apple Developer certificate. You can install and run it like any other Mac application - no security warnings or workarounds needed.\n\n**Automatic Updates**: Once installed, the app will automatically check for updates and notify you when new versions are available (Settings → Updates).\n\n#### Option 3: Build from Source\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker.git\ncd Claude-Usage-Tracker\n\n# Open in Xcode\nopen \"Claude Usage.xcodeproj\"\n\n# Build and run (⌘R)\n```\n\n### Quick Start Guide\n\n#### Option A: Automatic Setup with Claude Code (Easiest)\n\n**New in v2.2.2**: If you have Claude Code installed and logged in, the app works automatically!\n\n1. **Install Claude Code** (if not already installed)\n   - Download from [claude.com\u002Fclaude-code](https:\u002F\u002Fclaude.com\u002Fclaude-code)\n   - Log in using `claude login`\n\n2. **Launch Claude Usage Tracker**\n   - The app automatically detects your Claude Code Account\n   - No manual configuration needed!\n\n3. **Verify It's Working**\n   - Click the menu bar icon\n   - You should see your usage statistics immediately\n\n#### Option B: Browser Sign-In (v3.0.2+)\n\nIf you don't use Claude Code, sign in directly through the app:\n\n1. **Click the menu bar icon** and select \"Settings\"\n2. **Navigate to \"Personal Usage\"** tab\n3. **Click \"Sign in to Claude.ai\"** — an embedded browser opens\n4. **Log in** with your Claude.ai credentials (email, Google SSO, etc.)\n5. **Session key is extracted automatically** — the app validates and saves it\n6. **Select your organization** from the list and confirm\n\n#### Option C: Manual Setup with Session Key\n\nIf you prefer manual configuration:\n\n**Step 1: Extract Your Session Key**\n\n1. **Open Claude AI**\n   - Navigate to [claude.ai](https:\u002F\u002Fclaude.ai) in your browser\n   - Make sure you're logged in\n\n2. **Open Developer Tools**\n   - **Chrome\u002FEdge**: Press `F12` or `Cmd+Option+I` (macOS) \u002F `Ctrl+Shift+I` (Windows)\n   - **Safari**: Enable Developer menu in Preferences → Advanced, then press `Cmd+Option+I`\n   - **Firefox**: Press `F12` or `Cmd+Option+I` (macOS) \u002F `Ctrl+Shift+I` (Windows)\n\n3. **Navigate to Cookies**\n   - Go to: **Application** tab (Chrome\u002FEdge) or **Storage** tab (Firefox)\n   - Expand: **Cookies** → **https:\u002F\u002Fclaude.ai**\n   - Find: `sessionKey` cookie\n   - Copy: The value (starts with `sk-ant-sid01-...`)\n\n**Step 2: Configure Session Key**\n\n1. **Click the menu bar icon** and select \"Settings\"\n2. **Navigate to \"Personal Usage\"** tab\n3. **Expand \"Advanced: Manual Session Key\"**\n4. **Paste your session key** and click \"Test Connection\"\n5. **Select your organization** from the list\n6. **Review and click \"Save Configuration\"**\n\n**Step 3: Verify It's Working**\n\n1. **Check Menu Bar**: You should see the Claude Usage icon in your menu bar\n2. **Click the Icon**: Popover appears showing your usage statistics\n3. **View Data**: Session usage, weekly usage, and reset timers should display\n\n**Success!** The app is now monitoring your Claude usage.\n\n#### Next Steps\n\n- **Customize Icon**: Go to Settings → Appearance to choose your preferred menu bar style\n- **Enable Notifications**: Settings → Notifications to get threshold alerts\n- **Auto-Start Sessions**: Settings → Session Management to enable automatic session initialization\n- **Terminal Integration**: Settings → Claude Code to set up statusline (requires session key configuration)\n- **Keyboard Shortcuts**: Settings → Shortcuts to configure global hotkeys\n\n---\n\n## Advanced Configuration\n\n### Manual Session Key Setup\n\nIf you prefer to configure the session key manually instead of using the setup wizard:\n\n```bash\n# Create session key file\necho \"sk-ant-sid01-YOUR_SESSION_KEY_HERE\" > ~\u002F.claude-session-key\n\n# Set secure permissions (important for security)\nchmod 600 ~\u002F.claude-session-key\n```\n\nAfter creating the file, launch the app and it will automatically detect the session key.\n\n---\n\n## Multi-Profile Management\n\n**New in v2.2.0**: Claude Usage Tracker now supports unlimited profiles, allowing you to manage multiple Claude accounts seamlessly with automatic credential switching.\n\n**New in v3.0.0**: Auto-switch profiles when session limit reached, usage history tracking, and global keyboard shortcuts!\n\n### Features\n\n#### Profile Management\n- **Unlimited Profiles**: Create as many profiles as needed for different Claude accounts\n- **Multi-Profile Display**: Show all profiles in the menu bar at once\n  - Toggle between Single mode (active profile only) and Multi mode (all profiles)\n  - Each profile displays with its own icon style and settings\n  - Click any profile icon to view its usage details\n  - Independent refresh rates per profile\n- **Fun Auto-Names**: Profiles auto-generate with names like \"Quantum Llama\", \"Sneaky Penguin\", \"Turbo Sloth\"\n- **Custom Names**: Rename profiles to whatever you prefer\n- **Quick Switching**: Switch profiles instantly via popover dropdown or settings sidebar\n- **Profile Badges**: Visual indicators show which profiles have Claude.ai credentials and CLI accounts\n\n#### Claude Code CLI Integration\n- **One-Click Sync**: Sync your currently logged-in Claude Code account to a profile\n- **Automatic Switching**: When you switch profiles, CLI credentials automatically update\n- **Credential Display**: View masked access tokens and subscription type\n- **Smart Re-Sync**: Credentials automatically refresh before profile switches to capture CLI changes\n- **Per-Profile CLI**: Each profile can have its own Claude Code account or share the system account\n\n#### Per-Profile Settings\nEach profile has isolated settings:\n- **Credentials**: Separate Claude.ai session keys, API keys, and organization IDs\n- **Appearance**: Independent icon styles and monochrome mode\n- **Refresh Interval**: Custom refresh rates (5-300 seconds)\n- **Auto-Start Sessions**: Enable\u002Fdisable per profile\n- **Notifications**: Independent threshold alerts (75%, 90%, 95%)\n- **Usage Data**: Tracked separately per profile\n\n#### Profile Switcher\nAccess profile switcher in multiple places:\n- **Popover Header**: Dropdown menu with profile badges\n- **Settings Sidebar**: Active profile picker with visual indicators\n- **Manage Profiles Tab**: Full profile management interface\n\n#### How to Use\n\n1. **Create Profiles**:\n   - Go to Settings → Manage Profiles\n   - Click \"Create New Profile\"\n   - Auto-generates a fun name or enter your own\n\n2. **Configure Credentials**:\n   - Switch to desired profile in sidebar\n   - Go to Claude.AI \u002F API Console \u002F CLI Account tabs\n   - Enter credentials (isolated per profile)\n\n3. **Sync Claude Code** (Optional):\n   - Log in to Claude Code in terminal\n   - Open Settings → CLI Account\n   - Click \"Sync from Claude Code\"\n   - Now when you switch profiles, CLI credentials auto-update!\n\n4. **Switch Profiles**:\n   - Click popover dropdown\n   - Or use settings sidebar picker\n   - CLI credentials apply automatically\n\n\n---\n\n## Features\n\n### Installation & Updates\n- **Official Apple Code Signing**: Professionally signed application - installs like any Mac app\n- **Automatic Updates**: Built-in update system powered by Sparkle framework\n- **One-Click Installation**: No security workarounds or manual approvals needed\n- **Update Notifications**: Get notified when new versions are available\n\n### Usage Tracking & Monitoring\n- Real-time monitoring of 5-hour session, weekly limits, and Opus-specific usage\n- API console usage tracking with monthly cost dashboard and daily cost chart\n- Per-API-key cost breakdown with model-level detail\n- Extra usage cost tracking for Claude Extra subscribers\n- Color-coded indicators (adaptive green\u002Forange\u002Fred) based on consumption levels\n- Smart countdown timers for session and weekly resets with 3-way display (time, remaining, or both)\n\n### Menu Bar & Interface\n- **5 Customizable Icon Styles**: Battery, Progress Bar, Percentage Only, Icon with Bar, Compact\n- **Multi-Metric Icons**: Display separate icons for session, weekly, and api usage simultaneously\n- **3 Color Modes**: Multi-Color (threshold-based), Greyscale (adapts to appearance), Single Color (custom hex)\n- **6-Tier Pace System**: Pace markers colored by projected usage (green\u002Fteal\u002Fyellow\u002Forange\u002Fred\u002Fpurple)\n- **Interactive Popover**: One-click access with detachable floating window capability\n- **Live Status Indicator**: Real-time Claude system status from status.claude.com\n- **Multi-Language Support**: 9 languages (English, Spanish, French, German, Italian, Portuguese, Japanese, Korean, Simplified Chinese)\n- Adaptive colors for light\u002Fdark mode\n\n### Automation & Intelligence\n- **Auto-Start Sessions**: Automatically initialize new sessions when usage resets to 0%\n- **Auto-Switch Profiles**: Automatically switch to next profile at session limit\n- **Wake-from-Sleep Refresh**: Auto-refresh after waking with debounce\n- **Smart Notifications**: Threshold alerts at 75%, 90%, 95% + custom thresholds with sound picker\n- **Network Monitoring**: Auto-detect connectivity changes and handle offline scenarios\n- **Launch at Login**: System-level auto-start option\n- **Configurable Refresh**: Set intervals from 5 to 120 seconds\n- Session reset and auto-start confirmations\n\n### Developer Integration\n- **Claude Code Terminal Statusline**: Real-time usage in your terminal\n- Customizable components: directory, git branch, model name, context window, profile name, usage percentage, progress bar, pace marker, reset timer\n- **3 color modes**: Multi-Color, Greyscale, Single Color (custom hex) for statusline\n- **Pace marker**: 6-tier colored marker on progress bar showing projected usage pace\n- **Label toggles**: Show\u002Fhide \"Ctx:\", \"Usage:\", \"Reset:\" prefixes\n- **24-hour time**: Optional 24-hour format for reset time\n- Terminal-matching preview with ANSI-equivalent colors\n- Instant rendering via usage cache (no startup delay)\n- One-click automated installation\n- Live preview before applying changes\n\n### Security & Privacy\n- **macOS Keychain Storage**: Session keys stored in macOS Keychain (most secure option)\n- **Automatic Migration**: Seamless migration from old storage methods\n- **Apple Code Signed**: Verified by Apple for enhanced security and trust\n- **Advanced Error Handling**: Professional error system with user-friendly recovery\n- **Robust Validation**: Session key and API endpoint validation\n- Local storage with no cloud sync\n- Zero telemetry or tracking\n- HTTPS-only communication with Claude API\n\n### Advanced Capabilities\n- Multi-screen support\n- First-run guided setup wizard\n- Protocol-based modular architecture\n- Persistent settings with App Groups\n- Comprehensive test coverage\n\n---\n\n## Usage\n\n### Menu Bar Interface\n\nClick the menu bar icon to access:\n\n- **Session Usage**: 5-hour rolling window percentage and reset time\n- **Weekly Usage**: Overall weekly consumption across all models\n- **Opus Usage**: Weekly Opus-specific usage (if applicable)\n- **API Cost**: Monthly cost with daily chart and per-key breakdown (if Console configured)\n- **Quick Actions**: Refresh and Settings\n\n### Settings\n\nAccess comprehensive settings through the menu bar popover → Settings button. The app features a modern sidebar interface with profile switcher and organized tabs:\n\n### Profile-Specific Settings\n\n#### Profile Switcher (Sidebar)\n- **Quick Profile Selection**: Dropdown to switch between profiles instantly\n- **Profile Badges**: Visual indicators for Claude.ai 🔵 and CLI ✅ credentials\n- **Active Profile Display**: Shows currently selected profile\n\n#### Claude.AI (Credentials)\nConfigure your Claude.ai personal account:\n- **Browser Sign-In**: Sign in via embedded browser to extract session key automatically (v3.0.2+)\n- **3-Step Setup Wizard**: Guided session key configuration\n  - Non-destructive connection testing\n  - Visual organization selector\n  - Configuration summary with preview\n- **Manual Key Entry**: Advanced option under disclosure group for direct session key input\n- **Smart Updates**: Organization preserved when re-entering same key\n\n#### API Console (Credentials)\nConfigure API console usage tracking:\n- **Browser Sign-In**: Sign in via embedded browser for Anthropic Console (v3.0.2+)\n- **API Session Key**: Set your API authentication key (manual fallback)\n- **Organization ID**: Configure organization for API tracking\n- **Dual Tracking**: Monitor both web and API usage simultaneously\n- **API Billing**: View API console spend, prepaid credits, and monthly cost breakdown\n- **Session Key Expiry**: Visual status indicator showing when your session key expires\n\n#### CLI Account (Credentials)\nSync Claude Code CLI credentials:\n- **One-Click Sync**: Copy currently logged-in Claude Code account to profile\n- **Credential Display**: View masked access token and subscription type\n- **Auto-Switch**: Credentials automatically update when changing profiles\n- **Remove Sync**: Unlink CLI account from profile\n\n#### Appearance\nCustomize menu bar icon per profile:\n- **Icon Style Selection**: Choose from 5 different display modes\n  - Battery Style (classic indicator with fill)\n  - Progress Bar (horizontal bar with percentage)\n  - Percentage Only (text-only minimalist)\n  - Icon with Bar (Claude icon + progress)\n  - Compact (space-efficient)\n- **3 Color Modes**: Multi-Color (threshold-based), Greyscale (adapts to appearance), Single Color (custom hex)\n- **Pace Marker**: Colored time marker on progress bars showing projected usage pace (6 tiers)\n- **Percentage Display Mode**: Toggle between used\u002Fremaining percentage\n  - Show \"75% used\" or \"25% remaining\" - your choice\n  - Color coding automatically adapts (green for high remaining, red for low)\n  - Helps focus on budget left rather than budget spent\n- **Live Preview**: See changes in real-time before applying\n\n#### General (Profile Settings)\nPer-profile behavior configuration:\n- **Refresh Interval**: Configure auto-refresh rate (5-300 seconds)\n- **Auto-Start Sessions**: Enable\u002Fdisable automatic session initialization on reset\n- **Model Selection**: Uses the most cost-effective model available\n- **Notifications**: Per-profile threshold alerts (75%, 90%, 95%) + custom thresholds with sound picker\n\n### App-Wide Settings\n\n#### Manage Profiles\nCreate and manage multiple profiles:\n- **Create Profiles**: Add new profiles with fun auto-generated names\n- **Rename Profiles**: Customize profile names\n- **Delete Profiles**: Remove unused profiles (minimum 1 required)\n- **Profile List**: View all profiles with credential status indicators\n- **Display Mode Toggle**: Switch between Single and Multi mode\n  - Single Mode: Show only the active profile in menu bar\n  - Multi Mode: Show all profiles simultaneously in menu bar\n- **Auto-Switch Profile**: Automatically switch to next available profile when session limit reached\n\n#### Language\nApplication language preferences:\n- **Language Selection**: Choose from 9 supported languages\n- **Live Updates**: Interface updates immediately when language changes\n- Supported: English, Spanish, French, German, Italian, Portuguese, Japanese, Korean, Simplified Chinese\n\n#### Claude Code (Statusline)\nTerminal integration (app-wide):\n- **Component Selection**: Choose what to display (directory, branch, model name, context window, profile name, usage, progress bar, pace marker, reset time)\n- **Color Mode**: Multi-Color, Greyscale, or Single Color with custom hex picker\n- **Pace Marker**: 6-tier colored marker showing projected usage pace on progress bar\n- **Label Toggles**: Show\u002Fhide \"Ctx:\", \"Usage:\", \"Reset:\" prefixes for compact display\n- **24-Hour Time**: Optional 24-hour format for reset time\n- **Live Preview**: Terminal-matching preview with ANSI-equivalent colors\n- **One-Click Install**: Automated script installation to `~\u002F.claude\u002F`\n- **Automatic Updates**: Statusline updates when switching profiles\n- **Usage Cache**: Instant CLI rendering via cached usage data\n- See [Claude Code Integration](#claude-code-integration) section for detailed setup\n\n#### Updates\nAutomatic update configuration:\n- **Automatic Update Checking**: Configure how often to check for updates\n- **Update Notifications**: Get notified when new versions are available\n- **One-Click Installation**: Download and install updates with a single click\n- **Release Notes**: View what's new in each update\n\n#### About\nApplication information:\n- **Version Information**: Current app version\n- **Credits**: Contributors and acknowledgments\n- **Links**: GitHub repository, issue tracker, documentation\n\n\n## Claude Code Integration\n\nBring real-time Claude usage monitoring directly into your terminal with Claude Code statusline integration! Display your current usage percentage, model name, context window, profile name, git branch, and working directory without leaving your development workflow.\n\n### What is Claude Code?\n\n[Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code) is Anthropic's official CLI tool for interacting with Claude AI directly from your terminal. The statusline feature allows you to display custom information at the bottom of your terminal window.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fstatusline.png\" alt=\"Claude Code Statusline in Action\" width=\"90%\">\n  \u003Cbr>\n  \u003Csub>Example: Terminal statusline with all components enabled\u003C\u002Fsub>\n\u003C\u002Fdiv>\n\n### Setup Instructions\n\n#### Prerequisites\n\n1. **Claude Code installed**: Download from [claude.com\u002Fclaude-code](https:\u002F\u002Fclaude.com\u002Fclaude-code)\n2. **Session key configured**: Must be manually configured in the Personal Usage tab (Claude Code OAuth doesn't work for statusline - it requires direct session key)\n\n#### Installation Steps\n\n1. **Open Claude Usage Tracker Settings**\n   - Click the menu bar icon\n   - Click \"Settings\"\n   - Navigate to the \"Claude Code\" tab\n\n2. **Choose Your Components**\n   - Toggle on\u002Foff the components you want to see:\n     - **Directory name**: Shows current working directory\n     - **Git branch**: Displays current branch with ⎇ icon\n     - **Model name**: Shows current model (Opus, Sonnet)\n     - **Profile name**: Shows active profile name\n     - **Context window**: Shows context usage as percentage or token count\n     - **Usage statistics**: Shows session percentage with color coding\n     - **Progress bar**: Visual 10-segment indicator (optional when usage is enabled)\n     - **Pace marker**: Colored `┃` on progress bar at elapsed time position (6-tier pace colors)\n     - **Reset time**: When your session resets (12h or 24h format)\n   - **Color mode**: Choose Multi-Color, Greyscale, or Single Color\n   - **Label toggles**: Show\u002Fhide \"Ctx:\", \"Usage:\", \"Reset:\" prefixes\n\n3. **Preview Your Statusline**\n   - The live preview shows exactly how it will appear with terminal-matching ANSI colors\n   - Example: `claude-usage │ ⎇ main │ Opus │ Work │ Ctx: 48% │ Usage: 25% ▓▓┃░░░░░░░ → Reset: 3:45 PM`\n\n4. **Apply Configuration**\n   - Click \"Apply\" button\n   - Scripts will be installed to `~\u002F.claude\u002F`\n   - Claude Code's `settings.json` will be updated automatically\n\n5. **Restart Claude Code**\n   - Close and reopen your Claude Code terminal\n   - The statusline will appear at the bottom of your terminal window\n\n### What Gets Installed\n\nThe setup automatically creates:\n\n- `~\u002F.claude\u002Ffetch-claude-usage.swift`: Swift script that fetches usage data from Claude API\n- `~\u002F.claude\u002Fstatusline-command.sh`: Bash script that builds the statusline display\n- `~\u002F.claude\u002Fstatusline-config.txt`: Configuration file with your component preferences\n- `~\u002F.claude\u002Fsettings.json`: Updated with statusline command (or created if doesn't exist)\n\nAll scripts are set with secure permissions (755) and only read your existing session key file.\n\n### Customization\n\n#### Available Components\n\n| Component | Description | Example |\n|-----------|-------------|---------|\n| Directory | Current directory name | `claude-usage` |\n| Git Branch | Active git branch | `⎇ main` |\n| Model | Current model name | `Opus` |\n| Profile | Active profile name | `Work` |\n| Context | Context window usage | `Ctx: 48%` or `96K` |\n| Usage | Session percentage | `Usage: 25%` or `25%` |\n| Progress Bar | 10-segment visual indicator | `▓▓░░░░░░░░` |\n| Pace Marker | Colored marker at elapsed time position | `▓▓┃░░░░░░░` |\n| Reset Time | When session resets | `→ Reset: 3:45 PM` or `→ 15:45` |\n\n#### Color Coding\n\n**Usage bar** is color-coded with a 10-level gradient:\n- **0-10%**: Dark green\n- **11-30%**: Green shades\n- **31-50%**: Yellow-green transitioning to olive\n- **51-70%**: Yellow to orange\n- **71-90%**: Dark orange to red\n- **91-100%**: Deep red\n\n**Pace marker** uses a 6-tier system based on projected end-of-period usage:\n- **Comfortable** (projected \u003C50%): Green\n- **On Track** (50-75%): Teal\n- **Warming** (75-90%): Yellow\n- **Pressing** (90-100%): Orange\n- **Critical** (100-120%): Red\n- **Runaway** (>120%): Purple\n\n**Color modes** (applies to both menu bar and statusline):\n- **Multi-Color**: Full color palette (default)\n- **Greyscale**: No colors, adapts to system theme\n- **Single Color**: All elements use your custom hex color\n\n#### Disabling Statusline\n\nTo remove the statusline:\n1. Open Claude Usage Tracker Settings → Claude Code tab\n2. Click \"Reset\" button\n3. Restart Claude Code\n\nThis removes the statusline configuration but keeps the scripts installed for easy re-enabling.\n\n### Troubleshooting\n\n#### Statusline Not Appearing\n\n1. Verify Claude Code is installed and working\n2. Check that you restarted Claude Code after applying\n3. Ensure session key is valid in General settings tab\n4. Check that `~\u002F.claude\u002Fsettings.json` exists and has the statusline configuration\n\n#### Shows \"Usage: ~\"\n\nThis indicates the Swift script couldn't fetch usage data:\n- Verify your session key is valid\n- Check that `~\u002F.claude-session-key` exists\n- Ensure you're connected to the internet\n- Try refreshing your session key from claude.ai\n\n#### Permission Issues\n\nIf scripts can't be executed:\n```bash\nchmod 755 ~\u002F.claude\u002Ffetch-claude-usage.swift\nchmod 755 ~\u002F.claude\u002Fstatusline-command.sh\n```\n\n### Example Statuslines\n\nWith all components enabled (Multi-Color mode):\n```\nmy-project │ ⎇ feature\u002Fnew-ui │ Opus │ Work │ Ctx: 48% │ Usage: 47% ▓▓▓▓┃░░░░░ → Reset: 4:15 PM\n```\n\nCompact (labels hidden, 24h time):\n```\nmy-project │ ⎇ develop │ 12% ▓┃░░░░░░░░ → 16:15\n```\n\nModel and context only:\n```\nSonnet │ Ctx: 96K │ Usage: 25%\n```\n\n## Architecture\n\n### Technology Stack\n\n- **Language**: Swift 5.0+\n- **UI Framework**: SwiftUI 5.0+\n- **Platform**: macOS 14.0+ (Sonoma)\n- **Architecture**: MVVM with Protocol-Oriented Design\n- **Storage**: UserDefaults with App Groups\n- **Networking**: URLSession with async\u002Fawait\n- **Design Patterns**: Coordinator pattern, Protocol-based services, Modular components\n\n## API Integration\n\nThe application integrates with multiple Claude API endpoints for comprehensive usage tracking:\n\n### Web Usage Endpoint\n\n```\nGET https:\u002F\u002Fclaude.ai\u002Fapi\u002Forganizations\u002F{org_id}\u002Fusage\n```\n\n**Authentication**: Session cookie (`sessionKey`) from claude.ai\n\n**Response Structure**:\n- `five_hour`: 5-hour session usage data\n  - `utilization_pct`: Usage percentage (0-100)\n  - `reset_at`: ISO 8601 timestamp for next reset\n- `seven_day`: Weekly usage across all models\n  - `utilization_pct`: Weekly usage percentage\n- `seven_day_opus`: Opus-specific weekly usage\n  - `utilization_pct`: Opus weekly percentage\n- `extra_usage`: Claude Extra cost tracking (if applicable)\n  - `current_spending`: Amount spent\n  - `budget_limit`: Maximum allowed spending\n\n### API Console Endpoint\n\n```\nGET https:\u002F\u002Fapi.anthropic.com\u002Fv1\u002Forganization\u002F{org_id}\u002Fusage\n```\n\n**Authentication**: API Key (`x-api-key` header)\n\n**Response Structure**:\n- API console usage statistics\n- Billing information\n- Rate limits and quotas\n\n### Dual Tracking\n\nThe app can simultaneously monitor both web (claude.ai) and API console usage, providing complete visibility into your Claude consumption across all access methods.\n\n## Security\n\n- **macOS Keychain**: Session keys stored securely in macOS Keychain (most secure storage available)\n- **Automatic Migration**: v2.0+ automatically migrates session keys from older storage methods to Keychain\n- **Apple Code Signed**: Officially signed with Apple Developer certificate for verified authenticity\n- **Secure Updates**: Automatic updates delivered over HTTPS with code signature verification\n- **No Cloud Sync**: All data remains local to your machine\n- **No Telemetry**: Zero tracking or analytics\n- **Advanced Error Handling**: Robust error system with user-friendly recovery\n- **Session Key Validation**: Comprehensive validation of API credentials\n- **Network**: HTTPS-only communication with claude.ai and Anthropic API\n\n## Troubleshooting\n\n### Application Not Connecting\n\n1. Verify your session key is valid\n2. Check that you're logged into claude.ai in your browser\n3. Try extracting a fresh session key\n4. Ensure you have an active internet connection\n\n### 403 Permission Errors\n\nIf you see \"Unauthorized\" or 403 errors:\n1. Open Settings → Personal Usage\n2. Use the 3-step wizard to reconfigure:\n   - Test your session key\n   - Select the correct organization\n   - Save configuration\n3. The wizard will preserve your organization selection when updating keys\n\n### Menu Bar Icons Showing Zero\n\nIf icons briefly flash to zero during refresh:\n- This has been fixed in v2.1.0+\n- Update to the latest version for smooth refresh experience\n- Old data now stays visible until new data arrives\n\n### Menu Bar Icon Not Appearing\n\n1. Check System Settings → Desktop & Dock → Menu Bar\n2. Restart the application\n3. Check Console.app for error messages\n\n### Session Key Expired\n\nSession keys may expire after a period of time. You'll receive a notification 24 hours before expiry (v3.0.2+). To refresh:\n1. Go to Settings → Personal Usage (or API Console)\n2. Click \"Sign in to Claude.ai\" (or \"Sign in to Anthropic Console\") to re-authenticate via the built-in browser\n3. Or expand \"Advanced: Manual Session Key\" to paste a new key manually\n\n### Updates Not Working\n\nIf automatic updates aren't working:\n\n1. Check Settings → Updates to ensure automatic checking is enabled\n2. Verify you're running v2.0.0 or later (earlier versions don't have auto-update)\n3. Check your internet connection\n4. Manually download the latest version from GitHub if needed\n\n## Contributors\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_41061429542e.png\" alt=\"Contributors\" height=\"30px\" \u002F>\n\nThis project is built for the community — everyone is welcome\n\n### Special Thanks\n\nA huge thank you to everyone who opened pull requests. Many features in v3.0.0 were inspired by or ported from community PRs that couldn't be merged directly due to the scale of this release and resulting conflicts. Your code, ideas, and effort made this release possible:\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fnovastate\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_5850bb834b94.png\" width=\"40\" height=\"40\" alt=\"novastate\" title=\"novastate\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fheathdutton\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_2e0b16eb890c.png\" width=\"40\" height=\"40\" alt=\"heathdutton\" title=\"heathdutton\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftsvikas\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_5e4402b76cab.png\" width=\"40\" height=\"40\" alt=\"tsvikas\" title=\"tsvikas\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkynoptic\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_743e28d47c49.png\" width=\"40\" height=\"40\" alt=\"kynoptic\" title=\"kynoptic\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbezlant\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_722b2dc2d375.png\" width=\"40\" height=\"40\" alt=\"bezlant\" title=\"bezlant\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftrickart\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_aa780f8610bf.png\" width=\"40\" height=\"40\" alt=\"trickart\" title=\"trickart\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FAli-Aldahmani\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_e2d5f61f1d4e.png\" width=\"40\" height=\"40\" alt=\"Ali-Aldahmani\" title=\"Ali-Aldahmani\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcuvitx\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_b4a476f557b6.png\" width=\"40\" height=\"40\" alt=\"cuvitx\" title=\"cuvitx\">\u003C\u002Fa>\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n### Development Setup\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature\u002FAmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature\u002FAmazingFeature`)\n5. Open a Pull Request\n\n### Code Style\n\n- Follow Swift API Design Guidelines\n- Use SwiftUI best practices\n- Maintain MVVM architecture\n- Add comments for complex logic\n- Write descriptive commit messages\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Built with Swift and SwiftUI\n- Designed for macOS Sonoma and later\n- Uses Claude AI's usage API\n- Inspired by the need for better usage visibility\n\n## Disclaimer\n\nThis application is not affiliated with, endorsed by, or sponsored by Anthropic PBC. Claude is a trademark of Anthropic PBC. This is an independent third-party tool created for personal usage monitoring.\n\n## AI Transparency\n\nThis project is developed using AI-assisted workflows (primarily Claude Code via Happy). We believe in transparent collaboration between human developers and AI tools.\n\n---\n\n\u003Cdiv align=\"center\">\n  \u003Csub>Built for the Claude AI community\u003C\u002Fsub>\n\u003C\u002Fdiv>\n","# Claude 使用跟踪器\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fcover.jpg\" alt=\"Claude 使用跟踪器\" width=\"100%\">\n\n  **一款原生 macOS 菜单栏应用，用于实时监控 Claude AI 的使用限制**\n\n  ![macOS](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FmacOS-14.0+-black?style=flat-square&logo=apple)\n  ![Swift](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwift-5.0+-orange?style=flat-square&logo=swift)\n  ![SwiftUI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSwiftUI-5.0+-blue?style=flat-square&logo=swift)\n  ![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-green?style=flat-square)\n  ![Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-3.0.3-blue?style=flat-square)\n  ![Languages](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguages-9-purple?style=flat-square)\n\n  \u003Csub>🇬🇧 英语 • 🇪🇸 西班牙语 • 🇫🇷 法语 • 🇩🇪 德语 • 🇮🇹 意大利语 • 🇵🇹 葡萄牙语 • 🇯🇵 日语 • 🇰🇷 韩语 • 🇨🇳 简体中文\u003C\u002Fsub>\n\n  ### [下载最新版本 (v3.0.3)](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Flatest\u002Fdownload\u002FClaude-Usage.zip)\n\n  \u003Csub>macOS 14.0+ (Sonoma) | ~6 MB | 原生 Swift\u002FSwiftUI | 已官方签名\u003C\u002Fsub>\n\n  \u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fhamedelfayome\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.buymeacoffee.com\u002Fbuttons\u002Fv2\u002Fdefault-yellow.png\" alt=\"Buy Me A Coffee\" height=\"40\">\u003C\u002Fa>\n\u003C\u002Fdiv>\n\n---\n\n## 概述\n\nClaude 使用跟踪器是一款轻量级的原生 macOS 菜单栏应用，可实时监控您的 Claude AI 使用限制。它完全由 Swift 和 SwiftUI 构建，提供简洁直观的界面，用于跟踪您的 5 小时会话窗口、每周使用限制以及 Opus 特定的用量。\n\n### 主要功能\n\n- **多账户支持**：管理无限数量的 Claude 账户，每个账户拥有独立的凭据和设置\n- **多账户显示**：在菜单栏中同时监控所有账户\n- **Claude Code 集成**：同步 CLI 账户，并在切换账户时自动切换凭据\n- **实时监控**：按账户跟踪会话、每周、API 控制台的使用情况及 API 费用\n- **使用历史**：交互式图表，记录随时间变化的会话、每周和账单数据\n- **全局快捷键**：系统范围内的键盘快捷键（无需辅助功能权限）\n- **无头模式**：可通过远程桌面在无头 Mac 上运行\n- **可自定义界面**：5 种图标样式 + 3 种颜色模式（多色\u002F灰度\u002F单色）+ 余量\u002F已用量百分比切换\n- **智能自动化**：自动启动会话、自动切换账户、阈值通知\n- **开发者工具**：终端状态行集成，显示模型、上下文、账户信息、进度标记和颜色模式\n- **隐私优先**：本地存储，无遥测，无云同步\n- **原生性能**：轻量级 Swift\u002FSwiftUI 设计，专为 macOS 打造\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fsettings.gif\" alt=\"快速演示\" width=\"600\">\n  \u003Cimg src=\".github\u002Ficon.jpg\" alt=\"菜单栏图标\" height=\"180\">\n  \u003Cimg src=\".github\u002Fpopover.png\" alt=\"弹出界面\" width=\"200\">\n\n  \u003Csub>菜单栏图标和详细的使用弹出界面\u003C\u002Fsub>\n\n  \u003Cimg src=\".github\u002Fstatusline.png\" alt=\"Claude Code 状态行\">\n  \u003Cbr>\n  \u003Csub>实时终端状态行，显示目录、分支、模型、上下文以及彩色编码的使用情况\u003C\u002Fsub>\n\u003C\u002Fdiv>\n\n---\n\n## 新增内容\n\n- **v3.0.3 (2026-03-10)**：新增 6 级进度系统（舒适 → 危急），并在进度条上显示彩色进度标记；提供 3 种颜色模式（多色\u002F灰度\u002F单色）供菜单栏和状态行使用；新增标签切换（Ctx\u002FUsage\u002FReset）；采用 24 小时制；调整预览颜色以匹配终端；修复了菜单栏渲染中的 CPU 自旋循环问题。\n\n- **v3.0.2 (2026-03-10)**：新增 API 费用跟踪功能，并附每日图表；支持基于浏览器的身份验证（WKWebView 登录）；利用速率限制头部信息进行 CLI OAuth 认证；优化弹出窗口的自适应大小；新增三方式时间显示选择器；调整绿色配色方案使其更柔和；增加会话密钥到期提醒功能。\n\n- **v3.0.1 (2026-03-08)**：弹出窗口中新增设置选项卡（剩余时间切换）；修复了多显示器下的 CPU 显示问题。\n\n- **v3.0.0 - 重大更新 (2026-03-08)**：\n  - **无头模式**：支持通过远程桌面在无头 Mac 环境中运行\n  - **使用历史**：交互式时间线图表，并可导出为 JSON\u002FCSV 格式\n  - **全局键盘快捷键**：可配置热键（无需辅助功能权限）\n  - **自动切换账户**：当会话限额达到时自动切换账户\n  - **无边框设置窗口**：采用全息设计，配备自定义交通灯提示\n  - **新增 6 个状态行组件**：包括模型名称、上下文窗口、账户名称等\n  - **时间进度标记与进度感知着色**：智能进度指示器\n  - **网络调试视图**：定时捕获请求\u002F响应详情并进行查看\n  - **简体中文支持**（第 9 种语言）\n  - **移植了来自 novastate 分支的 12 项改进**，包括 CLI 自动检测、从睡眠唤醒后刷新以及自定义通知阈值等功能。\n\n- **v2.3.0** – 多账户菜单栏显示，新增剩余百分比切换功能\n- **v2.2.0** – 支持多账户管理、CLI 集成以及韩语本地化\n- **v2.1.0** – 引入 3 步设置向导，确保智能组织功能的保留\n- **v2.0.0** – 实现 Apple 代码签名、自动更新及 Keychain 安全保护\n\n**[查看完整发布历史](CHANGELOG.md)**\n\n---\n\n## 开始使用\n\n### 先决条件\n\n在安装 Claude 使用跟踪器之前，请确保您具备以下条件：\n\n- **macOS 14.0 (Sonoma) 或更高版本**：请通过苹果菜单 → 关于本机进行检查\n- **有效的 Claude AI 账户**：请前往 [claude.ai](https:\u002F\u002Fclaude.ai) 注册\n\n**身份验证**（任选其一）：\n- **最简单**：已安装并登录 [Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code)，应用程序将自动使用 CLI 凭据（v2.2.2 及以上版本）\n- **浏览器登录**：通过内置浏览器登录——会话密钥将自动提取（v3.0.2 及以上版本）\n- **手动方式**：通过网页浏览器访问 claude.ai 提取会话密钥（Chrome、Safari、Firefox 等）\n\n**注意**：若要集成终端状态行，即使使用 Claude Code OAuth，仍需手动配置会话密钥。\n\n### 安装\n\n#### 选项 1：Homebrew（推荐）\n\n```bash\nbrew install --cask hamed-elfayome\u002Fclaude-usage\u002Fclaude-usage-tracker\n```\n\n或者先 tap 再安装：\n\n```bash\nbrew tap hamed-elfayome\u002Fclaude-usage\nbrew install --cask claude-usage-tracker\n```\n\n**注意**：从 v2.0.0 开始，该应用已正式使用 Apple 开发者证书签名。无需任何安全绕过操作！\n\n**更新方法**：\n```bash\nbrew upgrade --cask claude-usage-tracker\n```\n\n或者使用内置的自动更新功能（设置 → 更新）。\n\n**卸载方法**：\n```bash\nbrew uninstall --cask claude-usage-tracker\n```\n\n#### 选项 2：直接下载\n\n**[下载 Claude-Usage.zip](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Flatest\u002Fdownload\u002FClaude-Usage.zip)**\n\n1. 从上述链接下载 `.zip` 文件。\n2. 解压文件（双击或使用归档实用程序）。\n3. 将 `Claude Usage.app` 拖到您的应用程序文件夹中。\n4. 双击启动——大功告成！\n\n**v2.0.0+ 注意**：该应用现已正式使用 Apple 开发者证书签名。您可以像安装和运行其他 Mac 应用程序一样进行安装和运行，无需任何安全警告或绕过操作。\n\n**自动更新**：一旦安装完毕，应用会自动检查更新，并在有新版本时通知您（设置 → 更新）。\n\n#### 选项 3：从源代码构建\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker.git\ncd Claude-Usage-Tracker\n\n# 在 Xcode 中打开\nopen \"Claude Usage.xcodeproj\"\n\n# 构建并运行（⌘R）\n```\n\n### 快速入门指南\n\n#### 选项 A：使用 Claude Code 自动设置（最简单）\n\n**v2.2.2 新增功能**：如果您已安装并登录了 Claude Code，应用将自动运行！\n\n1. **安装 Claude Code**（如果尚未安装）\n   - 从 [claude.com\u002Fclaude-code](https:\u002F\u002Fclaude.com\u002Fclaude-code) 下载。\n   - 使用 `claude login` 登录。\n\n2. **启动 Claude Usage Tracker**\n   - 应用会自动检测您的 Claude Code 账户。\n   - 无需手动配置！\n\n3. **验证是否正常工作**\n   - 点击菜单栏图标。\n   - 您应立即看到使用统计信息。\n\n#### 选项 B：浏览器登录（v3.0.2+）\n\n如果您不使用 Claude Code，可以直接通过应用登录：\n\n1. **点击菜单栏图标**，选择“设置”。\n2. **进入“个人使用”** 选项卡。\n3. **点击“登录 Claude.ai”** — 会打开一个嵌入式浏览器。\n4. **使用 Claude.ai 凭据登录**（邮箱、Google SSO 等）。\n5. **会话密钥会自动提取** — 应用会验证并保存它。\n6. **从列表中选择您的组织** 并确认。\n\n#### 选项 C：使用会话密钥手动设置\n\n如果您更倾向于手动配置：\n\n**步骤 1：提取您的会话密钥**\n\n1. **打开 Claude AI**\n   - 在浏览器中访问 [claude.ai](https:\u002F\u002Fclaude.ai)。\n   - 确保您已登录。\n\n2. **打开开发者工具**\n   - **Chrome\u002FEdge**：按 `F12` 或 `Cmd+Option+I`（macOS）\u002F `Ctrl+Shift+I`（Windows）。\n   - **Safari**：在偏好设置 → 高级中启用开发者菜单，然后按 `Cmd+Option+I`。\n   - **Firefox**：按 `F12` 或 `Cmd+Option+I`（macOS）\u002F `Ctrl+Shift+I`（Windows）。\n\n3. **导航到 Cookie**\n   - 转到：Chrome\u002FEdge 的 **Application** 选项卡 或 Firefox 的 **Storage** 选项卡。\n   - 展开：**Cookies** → **https:\u002F\u002Fclaude.ai**。\n   - 找到：`sessionKey` cookie。\n   - 复制：其值（以 `sk-ant-sid01-...` 开头）。\n\n**步骤 2：配置会话密钥**\n\n1. **点击菜单栏图标**，选择“设置”。\n2. **进入“个人使用”** 选项卡。\n3. **展开“高级：手动会话密钥”**。\n4. **粘贴您的会话密钥**，然后点击“测试连接”。\n5. **从列表中选择您的组织**。\n6. **检查并点击‘保存配置’**。\n\n**步骤 3：验证是否正常工作**\n\n1. **检查菜单栏**：您应该能在菜单栏中看到 Claude Usage 图标。\n2. **点击图标**：会弹出一个显示使用统计信息的窗口。\n3. **查看数据**：会话使用量、每周使用量以及重置计时器都应正确显示。\n\n**成功！** 应用现在正在监控您的 Claude 使用情况。\n\n#### 后续步骤\n\n- **自定义图标**：前往设置 → 外观，选择您喜欢的菜单栏样式。\n- **启用通知**：设置 → 通知，以接收阈值提醒。\n- **自动开始会话**：设置 → 会话管理，以启用自动会话初始化。\n- **终端集成**：设置 → Claude Code，以设置状态行（需要会话密钥配置）。\n- **键盘快捷键**：设置 → 快捷键，以配置全局热键。\n\n---\n\n## 高级配置\n\n### 手动会话密钥设置\n\n如果您希望手动配置会话密钥，而不是使用设置向导：\n\n```bash\n# 创建会话密钥文件\necho \"sk-ant-sid01-您的会话密钥在这里\" > ~\u002F.claude-session-key\n\n# 设置安全权限（对安全性很重要）\nchmod 600 ~\u002F.claude-session-key\n```\n\n创建文件后，启动应用，它将自动检测会话密钥。\n\n---\n\n## 多账号管理\n\n**v2.2.0 新增功能**：Claude Usage Tracker 现在支持无限个账号，允许您无缝管理多个 Claude 账户，并实现凭据的自动切换。\n\n**v3.0.0 新增功能**：当会话限额达到时自动切换账号、使用历史跟踪以及全局键盘快捷键！\n\n### 功能\n\n#### 个人资料管理\n- **无限个人资料**：为不同的 Claude 账户创建任意数量的个人资料\n- **多个人资料显示**：在菜单栏中同时显示所有个人资料\n  - 在单个模式（仅显示当前活动个人资料）和多个人资料模式之间切换\n  - 每个个人资料都以独特的图标样式和设置显示\n  - 点击任意个人资料图标即可查看其使用详情\n  - 每个个人资料可独立设置刷新频率\n- **趣味自动命名**：个人资料会自动生成类似“量子羊驼”、“狡猾企鹅”、“涡轮树懒”等名称\n- **自定义名称**：将个人资料重命名为你喜欢的任何名称\n- **快速切换**：通过弹出式下拉菜单或设置侧边栏即时切换个人资料\n- **个人资料徽章**：视觉指示器显示哪些个人资料拥有 Claude.ai 凭证和 CLI 账户\n\n#### Claude Code CLI 集成\n- **一键同步**：将当前登录的 Claude Code 账户同步到某个个人资料\n- **自动切换**：切换个人资料时，CLI 凭证会自动更新\n- **凭证显示**：查看遮蔽后的访问令牌和订阅类型\n- **智能重新同步**：在切换个人资料之前，凭据会自动刷新，以捕捉 CLI 的变化\n- **每个个人资料独立的 CLI**：每个个人资料可以有自己的 Claude Code 账户，也可以共享系统账户\n\n#### 每个个人资料的设置\n每个个人资料都有独立的设置：\n- **凭证**：独立的 Claude.ai 会话密钥、API 密钥和组织 ID\n- **外观**：独立的图标样式和单色模式\n- **刷新间隔**：自定义刷新频率（5-300 秒）\n- **自动开始会话**：可按个人资料启用或禁用\n- **通知**：独立的阈值提醒（75%、90%、95%）\n- **使用数据**：按个人资料分别记录\n\n#### 个人资料切换器\n可在多个位置访问个人资料切换器：\n- **弹出式标题栏**：带有个人资料徽章的下拉菜单\n- **设置侧边栏**：带有视觉指示器的当前活动个人资料选择器\n- **管理个人资料选项卡**：完整的个人资料管理界面\n\n#### 使用方法\n\n1. **创建个人资料**：\n   - 前往设置 → 管理个人资料\n   - 点击“创建新个人资料”\n   - 自动生成一个有趣的名称，或者输入你自己的名称\n\n2. **配置凭证**：\n   - 在侧边栏中切换到所需的个人资料\n   - 前往 Claude.AI \u002F API 控制台 \u002F CLI 账户选项卡\n   - 输入凭证（每个个人资料独立）\n\n3. **同步 Claude Code**（可选）：\n   - 在终端中登录 Claude Code\n   - 打开设置 → CLI 账户\n   - 点击“从 Claude Code 同步”\n   - 现在当你切换个人资料时，CLI 凭证会自动更新！\n\n4. **切换个人资料**：\n   - 点击弹出式下拉菜单\n   - 或使用设置侧边栏的选择器\n   - CLI 凭证会自动应用\n\n\n---\n\n## 特性\n\n### 安装与更新\n- **官方 Apple 代码签名**：专业签名的应用程序，安装方式与任何 Mac 应用程序相同\n- **自动更新**：内置 Sparkle 框架驱动的更新系统\n- **一键安装**：无需安全绕过或手动批准\n- **更新通知**：在有新版本可用时收到通知\n\n### 使用情况跟踪与监控\n- 实时监控 5 小时会话、每周限额以及 Opus 特定的使用情况\n- API 控制台使用情况跟踪，配备月度费用仪表盘和每日费用图表\n- 按 API 密钥细分的费用明细，详细到模型级别\n- 为 Claude Extra 订阅者提供额外使用费用跟踪\n- 根据消耗水平采用自适应的绿色\u002F橙色\u002F红色颜色编码指示器\n- 智能倒计时定时器，用于会话和每周重置，提供三种显示方式（时间、剩余时间或两者兼备）\n\n### 菜单栏与界面\n- **5 种可定制的图标样式**：电池型、进度条型、仅百分比型、带进度条的图标型、紧凑型\n- **多指标图标**：可同时显示会话、每周和 API 使用情况的独立图标\n- **3 种颜色模式**：多色（基于阈值）、灰度（根据外观模式调整）、单色（自定义十六进制）\n- **6 级节奏系统**：根据预计使用情况对节奏标记进行着色（绿色\u002F蓝绿色\u002F黄色\u002F橙色\u002F红色\u002F紫色）\n- **交互式弹出窗口**：一键访问，并可分离为浮动窗口\n- **实时状态指示器**：来自 status.claude.com 的实时 Claude 系统状态\n- **多语言支持**：支持 9 种语言（英语、西班牙语、法语、德语、意大利语、葡萄牙语、日语、韩语、简体中文）\n- 自适应浅色\u002F深色模式的颜色方案\n\n### 自动化与智能化\n- **自动开始会话**：当使用量重置为 0% 时，自动初始化新会话\n- **自动切换个人资料**：在会话达到限制时自动切换到下一个个人资料\n- **唤醒后刷新**：唤醒后自动刷新，并带有防抖功能\n- **智能通知**：在 75%、90%、95% 设置阈值提醒，还可自定义阈值并选择提示音\n- **网络监控**：自动检测连接变化，并处理离线情况\n- **登录时启动**：系统级自动启动选项\n- **可配置的刷新频率**：可设置 5 至 120 秒的刷新间隔\n- 会话重置和自动开始确认信息\n\n### 开发者集成\n- **Claude Code 终端状态行**：在你的终端中实时显示使用情况\n- 可自定义组件：目录、git 分支、模型名称、上下文窗口、个人资料名称、使用百分比、进度条、节奏标记、重置计时器\n- **3 种颜色模式**：多色、灰度、单色（自定义十六进制），用于状态行\n- **节奏标记**：进度条上的 6 级彩色标记，显示预计的使用节奏\n- **标签切换**：可显示或隐藏“Ctx:”、“Usage:”、“Reset:”前缀\n- **24 小时制**：可选的 24 小时制重置时间\n- 终端匹配的预览效果，使用与 ANSI 兼容的颜色\n- 通过使用缓存实现即时渲染（无启动延迟）\n- 一键自动安装\n- 应用更改前的实时预览\n\n### 安全与隐私\n- **macOS 钥匙链存储**：会话密钥存储在 macOS 钥匙链中（最安全的方式）\n- **自动迁移**：无缝迁移到旧的存储方式\n- **Apple 代码签名**：经 Apple 验证，增强安全性和信任度\n- **高级错误处理**：专业的错误处理系统，配合用户友好的恢复机制\n- **强大的验证功能**：会话密钥和 API 端点验证\n- 本地存储，不进行云端同步\n- 无遥测或追踪\n- 仅通过 HTTPS 与 Claude API 通信\n\n### 高级功能\n- 多屏幕支持\n- 首次运行引导式设置向导\n- 基于协议的模块化架构\n- 使用 App Groups 实现持久化设置\n- 全面的测试覆盖\n\n---\n\n## 使用说明\n\n### 菜单栏界面\n\n点击菜单栏图标即可访问：\n\n- **会话使用情况**：5 小时滚动窗口的百分比及重置时间\n- **每周使用情况**：所有模型的总体周使用量\n- **Opus 使用情况**：每周的 Opus 特定使用量（如适用）\n- **API 费用**：月度费用，附带每日图表和按密钥细分的费用明细（若已配置控制台）\n- **快速操作**：刷新和设置\n\n### 设置\n\n可通过菜单栏弹出窗口中的“设置”按钮访问全面的设置。该应用采用现代化的侧边栏界面，配有个人资料切换器和分类清晰的选项卡：\n\n### 个人资料专用设置\n\n#### 个人资料切换器（侧边栏）\n- **快速选择个人资料**：下拉菜单可即时切换不同个人资料\n- **个人资料徽章**：Claude.ai 🔵 和 CLI ✅ 凭证的可视化标识\n- **当前活动个人资料显示**：显示当前选定的个人资料\n\n#### Claude.AI（凭证）\n配置您的 Claude.ai 个人账户：\n- **浏览器登录**：通过嵌入式浏览器登录，自动提取会话密钥（v3.0.2+）\n- **三步设置向导**：引导式会话密钥配置\n  - 非破坏性连接测试\n  - 可视化组织选择器\n  - 包含预览的配置摘要\n- **手动输入密钥**：高级选项，在展开组中直接输入会话密钥\n- **智能更新**：重新输入相同密钥时，组织信息保持不变\n\n#### API 控制台（凭证）\n配置 API 控制台使用情况跟踪：\n- **浏览器登录**：通过嵌入式浏览器登录 Anthropic 控制台（v3.0.2+）\n- **API 会话密钥**：设置您的 API 认证密钥（手动备用）\n- **组织 ID**：为 API 跟踪配置组织\n- **双重跟踪**：同时监控网页和 API 使用情况\n- **API 账单**：查看 API 控制台消费、预付积分及每月费用明细\n- **会话密钥有效期**：可视化状态指示器，显示您的会话密钥何时过期\n\n#### CLI 账户（凭证）\n同步 Claude Code CLI 凭证：\n- **一键同步**：将当前登录的 Claude Code 账户复制到个人资料中\n- **凭证显示**：查看遮蔽后的访问令牌和订阅类型\n- **自动切换**：更换个人资料时，凭据会自动更新\n- **取消同步**：从个人资料中解除 CLI 账户关联\n\n#### 外观\n按个人资料自定义菜单栏图标：\n- **图标样式选择**：从 5 种不同的显示模式中选择\n  - 电池样式（经典带填充的指示器）\n  - 进度条（带有百分比的水平条）\n  - 仅百分比（纯文本极简风格）\n  - 图标加进度条（Claude 图标 + 进度）\n  - 紧凑型（节省空间）\n- **3 种颜色模式**：多色（基于阈值）、灰度（适应外观）或单色（自定义十六进制）\n- **节奏标记**：进度条上的彩色时间标记，显示预计使用节奏（6 层）\n- **百分比显示模式**：在已用百分比与剩余百分比之间切换\n  - 显示“已使用 75%”或“还剩 25%”——由您选择\n  - 颜色编码会自动调整（剩余多时为绿色，剩余少时为红色）\n  - 帮助您关注预算剩余而非已花费的预算\n- **实时预览**：应用更改前即可实时查看效果\n\n#### 通用（个人资料设置）\n按个人资料配置行为：\n- **刷新间隔**：配置自动刷新频率（5–300 秒）\n- **自动启动会话**：启用或禁用重置时自动初始化会话\n- **模型选择**：使用成本效益最高的可用模型\n- **通知**：按个人资料设置阈值警报（75%、90%、95%）+ 自定义阈值及声音选择器\n\n### 应用程序范围设置\n\n#### 管理个人资料\n创建并管理多个个人资料：\n- **创建个人资料**：添加新个人资料，并自动生成有趣的名字\n- **重命名个人资料**：自定义个人资料名称\n- **删除个人资料**：移除未使用的个人资料（至少保留一个）\n- **个人资料列表**：查看所有个人资料及其凭证状态指示器\n- **显示模式切换**：在单人模式和多人模式之间切换\n  - 单人模式：仅在菜单栏中显示当前活动个人资料\n  - 多人模式：在菜单栏中同时显示所有个人资料\n- **自动切换个人资料**：当会话限额达到时，自动切换到下一个可用个人资料\n\n#### 语言\n应用程序语言偏好：\n- **语言选择**：从 9 种支持的语言中选择\n- **实时更新**：更改语言后界面立即更新\n- 支持语言：英语、西班牙语、法语、德语、意大利语、葡萄牙语、日语、韩语、简体中文\n\n#### Claude Code（状态行）\n终端集成（全应用范围）：\n- **组件选择**：选择要显示的内容（目录、分支、模型名称、上下文窗口、个人资料名称、使用情况、进度条、节奏标记、重置时间）\n- **颜色模式**：多色、灰度或单色，并提供自定义十六进制选择器\n- **节奏标记**：进度条上显示的 6 层彩色标记，指示预计使用节奏\n- **标签开关**：显示\u002F隐藏“Ctx:”、“Usage:”、“Reset:”等前缀，以实现紧凑显示\n- **24 小时制**：可选的 24 小时制重置时间\n- **实时预览**：与终端匹配的预览，采用 ANSI 等效颜色\n- **一键安装**：自动脚本安装至 `~\u002F.claude\u002F`\n- **自动更新**：切换个人资料时状态行会自动更新\n- **使用情况缓存**：通过缓存的使用数据实现 CLI 的即时渲染\n- 详细设置请参阅【Claude Code 集成】章节\n\n#### 更新\n自动更新配置：\n- **自动检查更新**：配置检查更新的频率\n- **更新通知**：在有新版本可用时收到通知\n- **一键安装**：只需单击即可下载并安装更新\n- **发布说明**：查看每次更新的新内容\n\n#### 关于\n应用程序信息：\n- **版本信息**：当前应用版本\n- **致谢**：贡献者及鸣谢\n- **链接**：GitHub 仓库、问题追踪器、文档\n\n\n## Claude Code 集成\n\n通过 Claude Code 状态行集成，将实时 Claude 使用情况监控直接引入您的终端！无需离开开发流程，即可显示当前使用百分比、模型名称、上下文窗口、个人资料名称、Git 分支和工作目录。\n\n### 什么是 Claude Code？\n\n[Claude Code](https:\u002F\u002Fclaude.com\u002Fclaude-code) 是 Anthropic 官方提供的 CLI 工具，用于直接从终端与 Claude AI 交互。状态行功能允许您在终端窗口底部显示自定义信息。\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".github\u002Fstatusline.png\" alt=\"Claude Code 状态行实况\" width=\"90%\">\n  \u003Cbr>\n  \u003Csub>示例：所有组件均已启用的终端状态行\u003C\u002Fsub>\n\u003C\u002Fdiv>\n\n### 设置说明\n\n#### 先决条件\n\n1. **已安装 Claude Code**：请从 [claude.com\u002Fclaude-code](https:\u002F\u002Fclaude.com\u002Fclaude-code) 下载。\n2. **会话密钥已配置**：必须在“个人使用”选项卡中手动配置（Claude Code 的 OAuth 不适用于状态栏——它需要直接使用会话密钥）。\n\n#### 安装步骤\n\n1. **打开 Claude 使用跟踪器设置**\n   - 点击菜单栏图标\n   - 点击“设置”\n   - 导航到“Claude Code”选项卡\n\n2. **选择组件**\n   - 开启或关闭您希望显示的组件：\n     - **目录名称**：显示当前工作目录\n     - **Git 分支**：以 ⎇ 图标显示当前分支\n     - **模型名称**：显示当前模型（Opus、Sonnet）\n     - **配置文件名称**：显示活动配置文件名称\n     - **上下文窗口**：以百分比或令牌数量显示上下文使用情况\n     - **使用统计**：以颜色编码显示会话百分比\n     - **进度条**：可视化的 10 段指示器（启用使用统计时可选）\n     - **节奏标记**：进度条上根据经过时间位置显示的彩色 `┃`（6 层节奏颜色）\n     - **重置时间**：您的会话何时重置（12 小时或 24 小时格式）\n   - **颜色模式**：选择多色、灰度或单色\n   - **标签切换**：显示或隐藏“Ctx:”、“Usage:”、“Reset:”前缀\n\n3. **预览状态栏**\n   - 实时预览将准确展示其在终端中的显示效果，采用与终端匹配的 ANSI 颜色。\n   - 示例：`claude-usage │ ⎇ main │ Opus │ Work │ Ctx: 48% │ Usage: 25% ▓▓┃░░░░░░░ → Reset: 3:45 PM`\n\n4. **应用配置**\n   - 点击“应用”按钮\n   - 脚本将被安装到 `~\u002F.claude\u002F`\n   - Claude Code 的 `settings.json` 文件将自动更新。\n\n5. **重启 Claude Code**\n   - 关闭并重新打开您的 Claude Code 终端\n   - 状态栏将出现在终端窗口底部。\n\n### 安装内容\n\n设置过程会自动创建：\n\n- `~\u002F.claude\u002Ffetch-claude-usage.swift`：用于从 Claude API 获取使用数据的 Swift 脚本\n- `~\u002F.claude\u002Fstatusline-command.sh`：用于构建状态栏显示的 Bash 脚本\n- `~\u002F.claude\u002Fstatusline-config.txt`：包含您组件偏好设置的配置文件\n- `~\u002F.claude\u002Fsettings.json`：更新了状态栏命令（如果不存在则创建）\n\n所有脚本均设置了安全权限（755），且仅读取您现有的会话密钥文件。\n\n### 自定义\n\n#### 可用组件\n\n| 组件         | 描述                           | 示例                     |\n|--------------|--------------------------------|--------------------------|\n| 目录         | 当前目录名称                   | `claude-usage`           |\n| Git 分支     | 活动 Git 分支                  | `⎇ main`                 |\n| 模型         | 当前模型名称                   | `Opus`                   |\n| 配置文件     | 活动配置文件名称               | `Work`                   |\n| 上下文       | 上下文窗口使用情况             | `Ctx: 48%` 或 `96K`     |\n| 使用         | 会话百分比                     | `Usage: 25%` 或 `25%`   |\n| 进度条       | 10 段可视化指示器              | `▓▓░░░░░░░░`            |\n| 节奏标记     | 根据经过时间位置的彩色标记     | `▓▓┃░░░░░░░`            |\n| 重置时间     | 会话何时重置                   | `→ Reset: 3:45 PM` 或 `→ 15:45` |\n\n#### 颜色编码\n\n**使用条**采用 10 级渐变颜色：\n- **0–10%**：深绿色\n- **11–30%**：绿色系\n- **31–50%**：黄绿色过渡到橄榄色\n- **51–70%**：黄色至橙色\n- **71–90%**：深橙色至红色\n- **91–100%**：深红色\n\n**节奏标记**基于预计期末使用情况，采用 6 层系统：\n- **舒适**（预计 \u003C50%）：绿色\n- **正常**（50–75%）：蓝绿色\n- **警戒**（75–90%）：黄色\n- **紧张**（90–100%）：橙色\n- **危险**（100–120%）：红色\n- **失控**（>120%）：紫色\n\n**颜色模式**（适用于菜单栏和状态栏）：\n- **多色**：完整调色板（默认）\n- **灰度**：无颜色，适应系统主题\n- **单色**：所有元素使用您自定义的十六进制颜色。\n\n#### 禁用状态栏\n\n要移除状态栏：\n1. 打开 Claude 使用跟踪器设置 → Claude Code 选项卡\n2. 点击“重置”按钮\n3. 重启 Claude Code\n\n这将移除状态栏配置，但保留脚本以便于再次启用。\n\n### 故障排除\n\n#### 状态栏未显示\n\n1. 确认 Claude Code 已安装并正常运行\n2. 检查是否在应用设置后重启了 Claude Code\n3. 确保“常规设置”选项卡中的会话密钥有效\n4. 检查 `~\u002F.claude\u002Fsettings.json` 是否存在，并包含状态栏配置。\n\n#### 显示“Usage: ~”\n\n这表示 Swift 脚本无法获取使用数据：\n- 确认您的会话密钥有效\n- 检查 `~\u002F.claude-session-key` 是否存在\n- 确保您已连接互联网\n- 尝试从 claude.ai 刷新会话密钥。\n\n#### 权限问题\n\n如果脚本无法执行：\n```bash\nchmod 755 ~\u002F.claude\u002Ffetch-claude-usage.swift\nchmod 755 ~\u002F.claude\u002Fstatusline-command.sh\n```\n\n### 状态栏示例\n\n启用所有组件（多色模式）：\n```\nmy-project │ ⎇ feature\u002Fnew-ui │ Opus │ Work │ Ctx: 48% │ Usage: 47% ▓▓▓▓┃░░░░░ → Reset: 4:15 PM\n```\n\n简洁版（隐藏标签，24 小时制）：\n```\nmy-project │ ⎇ develop │ 12% ▓┃░░░░░░░░ → 16:15\n```\n\n仅显示模型和上下文：\n```\nSonnet │ Ctx: 96K │ Usage: 25%\n```\n\n## 架构\n\n### 技术栈\n\n- **语言**：Swift 5.0+\n- **UI 框架**：SwiftUI 5.0+\n- **平台**：macOS 14.0+（Sonoma）\n- **架构**：MVVM 结合面向协议的设计\n- **存储**：UserDefaults 与 App Groups\n- **网络**：URLSession 结合 async\u002Fawait\n- **设计模式**：协调者模式、基于协议的服务、模块化组件。\n\n## API 集成\n\n该应用程序集成了多个 Claude API 端点，以实现全面的使用跟踪：\n\n### Web 使用端点\n\n```\nGET https:\u002F\u002Fclaude.ai\u002Fapi\u002Forganizations\u002F{org_id}\u002Fusage\n```\n\n**认证**：来自 claude.ai 的会话 Cookie（`sessionKey`）\n\n**响应结构**：\n- `five_hour`：5 小时会话使用数据\n  - `utilization_pct`：使用百分比（0–100）\n  - `reset_at`：下次重置的 ISO 8601 时间戳\n- `seven_day`：所有模型的周使用情况\n  - `utilization_pct`：周使用百分比\n- `seven_day_opus`：Opus 特定的周使用情况\n  - `utilization_pct`：Opus 周使用百分比\n- `extra_usage`：Claude Extra 费用跟踪（如适用）\n  - `current_spending`：已花费金额\n  - `budget_limit`：允许的最大支出\n\n### API 控制台端点\n\n```\nGET https:\u002F\u002Fapi.anthropic.com\u002Fv1\u002Forganization\u002F{org_id}\u002Fusage\n```\n\n**认证**：API 密钥（`x-api-key` 头部）\n\n**响应结构**：\n- API 控制台使用统计信息\n- 计费信息\n- 速率限制和配额\n\n### 双重跟踪\n\n该应用可以同时监控网页端（claude.ai）和 API 控制台的使用情况，从而为您提供跨所有访问方式的 Claude 使用情况的完整视图。\n\n## 安全性\n\n- **macOS 钥匙串**：会话密钥安全存储在 macOS 钥匙串中（最安全的存储方式）\n- **自动迁移**：v2.0 及以上版本会自动将会话密钥从旧的存储方式迁移到钥匙串\n- **Apple 代码签名**：使用 Apple 开发者证书进行官方签名，确保应用的真实性\n- **安全更新**：通过 HTTPS 提供自动更新，并进行代码签名验证\n- **无云端同步**：所有数据均保留在本地设备上\n- **无遥测**：不收集任何跟踪或分析数据\n- **高级错误处理**：强大的错误处理系统，提供友好的恢复机制\n- **会话密钥验证**：对 API 凭证进行全面验证\n- **网络**：仅通过 HTTPS 与 claude.ai 和 Anthropic API 进行通信\n\n## 故障排除\n\n### 应用无法连接\n\n1. 确认您的会话密钥有效。\n2. 检查您是否已在浏览器中登录 claude.ai。\n3. 尝试重新获取一个新鲜的会话密钥。\n4. 确保您有活跃的互联网连接。\n\n### 403 权限错误\n\n如果出现“未授权”或 403 错误：\n1. 打开设置 → 个人使用。\n2. 使用三步向导重新配置：\n   - 测试您的会话密钥。\n   - 选择正确的组织。\n   - 保存配置。\n3. 向导会在更新密钥时保留您选择的组织。\n\n### 菜单栏图标显示为零\n\n如果图标在刷新时短暂地变为零：\n- 此问题已在 v2.1.0 及以上版本中修复。\n- 请更新到最新版本以获得流畅的刷新体验。\n- 旧数据现在会一直显示，直到新数据到达。\n\n### 菜单栏图标未显示\n\n1. 检查系统设置 → 桌面与菜单栏 → 菜单栏。\n2. 重启应用程序。\n3. 查看 Console.app 中是否有错误信息。\n\n### 会话密钥过期\n\n会话密钥可能会在一段时间后过期。您将在过期前 24 小时收到通知（v3.0.2 及以上版本）。要刷新：\n1. 前往设置 → 个人使用（或 API 控制台）。\n2. 点击“登录 Claude.ai”（或“登录 Anthropic 控制台”），通过内置浏览器重新认证。\n3. 或展开“高级：手动会话密钥”，手动粘贴新的密钥。\n\n### 更新不起作用\n\n如果自动更新无法正常工作：\n\n1. 检查设置 → 更新，确保已启用自动检查。\n2. 确认您正在运行 v2.0.0 或更高版本（较早版本没有自动更新功能）。\n3. 检查您的互联网连接。\n4. 如有必要，可从 GitHub 手动下载最新版本。\n\n## 贡献者\n\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_41061429542e.png\" alt=\"Contributors\" height=\"30px\" \u002F>\n\n本项目是为社区打造的——欢迎所有人参与！\n\n### 特别感谢\n\n非常感谢所有提交过拉取请求的开发者。v3.0.0 中的许多功能都受到社区 PR 的启发，或者直接移植自这些 PR，但由于本次发布规模较大、冲突较多，未能直接合并。正是你们的代码、想法和努力促成了这次发布：\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fnovastate\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_5850bb834b94.png\" width=\"40\" height=\"40\" alt=\"novastate\" title=\"novastate\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fheathdutton\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_2e0b16eb890c.png\" width=\"40\" height=\"40\" alt=\"heathdutton\" title=\"heathdutton\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftsvikas\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_5e4402b76cab.png\" width=\"40\" height=\"40\" alt=\"tsvikas\" title=\"tsvikas\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fkynoptic\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_743e28d47c49.png\" width=\"40\" height=\"40\" alt=\"kynoptic\" title=\"kynoptic\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbezlant\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_722b2dc2d375.png\" width=\"40\" height=\"40\" alt=\"bezlant\" title=\"bezlant\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftrickart\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_aa780f8610bf.png\" width=\"40\" height=\"40\" alt=\"trickart\" title=\"trickart\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002FAli-Aldahmani\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_e2d5f61f1d4e.png\" width=\"40\" height=\"40\" alt=\"Ali-Aldahmani\" title=\"Ali-Aldahmani\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcuvitx\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_readme_b4a476f557b6.png\" width=\"40\" height=\"40\" alt=\"cuvitx\" title=\"cuvitx\">\u003C\u002Fa>\n\n## 参与贡献\n\n我们欢迎任何形式的贡献！请随时提交拉取请求。对于重大更改，请先打开一个问题来讨论您希望做出的修改。\n\n### 开发环境设置\n\n1. 分支仓库。\n2. 创建您的功能分支 (`git checkout -b feature\u002FAmazingFeature`)。\n3. 提交您的更改 (`git commit -m '添加一些 AmazingFeature'`)。\n4. 推送到该分支 (`git push origin feature\u002FAmazingFeature`)。\n5. 打开拉取请求。\n\n### 代码风格\n\n- 遵循 Swift API 设计指南。\n- 使用 SwiftUI 最佳实践。\n- 维持 MVVM 架构。\n- 为复杂逻辑添加注释。\n- 编写描述性的提交信息。\n\n## 许可证\n\n本项目采用 MIT 许可证授权——详情请参阅 [LICENSE](LICENSE) 文件。\n\n## 致谢\n\n- 使用 Swift 和 SwiftUI 构建。\n- 专为 macOS Sonoma 及更高版本设计。\n- 使用 Claude AI 的用量 API。\n- 灵感来源于对更好用量可视化的需求。\n\n## 免责声明\n\n本应用与 Anthropic PBC 无关联、未获其认可或赞助。Claude 是 Anthropic PBC 的商标。本工具为独立第三方开发，用于个人用量监控。\n\n## AI 透明度\n\n本项目采用 AI 辅助的工作流程开发（主要通过 Happy 使用 Claude Code）。我们相信人类开发者与 AI 工具之间应保持透明的合作关系。\n\n---\n\n\u003Cdiv align=\"center\">\n  \u003Csub>为 Claude AI 社区打造\u003C\u002Fsub>\n\u003C\u002Fdiv>","# Claude Usage Tracker 快速上手指南\n\nClaude Usage Tracker 是一款专为 macOS 设计的原生菜单栏应用，用于实时监控 Claude AI 的使用限额（会话窗口、周限额及 API 消耗）。它支持多账号管理、终端状态行集成及自动化通知。\n\n## 环境准备\n\n在开始之前，请确保满足以下条件：\n\n*   **操作系统**：macOS 14.0 (Sonoma) 或更高版本。\n    *   *检查方法*：点击苹果菜单  > 关于本机。\n*   **账号要求**：拥有有效的 Claude AI 账号 ([claude.ai](https:\u002F\u002Fclaude.ai))。\n*   **认证方式（任选其一）**：\n    1.  **推荐**：已安装并登录 [Claude Code CLI](https:\u002F\u002Fclaude.com\u002Fclaude-code)（应用可自动同步凭证）。\n    2.  **内置浏览器**：通过应用内嵌浏览器直接登录（v3.0.2+ 支持）。\n    3.  **手动配置**：从浏览器中提取 `sessionKey`。\n\n> **注意**：若需使用终端状态行（Statusline）功能，即使使用了 Claude Code OAuth，仍需手动配置 Session Key。\n\n## 安装步骤\n\n### 方式一：Homebrew 安装（推荐）\n\n这是最简便的安装方式，支持自动更新。\n\n```bash\n# 添加仓库并安装\nbrew tap hamed-elfayome\u002Fclaude-usage\nbrew install --cask claude-usage-tracker\n```\n\n**更新应用**：\n```bash\nbrew upgrade --cask claude-usage-tracker\n```\n\n**卸载应用**：\n```bash\nbrew uninstall --cask claude-usage-tracker\n```\n\n### 方式二：直接下载安装\n\n1.  下载最新安装包：[Claude-Usage.zip](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Flatest\u002Fdownload\u002FClaude-Usage.zip)\n2.  解压下载的 `.zip` 文件。\n3.  将 `Claude Usage.app` 拖入 **应用程序 (Applications)** 文件夹。\n4.  双击运行即可。\n\n> **说明**：v2.0.0+ 版本已使用 Apple 开发者证书签名，无需绕过安全限制即可直接运行。\n\n### 方式三：源码构建\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker.git\ncd Claude-Usage-Tracker\nopen \"Claude Usage.xcodeproj\"\n# 在 Xcode 中按 ⌘R 构建并运行\n```\n\n## 基本使用\n\n### 场景 A：自动配置（适用于 Claude Code 用户）\n\n如果你已安装并登录了 Claude Code CLI，应用将自动检测凭证，无需额外操作。\n\n1.  确保终端中已执行 `claude login` 并登录成功。\n2.  启动 **Claude Usage Tracker**。\n3.  点击菜单栏图标，即可立即看到使用统计信息。\n\n### 场景 B：内置浏览器登录（适用于普通网页用户）\n\n如果你未使用 CLI，可通过应用内嵌浏览器直接登录。\n\n1.  点击菜单栏图标，选择 **Settings (设置)**。\n2.  进入 **Personal Usage** 标签页。\n3.  点击 **Sign in to Claude.ai**，弹出内置浏览器窗口。\n4.  输入账号密码或使用 Google SSO 登录。\n5.  登录成功后，应用会自动提取 Session Key 并验证，选择对应的组织即可保存。\n\n### 场景 C：手动配置 Session Key\n\n如果需要手动提取凭证：\n\n**第一步：获取 Session Key**\n1.  在浏览器访问 [claude.ai](https:\u002F\u002Fclaude.ai) 并登录。\n2.  打开开发者工具：\n    *   Chrome\u002FEdge: 按 `F12` 或 `Cmd+Option+I`\n    *   Safari: 需在偏好设置中开启“开发”菜单，然后按 `Cmd+Option+I`\n3.  进入 **Application** (Chrome\u002FEdge) 或 **Storage** (Firefox) 标签页。\n4.  展开 **Cookies** -> 选择 `https:\u002F\u002Fclaude.ai`。\n5.  找到名为 `sessionKey` 的项，复制其值（格式通常为 `sk-ant-sid01-...`）。\n\n**第二步：填入应用**\n1.  点击菜单栏图标 > **Settings** > **Personal Usage**。\n2.  展开 **Advanced: Manual Session Key**。\n3.  粘贴刚才复制的 Key，点击 **Test Connection**。\n4.  选择组织并点击 **Save Configuration**。\n\n### 后续优化建议\n\n*   **自定义图标**：前往 `Settings` > `Appearance` 切换图标风格（支持 5 种样式及多种颜色模式）。\n*   **开启通知**：在 `Settings` > `Notifications` 中设置用量阈值提醒。\n*   **终端集成**：在 `Settings` > `Claude Code` 中配置终端状态行，可在命令行实时显示模型、上下文及用量信息。\n*   **多账号管理**：支持创建无限数量的配置文件（Profile），可在菜单栏同时监控多个账号，并支持快捷键快速切换。","资深后端工程师李明正在利用 Claude Opus 模型重构核心微服务架构，需要在长达数小时的编码会话中频繁调用 AI 生成代码并审查逻辑。\n\n### 没有 Claude-Usage-Tracker 时\n- **盲目消耗配额**：只能手动刷新网页查看剩余额度，常在关键调试阶段突然发现 5 小时会话窗口耗尽，导致工作流被迫中断。\n- **多账号管理混乱**：同时维护个人版和企业版多个账号时，极易混淆当前使用的凭证，偶尔误用低配额账号处理重型任务。\n- **缺乏成本感知**：无法实时看到 API 调用的具体花费和速率限制（Pace），往往在月底收到账单或触发限流报错后才意识到使用过度。\n- **终端上下文割裂**：在命令行使用 Claude Code 时，无法直接在终端状态栏查看当前模型的上下文占用率和配额状态，需频繁切换窗口。\n\n### 使用 Claude-Usage-Tracker 后\n- **实时可视化监控**：菜单栏图标直接以颜色编码（从舒适到失控）展示剩余额度和 5 小时窗口进度，让李明在配额告急前从容切换策略。\n- **智能多 profile 协同**：自动同步 CLI 凭证并支持一键切换不同账号，确保重型重构任务始终运行在高配额的企业账号上，隔离个人测试流量。\n- **精细化成本掌控**：内置图表实时追踪每日 API 成本和速率标记，帮助李明动态调整请求频率，避免突发限流并优化预算分配。\n- **终端无缝集成**：在 Terminal 状态栏直接显示当前目录、分支、模型及彩色用量条，无需离开代码环境即可掌握所有关键指标。\n\nClaude-Usage-Tracker 将原本黑盒化的 AI 配额管理转化为透明、可预测的本地化工作流，彻底消除了开发者因资源不可见而产生的焦虑与中断。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhamed-elfayome_Claude-Usage-Tracker_13d0bb2e.jpg","hamed-elfayome","hamed elfayome","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhamed-elfayome_c631536b.jpg",null,"hamedelfayome@gmail.com","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome",[83,87],{"name":84,"color":85,"percentage":86},"Swift","#F05138",99.8,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.2,1988,100,"2026-04-10T15:30:39","MIT",1,"macOS","不需要 GPU","未说明",{"notes":100,"python":101,"dependencies":102},"该工具是一个原生 macOS 菜单栏应用，非 Python 项目。需要 macOS 14.0 (Sonoma) 或更高版本。支持通过 Homebrew 安装、直接下载.app 文件或从源码使用 Xcode 构建。无需 NVIDIA GPU、CUDA 或 Python 环境。主要依赖系统自带的 Swift 和 SwiftUI 框架。","不需要 Python",[103,104],"Swift 5.0+","SwiftUI 5.0+",[15,25],[107,108,109,110,111,112],"claude","claude-ai","claude-code","claudecode","macos","usage-application","2026-03-27T02:49:30.150509","2026-04-11T08:12:54.019675",[116,121,126,131,136,141],{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},28992,"刷新按钮点击后无反应或静默失败，数据未更新怎么办？","这通常是由于系统长时间休眠或认证令牌过期导致的。尝试以下解决方法：\n1. 进入设置（Settings），找到 Claude Code CLI 账户选项。\n2. 点击“重新同步”（Re-sync）或重新连接账户。\n3. 再次点击刷新按钮。\n注意：在 v3.0.0 及更高版本中该问题已有所改进，但如果问题依旧，请检查是否仅使用了 CLI 账户认证。维护者建议在后续版本中增加自动刷新机制和更明确的错误提示（如成功显示勾号❌，失败显示叉号❌）。","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fissues\u002F105",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},28993,"如何查看 API 余额（Balance）信息？","API 余额信息默认可能不会立即显示。请尝试点击弹出窗口（popover）中的刷新按钮，等待片刻后余额信息会出现。\n显示逻辑为：进度条表示 已用额度 \u002F (剩余额度 + 已用额度)。\n如果使用的是 v3.0.0 之前版本，可能需要手动刷新才能触发数据加载。维护者确认该功能存在，并计划在未来增加当剩余额度低于设定限制时的通知功能。","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fissues\u002F5",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},28994,"周用量和会话用量数据停滞不前，不再更新如何解决？","如果在 v2.3.0 版本中发现周用量和会话用量停止更新（即使 Sonnet 用量正常），且重启应用或手动刷新无效，这可能是因为 Anthropic 服务端发生了变化或存在多配置文件冲突。\n解决方案：\n1. 升级到 v3.0.0 或更高版本，该版本重构了数据获取逻辑并修复了此类问题。\n2. 如果升级后仍无效，检查是否同时运行了两个配置文件（profiles），尝试暂时禁用其中一个测试。\n3. 维护者已在 v3.0.0 中合并了社区的相关修复，建议不再使用旧版本。","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fissues\u002F153",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},28995,"在 Apple Remote Desktop 远程连接时，菜单栏图标不显示怎么办？","这是一个在头枕模式（headless）或远程桌面环境下已知的问题。\n解决方法：\n1. 确保使用的是最新版本的测试构建版或正式版（v2.1.1 之后已有修复）。\n2. 维护者曾提供过特定的测试版本链接供用户验证修复效果（通过 GitHub Actions 构建）。\n3. 如果问题依然存在，尝试完全退出应用后重新启动，或者在本地登录会话中启动应用后再切换回远程桌面。多数用户反馈在更新版本后该问题已自行解决。","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fissues\u002F77",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},28996,"禁用后再启用圆形显示项，状态栏图标无法恢复显示怎么办？","在 v2.3.0 版本中存在一个 Bug：当用户在设置中将“会话用量”或“周限额”的圆形显示项禁用后重新启用，状态栏图标可能不会重新出现。\n临时解决方法：\n1. 尝试完全退出应用（Quit）并重新启动。\n2. 或者切换到其他显示样式再切回圆形样式。\n根本解决：该问题已在后续的 v3.0.0 大版本更新中得到修复，建议升级到最新版本以获得稳定的图标切换体验。","https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fissues\u002F97",{"id":142,"question_zh":143,"answer_zh":144,"source_url":125},28997,"进度条显示的累计支出是指哪个时间段的？","进度条显示的是当前计费周期（通常为每月）的累计支出情况。\n计算逻辑为：已用额度 \u002F (剩余额度 + 已用额度)。\n由于 Anthropic 的额度通常在每月重置，因此该进度条反映了本月内的消费与信用额度的比例。如果支出超过信用额度，进度条会向右延伸；如果信用额度充足，则显示在左侧。这对于规划月度支出的用户非常有用。",[146,151,156,161,166,171,176,181,186,191,196,201,206,211,216,221,226,231,236,241],{"id":147,"version":148,"summary_zh":149,"released_at":150},197829,"v3.0.3","### 6级节奏系统\n- **节奏状态引擎**：新增 `PaceStatus` 枚举，包含6个紧急程度等级——舒适、按计划、升温、紧迫、关键、失控——根据当前使用速率预测本周期结束时的用量。\n- **菜单栏节奏标记**：在进度条上以粗体 `┃` 标记显示已用时间位置，并根据6级节奏着色（绿色→青色→黄色→橙色→红色→紫色）。\n- **状态行节奏标记**：在终端的 ASCII 进度条中，于正确的时间位置插入 ANSI 颜色的 `┃`。\n- **弹出窗口节奏标记**：时间标记由原来的 1.5px 线条升级为 2.5px 圆角矩形，并根据节奏状态着色。\n- **独立开关**：“显示节奏标记”和“节奏等级颜色”可在菜单栏和状态行设置中分别控制。\n### 3种颜色模式（菜单栏+状态行）\n- **多色模式**：基于阈值的颜色用于用量指示器（默认行为）。\n- **灰度模式**：不使用颜色——适应菜单栏外观或终端主题。\n- **单色模式**：用户可自定义一个十六进制颜色，并应用于所有元素。\n- **颜色模式界面**：新增“状态行颜色”设置卡片，包含3个可选模式按钮及单色模式下的 ColorPicker。\n- **向后兼容**：旧的 `monochromeMode: true\u002Ffalse` 自动迁移至新的 `colorMode` 系统。\n### 标签与格式化开关\n- **显示\u002F隐藏“Ctx:”标签**：切换上下文显示前的 `Ctx:` 前缀。\n- **显示\u002F隐藏“Usage:”标签**：切换用量显示前的 `Usage:` 前缀。\n- **显示\u002F隐藏“Reset:”标签**：切换重置时间前的 `Reset:` 前缀。\n- **24小时制时间格式**：覆盖系统时间格式，用于重置时间显示（状态行和预览均适用）。\n### 终端匹配预览\n- **ANSI 颜色预览**：ClaudeCodeView 预览现以 ANSI 等效的终端颜色渲染——目录蓝色、分支绿色、模型黄色、个人资料洋红、上下文青色，用量则采用10级渐变。\n- **实时节奏颜色**：当启用步骤颜色时，预览中的节奏标记会根据实际节奏等级着色。\n- **真实数据**：预览优先使用实际用量数据，而非静态演示值。\n### 新工具函数\n- **Color+Extensions.swift**：新增 `Color(hex:)` 初始化方法、`toHex()` 方法、`hexString` 属性，以及用于十六进制颜色转换的 `NSColor(hex:)`。\n- **Date.roundedToNearestMinute()**：去除重置时间中的秒数，以防止显示闪烁。\n### 错误修复\n- **CPU 自旋循环修复**：修复了因每个按钮的 `effectiveAppearance` KVO 导致无限重绘循环而引发的 104% CPU 使用率问题——改用单一的 `NSApp` 观察者，并通过图像数据缓存去重来优化性能。\n- **重置时间四舍五入**：重置时间现四舍五入到最接近的分钟，以避免在例如 6:59 和 7:00 之间反复跳动。\n- **节奏标记恢复**：会话重置后，节奏标记能够正确保留。\n### 重构\n- **MenuBarManager**：移除了空的 `observeAppearanceChanges()` 无操作方法和未使用的 `appearanceObserver`；简化了 `statusBarAppearanceDidChange()` 方法，移除了防抖定时器（由于图像缓存的存在，此举安全可靠）。\n- **StatusBarUIManager**：`ima","2026-03-10T20:43:58",{"id":152,"version":153,"summary_zh":154,"released_at":155},197830,"v3.0.2","### API 成本跟踪与使用监控\n- **API 成本仪表盘**：按月跟踪 API 成本，提供每日柱状图、按 API 密钥细分以及按模型的成本详情——数据来自控制台的 `\u002Fusage_cost` 端点。\n- **速率限制头信息使用情况**：CLI OAuth 使用情况现通过 Messages API 的速率限制头信息（`anthropic-ratelimit-unified-*`）获取，不再依赖已停用的 `\u002Fapi\u002Foauth\u002Fusage` 端点——仅需发送一条极小的 Haiku 请求，几乎不产生费用。\n- **过期会话窗口处理**：新增 `effectiveSessionPercentage` 在 5 小时会话窗口过期时返回 0%，防止过时的高百分比值持续显示在 UI、菜单栏图标、通知及自动切换逻辑中。\n### 基于浏览器的身份验证\n- **WKWebView 登录**：为 Claude.ai 和 Anthropic 控制台提供嵌入式浏览器身份验证——登录后自动提取 `sessionKey` Cookie，支持 Google SSO。\n- **会话密钥过期跟踪**：每个配置文件分别存储 Cookie 过期日期，并在 API 控制台设置中以可视化状态指示器（已过期、即将过期、剩余时间）显示。\n- **手动密钥回退**：所有凭据视图和设置向导中均保留“高级：手动会话密钥”展开组，支持手动输入会话密钥。\n### 弹出框 UI 全面升级\n- **自适应高度弹出框**：弹出框高度现通过 `intrinsicContentSize` 动态匹配内容，不再采用固定的 600px 框架——根据可用数据自动伸缩。\n- **页眉重新设计**：移除 logo 图片；在页眉中添加设置齿轮图标按钮及刷新按钮，并配备悬停动画。\n- **移除页脚**：从弹出框页脚中移除退出按钮——退出功能现位于设置底部栏。\n- **API 成本卡片**：新增可展开卡片，展示每月总成本、每日成本柱状图以及按密钥的模型细分，并可通过点击展开源数据行。\n### 时间显示与格式化\n- **三档时间显示**：将二元的“显示剩余时间”开关替换为分段选择器——可选择重置时间、剩余时间或两者（例如：“将在 3 小时 45 分钟后重置（今天下午 3:59）”）。\n- **时间格式偏好**：新增 12 小时制、24 小时制或系统默认时间格式的设置——应用于所有弹出框的重置时间、图表标签及使用历史时间戳。\n- **优化持续时间字符串**：多日持续时间现以“Xd Yh”格式显示，而非仅显示“X 天”。\n### 设置与导航\n- **应用设置板块**：新增应用级首选项设置页面（登录时启动），配有 `gearshape.2.fill` 图标。\n- **底部栏标签**：设置底部栏项目现同时显示图标和文本标签；新增退出按钮，并添加红色悬停效果。\n- **更新部分移出底部栏**：为使布局更整洁，已将更新部分移出底部栏。\n### 视觉与色彩改进\n- **自适应绿色**：将所有硬编码的 `Color.green` 替换为 `Color.adaptiveGreen`——浅色模式下为深森林绿，深色模式下为亮绿色，以在半透明表面上获得更好的对比度。\n- **图表轴修复**：账单周期图表的 x 轴现使用正确的 `Date` 值，而非字符串标签，从而修复了不规则的问题。","2026-03-10T01:36:49",{"id":157,"version":158,"summary_zh":159,"released_at":160},197831,"v3.0.1","### 新增\n- **弹出窗口设置页**：新增“弹出窗口”下的应用级设置页，用于自定义弹出窗口的显示方式。\n- **显示剩余时间**：新增选项，可显示倒计时至重置时间（例如：“将在3小时45分钟后重置”），而非绝对的重置时间（例如：“今日凌晨3:59重置”）——该功能同时适用于单资料和多资料弹出窗口。\n### 修复\n- **多显示器下的CPU占用率**：修复了连接多个显示器时CPU占用率过高的问题——现已对界面变化监听器进行防抖处理，以避免不必要的重绘。","2026-03-08T21:56:31",{"id":162,"version":163,"summary_zh":164,"released_at":165},197832,"v3.0.0","### 重大发布 — 无头模式、使用历史、全局快捷键与界面全面升级\n本次更新包含14项以上新功能、7项以上错误修复，以及从 novastate 分支移植而来的12项改进。此版本新增了对无头 Mac 的支持、交互式使用历史图表、全局键盘快捷键、自动切换配置文件、无边框的活力设置窗口等功能。\n### 新增功能\n- **无头模式**：支持在无头 Mac 环境下使用远程桌面（如未连接显示器的 Mac mini\u002FMac Studio）。\n- **使用历史追踪**：提供交互式时间线图表（会话、周度、计费），支持 5 小时\u002F24 小时\u002F7 天\u002F30 天等时间尺度，并可导出为 JSON\u002FCSV 格式。\n- **全局键盘快捷键**：通过 Carbon API 配置热键（切换弹出窗口、刷新、打开设置、切换下一个配置文件），无需辅助功能权限。\n- **自动切换配置文件**：当会话限额达到时，自动切换到下一个可用配置文件。\n- **应用内反馈提示**：使用 7 天后显示反馈表单，仅收集匿名分析数据。\n- **移动应用“即将推出”**：面向未来移动伴侣的应用兴趣收集入口。\n- **支持页面**：集成 “Buy Me a Coffee” 和 GitHub Sponsors。\n- **网络日志与调试视图**：定时捕获网络请求与响应，并提供详细的查看器。\n- **Claude Code 状态行 — 模型名称**：在 CLI 状态行中显示当前使用的模型（Opus、Sonnet）。\n- **Claude Code 状态行 — 上下文窗口**：以百分比或令牌数形式显示上下文使用情况。\n- **Claude Code 状态行 — 配置文件名称**：在 CLI 状态行中显示当前活动的配置文件名称。\n- **用时标记**：在进度条上添加视觉标记，显示当前时间段已用时长。\n- **节奏感知色彩**：根据预计的周期结束使用情况动态调整指示颜色。\n- **多配置文件百分比样式**：新增适用于多配置文件模式的“30 · 4”百分比文本图标样式。\n- **简体中文（zh-cn）**：完整本地化支持（第 9 种语言），由 qianmoQ 贡献。\n- **简化设置向导**：首次启动时自动检测 CLI 设置（源自 novastate 分支移植）。\n- **钥匙串服务名称发现**：兼容 Claude Code v2.1.52 及以上版本的哈希钥匙串名称（移植自 novastate 分支）。\n- **唤醒后自动刷新**：从睡眠状态唤醒后，经过 10 秒防抖延迟自动刷新（移植自 novastate 分支）。\n- **过期数据与错误提示栏**：在弹出窗口中显示凭据过期、刷新失败及数据过时警告信息（移植自 novastate 分支）。\n- **超额额度余额**：在弹出窗口中显示超额余额（移植自 novastate 分支）。\n- **自定义通知阈值**：用户可自定义百分比阈值，并选择提示音（移植自 novastate 分支）。\n- **CLAUDE_CONFIG_DIR 支持**：尊重用户自定义的 Claude 配置目录环境变量（移植自 novastate 分支）。\n- **状态行使用缓存**：通过使用缓存文件实现 CLI 的即时渲染（移植自 novastate 分支）。\n- **所有 9 种语言新增 200 多条本地化字符串**。\n### 变更内容\n- **无边框设置窗口**：采用全活力设计，配备自定义交通信号灯、HUD 材质和圆角。\n- **设置侧边栏重新设计**：底部新增“关于”“调试”“支持”“更新”选项，宽度固定为 190pt。\n- **弹出窗口活力背景**：Al","2026-03-08T20:28:36",{"id":167,"version":168,"summary_zh":169,"released_at":170},197833,"v2.3.0","### 重大发布 - 多账号菜单栏显示与界面增强\n本次发布引入了革命性的多账号菜单栏显示系统，让您能够同时监控多个 Claude 账号。结合智能色彩适配、统一的用量计算功能，以及显示剩余与已用百分比的能力，v2.3.0 彻底改变了您追踪所有账号使用情况的方式。\n### 新增功能\n#### 多账号菜单栏显示\n- **多账号同时监控**：在菜单栏中一次性显示多个账号\n  - 新增“多账号”显示模式，可并排展示所有账号\n  - 每个账号以各自配置的图标样式和设置呈现\n  - 切换单账号\u002F多账号显示模式时动态更新\n  - 各账号会根据各自的刷新间隔独立自动刷新\n  - 点击任意账号图标即可打开该账号的弹出窗口\n- **账号显示模式切换**：轻松切换显示模式\n  - **单账号模式**：仅显示当前活跃账号（旧版行为）\n  - **多账号模式**：在菜单栏中同时显示所有账号\n  - 可在“管理账号”设置中进行切换\n  - 模式会在应用重启后保持不变\n  - 切换模式时过渡流畅\n- **智能账号图标管理**\n  - 每个账号保留自己的状态栏按钮和图标\n  - 支持为每个账号单独设置图标样式（电量、进度条、百分比等）\n  - 尊重各账号的单色模式设置\n  - 删除账号时自动清理相关图标\n  - 创建或删除账号时仍能保持正确的排列顺序\n#### 剩余与已用百分比显示\n- **可配置的百分比显示**（由 [@eliasyin](https:\u002F\u002Fgithub.com\u002Feliasyin) 贡献）\n  - 新增切换项：“显示剩余百分比而非已用百分比”\n  - 在每个账号的外观设置中启用\n  - 颠倒显示逻辑：75% 已用 → 25% 剩余\n  - 同时反转颜色编码：高剩余显示绿色，低剩余显示红色\n  - 适用于所有菜单栏图标样式\n  - 帮助用户关注“剩余预算”而非“已花费预算”\n#### 统一用量状态计算\n- **UsageStatusCalculator**：全新的集中式工具，用于一致地计算用量\n  - 是全应用范围内确定用量水平的唯一权威来源\n  - 同时支持“已用”和“剩余”百分比模式\n  - 颜色编码逻辑（绿\u002F橙\u002F红）会根据显示模式自动调整\n  - 具有全面的测试覆盖（UsageStatusCalculatorTests 包含 10 余个测试用例）\n  - 由 MenuBarIconRenderer、PopoverContentView 以及所有图标渲染器使用\n#### 菜单栏图标渲染增强\n- **多指标图标支持改进**\n  - 支持按账号显示不同指标（会话、每周、API）\n  - 同一指标下，每个账号可显示不同的图标样式\n  - 多账号同时显示时，图标间距和排列整齐合理\n  - 当账号设置变更时，图标会自动更新\n- **自适应色彩处理**\n  - 智能反色处理，用于剩","2026-01-23T03:55:52",{"id":172,"version":173,"summary_zh":174,"released_at":175},197834,"v2.2.3","### 新增\n- **设置向导横幅**：Claude Code 信息（在 CLI 凭据存在时显示）和数据迁移（从旧版本导入）\n- 手动迁移，成功后自动关闭\n- 完整本地化，支持 8 种语言\n","2026-01-18T17:27:51",{"id":177,"version":178,"summary_zh":179,"released_at":180},197835,"v2.2.2","### 新增\n#### CLI OAuth 认证回退机制\n- **健壮的认证系统**，支持自动回退\n  - 优先使用 claude.ai 会话密钥作为主要认证方式\n  - 当会话密钥不可用时，自动回退至 Claude Code CLI OAuth\n  - 集成系统钥匙串管理 CLI OAuth 令牌\n  - 在 Profile 模型中实现令牌过期的自动检查\n  - 无需用户干预，实现无缝认证\n### 变更\n#### 自动启动会话优化\n- **简化自动启动逻辑**，提升可靠性\n  - 移除复杂的重置检测机制\n  - 直接检查会话进度为 0% 来简化触发逻辑\n  - 更新模型选择逻辑，确保正确记录使用情况\n  - 自动启动行为更加可预测\n### 技术改进\n- 增强 ClaudeAPIService，支持多认证方式\n- 改进 ClaudeCodeSyncService，优化令牌管理\n- 为网络客户端配置权限，确保正确的 API 访问\n- 图片资源优化调整\n","2026-01-18T16:39:16",{"id":182,"version":183,"summary_zh":184,"released_at":185},197836,"v2.2.1","### 新增\n- **Sonnet 每周用量跟踪**：在显示总每周用量的同时，新增 Claude Sonnet 3.5 的专属每周用量\n  - 在 ClaudeUsage 模型中新增 `sonnetWeeklyTokensUsed` 和 `sonnetWeeklyPercentage` 字段\n  - 已添加至气泡提示展示，并支持全部 8 种语言的本地化\n  - 数据从 API 的 `seven_day_sonnet_3_5` 字段解析而来\n### 修复\n- **自动启动会话的可靠性**：修复 Mac 睡眠\u002F唤醒后自动启动会话不生效的问题\n  - 添加了 `NSWorkspace.didWakeNotification` 观察者，用于监听 Mac 唤醒事件\n  - 当 Mac 从睡眠状态唤醒时，会立即执行检查，以捕获睡眠期间发生的会话重置情况\n  - 在服务启动时增加了一次即时的初始检查，确保状态正确初始化\n  - 实现了防抖处理（10 秒窗口），避免重复检查\n  - 将定时器容差设置为 30 秒，以提升能源效率\n  - 现在即使经过较长时间的睡眠，会话也能可靠地自动启动。","2026-01-13T22:12:17",{"id":187,"version":188,"summary_zh":189,"released_at":190},197837,"v2.2.0","### 重大发布 - 多账号管理系统\n本次重大发布引入了全面的多账号支持，允许您管理无限数量的 Claude 账号，并实现凭据的自动切换及每个账号的独立设置。结合 Claude Code CLI 集成和韩语支持，v2.2.0 标志着这款应用的一次重要升级。\n### 新增功能\n#### 多账号系统\n- **无限账号**：为不同的 Claude 账号创建并管理无限数量的个人资料\n  - 每个个人资料拥有独立的凭据、设置和使用数据\n  - 趣味十足的自动生成名称（“量子羊驼”、“狡猾企鹅”、“涡轮树懒”等）\n  - 支持自定义命名——您可以将个人资料重命名为任何喜欢的名字\n  - 可删除个人资料（但必须保留至少一个）\n  - 记录上次使用时间戳\n- **账号切换器**：在多个位置快速切换个人资料\n  - 弹出式头部下拉菜单显示个人资料徽章\n  - 设置侧边栏选择器带有可视化指示标志\n  - 专门的“管理个人资料”选项卡，提供完整的个人资料管理功能\n  - 个人资料徽章会显示 Claude.ai 和 CLI 的登录状态\n- **每个账号的独立设置**：每个个人资料都维护独立的配置\n  - 凭据：Claude.ai 会话密钥、组织 ID、API 密钥\n  - 界面外观：图标样式、单色模式（共 5 种图标样式可供选择）\n  - 刷新间隔：5 至 300 秒\n  - 自动启动会话：可按个人资料单独启用或禁用\n  - 通知：独立的阈值提醒（75%、90%、95%）\n  - 使用数据：按个人资料分别记录和存储\n#### Claude Code CLI 集成\n- **ClaudeCodeSyncService**：用于 CLI 凭据管理的新服务\n  - 可从当前登录的 Claude Code 账号一键同步\n  - 从系统钥匙串中读取凭据（`Claude Code-credentials`）\n  - 按个人资料分别存储凭据，实现隔离管理\n  - 集成了安全命令，用于钥匙串的读写操作\n- **自动凭据切换**：CLI 账号无缝切换\n  - 更换个人资料时，CLI 凭据会自动更新\n  - 系统钥匙串将更新为所选个人资料的凭据\n  - Claude Code 会自动切换到该个人资料对应的账号\n  - 切换前的智能重新同步功能可捕获 CLI 登录状态的任何变化\n- **CLI 账号设置选项卡**：专为 CLI 管理设计的用户界面\n  - 同步状态显示（已同步\u002F未同步）\n  - 掩码显示访问令牌\n  - 订阅类型和权限范围信息\n  - 提供一键同步与移除操作\n  - 最后一次同步的时间戳\n- **自动更新终端状态行**：终端状态行始终保持同步\n  - 切换个人资料时，状态行脚本会自动更新\n  - 组织 ID 和会话密钥会自动注入\n  - 无需手动重新配置\n#### 自动启动会话服务（按个人资料）\n- **AutoStartSessionService**：后台监控所有个人资料\n  - 每 5 分钟检查一次，监控所有启用了自动启动功能的个人资料\n  - 检测会话重置（使用量降至 0%）\n  - 自动使用 Claude 3.5 Haiku 初始化新会话\n  - 按个人资料","2026-01-11T23:34:45",{"id":192,"version":193,"summary_zh":194,"released_at":195},197838,"v2.1.2","### 修复\n#### 状态栏脚本更新\n- **条件性脚本更新** - 脚本现在仅在已安装时才会更新\n  - 添加了带有安装检查的 `updateScriptsIfInstalled()` 方法\n  - 避免在未配置状态栏时出现错误\n  - 将 `isInstalled()` 改为计算属性，使语法更简洁\n  - 修复了应用尝试更新不存在脚本的问题\n#### 组织 ID 处理\n- **直接注入组织 ID** - 现在直接将组织 ID 注入脚本，而非通过 API 获取\n  - 移除了 Swift 状态栏脚本中的 API 调用 (`fetchOrganizationId()`)\n  - 组织 ID 直接从注入的值中读取（类似于会话密钥）\n  - 消除了状态栏执行过程中不必要的网络请求\n  - 提升了性能和可靠性\n#### 错误处理\n- **新增错误情况** - 添加了 `organizationNotConfigured` 错误\n  - 当未设置组织时显示清晰的错误信息\n  - 在状态栏配置过程中提供更好的用户反馈\n  - 防止在设置不完整的情况下安装脚本\n### 贡献者\n- [@oomathias](https:\u002F\u002Fgithub.com\u002Foomathias) - 组织 ID 注入修复","2026-01-10T16:43:16",{"id":197,"version":198,"summary_zh":199,"released_at":200},197839,"v2.1.1","### Added\n#### Next Session Time Display (contributed by [@khromov](https:\u002F\u002Fgithub.com\u002Fkhromov))\n- **Session reset countdown in menu bar icon** - See exactly when your next 5-hour session starts\n  - Displays time until next session in HH:MM format (e.g., \"2:45\" for 2 hours 45 minutes)\n  - Shows \"in \u003C1h\" when less than an hour remains\n  - Automatically updates as time progresses\n  - Toggle on\u002Foff in Appearance Settings\n  - Works with all icon styles\n  - Clean, compact display that fits naturally in the menu bar\n#### Enhanced Date Utilities\n- **New time formatting helpers** in Date+Extensions\n  - `timeUntilSessionReset(from:)` - Calculates hours and minutes until next session\n  - `formattedTimeUntilReset(from:)` - Returns human-readable time string\n### Changed\n#### Menu Bar Icon Configuration\n- **Extended MenuBarIconConfig** - New `showTimeToNextSession` property\n  - Per-metric configuration support\n  - Persistent storage via DataStore\n  - Default: enabled for better user awareness\n#### Appearance Settings\n- **Session time toggle** - New option in Appearance Settings tab\n  - Easy enable\u002Fdisable of time-to-next-session display\n  - Located in MetricIconCard for per-metric control\n  - Applies to all configured menu bar icons\n### Fixed\n- **Time formatting for sessions under 1 hour** - Fixed display bug showing incorrect format\n  - Properly shows \"in \u003C1h\" when less than 60 minutes remain\n  - Prevents confusion with negative or invalid time displays\n### Contributors\n- [@khromov](https:\u002F\u002Fgithub.com\u002Fkhromov) (Stanislav Khromov) - Next session time display feature\n","2026-01-05T22:08:23",{"id":202,"version":203,"summary_zh":204,"released_at":205},197840,"v2.1.0","### Enhanced User Experience - Smart Setup Wizard & Modern APIs\nThis release brings a completely redesigned setup experience with a 3-step wizard flow that makes configuration intuitive and error-free. Combined with modernized notification APIs and critical UX fixes, v2.1.0 significantly improves the onboarding and daily usage experience.\n### Added\n#### 3-Step Wizard Setup Flow (contributed by [@alexbartok](https:\u002F\u002Fgithub.com\u002Falexbartok))\n- **Redesigned Initial Setup Wizard** - Complete overhaul of first-run experience\n  - **Step 1: Enter Session Key** - Test your session key without saving\n    - Non-destructive validation using new `testSessionKey()` API method\n    - Discovers all organizations associated with your account\n    - Clear validation feedback with detailed error messages\n    - Auto-advances to next step on success\n  - **Step 2: Select Organization** - Choose which organization to track\n    - Visual organization selector with radio buttons\n    - Displays organization name and UUID\n    - Auto-selects first organization for convenience\n    - Prevents common 403 errors from wrong organization selection\n  - **Step 3: Confirm & Save** - Review and finalize configuration\n    - Configuration summary with masked session key\n    - Selected organization details\n    - Auto-start session toggle (moved from Step 1)\n    - Only saves to Keychain when explicitly confirmed\n- **Visual Progress Indicator**\n  - Step circles (1, 2, 3) with color-coded states\n  - Connecting lines turn green when steps are completed\n  - Current step highlighted in accent color\n  - Completed steps show checkmark icons\n- **Personal Usage Settings Wizard** - Settings tab now uses same 3-step flow\n  - Consistent UX between initial setup and settings configuration\n  - Smart organization preservation (only clears when key actually changes)\n  - Clear navigation with Back\u002FNext buttons\n  - Prevents accidental data loss during reconfiguration\n#### Modern Notification System\n- **UNUserNotificationCenter Integration** - Replaced deprecated macOS 11.0 APIs\n  - Migrated from `NSUserNotification` to `UNUserNotificationCenter`\n  - All notifications now use modern UserNotifications framework\n  - Success notifications for user-triggered actions\n  - Proper notification categories (`SUCCESS_ALERT`, `INFO_ALERT`, `USAGE_ALERT`)\n- **Centralized Notification Architecture**\n  - New `sendSuccessNotification()` method in NotificationManager\n  - All notification logic consolidated in NotificationManager service\n  - Silent success notifications (no sound, 2-second auto-dismiss)\n  - Consistent error logging and handling\n### Changed\n#### API Service Enhancements (contributed by [@alexbartok](https:\u002F\u002Fgithub.com\u002Falexbartok))\n- **Non-Destructive Session Key Testing**\n  - New `testSessionKey()` method validates without saving to Keychain\n  - Returns list of discovered organizations\n  - Prevents premature saving that caused configuration issues\n  - Enables proper organization selection before commitment\n- **Smart Organization Preservation**\n  - Enhanced `saveSessionKey()` with `preserveOrgIfUnchanged` parameter\n  - Only clears organization ID when session key actually changes\n  - Prevents data loss during reconfiguration\n  - Targeted refresh notifications (session key vs. organization changes)\n- **Notification Extensions**\n  - New `.organizationChanged` notification for independent organization updates\n  - MenuBarManager observes organization changes separately from session key\n  - More granular refresh control\n### Fixed\n#### Menu Bar Icon Flicker (contributed by [@alexbartok](https:\u002F\u002Fgithub.com\u002Falexbartok))\n- **Smooth Refresh Experience** - Icons no longer briefly show zeros during data refresh\n  - Removed clearing of usage data during refresh process\n  - Old data remains visible until new data arrives\n  - Prevents visual \"flashing\" that was jarring to users\n  - Maintains professional appearance during background updates\n#### Setup Wizard Issues (contributed by [@alexbartok](https:\u002F\u002Fgithub.com\u002Falexbartok))\n- **Fixed 403 Errors** - Resolved critical issue where saving after organization selection would fail\n  - \"Test Connection\" and \"Save\" no longer clear organization IDs prematurely\n  - Proper organization selection workflow prevents API authentication errors\n  - Smart preservation ensures configuration consistency\n- **Visual Guidance** - Users now have clear indication of setup progress\n  - No more confusion about what step they're on\n  - Clear path forward with visual progress indicator\n  - Prevents incomplete configurations\n#### Deprecation Warnings\n- **Eliminated NSUserNotification Warnings** - Removed all 3 macOS 11.0 deprecation warnings\n  - Replaced deprecated APIs throughout MenuBarManager\n  - App now fully compatible with modern macOS notification system\n  - Cleaner build output with no deprecation warnings\n  - Future-proof notification implementation\n### Technical Improvements\n#### Architecture\n- **Protocol Conformance** - NotificationManager follows service","2025-12-29T23:37:43",{"id":207,"version":208,"summary_zh":209,"released_at":210},197841,"v2.0.0","### Major Release - Professional Grade Security & User Experience\nThis major release represents a significant milestone for Claude Usage Tracker, bringing professional-grade features including official Apple code signing, automatic updates, and enterprise-level security.\n### Added\n#### Official Apple Code Signing\n- **Professionally signed application** with Apple Developer certificate\n  - No more security warnings or workarounds on installation\n  - Seamless installation experience like any other Mac app\n  - Full macOS Gatekeeper compatibility\n  - Users can now install by simply double-clicking the app\n#### Automatic Updates (Sparkle Framework)\n- **In-app update system** powered by Sparkle framework\n  - Automatic update checking and notifications\n  - One-click update installation\n  - Secure update delivery with code signature verification\n  - New Updates Settings tab for managing update preferences\n  - Configurable update check frequency\n  - Release notes displayed within the app\n#### Enhanced Security\n- **Keychain Integration** - Session keys now stored securely in macOS Keychain\n  - Migration from file-based and UserDefaults storage to Keychain\n  - Automatic one-time migration on first launch of v2.0\n  - Enhanced security for API credentials\n  - KeychainService and KeychainMigrationService implementation\n  - Secure storage for both web and API session keys\n#### Multi-Language Support (Internationalization)\n- **6 Language Support** - Comprehensive localization across the entire application\n  - English (en)\n  - Spanish (es)\n  - French (fr)\n  - German (de)\n  - Italian (it)\n  - Portuguese (pt)\n- **Language Switcher** in General Settings\n  - LanguageManager and LocalizationManager for dynamic language switching\n  - Localized strings for all UI components\n  - Localized notification messages\n  - Validation script for ensuring translation completeness\n#### Multi-Metric Menu Bar Icons\n- **Multiple Simultaneous Icons** - Display separate menu bar icons for different metrics\n  - Configure independent icons for session, weekly, and opus usage\n  - MenuBarIconConfig for flexible icon configuration\n  - MenuBarIconRenderer for modular rendering logic\n  - Per-metric customization (icon style, monochrome mode)\n  - Global settings with metric-specific overrides\n#### Advanced Error Handling System\n- **Comprehensive Error Framework** - Professional error handling throughout the app\n  - AppError enum with categorized error types\n  - ErrorLogger for detailed error tracking\n  - ErrorPresenter for user-friendly error messages\n  - ErrorRecovery with automatic recovery suggestions\n  - Enhanced error feedback in UI components\n  - Improved debugging and troubleshooting\n#### Session Key Validation\n- **Robust Validation System** - Enhanced session key validation and API security\n  - SessionKeyValidator with comprehensive validation rules\n  - Format validation (sk-ant-sid01- prefix)\n  - Length validation\n  - Character set validation\n  - URLBuilder for safer API endpoint construction\n  - Comprehensive test coverage (SessionKeyValidatorTests, URLBuilderTests)\n#### Network Monitoring\n- **Network Change Detection** - Automatic network status monitoring\n  - NetworkMonitor service for connectivity tracking\n  - Automatic retry on network restoration\n  - Better handling of offline scenarios\n  - User feedback when network is unavailable\n#### Launch at Login\n- **System Auto-Start** - Launch the app automatically on macOS login\n  - LaunchAtLoginManager for system integration\n  - Toggle in Session Management settings\n  - Proper cleanup on disable\n  - System-level integration (not login item)\n#### Code of Conduct\n- **Contributor Covenant Code of Conduct** - Community guidelines and standards\n  - Clear behavioral standards\n  - Enforcement procedures\n  - Community pledge\n### Changed\n#### API Service Architecture\n- **Refactored API Service** - Cleaner, more maintainable code structure\n  - ClaudeAPIService split into extensions (ConsoleAPI, Types)\n  - Improved organization ID fetching with session key parameter\n  - Enhanced error handling throughout API layer\n  - Better separation of concerns\n#### Icon Rendering System\n- **Modularized Icon Rendering** - Extracted to dedicated components\n  - MenuBarIconRenderer for centralized rendering logic\n  - MenuBar\u002FMenuBarManager+IconRendering.swift extension\n  - Optimized appearance change observation\n  - Better performance and maintainability\n#### Popover Management\n- **Multi-Popover Support** - Track and manage multiple menu bar buttons\n  - currentPopoverButton tracking\n  - Enhanced togglePopover for multiple buttons\n  - Improved cleanup and resource management\n  - Better state management\n#### Setup Wizard\n- **Streamlined First-Run Experience** - Simplified setup flow\n  - Removed icon style settings from wizard\n  - Immediate data refresh on session key save\n  - Session key observer for reactive updates\n  - Faster time-to-first-use\n#### UI Refinements\n- **Window Management** - All custom windows made non-restorabl","2025-12-28T21:53:30",{"id":212,"version":213,"summary_zh":214,"released_at":215},197842,"v1.6.2","### Fixed\n#### Settings UI Improvement\n- **Fixed sidebar tab click area** in Settings window\n    - Tabs now respond to clicks anywhere in the tab area, not just on the text\n    - Added `.contentShape(Rectangle())` to make entire button area clickable\n    - Improves user experience by making tab navigation more intuitive\n### Changed\n#### Release Pipeline Improvements\n- **Fixed GitHub Actions release workflow** to create working app bundles\n    - Added ad-hoc code signing to prevent \"damaged app\" errors on macOS\n    - Changed from `zip` to `ditto` for ZIP creation to preserve code signatures\n    - Updated from `macos-15` to `macos-14` runner for better compatibility\n    - Removed `xcpretty` dependency that was causing build failures\n- **Enhanced Homebrew Cask automation workflow**\n    - Added download verification with file size checks\n    - Added validation that cask file updates succeed\n    - Better error handling throughout the workflow\n- **Automated release process** now works end-to-end:\n    1. Push tag → Builds app with signing\n    2. Creates GitHub Release with working ZIP\n    3. Automatically updates Homebrew tap\n","2025-12-22T23:24:35",{"id":217,"version":218,"summary_zh":219,"released_at":220},197843,"v1.6.1","# What's Changed\r\n### Performance Fix - High CPU Usage Resolution\r\n\r\n## Issue Summary\r\n**Problem:** Claude Usage exhibited abnormally high CPU usage (10-35%) during normal operation, scaling with the number of connected displays.\r\n\r\n**Reported By:** Multiple users, particularly those with:\r\n- Multiple displays (2-3 monitors)\r\n- High-end Macs (M2 Max, M1 Pro)\r\n- Retina displays\r\n- Stage Manager enabled\r\n\r\n**Symptoms:**\r\n- 14% CPU usage on single display (idle state)\r\n- 20-25% CPU usage with dual displays\r\n- 30-35% CPU usage with triple displays\r\n- CPU usage jumped significantly when connecting external displays\r\n\r\n---\r\n\r\n## Root Cause Analysis\r\n\r\n### The Problem\r\nmacOS creates **multiple \"replicants\"** (copies) of menu bar items for:\r\n- Each connected display\r\n- Each Space\u002FDesktop\r\n- Stage Manager thumbnails\r\n- Mission Control views\r\n- Notification Center\r\n\r\n**Every 30 seconds**, the app was:\r\n1. Creating a **brand new NSImage from scratch** (17 lockFocus\u002FunlockFocus calls)\r\n2. Complex bezier path drawing with custom fonts\r\n3. Triggering `NSStatusItem._updateReplicants`\r\n4. Forcing macOS to re-render the icon for **every replicant**\r\n5. Calling `UserDefaults.synchronize()` (deprecated, blocks main thread)\r\n6. Publishing Combine updates even when data was identical\r\n\r\n**Result:** ~45% of CPU time spent in `_updateReplicantsUnlessMenuIsTracking` → `renderInContext`\r\n\r\n### Evidence from Activity Monitor Sampling\r\n```\r\nCall Stack (1726 samples):\r\n  __CFRunLoopDoTimers: 838 samples (48.6%)\r\n  └─ _updateReplicantsUnlessMenuIsTracking: 761 samples (44.1%)\r\n     └─ renderInContext: 415 samples (24%)\r\n```\r\n\r\n---\r\n\r\n## Solution Implemented\r\n\r\n### 1. **Image Caching System** \r\n**File:** `MenuBar\u002FMenuBarManager.swift`\r\n\r\nAdded intelligent caching that only regenerates images when necessary:\r\n\r\n```swift\r\n\u002F\u002F Cache key based on all visual factors\r\nlet cacheKey = \"\\(percentage)_\\(isDarkAppearance)_\\(iconStyle)_\\(monochromeMode)\"\r\n\r\n\u002F\u002F Skip expensive redraw if nothing changed\r\nif cachedImage != nil && cachedImageKey == cacheKey {\r\n    return  \u002F\u002F Reuse cached image\r\n}\r\n```\r\n\r\n**Impact:** 70% CPU reduction - Images only regenerate when:\r\n- Usage percentage changes\r\n- Dark\u002Flight mode switches\r\n- Icon style changes in settings\r\n- Monochrome mode toggles\r\n\r\n---\r\n\r\n### 2. **Removed Deprecated UserDefaults.synchronize()** \r\n**File:** `Shared\u002FStorage\u002FDataStore.swift`\r\n\r\nRemoved 12 instances of `defaults.synchronize()`:\r\n- Called every 30 seconds during refresh\r\n- Deprecated since macOS 10.14\r\n- Blocks main thread unnecessarily\r\n- UserDefaults auto-syncs periodically\r\n\r\n**Impact:** 10% CPU reduction - Eliminated main thread blocking\r\n\r\n---\r\n\r\n### 3. **Debounced Replicant Updates** \r\n**File:** `MenuBar\u002FMenuBarManager.swift`\r\n\r\nAdded 100ms debounce timer to prevent rendering congestion:\r\n\r\n```swift\r\nupdateDebounceTimer?.invalidate()\r\nupdateDebounceTimer = Timer.scheduledTimer(withTimeInterval: 0.1, ...) {\r\n    \u002F\u002F Update button image\r\n}\r\n```\r\n\r\n**Impact:** 10% CPU reduction - Prevents overlapping render operations\r\n\r\n---\r\n\r\n### 4. **Optimized Appearance Observer** \r\n**File:** `MenuBar\u002FMenuBarManager.swift`\r\n\r\nChanged from observing button appearance to NSApp appearance:\r\n\r\n```swift\r\n\u002F\u002F Before: Fired on every button context change\r\nbutton.observe(\\.effectiveAppearance, ...)\r\n\r\n\u002F\u002F After: Fires only on system-wide appearance changes\r\nNSApp.observe(\\.effectiveAppearance, ...)\r\n```\r\n\r\n**Impact:** 5% CPU reduction - Fewer redundant redraws\r\n\r\n---\r\n\r\n### 5. **Smart Cache Invalidation** \r\n**Files:** `MenuBar\u002FMenuBarManager.swift`\r\n\r\nClear cache only when necessary:\r\n- Appearance changes → `cachedImageKey = \"\"`\r\n- Icon style changes → `cachedImageKey = \"\"`\r\n- Forces fresh render on next update\r\n\r\n---\r\n\r\n## Expected Results\r\n\r\n| Configuration | Before | After | Improvement |\r\n|---------------|--------|-------|-------------|\r\n| Single Display | 14% | ~2-3% | **80% reduction** |\r\n| Dual Display | 20-25% | ~4-6% | **75-80% reduction** |\r\n| Triple Display | 30-35% | ~6-9% | **70-75% reduction** |\r\n\r\n---\r\n\r\n## Testing Instructions\r\n\r\n### Before Testing\r\n1. Open Activity Monitor\r\n2. Filter for \"Claude Usage\"\r\n3. Note CPU% with single display\r\n4. Connect external display(s)\r\n5. Note CPU% with multiple displays\r\n\r\n### After Update\r\n1. Update to v1.7.0+\r\n2. Repeat Activity Monitor test\r\n3. Expected: Dramatic CPU reduction\r\n4. Verify icon still updates every 30 seconds\r\n5. Verify appearance changes (dark\u002Flight mode) work\r\n6. Verify icon style changes in settings work\r\n\r\n---\r\n\r\n## Code Changes Summary\r\n\r\n### Modified Files\r\n1. `Claude Usage\u002FMenuBar\u002FMenuBarManager.swift`\r\n   - Added: Image caching properties\r\n   - Modified: `updateStatusButton()` with cache logic\r\n   - Modified: `observeAppearanceChanges()` to use NSApp\r\n   - Modified: `observeIconStyleChanges()` to invalidate cache\r\n\r\n2. `Claude Usage\u002FShared\u002FStorage\u002FDataStore.swift`\r\n   - Removed: All 12 `defaults.synchronize()` calls\r\n   - Added: Comments explaining why synchronize() is unnecessary\r\n\r\n### ","2025-12-21T23:25:33",{"id":222,"version":223,"summary_zh":224,"released_at":225},197844,"v1.6.0","## What's Changed\r\n\r\n#### API Console Usage Tracking\r\n- **New API Settings Tab** - Configure API console usage tracking separately from web usage\r\n  - API session key input field with validation\r\n  - Organization ID configuration\r\n  - Dual tracking capability: Monitor both claude.ai web usage and API console usage simultaneously\r\n  - API billing view integration\r\n\r\n- **API Usage Display** - Enhanced popover shows API console usage data\r\n  - Real-time API usage statistics\r\n  - Separate tracking from web usage metrics\r\n  - Seamless integration with existing usage views\r\n\r\n- **ClaudeAPIService Enhancements** - Extended API service to support multiple endpoints\r\n  - API console endpoint integration (`https:\u002F\u002Fapi.anthropic.com\u002Fv1\u002Forganization\u002F{org_id}\u002Fusage`)\r\n  - Dual authentication support (session cookie + API key)\r\n  - Parallel usage data fetching for both web and API\r\n\r\n#### Customizable Menu Bar Icon Styles\r\n- **5 Icon Style Options** - Choose your preferred menu bar display mode\r\n  - **Battery Style**: Classic battery indicator with fill level (original style)\r\n  - **Progress Bar**: Horizontal progress bar with percentage display\r\n  - **Percentage Only**: Minimalist text-only display\r\n  - **Icon with Bar**: Claude icon with integrated progress bar\r\n  - **Compact**: Space-efficient minimal design\r\n\r\n- **New Appearance Settings Tab** - Dedicated UI for visual customization\r\n  - Icon style picker with visual previews\r\n  - Live preview showing how each style looks\r\n  - Monochrome mode toggle (see below)\r\n  - Real-time updates when changing styles\r\n\r\n- **Monochrome Mode** - Optional black & white icon aesthetic\r\n  - Toggle for minimalist monochrome menu bar icons\r\n  - Removes colored indicators for clean appearance\r\n  - Works with all icon styles\r\n  - Perfect for users who prefer subtle menu bar presence\r\n\r\n- **StatusBarUIManager** - New component for menu bar icon rendering\r\n  - Centralized icon drawing logic for all styles\r\n  - Handles style switching seamlessly\r\n  - Manages monochrome mode rendering\r\n  - Optimized drawing performance\r\n\r\n#### Redesigned Settings Interface\r\n- **Modular Settings Architecture** - Complete refactor with separate view files\r\n  - **APIBillingView**: API console billing and usage display\r\n  - **AboutView**: Version info, credits, and links\r\n  - **AppearanceSettingsView**: Icon styles and visual preferences (new)\r\n  - **ClaudeCodeView**: Terminal statusline configuration\r\n  - **GeneralSettingsView**: Session key and refresh settings\r\n  - **NotificationsSettingsView**: Alert preferences\r\n  - **PersonalUsageView**: Individual usage tracking\r\n  - **SessionManagementView**: Auto-start configuration\r\n\r\n- **New Design System** - Reusable component library for consistent UI\r\n  - **SettingsCard**: Bordered container component for grouping settings\r\n  - **SettingToggle**: Standardized toggle switch with description\r\n  - **SettingsButton**: Consistent button styling (primary, secondary, danger variants)\r\n  - **SettingsInputField**: Text input with validation states\r\n  - **SettingsStatusBox**: Status message display with color coding\r\n  - **SettingsHeader**: Section headers with consistent styling\r\n  - **Typography System**: Standardized text styles (title, heading, body, caption, small)\r\n  - **Spacing System**: Consistent padding and margin values\r\n  - **Color System**: Centralized color definitions for light\u002Fdark mode\r\n\r\n- **IconStylePicker Component** - Visual icon style selection interface\r\n  - Grid layout with style previews\r\n  - Hover effects and selection states\r\n  - Clear style descriptions\r\n  - Intuitive selection UX\r\n\r\n#### Core Architecture Improvements\r\n- **Protocol-Oriented Design** - Enhanced modularity and testability\r\n  - **APIServiceProtocol**: Service layer abstraction\r\n  - **NotificationServiceProtocol**: Notification system interface\r\n  - **StorageProvider**: Storage abstraction for data persistence\r\n  - Dependency injection support for better testing\r\n\r\n- **Coordinator Pattern Implementation**\r\n  - **UsageRefreshCoordinator**: Orchestrates automatic data refresh cycles\r\n  - **WindowCoordinator**: Manages popover and detached window lifecycle\r\n  - **StatusBarUIManager**: Coordinates menu bar icon rendering\r\n  - Separation of concerns between navigation and business logic\r\n\r\n- **LoggingService** - Centralized logging system\r\n  - Categorized log levels (debug, info, warning, error)\r\n  - Consistent logging across the application\r\n  - Helps with debugging and troubleshooting\r\n  - Production-ready with configurable verbosity\r\n\r\n- **ValidationState Model** - Type-safe validation state representation\r\n  - States: idle, validating, success, error\r\n  - Used across settings UI for consistent validation feedback\r\n  - Improves UX with clear validation states\r\n\r\n#### Enhanced Data Storage\r\n- **Extended DataStore Capabilities**\r\n  - Icon style preference persistence\r\n  - Monochrome mode setting storage\r\n  - API configuration storage (API key, organization ID)\r\n  - Appearance preferences ","2025-12-21T03:01:40",{"id":227,"version":228,"summary_zh":229,"released_at":230},197845,"v1.5.0","## What's Changed\r\n* chore: add CI build workflow with correct Xcode version by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F26\r\n* fix: use macos-15 runner for Xcode 16 project format by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F27\r\n* feat: add XCTest target and unit tests by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F30\r\n* ci: add automated release workflow by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F32\r\n* docs: add .github\u002FREADME.md for CI\u002FCD reference by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F33\r\n* docs: Homebrew cask install via ggfevans tap by @ggfevans in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F35\r\n* Add GitHub star prompt and enhance popover UI by @hamed-elfayome in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F39\r\n\r\n## New Contributors\r\n* @hamed-elfayome made their first contribution in https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fpull\u002F39\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fcompare\u002Fv1.4.0...v1.5.0","2025-12-16T07:27:50",{"id":232,"version":233,"summary_zh":234,"released_at":235},197846,"v1.4.0","# Changelog\r\n\r\nAll notable changes to Claude Usage Tracker will be documented in this file.\r\n\r\nThe format is based on [Keep a Changelog](https:\u002F\u002Fkeepachangelog.com\u002Fen\u002F1.0.0\u002F),\r\nand this project adheres to [Semantic Versioning](https:\u002F\u002Fsemver.org\u002Fspec\u002Fv2.0.0.html).\r\n\r\n## [1.4.0] - 2025-12-15\r\n\r\n### Added\r\n\r\n#### Claude System Status Indicator\r\n- **Real-time Claude API Status** - Live status indicator in the popover footer\r\n  - Fetches status from `status.claude.com` API (Statuspage)\r\n  - Color-coded indicators: 🟢 Green (operational), 🟡 Yellow (minor), 🟠 Orange (major), 🔴 Red (critical), ⚪ Gray (unknown)\r\n  - Displays current status description (e.g., \"All Systems Operational\")\r\n  - Clickable row opens status.claude.com for detailed information\r\n  - Hover tooltip and subtle hover effect for better UX\r\n  - 10-second timeout prevents UI blocking on slow connections\r\n\r\n- **New ClaudeStatusService** - Dedicated service for status monitoring\r\n  - Async\u002Fawait implementation with proper error handling\r\n  - Automatic status refresh alongside usage data\r\n  - Graceful fallback to \"Status Unknown\" on failures\r\n\r\n- **ClaudeStatus Model** - Type-safe status representation\r\n  - `StatusIndicator` enum: none, minor, major, critical, unknown\r\n  - `StatusColor` enum for consistent color mapping\r\n  - Static factories for common states (.unknown, .operational)\r\n\r\n#### Detachable Popover\r\n- **Floating Window Mode** - Drag the popover to detach it into a standalone window\r\n  - Detaches by dragging the popover away from the menu bar\r\n  - Floating window stays above other windows (`NSWindow.Level.floating`)\r\n  - Close button only (minimal chrome) for clean appearance\r\n  - Window properly cleans up when closed\r\n  - Menu bar icon click toggles\u002Fcloses detached window\r\n\r\n#### GitHub Issue Templates\r\n- **Bug Report Template** (`bug_report.yml`) - Structured bug reporting\r\n  - Description, steps to reproduce, app version, macOS version fields\r\n  - Additional context section for logs\u002Fscreenshots\r\n  \r\n- **Feature Request Template** (`feature_request.yml`) - Feature suggestions\r\n  - Problem\u002Fuse case, proposed solution, alternatives considered\r\n  \r\n- **Documentation Template** (`documentation.yml`) - Docs improvements\r\n  - Issue location, suggested improvement fields\r\n\r\n- **Config** (`config.yml`) - Links to GitHub Discussions for questions\r\n\r\n#### Developer Documentation\r\n- **CONTRIBUTING.md** - Comprehensive contributor guide\r\n  - Development setup and prerequisites\r\n  - Project structure overview\r\n  - Code style guidelines (Swift API Design Guidelines)\r\n  - Commit message conventions (Conventional Commits)\r\n  - Branch naming conventions\r\n  - Pull request process with checklist\r\n  - Release process documentation\r\n\r\n### Fixed\r\n\r\n#### Popover Behavior\r\n- **Close on Outside Click** - Popover now properly closes when clicking outside\r\n  - Global event monitor for left and right mouse clicks\r\n  - Automatically stops monitoring when popover closes or detaches\r\n  - Prevents accidental dismissal while interacting with popover\r\n\r\n#### About View\r\n- **Dynamic Version Display** - Version number now reads from app bundle\r\n  - Pulls `CFBundleShortVersionString` from `Bundle.main`\r\n  - Falls back to \"Unknown\" if unavailable\r\n  - No more hardcoded version strings to update\r\n\r\n### Technical Improvements\r\n\r\n- **MenuBarManager Enhancements**\r\n  - Added `@Published var status: ClaudeStatus` for reactive status updates\r\n  - Integrated `ClaudeStatusService` for parallel status fetching\r\n  - `NSPopoverDelegate` implementation for detachable window support\r\n  - `NSWindowDelegate` for proper window lifecycle management\r\n  - Event monitor management for outside click detection\r\n\r\n- **PopoverContentView Updates**\r\n  - New `ClaudeStatusRow` component with hover effects\r\n  - `SmartFooter` now displays live Claude status\r\n  - Smooth animations for status transitions\r\n\r\nCloses #21 \r\n\r\n### Contributors\r\n- [@hamed-elfayome](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome) (Hamed Elfayome) - Project creator and maintainer\r\n- [@ggfevans](https:\u002F\u002Fgithub.com\u002Fggfevans) - Claude status indicator, detachable popover, outside click fix, dynamic version, issue templates, contributing guide\r\n\r\n---\r\n\r\n## [1.3.0] - 2025-12-14\r\n\r\n### Added\r\n\r\n#### Claude Code Terminal Integration\r\n- **New Claude Code Settings Tab** - Dedicated UI for configuring terminal statusline integration\r\n  - Toggle individual components (directory, git branch, usage, progress bar)\r\n  - Live preview showing exactly how your statusline will appear\r\n  - One-click installation with automated script deployment\r\n  - Visual component selection with clear descriptions\r\n\r\n- **Terminal Statusline Display** - Real-time usage monitoring directly in your Claude Code terminal\r\n  - **Current Directory**: Shows working directory name with blue highlight\r\n  - **Git Branch**: Live branch indicator with ⎇ icon (automatically detected)\r\n  - **Usage Percentage**: Session usage with 10-level color gradient (green → yellow → orange → red)\r\n  - **P","2025-12-15T01:47:58",{"id":237,"version":238,"summary_zh":239,"released_at":240},197847,"v1.3.0","# Claude Usage Tracker v1.3.0\r\n## Terminal Integration Edition\r\n\u003Cimg width=\"552\" height=\"80\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fa4e33eed-f1b6-44f7-a5ed-0f21c4d04a9f\" \u002F>\r\n\r\nMonitor your Claude AI usage without ever leaving your terminal. Version 1.3.0 brings powerful Claude Code integration, putting real-time usage tracking directly in your development workflow.\r\n\r\n---\r\n\r\n## Quick Install\r\n\r\n**[Download Claude-Usage.zip (v1.3.0)](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Fdownload\u002Fv1.3.0\u002FClaude-Usage.zip)**\r\n\r\n### First-Time Setup\r\n1. Extract the zip and drag `Claude Usage.app` to Applications\r\n2. Open the app (you'll see a security warning)\r\n3. Go to **System Settings** → **Privacy & Security** → **\"Open Anyway\"**\r\n\r\n**Already have it?** Just replace your old version. Your settings are safe!\r\n\r\n---\r\n\r\n## What's New: Terminal Statusline\r\n\r\n### See Your Usage While You Code\r\n\r\nImagine working on your project and glancing down to see:\r\n\r\n```\r\nmy-awesome-app │ ⎇ feature\u002Fnew-ui │ Usage: 25% ▓▓░░░░░░░░ → Reset: 4:15 PM\r\n```\r\n\r\nThat's your new Claude Code statusline—live, colorful, and always up-to-date.\r\n\r\n### Why You'll Love It\r\n\r\n**For Terminal Enthusiasts:**\r\n- Never switch windows to check usage\r\n- Beautiful color-coded feedback (green → red gradient)\r\n- Integrates seamlessly with your existing workflow\r\n\r\n**For Heavy Claude Users:**\r\n- Know when you're approaching limits *before* hitting them\r\n- Visual progress bar for instant status\r\n- See exactly when your session resets\r\n\r\n**For Multi-Taskers:**\r\n- Git branch awareness right in the statusline\r\n- Current directory at a glance\r\n- Customizable—show only what you need\r\n\r\n---\r\n\r\n## Feature Showcase\r\n\r\n### Component Buffet: Pick What You Want\r\n\r\nMix and match your perfect statusline:\r\n\r\n| Component | What You Get | Example |\r\n|-----------|-------------|---------|\r\n| **Directory** | Your current folder | `claude-usage` |\r\n| **Git Branch** | Active branch with icon | `⎇ main` |\r\n| **Usage %** | Session usage with color | `Usage: 25%` |\r\n| **Progress Bar** | Visual 10-bar indicator | `▓▓░░░░░░░░` |\r\n| **Reset Time** | When session refreshes | `→ Reset: 3:45 PM` |\r\n\r\n### Smart Color Coding\r\n\r\nYour statusline changes color based on usage:\r\n\r\n- **0-30%**: Shades of green—you're good!\r\n- **31-50%**: Yellow-green—moderate usage\r\n- **51-70%**: Orange tones—pay attention\r\n- **71-90%**: Red alert—high usage\r\n- **91-100%**: Deep red—critical!\r\n\r\n### Live Preview\r\n\r\nBefore you apply, see exactly how it looks. The settings tab shows a real-time preview as you toggle components. No surprises!\r\n\r\n---\r\n\r\n## Getting Started (60 Seconds)\r\n\r\n### Prerequisites\r\n- Claude Code installed ([get it here](https:\u002F\u002Fclaude.com\u002Fclaude-code))\r\n- Session key configured in the app\r\n- macOS 14.0 or later\r\n\r\n### Setup Steps\r\n\r\n1. **Open Claude Usage Tracker Settings**\r\n   - Click the menu bar icon → Settings (or ⌘,)\r\n\r\n2. **Navigate to \"Claude Code\" Tab**\r\n   - Brand new tab just for terminal integration!\r\n\r\n3. **Choose Your Components**\r\n   - Toggle what you want to see\r\n   - Watch the live preview update\r\n\r\n4. **Click \"Apply\"**\r\n   - Scripts auto-install to `~\u002F.claude\u002F`\r\n   - Settings.json configured automatically\r\n\r\n5. **Restart Claude Code**\r\n   - Boom! Your statusline appears \r\n\r\n---\r\n\r\n## Under the Hood\r\n\r\nWhen you hit \"Apply\", here's what happens:\r\n\r\n1. **Scripts Installed**\r\n   - `~\u002F.claude\u002Ffetch-claude-usage.swift` — Fetches your usage data\r\n   - `~\u002F.claude\u002Fstatusline-command.sh` — Builds the beautiful display\r\n   - `~\u002F.claude\u002Fstatusline-config.txt` — Your preferences\r\n\r\n2. **Settings Updated**\r\n   - `~\u002F.claude\u002Fsettings.json` gets the statusline command\r\n   - Secure permissions set automatically (755)\r\n\r\n3. **Ready to Go**\r\n   - Scripts use your existing session key\r\n   - Updates in real-time with your usage\r\n   - No extra configuration needed\r\n\r\n---\r\n\r\n## Troubleshooting\r\n\r\n### Statusline Not Showing?\r\n- Restart Claude Code (this is crucial!)\r\n- Check session key is valid in General tab\r\n- erify Claude Code is installed properly\r\n\r\n### Shows \"Usage: ~\"?\r\n- The tilde means data couldn't be fetched\r\n- Check your internet connection\r\n- Refresh your session key from claude.ai\r\n- Make sure `~\u002F.claude-session-key` exists\r\n\r\n### Permission Issues?\r\nRun this quick fix:\r\n```bash\r\nchmod 755 ~\u002F.claude\u002Ffetch-claude-usage.swift\r\nchmod 755 ~\u002F.claude\u002Fstatusline-command.sh\r\n```\r\n\r\n---\r\n\r\n## Upgrading from v1.2.0\r\n\r\nSuper easy:\r\n\r\n1. Quit Claude Usage Tracker\r\n2. Download v1.3.0\r\n3. Replace old app in Applications\r\n4. Launch and enjoy!\r\n\r\n**Your settings, session key, and preferences are automatically preserved.**\r\n\r\n---\r\n\r\n## Learn More\r\n\r\n- **[Full Setup Guide](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker#claude-code-integration)** — Detailed walkthrough\r\n- **[Changelog](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fblob\u002Fmain\u002FCHANGELOG.md)** — Every change documented\r\n- **[Report Issues](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tra","2025-12-14T20:51:37",{"id":242,"version":243,"summary_zh":244,"released_at":245},197848,"v1.2.0","# Claude Usage Tracker v1.2.0\r\n\r\nNative macOS menu bar application for real-time monitoring of Claude AI usage limits.\r\n\r\n## Installation\r\n\r\n**Download:** [Claude-Usage.zip](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Freleases\u002Fdownload\u002Fv1.2.0\u002FClaude-Usage.zip)\r\n\r\n### First-Time Installation\r\n\r\n1. Download and extract the zip file\r\n2. Drag `Claude Usage.app` to your Applications folder\r\n3. Try to open the app (security warning will appear)\r\n4. Go to **System Settings** → **Privacy & Security**\r\n5. Click **\"Open Anyway\"** next to the Claude Usage message\r\n6. Click **\"Open\"** to confirm\r\n\r\n**Alternative:** Right-click the app → \"Open\" → \"Open\" again\r\n\r\n**Note:** Security approval is required once on first launch because the app is not signed with an Apple Developer certificate.\r\n\r\n### Upgrading from Previous Versions\r\n\r\n1. Quit the current version if running\r\n2. Download v1.2.0 and extract\r\n3. Replace the old app in Applications folder\r\n4. Launch the new version\r\n\r\nYour settings and session key will be preserved.\r\n\r\n## What's New in v1.2.0\r\n\r\n### Extra Usage Cost Tracking\r\n\r\n**New feature contributed by [Stanislav Khromov](https:\u002F\u002Fgithub.com\u002Fkhromov)** \r\n\r\nTrack your Claude Extra usage costs directly in the app!\r\n\r\n- **Real-time cost monitoring**: See your current spending vs. budget limit\r\n- **Visual progress indicator**: Color-coded bar (orange\u002Fred) based on usage\r\n- **Percentage tracking**: Know exactly how much of your Extra budget is used\r\n- **Integrated display**: Seamlessly shows below Weekly usage in the popover\r\n\r\n**How it works:**\r\n- If you have Claude Extra usage enabled, the app automatically displays your spending\r\n- Shows cost in your currency (e.g., 15.38 \u002F 25.00 EUR)\r\n- Updates in real-time with your configured refresh interval\r\n\r\n### Contributors\r\n\r\nA huge thank you to **[@khromov](https:\u002F\u002Fgithub.com\u002Fkhromov)** (Stanislav Khromov) for implementing this feature.\r\n\r\n## Previous Features (v1.1.0)\r\n\r\n### Auto-Start Session Feature (BETA)\r\n- Automatically sends \"Hi\" to Claude 3.5 Haiku when session resets to 0%\r\n- Configure in Settings → Session tab\r\n- Can be enabled during first-run setup wizard\r\n\r\n### Enhanced Notifications\r\n- Session auto-start notifications\r\n- Notifications enabled confirmation\r\n- Fixed notification delivery for menu bar apps\r\n\r\n### Menu Bar Icon\r\n- Adapts to light\u002Fdark mode in real-time\r\n- Colored progress indicator remains vibrant\r\n\r\n## Features\r\n\r\n- **Real-time tracking**: Session, weekly, and Opus-specific usage\r\n- **Extra usage costs**: Monitor your Claude Extra spending (NEW)\r\n- **Menu bar integration**: Visual indicators with battery-style progress\r\n- **Smart notifications**: Alerts at 75%, 90%, and 95% thresholds\r\n- **Auto-start session**: Automatically initialize sessions on reset (BETA)\r\n- **Auto-refresh**: Configurable intervals (5-120 seconds)\r\n- **Native SwiftUI design**: Clean, professional macOS interface\r\n- **Secure storage**: Session keys stored with restrictive permissions\r\n\r\n## Requirements\r\n\r\n- macOS 14.0 (Sonoma) or later\r\n- Active Claude AI account\r\n- ~3 MB disk space\r\n\r\n---\r\n\r\n**Open Source** | **MIT License** | Made for the Claude community\r\n\r\n**Full Changelog:** [CHANGELOG.md](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome\u002FClaude-Usage-Tracker\u002Fblob\u002Fmain\u002FCHANGELOG.md)\r\n\r\n**Contributors:** [@hamed-elfayome](https:\u002F\u002Fgithub.com\u002Fhamed-elfayome), [@khromov](https:\u002F\u002Fgithub.com\u002Fkhromov)\r\n","2025-12-14T02:47:16"]