usage-cli 0.34.5__tar.gz → 0.34.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. {usage_cli-0.34.5/usage_cli.egg-info → usage_cli-0.34.7}/PKG-INFO +20 -21
  2. {usage_cli-0.34.5 → usage_cli-0.34.7}/README.md +19 -20
  3. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/dispatch_ledger.py +113 -27
  4. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/reporter.py +30 -14
  5. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/usage_snapshot.py +6 -3
  6. {usage_cli-0.34.5 → usage_cli-0.34.7}/i18n.json +55 -75
  7. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/agy_loader.py +0 -5
  8. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/agy_quota_probe.py +19 -1
  9. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/muse_quota_probe.py +19 -9
  10. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/agy.py +13 -2
  11. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/payload.py +3 -0
  12. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/web_panel.py +1 -0
  13. {usage_cli-0.34.5 → usage_cli-0.34.7}/pyproject.toml +1 -1
  14. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_agy_loader.py +0 -21
  15. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_agy_quota_probe.py +33 -0
  16. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_dispatch_ledger.py +244 -80
  17. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_history_persist.py +73 -0
  18. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_agy.py +13 -0
  19. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_muse_quota_probe.py +29 -3
  20. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_panel_footer_layout.py +11 -2
  21. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_report_cold_read.py +10 -19
  22. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_web_panel_payload.py +52 -1
  23. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_wintray.py +30 -1
  24. usage_cli-0.34.7/ui/report_ledger.py +102 -0
  25. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/report_styles.py +4 -0
  26. {usage_cli-0.34.5 → usage_cli-0.34.7/usage_cli.egg-info}/PKG-INFO +20 -21
  27. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/app.py +2 -0
  28. usage_cli-0.34.5/ui/report_ledger.py +0 -88
  29. {usage_cli-0.34.5 → usage_cli-0.34.7}/LICENSE +0 -0
  30. {usage_cli-0.34.5 → usage_cli-0.34.7}/THIRD_PARTY_NOTICES.md +0 -0
  31. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/__init__.py +0 -0
  32. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/agy.py +0 -0
  33. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/claude.py +0 -0
  34. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/codex.py +0 -0
  35. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/grok.py +0 -0
  36. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/muse.py +0 -0
  37. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/rate_limits.py +0 -0
  38. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/registry.py +0 -0
  39. {usage_cli-0.34.5 → usage_cli-0.34.7}/adapters/types.py +0 -0
  40. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/__init__.py +0 -0
  41. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/aggregator.py +0 -0
  42. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/blocks.py +0 -0
  43. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/diagnoser.py +0 -0
  44. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/diagnosis_snapshot.py +0 -0
  45. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/history_persist.py +0 -0
  46. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/insights.py +0 -0
  47. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/ledger_backfill.py +0 -0
  48. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/persona_loader.py +0 -0
  49. {usage_cli-0.34.5 → usage_cli-0.34.7}/analyzer/subscription.py +0 -0
  50. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/__init__.py +0 -0
  51. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/claude_pane.py +0 -0
  52. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/codex_hook_trust.py +0 -0
  53. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/login_item.py +0 -0
  54. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/session_hooks.py +0 -0
  55. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/setup_hook.py +0 -0
  56. {usage_cli-0.34.5 → usage_cli-0.34.7}/installer/statusline_settings.py +0 -0
  57. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/__init__.py +0 -0
  58. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/_shared_cache_file.py +0 -0
  59. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/agy_disk_cache.py +0 -0
  60. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/cache_quarantine.py +0 -0
  61. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/chromium_cache.py +0 -0
  62. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/claude_desktop.py +0 -0
  63. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/claude_paths.py +0 -0
  64. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/claude_usage.py +0 -0
  65. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/codex_disk_cache.py +0 -0
  66. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/codex_events.py +0 -0
  67. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/codex_fork_replay.py +0 -0
  68. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/codex_loader.py +0 -0
  69. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/codex_paths.py +0 -0
  70. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/disk_cache_common.py +0 -0
  71. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/disk_cache_lifecycle.py +0 -0
  72. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/grok_loader.py +0 -0
  73. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/grok_quota_probe.py +0 -0
  74. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/history_disk_cache.py +0 -0
  75. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/history_loader.py +0 -0
  76. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/jsonl_limits.py +0 -0
  77. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/jsonl_utils.py +0 -0
  78. {usage_cli-0.34.5 → usage_cli-0.34.7}/loaders/muse_loader.py +0 -0
  79. {usage_cli-0.34.5 → usage_cli-0.34.7}/main.py +0 -0
  80. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/__init__.py +0 -0
  81. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/actions.py +0 -0
  82. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/app.py +0 -0
  83. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/chrome.py +0 -0
  84. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/fsevents_watch.py +0 -0
  85. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/grok.py +0 -0
  86. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/manual_refresh.py +0 -0
  87. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/menu.py +0 -0
  88. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/muse.py +0 -0
  89. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/new_badge.py +0 -0
  90. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/notify.py +0 -0
  91. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/popover.py +0 -0
  92. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/prefs.py +0 -0
  93. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/refresh.py +0 -0
  94. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/state.py +0 -0
  95. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/title.py +0 -0
  96. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/update.py +0 -0
  97. {usage_cli-0.34.5 → usage_cli-0.34.7}/menubar/whats_new.py +0 -0
  98. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/__init__.py +0 -0
  99. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/base.py +0 -0
  100. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/catalog.py +0 -0
  101. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/dynamic_height.py +0 -0
  102. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/panel_scale.py +0 -0
  103. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/panel_window.py +0 -0
  104. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/panel_window_state.py +0 -0
  105. {usage_cli-0.34.5 → usage_cli-0.34.7}/panels/window_drag.py +0 -0
  106. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/__init__.py +0 -0
  107. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/agy_window_keeper.py +0 -0
  108. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/burn_rate.py +0 -0
  109. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/codex_window_keeper.py +0 -0
  110. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/keeper_outcome.py +0 -0
  111. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/notifications.py +0 -0
  112. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/quota_snapshot.py +0 -0
  113. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/status_payload.py +0 -0
  114. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/usage_rate.py +0 -0
  115. {usage_cli-0.34.5 → usage_cli-0.34.7}/quota/window_keeper.py +0 -0
  116. {usage_cli-0.34.5 → usage_cli-0.34.7}/setup.cfg +0 -0
  117. {usage_cli-0.34.5 → usage_cli-0.34.7}/setup_app.py +0 -0
  118. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_adapters_claude.py +0 -0
  119. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_adapters_codex.py +0 -0
  120. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_adapters_rate_limits.py +0 -0
  121. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_aggregator.py +0 -0
  122. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_agy_adapter.py +0 -0
  123. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_agy_disk_cache.py +0 -0
  124. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_agy_window_keeper.py +0 -0
  125. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_analyzer_blocks.py +0 -0
  126. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_analyzer_pipeline.py +0 -0
  127. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_app_version.py +0 -0
  128. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_burn_rate.py +0 -0
  129. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_cache_quarantine.py +0 -0
  130. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_check_upstream.py +0 -0
  131. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_chromium_cache.py +0 -0
  132. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_claude_desktop.py +0 -0
  133. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_claude_pane.py +0 -0
  134. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_claude_paths.py +0 -0
  135. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_codex_consistency.py +0 -0
  136. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_codex_hook_trust.py +0 -0
  137. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_codex_loader.py +0 -0
  138. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_codex_window_keeper.py +0 -0
  139. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_compact_cards.py +0 -0
  140. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_desktop_fresh_cache.py +0 -0
  141. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_desktop_quota_display.py +0 -0
  142. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_desktop_quota_review.py +0 -0
  143. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_diagnoser.py +0 -0
  144. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_disk_cache_shards.py +0 -0
  145. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_doctor.py +0 -0
  146. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_dynamic_height.py +0 -0
  147. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_fsevents_watch.py +0 -0
  148. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_grok_loader.py +0 -0
  149. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_grok_quota_probe.py +0 -0
  150. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_history_loader.py +0 -0
  151. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_hook_scripts_are_standalone.py +0 -0
  152. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_html_report_snapshot.py +0 -0
  153. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_i18n_format_fallback.py +0 -0
  154. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_i18n_key_parity.py +0 -0
  155. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_i18n_packaged_path.py +0 -0
  156. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_insights.py +0 -0
  157. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_jsonl_utils.py +0 -0
  158. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_keeper_menu.py +0 -0
  159. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_keeper_outcome.py +0 -0
  160. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_ledger_backfill.py +0 -0
  161. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_login_item.py +0 -0
  162. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_main.py +0 -0
  163. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_manual_refresh.py +0 -0
  164. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar.py +0 -0
  165. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_grok.py +0 -0
  166. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_muse.py +0 -0
  167. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_notify.py +0 -0
  168. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_prefs.py +0 -0
  169. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_state.py +0 -0
  170. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_menubar_update.py +0 -0
  171. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_muse_coverage.py +0 -0
  172. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_muse_loader.py +0 -0
  173. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_muse_review_regressions.py +0 -0
  174. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_new_badge.py +0 -0
  175. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_packaged_resources.py +0 -0
  176. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_packaging.py +0 -0
  177. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_panel_scale.py +0 -0
  178. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_panel_window_state.py +0 -0
  179. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_panels.py +0 -0
  180. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_panels_lazy_import.py +0 -0
  181. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_persona_loader.py +0 -0
  182. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_pricing.py +0 -0
  183. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_project_resolver.py +0 -0
  184. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_quota_aware.py +0 -0
  185. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_quota_label.py +0 -0
  186. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_report_daily_chart.py +0 -0
  187. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_report_filter_js.py +0 -0
  188. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_report_share_mask.py +0 -0
  189. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_reporter_build_data.py +0 -0
  190. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_service_status.py +0 -0
  191. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_session_resume.py +0 -0
  192. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_setup_app.py +0 -0
  193. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_setup_hook.py +0 -0
  194. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_setup_hook_coexistence.py +0 -0
  195. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_setup_hook_resume.py +0 -0
  196. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_setup_hook_terse.py +0 -0
  197. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_subprocess_utils.py +0 -0
  198. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_subscription.py +0 -0
  199. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_taskbar_menu.py +0 -0
  200. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_taskbar_obstacles.py +0 -0
  201. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_time_utils.py +0 -0
  202. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_tui.py +0 -0
  203. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_tui_sprite.py +0 -0
  204. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_ui_tables.py +0 -0
  205. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_update_checker.py +0 -0
  206. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_update_gate.py +0 -0
  207. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_update_release_notes.py +0 -0
  208. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_cli.py +0 -0
  209. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_client.py +0 -0
  210. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_diagnosis_snapshot.py +0 -0
  211. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_dir_sweeper.py +0 -0
  212. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_lang.py +0 -0
  213. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_logging.py +0 -0
  214. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_notifications.py +0 -0
  215. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_rate.py +0 -0
  216. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_snapshot.py +0 -0
  217. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_snapshot_replay.py +0 -0
  218. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_statusline.py +0 -0
  219. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_statusline_agy.py +0 -0
  220. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_statusline_forwarder.py +0 -0
  221. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_statusline_grok.py +0 -0
  222. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_terse_mode.py +0 -0
  223. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_usage_terse_reminder.py +0 -0
  224. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_whats_new.py +0 -0
  225. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_wheel_packaging.py +0 -0
  226. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_win_login_item.py +0 -0
  227. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_window_keeper.py +0 -0
  228. {usage_cli-0.34.5 → usage_cli-0.34.7}/tests/test_windows_manifest.py +0 -0
  229. {usage_cli-0.34.5 → usage_cli-0.34.7}/tui/__init__.py +0 -0
  230. {usage_cli-0.34.5 → usage_cli-0.34.7}/tui/app.py +0 -0
  231. {usage_cli-0.34.5 → usage_cli-0.34.7}/tui/sprite.py +0 -0
  232. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/__init__.py +0 -0
  233. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/html_report.py +0 -0
  234. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/report_charts.py +0 -0
  235. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/report_daily_chart.py +0 -0
  236. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/report_filter.py +0 -0
  237. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/report_scripts.py +0 -0
  238. {usage_cli-0.34.5 → usage_cli-0.34.7}/ui/tables.py +0 -0
  239. {usage_cli-0.34.5 → usage_cli-0.34.7}/updates/__init__.py +0 -0
  240. {usage_cli-0.34.5 → usage_cli-0.34.7}/updates/checker.py +0 -0
  241. {usage_cli-0.34.5 → usage_cli-0.34.7}/updates/gate.py +0 -0
  242. {usage_cli-0.34.5 → usage_cli-0.34.7}/updates/release_notes.py +0 -0
  243. {usage_cli-0.34.5 → usage_cli-0.34.7}/updates/whats_new.py +0 -0
  244. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_app/__init__.py +0 -0
  245. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_app/cli.py +0 -0
  246. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_app/doctor.py +0 -0
  247. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_cli.egg-info/SOURCES.txt +0 -0
  248. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_cli.egg-info/dependency_links.txt +0 -0
  249. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_cli.egg-info/entry_points.txt +0 -0
  250. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_cli.egg-info/requires.txt +0 -0
  251. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_cli.egg-info/top_level.txt +0 -0
  252. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/__init__.py +0 -0
  253. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/app_version.py +0 -0
  254. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/i18n.py +0 -0
  255. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/prefs.py +0 -0
  256. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/pricing.py +0 -0
  257. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/project_resolver.py +0 -0
  258. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/service_status.py +0 -0
  259. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/subprocess_utils.py +0 -0
  260. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/time_utils.py +0 -0
  261. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/usage_dir_sweeper.py +0 -0
  262. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/usage_lang.py +0 -0
  263. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_common/usage_logging.py +0 -0
  264. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/__init__.py +0 -0
  265. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_quota_aware.py +0 -0
  266. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_session_resume.py +0 -0
  267. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_statusline.py +0 -0
  268. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_statusline_agy.py +0 -0
  269. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_statusline_forwarder.py +0 -0
  270. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_statusline_grok.py +0 -0
  271. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_terse_mode.py +0 -0
  272. {usage_cli-0.34.5 → usage_cli-0.34.7}/usage_hooks/usage_terse_reminder.py +0 -0
  273. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/__init__.py +0 -0
  274. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/login_item.py +0 -0
  275. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/menu.py +0 -0
  276. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/prefs.py +0 -0
  277. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/quota_label.py +0 -0
  278. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/taskbar_menu.py +0 -0
  279. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/taskbar_obstacles.py +0 -0
  280. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/taskbar_overlay.py +0 -0
  281. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/watch.py +0 -0
  282. {usage_cli-0.34.5 → usage_cli-0.34.7}/wintray/whats_new.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: usage-cli
3
- Version: 0.34.5
3
+ Version: 0.34.7
4
4
  Summary: usage — 在 macOS menu bar 與 Windows 系統匣顯示 Claude Code、Codex、Antigravity 用量的小工具(也提供終端機 TUI)
5
5
  License-Expression: AGPL-3.0-only
6
6
  Requires-Python: >=3.13
@@ -28,7 +28,7 @@ Dynamic: license-file
28
28
 
29
29
  ### Your Claude Code, Codex, Antigravity, Grok CLI, and Muse Code quota, always on screen.
30
30
 
31
- `usage` puts your 5-hour and weekly limits in the macOS menu bar or Windows system tray, colored from green to red. Hitting the limit halfway through a long refactor is a bad way to find out you were running low. Now you see it coming. There's nothing to run and no page to open.
31
+ `usage` puts your 5-hour and weekly limits in the macOS menu bar or Windows system tray, and turns a quota red as it nears its limit. Hitting the limit halfway through a long refactor is a bad way to find out you were running low. Now you see it coming. There's nothing to run and no page to open.
32
32
 
33
33
  [繁體中文](docs/README.zh-TW.md) · [简体中文](docs/README.zh-CN.md) · English · [日本語](docs/README.ja.md) · [한국어](docs/README.ko.md)  |  [Discussions](https://github.com/aqua5230/usage/discussions)  |  [Landing page](https://aqua5230.github.io/usage/)
34
34
 
@@ -48,7 +48,7 @@ Dynamic: license-file
48
48
  </p>
49
49
 
50
50
  - **Every quota at a glance:** Claude Code, Codex, Antigravity, and Muse Code session and weekly limits with reset countdowns, plus Grok CLI's weekly credit.
51
- - **Reads what's already on your machine:** Claude Code, Codex, Grok CLI, and Muse Code tokens and cost come from local logs. Antigravity quota comes from Google's official endpoint, using the sign-in its CLI already stores. Muse quota comes from a small background model call through its own signed-in CLI.
51
+ - **Reads what's already on your machine:** Claude Code, Codex, Grok CLI, and Muse Code tokens and cost come from local logs. Antigravity quota comes from its own CLI (no model call), or from Google's official endpoint using the sign-in that CLI already stores. Muse quota comes from a small background model call through its own signed-in CLI.
52
52
  - **Warns before tokens go to waste:** The Claude Code status line flags a bloating context window and a cold prompt cache. A banner shows Claude or Codex outages.
53
53
  - **Helpers inside Claude Code:** A side pane, shorter replies, a progress hand-off for new sessions, and quota-aware planning. All optional.
54
54
  - **Reports and 16 themes:** HTML reports of token trends and cost, and 16 panel themes to pick from.
@@ -95,7 +95,7 @@ Then click the menu bar or tray icon.
95
95
  If you've used Codex, `usage` picks up its history automatically. For Claude Code, click the **"Set Up Status Line"** button in the app popover to install the sync hook.
96
96
  Restart the relevant tool afterward (on macOS, fully Cmd+Q Claude Code and re-open it; on Windows, restart your terminal or start a new session).
97
97
 
98
- The same button also sets up a status line for the Antigravity CLI and for Grok CLI when they are installed on your machine, and does nothing at all when they aren't. Any status line you configured there yourself is backed up first and restored when you turn the switch off.
98
+ The same button also sets up a status line for the Antigravity CLI and for Grok CLI when they are installed on your machine, and does nothing at all when they aren't. Any status line you configured there yourself is backed up first and restored when you turn the switch off. The switch is **⚙ Settings → Claude Code → Sync quota via status line**; with it off, the Claude quota stops updating.
99
99
 
100
100
  Once set up, the bottom of the Claude Code window will show a status line like this:
101
101
 
@@ -107,8 +107,8 @@ Once set up, the bottom of the Claude Code window will show a status line like t
107
107
 
108
108
  ### On Screen
109
109
 
110
- - **Menu bar monitor:** Quota color-coded from green to red. Click for the full session, weekly, and per-project breakdown. On macOS, the menu bar keeps at most three tools with the highest Session usage, in Claude → Codex → Antigravity → Grok → Muse order; the panel still shows all tools.
111
- - **Antigravity card:** Shows the Gemini pool by default. Tap the `Gemini ⇄` tag to switch to the separate Claude / GPT pool; the choice is remembered.
110
+ - **Menu bar monitor:** A quota turns red as it nears its limit. Click for the full session, weekly, and per-project breakdown. On macOS, the menu bar keeps at most three tools with the highest Session usage, in Claude → Codex → Antigravity → Grok → Muse order; the panel still shows all tools.
111
+ - **Antigravity card:** Shows the Gemini pool by default. Tap the `Gemini ⇄` tag to cycle through the separate Claude / GPT and Gemini 4 Argon pools; the choice is remembered. Argon has a weekly limit only.
112
112
  - **Grok CLI card:** The weekly credit percentage from Grok CLI's local debug log. Its tokens also count toward cost and project totals.
113
113
  - **Muse Code card:** Shows 5-hour (Session) and weekly quota with reset countdowns. Available in all 15 quota themes, with a menu bar item and optional low, exhausted, and recovered quota notifications. Hidden automatically when Muse is not installed. Tokens and cost still count toward today's cost, project totals, reports, and the CLI.
114
114
  - **Outage alerts:** An orange-red banner when Claude Code, Claude API, or Codex API is down or degraded, read from their public status pages.
@@ -129,10 +129,10 @@ Once set up, the bottom of the Claude Code window will show a status line like t
129
129
 
130
130
  ### Reports and More
131
131
 
132
- - **HTML reports:** Daily and weekly token trends, project rankings, cost, and a Year in Review with a contribution heatmap. Export .html, .csv, or .png fully offline, with optional project-name masking.
132
+ - **HTML reports:** Daily and weekly token trends, project rankings, cost, and a Year in Review with a contribution heatmap. Export .html, .csv, or .png fully offline, with optional project-name masking. If you hand work from Claude Code to Codex or Antigravity, the report shows which conversations used how much of each weekly quota.
133
133
  - **Terminal integration:** `usage status --json` hands your Claude Code, Codex, Antigravity, Grok, and Muse quota to Starship, tmux, or your own scripts. [Ready-made snippets](docs/DEVELOPMENT.md#quota-status-for-other-tools-usage-status).
134
- - **AI Update Daily:** A daily public [page](https://aqua5230.github.io/ai-updates/) of Claude Code, Codex, and Antigravity changes, with plain-language summaries in five languages.
135
- - **Your layout:** Drag the panel anywhere, drag quota cards to reorder them, and switch among 16 themes. The UI follows your system language: Traditional Chinese, Simplified Chinese, English, Japanese, or Korean. With four or more quota cards visible, all cards switch to a compact layout; three or fewer keep the usual layout.
134
+ - **AI Update Daily:** A daily public [page](https://aqua5230.github.io/ai-updates/) of changes to Claude Code, Codex, Antigravity, Grok Build, Muse Code, GitHub CLI, and usage itself, with plain-language summaries in five languages.
135
+ - **Your layout:** Drag the panel anywhere, drag quota cards to reorder them, and switch among 16 themes from **⚙ Settings → Switch Panel**. The UI follows your system language: Traditional Chinese, Simplified Chinese, English, Japanese, or Korean. With four or more quota cards visible, all cards switch to a compact layout; three or fewer keep the usual layout.
136
136
 
137
137
  <details>
138
138
  <summary>Thresholds, versions, and fine print</summary>
@@ -147,7 +147,7 @@ Once set up, the bottom of the Claude Code window will show a status line like t
147
147
  - **Progress Concierge:** When you `/resume` a conversation that sat long enough for its cache to expire, it warns how many tokens the next message will re-send and suggests `/compact` first.
148
148
  - **Beginner Mode (macOS and Windows):** Terms appear above the prompt in your UI language. Press 9 to mark them understood; skipped terms come back after 1, 3, then 7 days. Understood terms return as a one-question multiple-choice quiz 7, 21, then 60 days later, at most one a day, and a wrong answer puts the term back in the hints. `/terms` opens your term history. Picking terms asks Claude Haiku through your Claude Code, and pauses while your 5-hour quota is at 90% or more.
149
149
  - **Quota-Aware Mode (macOS and Windows):** Claude Code gets one line with what is left and when it resets when a 5-hour quota passes 80%, 90%, or 95%, or a weekly quota passes 95%. It covers Claude Code, Codex, Antigravity, and Muse, says each level once per conversation, and treats each quota and model group separately, so a used-up one only matters for work that runs on it.
150
- - **Auto-start 5-hour session:** Claude gets Haiku, Antigravity gets Gemini 3.8 Flash Low, and Codex gets its cheapest model. The quota used is negligible.
150
+ - **Auto-start 5-hour session:** Claude gets Haiku, Antigravity gets Gemini 3.8 Flash Low, and Codex gets its cheapest model. The quota used is negligible. The Claude and Codex pings skip your own hooks and stay out of `claude --resume` and `codex resume`.
151
151
  - **Panel:** It stays put when another app takes focus; a second click on the menu bar icon, or Escape, closes it. Card order is shared across every theme with quota cards (all except World Cup 2026) and survives restarts.
152
152
  - **HTML reports:** A "What you worked on" section lists the names Claude Code gave your recent conversations, and masking covers those titles too.
153
153
  - **AI Update Daily:** Unreviewed items show the original source text. The full history is kept.
@@ -218,19 +218,18 @@ Switch between **16 visual themes** directly from the UI:
218
218
 
219
219
  ## Comparison
220
220
 
221
+ As of October 2026. ccusage and TokenTracker read many more AI tools; `usage` focuses on five and their quotas.
222
+
221
223
  | Feature | usage | ccusage | TokenTracker |
222
224
  |---------|:-----:|:-------:|:------------:|
223
- | Always on screen | ✅ | — | ✅ |
224
- | macOS menu bar & Windows system tray | ✅ | — | macOS only |
225
- | Claude Code & Codex usage | ✅ | ✅ | ✅ |
226
- | Antigravity usage (Gemini and Claude / GPT) | ✅ | — | — |
227
- | Grok CLI usage | ✅ | — | — |
228
- | Muse Code quota, tokens, and cost | ✅ | — | — |
229
- | Claude Code & Codex service-status alerts | ✅ | — | — |
230
- | HTML deep reports & UI | ✅ | ✅ | — |
231
- | Claude Code helpers (Token Saver, Progress Concierge, Beginner and Quota-Aware modes, health check) | ✅ | — | — |
225
+ | Menu bar or system tray app | macOS, Windows | — | macOS, Windows, Linux |
226
+ | Token and cost reports | ✅ | ✅ | ✅ |
227
+ | Live 5-hour and weekly quota | ✅ | Estimated Claude 5-hour blocks only | ✅ |
228
+ | Muse Code quota | ✅ | — | — |
229
+ | Service status from official status pages | Claude, Codex | — | 8 providers |
230
+ | Claude Code helpers (Token Saver, Progress Concierge, Beginner and Quota-Aware modes, side pane, health check) | ✅ | — | — |
232
231
  | AI Update Daily | ✅ | — | — |
233
- | Open-source license | AGPL-3.0 | MIT | — |
232
+ | Open-source license | AGPL-3.0 | MIT | MIT |
234
233
 
235
234
  ## When usage Isn't the Right Fit
236
235
 
@@ -271,7 +270,7 @@ If the menu bar shows `--`, it's usually not broken — there's just no local da
271
270
 
272
271
  - **Local logs:** Claude Code, Codex, Grok CLI, and Muse Code token and cost numbers are read from log files on your machine. Their contents are never uploaded.
273
272
  - **Claude Desktop:** Without the Claude Code CLI or a status line, keep Claude Desktop open and `usage` reads its local plan-usage history. No cookies, login tokens, or API calls are needed. Reset times appear only when its local cache confirms them; they are never estimated.
274
- - **Antigravity**, only if you use it, needs network access: quota is fetched from Google's official quota endpoint with the OAuth credential the Antigravity CLI already stored after sign-in — read from macOS Keychain, Windows Credential Manager, or a local token file depending on CLI version. `usage` never writes that credential back and keeps any refreshed access token in memory only; the call itself reads quota metadata.
273
+ - **Antigravity**, only if you use it, needs network access: quota comes first from `agy -p /usage`, which makes no model call; if that fails, it is fetched from Google's official quota endpoint with the OAuth credential the Antigravity CLI already stored after sign-in — read from macOS Keychain, Windows Credential Manager, or a local token file depending on CLI version. `usage` never writes that credential back and keeps any refreshed access token in memory only; the call itself reads quota metadata.
275
274
  - **Muse quota:** Muse stores no quota file locally. `usage` runs `muse exec --json` through Muse's own sign-in and saves the returned quota to `~/.usage/muse_quota.json`. This connects to Muse and makes a real model call, using a little Muse quota. It runs in an empty folder with `--no-session-log`. With Muse installed and a conversation available, it fetches the first snapshot; later probes require a snapshot over 30 minutes old and a newer Muse conversation. After failure, it waits at least 30 minutes and requires new Muse usage before retrying. Hide its card under **Hide sections**.
276
275
  - **Other background network activity:** Public Claude and Codex status pages to flag outages, a public model-pricing table to estimate cost (built-in prices are used offline), and an occasional GitHub check for a new version.
277
276
  - **Beginner Mode**, only if you turn it on, sends Claude Code's latest answer to Claude Haiku through your own Claude Code sign-in to pick terms. Your term list stays in `~/.usage/glossary.json`.
@@ -6,7 +6,7 @@
6
6
 
7
7
  ### Your Claude Code, Codex, Antigravity, Grok CLI, and Muse Code quota, always on screen.
8
8
 
9
- `usage` puts your 5-hour and weekly limits in the macOS menu bar or Windows system tray, colored from green to red. Hitting the limit halfway through a long refactor is a bad way to find out you were running low. Now you see it coming. There's nothing to run and no page to open.
9
+ `usage` puts your 5-hour and weekly limits in the macOS menu bar or Windows system tray, and turns a quota red as it nears its limit. Hitting the limit halfway through a long refactor is a bad way to find out you were running low. Now you see it coming. There's nothing to run and no page to open.
10
10
 
11
11
  [繁體中文](docs/README.zh-TW.md) · [简体中文](docs/README.zh-CN.md) · English · [日本語](docs/README.ja.md) · [한국어](docs/README.ko.md) &nbsp;|&nbsp; [Discussions](https://github.com/aqua5230/usage/discussions) &nbsp;|&nbsp; [Landing page](https://aqua5230.github.io/usage/)
12
12
 
@@ -26,7 +26,7 @@
26
26
  </p>
27
27
 
28
28
  - **Every quota at a glance:** Claude Code, Codex, Antigravity, and Muse Code session and weekly limits with reset countdowns, plus Grok CLI's weekly credit.
29
- - **Reads what's already on your machine:** Claude Code, Codex, Grok CLI, and Muse Code tokens and cost come from local logs. Antigravity quota comes from Google's official endpoint, using the sign-in its CLI already stores. Muse quota comes from a small background model call through its own signed-in CLI.
29
+ - **Reads what's already on your machine:** Claude Code, Codex, Grok CLI, and Muse Code tokens and cost come from local logs. Antigravity quota comes from its own CLI (no model call), or from Google's official endpoint using the sign-in that CLI already stores. Muse quota comes from a small background model call through its own signed-in CLI.
30
30
  - **Warns before tokens go to waste:** The Claude Code status line flags a bloating context window and a cold prompt cache. A banner shows Claude or Codex outages.
31
31
  - **Helpers inside Claude Code:** A side pane, shorter replies, a progress hand-off for new sessions, and quota-aware planning. All optional.
32
32
  - **Reports and 16 themes:** HTML reports of token trends and cost, and 16 panel themes to pick from.
@@ -73,7 +73,7 @@ Then click the menu bar or tray icon.
73
73
  If you've used Codex, `usage` picks up its history automatically. For Claude Code, click the **"Set Up Status Line"** button in the app popover to install the sync hook.
74
74
  Restart the relevant tool afterward (on macOS, fully Cmd+Q Claude Code and re-open it; on Windows, restart your terminal or start a new session).
75
75
 
76
- The same button also sets up a status line for the Antigravity CLI and for Grok CLI when they are installed on your machine, and does nothing at all when they aren't. Any status line you configured there yourself is backed up first and restored when you turn the switch off.
76
+ The same button also sets up a status line for the Antigravity CLI and for Grok CLI when they are installed on your machine, and does nothing at all when they aren't. Any status line you configured there yourself is backed up first and restored when you turn the switch off. The switch is **⚙ Settings → Claude Code → Sync quota via status line**; with it off, the Claude quota stops updating.
77
77
 
78
78
  Once set up, the bottom of the Claude Code window will show a status line like this:
79
79
 
@@ -85,8 +85,8 @@ Once set up, the bottom of the Claude Code window will show a status line like t
85
85
 
86
86
  ### On Screen
87
87
 
88
- - **Menu bar monitor:** Quota color-coded from green to red. Click for the full session, weekly, and per-project breakdown. On macOS, the menu bar keeps at most three tools with the highest Session usage, in Claude → Codex → Antigravity → Grok → Muse order; the panel still shows all tools.
89
- - **Antigravity card:** Shows the Gemini pool by default. Tap the `Gemini ⇄` tag to switch to the separate Claude / GPT pool; the choice is remembered.
88
+ - **Menu bar monitor:** A quota turns red as it nears its limit. Click for the full session, weekly, and per-project breakdown. On macOS, the menu bar keeps at most three tools with the highest Session usage, in Claude → Codex → Antigravity → Grok → Muse order; the panel still shows all tools.
89
+ - **Antigravity card:** Shows the Gemini pool by default. Tap the `Gemini ⇄` tag to cycle through the separate Claude / GPT and Gemini 4 Argon pools; the choice is remembered. Argon has a weekly limit only.
90
90
  - **Grok CLI card:** The weekly credit percentage from Grok CLI's local debug log. Its tokens also count toward cost and project totals.
91
91
  - **Muse Code card:** Shows 5-hour (Session) and weekly quota with reset countdowns. Available in all 15 quota themes, with a menu bar item and optional low, exhausted, and recovered quota notifications. Hidden automatically when Muse is not installed. Tokens and cost still count toward today's cost, project totals, reports, and the CLI.
92
92
  - **Outage alerts:** An orange-red banner when Claude Code, Claude API, or Codex API is down or degraded, read from their public status pages.
@@ -107,10 +107,10 @@ Once set up, the bottom of the Claude Code window will show a status line like t
107
107
 
108
108
  ### Reports and More
109
109
 
110
- - **HTML reports:** Daily and weekly token trends, project rankings, cost, and a Year in Review with a contribution heatmap. Export .html, .csv, or .png fully offline, with optional project-name masking.
110
+ - **HTML reports:** Daily and weekly token trends, project rankings, cost, and a Year in Review with a contribution heatmap. Export .html, .csv, or .png fully offline, with optional project-name masking. If you hand work from Claude Code to Codex or Antigravity, the report shows which conversations used how much of each weekly quota.
111
111
  - **Terminal integration:** `usage status --json` hands your Claude Code, Codex, Antigravity, Grok, and Muse quota to Starship, tmux, or your own scripts. [Ready-made snippets](docs/DEVELOPMENT.md#quota-status-for-other-tools-usage-status).
112
- - **AI Update Daily:** A daily public [page](https://aqua5230.github.io/ai-updates/) of Claude Code, Codex, and Antigravity changes, with plain-language summaries in five languages.
113
- - **Your layout:** Drag the panel anywhere, drag quota cards to reorder them, and switch among 16 themes. The UI follows your system language: Traditional Chinese, Simplified Chinese, English, Japanese, or Korean. With four or more quota cards visible, all cards switch to a compact layout; three or fewer keep the usual layout.
112
+ - **AI Update Daily:** A daily public [page](https://aqua5230.github.io/ai-updates/) of changes to Claude Code, Codex, Antigravity, Grok Build, Muse Code, GitHub CLI, and usage itself, with plain-language summaries in five languages.
113
+ - **Your layout:** Drag the panel anywhere, drag quota cards to reorder them, and switch among 16 themes from **⚙ Settings → Switch Panel**. The UI follows your system language: Traditional Chinese, Simplified Chinese, English, Japanese, or Korean. With four or more quota cards visible, all cards switch to a compact layout; three or fewer keep the usual layout.
114
114
 
115
115
  <details>
116
116
  <summary>Thresholds, versions, and fine print</summary>
@@ -125,7 +125,7 @@ Once set up, the bottom of the Claude Code window will show a status line like t
125
125
  - **Progress Concierge:** When you `/resume` a conversation that sat long enough for its cache to expire, it warns how many tokens the next message will re-send and suggests `/compact` first.
126
126
  - **Beginner Mode (macOS and Windows):** Terms appear above the prompt in your UI language. Press 9 to mark them understood; skipped terms come back after 1, 3, then 7 days. Understood terms return as a one-question multiple-choice quiz 7, 21, then 60 days later, at most one a day, and a wrong answer puts the term back in the hints. `/terms` opens your term history. Picking terms asks Claude Haiku through your Claude Code, and pauses while your 5-hour quota is at 90% or more.
127
127
  - **Quota-Aware Mode (macOS and Windows):** Claude Code gets one line with what is left and when it resets when a 5-hour quota passes 80%, 90%, or 95%, or a weekly quota passes 95%. It covers Claude Code, Codex, Antigravity, and Muse, says each level once per conversation, and treats each quota and model group separately, so a used-up one only matters for work that runs on it.
128
- - **Auto-start 5-hour session:** Claude gets Haiku, Antigravity gets Gemini 3.8 Flash Low, and Codex gets its cheapest model. The quota used is negligible.
128
+ - **Auto-start 5-hour session:** Claude gets Haiku, Antigravity gets Gemini 3.8 Flash Low, and Codex gets its cheapest model. The quota used is negligible. The Claude and Codex pings skip your own hooks and stay out of `claude --resume` and `codex resume`.
129
129
  - **Panel:** It stays put when another app takes focus; a second click on the menu bar icon, or Escape, closes it. Card order is shared across every theme with quota cards (all except World Cup 2026) and survives restarts.
130
130
  - **HTML reports:** A "What you worked on" section lists the names Claude Code gave your recent conversations, and masking covers those titles too.
131
131
  - **AI Update Daily:** Unreviewed items show the original source text. The full history is kept.
@@ -196,19 +196,18 @@ Switch between **16 visual themes** directly from the UI:
196
196
 
197
197
  ## Comparison
198
198
 
199
+ As of October 2026. ccusage and TokenTracker read many more AI tools; `usage` focuses on five and their quotas.
200
+
199
201
  | Feature | usage | ccusage | TokenTracker |
200
202
  |---------|:-----:|:-------:|:------------:|
201
- | Always on screen | ✅ | — | ✅ |
202
- | macOS menu bar & Windows system tray | ✅ | — | macOS only |
203
- | Claude Code & Codex usage | ✅ | ✅ | ✅ |
204
- | Antigravity usage (Gemini and Claude / GPT) | ✅ | — | — |
205
- | Grok CLI usage | ✅ | — | — |
206
- | Muse Code quota, tokens, and cost | ✅ | — | — |
207
- | Claude Code & Codex service-status alerts | ✅ | — | — |
208
- | HTML deep reports & UI | ✅ | ✅ | — |
209
- | Claude Code helpers (Token Saver, Progress Concierge, Beginner and Quota-Aware modes, health check) | ✅ | — | — |
203
+ | Menu bar or system tray app | macOS, Windows | — | macOS, Windows, Linux |
204
+ | Token and cost reports | ✅ | ✅ | ✅ |
205
+ | Live 5-hour and weekly quota | ✅ | Estimated Claude 5-hour blocks only | ✅ |
206
+ | Muse Code quota | ✅ | — | — |
207
+ | Service status from official status pages | Claude, Codex | — | 8 providers |
208
+ | Claude Code helpers (Token Saver, Progress Concierge, Beginner and Quota-Aware modes, side pane, health check) | ✅ | — | — |
210
209
  | AI Update Daily | ✅ | — | — |
211
- | Open-source license | AGPL-3.0 | MIT | — |
210
+ | Open-source license | AGPL-3.0 | MIT | MIT |
212
211
 
213
212
  ## When usage Isn't the Right Fit
214
213
 
@@ -249,7 +248,7 @@ If the menu bar shows `--`, it's usually not broken — there's just no local da
249
248
 
250
249
  - **Local logs:** Claude Code, Codex, Grok CLI, and Muse Code token and cost numbers are read from log files on your machine. Their contents are never uploaded.
251
250
  - **Claude Desktop:** Without the Claude Code CLI or a status line, keep Claude Desktop open and `usage` reads its local plan-usage history. No cookies, login tokens, or API calls are needed. Reset times appear only when its local cache confirms them; they are never estimated.
252
- - **Antigravity**, only if you use it, needs network access: quota is fetched from Google's official quota endpoint with the OAuth credential the Antigravity CLI already stored after sign-in — read from macOS Keychain, Windows Credential Manager, or a local token file depending on CLI version. `usage` never writes that credential back and keeps any refreshed access token in memory only; the call itself reads quota metadata.
251
+ - **Antigravity**, only if you use it, needs network access: quota comes first from `agy -p /usage`, which makes no model call; if that fails, it is fetched from Google's official quota endpoint with the OAuth credential the Antigravity CLI already stored after sign-in — read from macOS Keychain, Windows Credential Manager, or a local token file depending on CLI version. `usage` never writes that credential back and keeps any refreshed access token in memory only; the call itself reads quota metadata.
253
252
  - **Muse quota:** Muse stores no quota file locally. `usage` runs `muse exec --json` through Muse's own sign-in and saves the returned quota to `~/.usage/muse_quota.json`. This connects to Muse and makes a real model call, using a little Muse quota. It runs in an empty folder with `--no-session-log`. With Muse installed and a conversation available, it fetches the first snapshot; later probes require a snapshot over 30 minutes old and a newer Muse conversation. After failure, it waits at least 30 minutes and requires new Muse usage before retrying. Hide its card under **Hide sections**.
254
253
  - **Other background network activity:** Public Claude and Codex status pages to flag outages, a public model-pricing table to estimate cost (built-in prices are used offline), and an occasional GitHub check for a new version.
255
254
  - **Beginner Mode**, only if you turn it on, sends Claude Code's latest answer to Claude Haiku through your own Claude Code sign-in to pick terms. Your term list stays in `~/.usage/glossary.json`.
@@ -18,6 +18,7 @@ from adapters import rate_limits
18
18
  from adapters.types import UsageEntry
19
19
  from loaders import agy_loader, agy_quota_probe, codex_loader, muse_quota_probe
20
20
  from loaders.claude_paths import claude_config_dirs
21
+ from usage_common.project_resolver import resolve_project_name
21
22
 
22
23
  _DISPATCH = {
23
24
  "codex": re.compile(r"(^|[;&|(\s])codex exec"),
@@ -61,7 +62,10 @@ class LedgerRow(TypedDict):
61
62
  dispatch_count: int
62
63
  claude_pct: float | None
63
64
  codex_pct: float | None
64
- agy_pct: float | None
65
+ agy_groups: dict[str, float]
66
+ claude_reset: bool
67
+ codex_reset: bool
68
+ agy_reset: bool
65
69
  total_pct: float
66
70
 
67
71
 
@@ -69,6 +73,52 @@ class LedgerData(TypedDict):
69
73
  rows: list[LedgerRow]
70
74
  unowned_codex: int
71
75
  unowned_agy: int
76
+ used_pct: dict[str, float]
77
+
78
+
79
+ class LedgerBlock(TypedDict):
80
+ quota: str
81
+ used_pct: float | None
82
+ conversations: list[tuple[LedgerRow, float]]
83
+ more_count: int
84
+ more_pct: float
85
+ other_pct: float | None
86
+ all_reset: bool
87
+
88
+
89
+ def ledger_blocks(rows: list[LedgerRow], used_pct: dict[str, float]) -> list[LedgerBlock]:
90
+ """Select each quota's top five from every owned conversation."""
91
+ shares: dict[str, list[tuple[LedgerRow, float]]] = defaultdict(list)
92
+ for row in rows:
93
+ if row["codex_pct"] is not None and row["codex_pct"] > 0:
94
+ shares["codex"].append((row, row["codex_pct"]))
95
+ for group, value in row["agy_groups"].items():
96
+ if value > 0:
97
+ shares[f"antigravity:{group}"].append((row, value))
98
+ if any(row["codex_reset"] for row in rows):
99
+ shares.setdefault("codex", [])
100
+ blocks: list[LedgerBlock] = []
101
+ for quota, conversations in shares.items():
102
+ conversations.sort(key=lambda item: item[1], reverse=True)
103
+ total = sum(value for _, value in conversations)
104
+ used = used_pct.get(quota)
105
+ other = max(0.0, used - total) if used is not None else None
106
+ blocks.append(
107
+ {
108
+ "quota": quota,
109
+ "used_pct": used,
110
+ "conversations": conversations[:5],
111
+ "more_count": len(conversations[5:]),
112
+ "more_pct": sum(value for _, value in conversations[5:]),
113
+ "other_pct": other if other is not None and other >= 0.5 else None,
114
+ "all_reset": quota == "codex" and not conversations,
115
+ }
116
+ )
117
+ blocks.sort(
118
+ key=lambda block: sum(value for _, value in block["conversations"]) + block["more_pct"],
119
+ reverse=True,
120
+ )
121
+ return blocks
72
122
 
73
123
 
74
124
  def _timestamp(value: object) -> datetime | None:
@@ -319,11 +369,15 @@ def estimate_pct(
319
369
  return session_tokens / total_tokens * window.used_pct
320
370
 
321
371
 
372
+ SessionGroup = tuple[str, str, str]
373
+
374
+
322
375
  def estimate_sessions(
323
376
  entries: list[UsageEntry], windows: dict[str, QuotaWindow], now: datetime
324
- ) -> dict[tuple[str, str], float | None]:
377
+ ) -> tuple[dict[SessionGroup, float], set[SessionGroup]]:
325
378
  totals: dict[str, int] = defaultdict(int)
326
379
  sessions: dict[tuple[str, str, str], int] = defaultdict(int)
380
+ before_window: set[SessionGroup] = set()
327
381
  for entry in entries:
328
382
  group = entry.agent_id
329
383
  if entry.agent_id == "antigravity":
@@ -351,18 +405,21 @@ def estimate_sessions(
351
405
  "",
352
406
  )
353
407
  window = windows.get(group)
354
- if window is None or not window.resets_at - window.length <= entry.timestamp <= now:
355
- continue
356
408
  tokens = entry.input_tokens + entry.output_tokens + entry.cache_creation_tokens
409
+ if window is None or entry.timestamp > now or tokens <= 0:
410
+ continue
411
+ key = (entry.agent_id, entry.session_id, group)
412
+ if entry.timestamp < window.resets_at - window.length:
413
+ before_window.add(key)
414
+ continue
357
415
  totals[group] += tokens
358
- sessions[(entry.agent_id, entry.session_id, group)] += tokens
359
- estimates: dict[tuple[str, str], float | None] = {}
416
+ sessions[key] += tokens
417
+ estimates: dict[SessionGroup, float] = {}
360
418
  for (agent_id, session_id, group), tokens in sessions.items():
361
419
  value = estimate_pct(tokens, totals[group], windows.get(group), now)
362
420
  if value is not None:
363
- key = (agent_id, session_id)
364
- estimates[key] = (estimates.get(key) or 0.0) + value
365
- return estimates
421
+ estimates[(agent_id, session_id, group)] = value
422
+ return estimates, before_window - sessions.keys()
366
423
 
367
424
 
368
425
  def _session_title(path: Path) -> str:
@@ -392,13 +449,23 @@ def _session_title(path: Path) -> str:
392
449
  return title or first_text
393
450
 
394
451
 
395
- def build_ledger(estimates: dict[tuple[str, str], float | None], now: datetime) -> LedgerData:
452
+ def build_ledger(
453
+ estimates: dict[SessionGroup, float],
454
+ now: datetime,
455
+ reset_sessions: set[SessionGroup] | None = None,
456
+ used_pct: dict[str, float] | None = None,
457
+ ) -> LedgerData:
396
458
  cutoff = now - timedelta(days=7)
397
459
  paths = _claude_paths(cutoff)
398
460
  dispatches = [
399
461
  item for path in paths for item in _read_dispatches(path) if cutoff <= item.timestamp <= now
400
462
  ]
401
- empty: LedgerData = {"rows": [], "unowned_codex": 0, "unowned_agy": 0}
463
+ empty: LedgerData = {
464
+ "rows": [],
465
+ "unowned_codex": 0,
466
+ "unowned_agy": 0,
467
+ "used_pct": used_pct or {},
468
+ }
402
469
  if not dispatches:
403
470
  return empty
404
471
  known_sessions = {path.stem for path in paths}
@@ -426,32 +493,51 @@ def build_ledger(estimates: dict[tuple[str, str], float | None], now: datetime)
426
493
  origin = by_owner.get(owner)
427
494
  if not origin:
428
495
  continue
429
- shares = {"claude-code": estimates.get(("claude-code", owner))}
430
- for agent_id in ("codex", "antigravity"):
431
- values = [estimates.get((agent_id, session_id)) for session_id in children[agent_id]]
432
- shares[agent_id] = (
433
- sum(value for value in values if value is not None)
434
- if any(value is not None for value in values)
435
- else None
436
- )
496
+ claude_pct = estimates.get(("claude-code", owner, "claude-code"))
497
+ codex_values = [
498
+ estimates[("codex", child, "codex")]
499
+ for child in children["codex"]
500
+ if ("codex", child, "codex") in estimates
501
+ ]
502
+ codex_pct = sum(codex_values) if codex_values else None
503
+ agy_groups: dict[str, float] = {}
504
+ for (agent, child, group), value in estimates.items():
505
+ if agent == "antigravity" and child in children[agent]:
506
+ name = group.removeprefix("antigravity:")
507
+ agy_groups[name] = agy_groups.get(name, 0.0) + value
508
+ reset_agents = {
509
+ agent
510
+ for agent, session, _ in reset_sessions or set()
511
+ if (agent == "claude-code" and session == owner)
512
+ or session in children.get(agent, set())
513
+ }
437
514
  first = min(origin, key=lambda item: item.timestamp)
438
515
  rows.append(
439
516
  (
440
517
  owner,
441
518
  {
442
519
  "date": first.timestamp.astimezone().strftime("%Y-%m-%d"),
443
- "project": Path(first.cwd).name or "unknown",
520
+ "project": resolve_project_name(first.cwd),
444
521
  "title": "",
445
522
  "dispatch_count": len(origin),
446
- "claude_pct": shares["claude-code"],
447
- "codex_pct": shares["codex"],
448
- "agy_pct": shares["antigravity"],
449
- "total_pct": sum(value for value in shares.values() if value is not None),
523
+ "claude_pct": claude_pct,
524
+ "codex_pct": codex_pct,
525
+ "agy_groups": agy_groups,
526
+ "claude_reset": claude_pct is None and "claude-code" in reset_agents,
527
+ "codex_reset": codex_pct is None and "codex" in reset_agents,
528
+ "agy_reset": not agy_groups and "antigravity" in reset_agents,
529
+ "total_pct": (claude_pct or 0) + (codex_pct or 0) + sum(agy_groups.values()),
450
530
  },
451
531
  )
452
532
  )
453
533
  rows.sort(key=lambda item: item[1]["total_pct"], reverse=True)
454
- for owner, row in rows[:15]:
455
- row["title"] = _session_title(path_by_session[owner])
456
- empty["rows"].append(row)
534
+ empty["rows"] = [row for _, row in rows]
535
+ displayed = {
536
+ id(row)
537
+ for block in ledger_blocks(empty["rows"], empty["used_pct"])
538
+ for row, _ in block["conversations"]
539
+ }
540
+ for owner, row in rows:
541
+ if id(row) in displayed:
542
+ row["title"] = _session_title(path_by_session[owner])
457
543
  return empty
@@ -16,6 +16,7 @@ import logging
16
16
  import os
17
17
  from pathlib import Path
18
18
  import tempfile
19
+ import threading
19
20
  import time
20
21
  from typing import Any, NotRequired, TypedDict, cast
21
22
 
@@ -45,6 +46,7 @@ YEAR_LEDGER_PATH = YEAR_CACHE_PATH.with_name("year_ledger.json")
45
46
  YEAR_CACHE_TTL_SECONDS = 6 * 3600
46
47
  _YEAR_CACHE_SCHEMA = 6
47
48
  _YEAR_LEDGER_SCHEMA = 1
49
+ _year_ledger_lock = threading.Lock()
48
50
  _YEAR_LEDGER_TRIM_BUFFER_DAYS = 60
49
51
 
50
52
 
@@ -675,18 +677,21 @@ def _merge_year_ledger(
675
677
  *,
676
678
  trim_before: date,
677
679
  ) -> _YearLedger:
678
- ledger = _read_year_ledger()
679
- days = ledger["days"]
680
- for day_key, current_day in current_days.items():
681
- ledger_day = days.get(day_key)
682
- if ledger_day is None or current_day["total_tokens"] >= ledger_day["total_tokens"]:
683
- days[day_key] = current_day
684
-
685
- ledger["days"] = {
686
- day_key: day for day_key, day in days.items() if date.fromisoformat(day_key) >= trim_before
687
- }
688
- _write_year_ledger(ledger)
689
- return ledger
680
+ with _year_ledger_lock:
681
+ ledger = _read_year_ledger()
682
+ days = ledger["days"]
683
+ for day_key, current_day in current_days.items():
684
+ ledger_day = days.get(day_key)
685
+ if ledger_day is None or current_day["total_tokens"] >= ledger_day["total_tokens"]:
686
+ days[day_key] = current_day
687
+
688
+ ledger["days"] = {
689
+ day_key: day
690
+ for day_key, day in days.items()
691
+ if date.fromisoformat(day_key) >= trim_before
692
+ }
693
+ _write_year_ledger(ledger)
694
+ return ledger
690
695
 
691
696
 
692
697
  def _build_year_output_from_ledger(
@@ -1258,7 +1263,13 @@ def build_report_data(agents: list[AgentInfo], period: str = "month") -> ReportD
1258
1263
  entry for entry in weekly_entries if not ledger_backfill.is_ledger_entry(entry)
1259
1264
  ]
1260
1265
  windows = dispatch_ledger.load_windows() if weekly_entries else {}
1261
- estimates = dispatch_ledger.estimate_sessions(weekly_entries, windows, now)
1266
+ group_estimates, reset_sessions = dispatch_ledger.estimate_sessions(
1267
+ weekly_entries, windows, now
1268
+ )
1269
+ estimates: dict[tuple[str, str], float] = {}
1270
+ for (agent_id, session_id, _), value in group_estimates.items():
1271
+ key = (agent_id, session_id)
1272
+ estimates[key] = estimates.get(key, 0.0) + value
1262
1273
  sessions_by_cost = sorted(
1263
1274
  aggregate_sessions(real_entries), key=lambda session: session.cost_usd, reverse=True
1264
1275
  )
@@ -1322,7 +1333,12 @@ def build_report_data(agents: list[AgentInfo], period: str = "month") -> ReportD
1322
1333
  "sessions": session_rows,
1323
1334
  "daily_trend": daily_trend,
1324
1335
  "top_sessions": top_sessions,
1325
- "dispatch_ledger": dispatch_ledger.build_ledger(estimates, now),
1336
+ "dispatch_ledger": dispatch_ledger.build_ledger(
1337
+ group_estimates,
1338
+ now,
1339
+ reset_sessions,
1340
+ {key: window.used_pct for key, window in windows.items()},
1341
+ ),
1326
1342
  "comparison": comparison,
1327
1343
  "subscriptions": subscription.load_subscriptions(),
1328
1344
  "persona": _load_persona_for_period(period),
@@ -23,6 +23,7 @@ import logging
23
23
  import os
24
24
  from pathlib import Path
25
25
  import tempfile
26
+ import threading
26
27
  from typing import NotRequired, TypeGuard, TypedDict
27
28
 
28
29
  from adapters.types import UsageEntry
@@ -33,6 +34,7 @@ logger = logging.getLogger(__name__)
33
34
 
34
35
  SNAPSHOT_PATH = Path(os.path.expanduser("~/.usage/usage_snapshot.json"))
35
36
  SNAPSHOT_SCHEMA = 1
37
+ _snapshot_lock = threading.Lock()
36
38
 
37
39
  _RowKey = tuple[str, str, str, str, str]
38
40
 
@@ -79,9 +81,10 @@ def record_entries(
79
81
  ) -> UsageSnapshot:
80
82
  """Merge this load into the on-disk snapshot and return the result."""
81
83
  new_rows, new_headers = _aggregate_entries(entries, entry_dates)
82
- merged = _merge_snapshot(_read_snapshot(), new_rows, new_headers)
83
- _write_snapshot(merged)
84
- return merged
84
+ with _snapshot_lock:
85
+ merged = _merge_snapshot(_read_snapshot(), new_rows, new_headers)
86
+ _write_snapshot(merged)
87
+ return merged
85
88
 
86
89
 
87
90
  def read_snapshot() -> UsageSnapshot: