claude-usage-limits 0.3.0__tar.gz → 0.3.1__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 (19) hide show
  1. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/PKG-INFO +19 -4
  2. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/README.md +16 -1
  3. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/pyproject.toml +3 -3
  4. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/__init__.py +1 -1
  5. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage_limits.egg-info/PKG-INFO +19 -4
  6. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/tests/test_report.py +1 -1
  7. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/LICENSE +0 -0
  8. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/setup.cfg +0 -0
  9. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/__main__.py +0 -0
  10. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/api.py +0 -0
  11. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/auth.py +0 -0
  12. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/cli.py +0 -0
  13. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage/report.py +0 -0
  14. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage_limits.egg-info/SOURCES.txt +0 -0
  15. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage_limits.egg-info/dependency_links.txt +0 -0
  16. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage_limits.egg-info/entry_points.txt +0 -0
  17. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/src/claude_usage_limits.egg-info/top_level.txt +0 -0
  18. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/tests/test_auth.py +0 -0
  19. {claude_usage_limits-0.3.0 → claude_usage_limits-0.3.1}/tests/test_sources.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-usage-limits
3
- Version: 0.3.0
4
- Summary: CLI for Claude subscription usage and model limits, with status-line output and warning thresholds.
3
+ Version: 0.3.1
4
+ Summary: CLI for Claude subscription limits (5-hour, weekly, model caps, Enterprise spend) with status-line, SwiftBar menu bar, and warning thresholds.
5
5
  Author: claude-usage contributors
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/javaisbetterthanpython/claude-usage
8
8
  Project-URL: Issues, https://github.com/javaisbetterthanpython/claude-usage/issues
9
- Keywords: claude,claude-code,anthropic,usage,rate-limit,weekly-usage,subscription,statusline,cli
9
+ Keywords: claude,claude-code,anthropic,usage,rate-limit,weekly-usage,subscription,statusline,swiftbar,menubar,cli
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -51,6 +51,7 @@ Usage-based plans such as Enterprise show spend instead of percentages.
51
51
 
52
52
  ```text
53
53
  $ claude-usage
54
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
54
55
  7-day: 59% used, resets Sun 03:00 (in 12h29m)
55
56
  ```
56
57
 
@@ -101,6 +102,7 @@ only in plain format, keeping JSON machine-readable and short output on one line
101
102
  <summary><b>📊 Example: <code>--all</code></b></summary>
102
103
 
103
104
  ```text
105
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
104
106
  7-day: 60% used, resets Sun 03:00 (in 12h11m)
105
107
  kind percent severity active model reset
106
108
  ------------------------------------------------------------------------------
@@ -151,10 +153,23 @@ Missing parts are omitted. This mode never looks up credentials or makes a netwo
151
153
  call. It also writes `last-statusline.json`, feeding the documented fallback when
152
154
  the endpoint is unavailable. Invalid input produces no output and exits 0.
153
155
  `claude-usage --format short` gives the same compact format from the normal source
154
- order; endpoint answers usually have no model, so show `7d 59%`.
156
+ order; endpoint answers usually have no model, so show `5h 23% · 7d 59%`.
155
157
 
156
158
  ## 🖥️ SwiftBar menu bar
157
159
 
160
+ ```text
161
+ $ claude-usage --format menubar
162
+ 5h 23% · 7d 59% | sfimage=gauge.with.dots.needle.50percent
163
+ ---
164
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
165
+ 7-day: 59% used, resets Sun 03:00 (in 12h29m)
166
+ weekly_scoped (Fable): 9%
167
+ Source: endpoint | size=11
168
+ ```
169
+
170
+ The title turns orange at 70% and red at 90%. On usage-based plans it shows the
171
+ spend, e.g. `$12.34`. If every source fails, the item shows `Claude ⚠` with the reason.
172
+
158
173
  Save `claude-usage.1m.sh` in your SwiftBar plugin folder and make it executable.
159
174
 
160
175
  ```sh
@@ -31,6 +31,7 @@ Usage-based plans such as Enterprise show spend instead of percentages.
31
31
 
32
32
  ```text
33
33
  $ claude-usage
34
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
34
35
  7-day: 59% used, resets Sun 03:00 (in 12h29m)
35
36
  ```
36
37
 
@@ -81,6 +82,7 @@ only in plain format, keeping JSON machine-readable and short output on one line
81
82
  <summary><b>📊 Example: <code>--all</code></b></summary>
82
83
 
83
84
  ```text
85
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
84
86
  7-day: 60% used, resets Sun 03:00 (in 12h11m)
85
87
  kind percent severity active model reset
86
88
  ------------------------------------------------------------------------------
@@ -131,10 +133,23 @@ Missing parts are omitted. This mode never looks up credentials or makes a netwo
131
133
  call. It also writes `last-statusline.json`, feeding the documented fallback when
132
134
  the endpoint is unavailable. Invalid input produces no output and exits 0.
133
135
  `claude-usage --format short` gives the same compact format from the normal source
134
- order; endpoint answers usually have no model, so show `7d 59%`.
136
+ order; endpoint answers usually have no model, so show `5h 23% · 7d 59%`.
135
137
 
136
138
  ## 🖥️ SwiftBar menu bar
137
139
 
140
+ ```text
141
+ $ claude-usage --format menubar
142
+ 5h 23% · 7d 59% | sfimage=gauge.with.dots.needle.50percent
143
+ ---
144
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
145
+ 7-day: 59% used, resets Sun 03:00 (in 12h29m)
146
+ weekly_scoped (Fable): 9%
147
+ Source: endpoint | size=11
148
+ ```
149
+
150
+ The title turns orange at 70% and red at 90%. On usage-based plans it shows the
151
+ spend, e.g. `$12.34`. If every source fails, the item shows `Claude ⚠` with the reason.
152
+
138
153
  Save `claude-usage.1m.sh` in your SwiftBar plugin folder and make it executable.
139
154
 
140
155
  ```sh
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "claude-usage-limits"
7
- version = "0.3.0"
8
- description = "CLI for Claude subscription usage and model limits, with status-line output and warning thresholds."
7
+ version = "0.3.1"
8
+ description = "CLI for Claude subscription limits (5-hour, weekly, model caps, Enterprise spend) with status-line, SwiftBar menu bar, and warning thresholds."
9
9
  readme = "README.md"
10
10
  license = "MIT"
11
11
  license-files = ["LICENSE"]
12
12
  requires-python = ">=3.9"
13
13
  authors = [{ name = "claude-usage contributors" }]
14
- keywords = ["claude", "claude-code", "anthropic", "usage", "rate-limit", "weekly-usage", "subscription", "statusline", "cli"]
14
+ keywords = ["claude", "claude-code", "anthropic", "usage", "rate-limit", "weekly-usage", "subscription", "statusline", "swiftbar", "menubar", "cli"]
15
15
  classifiers = [
16
16
  "Development Status :: 4 - Beta",
17
17
  "Environment :: Console",
@@ -1,3 +1,3 @@
1
1
  """claude-usage: read your Claude subscription rate-limit windows."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.1"
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-usage-limits
3
- Version: 0.3.0
4
- Summary: CLI for Claude subscription usage and model limits, with status-line output and warning thresholds.
3
+ Version: 0.3.1
4
+ Summary: CLI for Claude subscription limits (5-hour, weekly, model caps, Enterprise spend) with status-line, SwiftBar menu bar, and warning thresholds.
5
5
  Author: claude-usage contributors
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/javaisbetterthanpython/claude-usage
8
8
  Project-URL: Issues, https://github.com/javaisbetterthanpython/claude-usage/issues
9
- Keywords: claude,claude-code,anthropic,usage,rate-limit,weekly-usage,subscription,statusline,cli
9
+ Keywords: claude,claude-code,anthropic,usage,rate-limit,weekly-usage,subscription,statusline,swiftbar,menubar,cli
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -51,6 +51,7 @@ Usage-based plans such as Enterprise show spend instead of percentages.
51
51
 
52
52
  ```text
53
53
  $ claude-usage
54
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
54
55
  7-day: 59% used, resets Sun 03:00 (in 12h29m)
55
56
  ```
56
57
 
@@ -101,6 +102,7 @@ only in plain format, keeping JSON machine-readable and short output on one line
101
102
  <summary><b>📊 Example: <code>--all</code></b></summary>
102
103
 
103
104
  ```text
105
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
104
106
  7-day: 60% used, resets Sun 03:00 (in 12h11m)
105
107
  kind percent severity active model reset
106
108
  ------------------------------------------------------------------------------
@@ -151,10 +153,23 @@ Missing parts are omitted. This mode never looks up credentials or makes a netwo
151
153
  call. It also writes `last-statusline.json`, feeding the documented fallback when
152
154
  the endpoint is unavailable. Invalid input produces no output and exits 0.
153
155
  `claude-usage --format short` gives the same compact format from the normal source
154
- order; endpoint answers usually have no model, so show `7d 59%`.
156
+ order; endpoint answers usually have no model, so show `5h 23% · 7d 59%`.
155
157
 
156
158
  ## 🖥️ SwiftBar menu bar
157
159
 
160
+ ```text
161
+ $ claude-usage --format menubar
162
+ 5h 23% · 7d 59% | sfimage=gauge.with.dots.needle.50percent
163
+ ---
164
+ 5-hour: 23% used, resets 17:40 (in 2h13m)
165
+ 7-day: 59% used, resets Sun 03:00 (in 12h29m)
166
+ weekly_scoped (Fable): 9%
167
+ Source: endpoint | size=11
168
+ ```
169
+
170
+ The title turns orange at 70% and red at 90%. On usage-based plans it shows the
171
+ spend, e.g. `$12.34`. If every source fails, the item shows `Claude ⚠` with the reason.
172
+
158
173
  Save `claude-usage.1m.sh` in your SwiftBar plugin folder and make it executable.
159
174
 
160
175
  ```sh
@@ -210,7 +210,7 @@ def test_version(capsys):
210
210
  with pytest.raises(SystemExit) as exc:
211
211
  cli.main(["--version"])
212
212
  assert exc.value.code == 0
213
- assert capsys.readouterr().out == "claude-usage 0.3.0\n"
213
+ assert capsys.readouterr().out == "claude-usage 0.3.1\n"
214
214
 
215
215
 
216
216
  def test_help_hides_statusline(capsys):