quotabubble 0.1.2__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.
- quotabubble-0.1.2/.github/workflows/ci.yml +27 -0
- quotabubble-0.1.2/.github/workflows/pages.yml +52 -0
- quotabubble-0.1.2/.github/workflows/publish.yml +50 -0
- quotabubble-0.1.2/.github/workflows/release.yml +38 -0
- quotabubble-0.1.2/.gitignore +25 -0
- quotabubble-0.1.2/AGENTS.md +25 -0
- quotabubble-0.1.2/LICENSE +21 -0
- quotabubble-0.1.2/PKG-INFO +123 -0
- quotabubble-0.1.2/README.md +94 -0
- quotabubble-0.1.2/assets/.gitkeep +1 -0
- quotabubble-0.1.2/assets/quotabubble.ico +0 -0
- quotabubble-0.1.2/assets/screenshot-compact.png +0 -0
- quotabubble-0.1.2/assets/screenshot-expanded.png +0 -0
- quotabubble-0.1.2/packaging/launcher.py +6 -0
- quotabubble-0.1.2/packaging/quotabubble.spec +42 -0
- quotabubble-0.1.2/pyproject.toml +73 -0
- quotabubble-0.1.2/scripts/make_icon.py +47 -0
- quotabubble-0.1.2/src/quotabubble/__init__.py +1 -0
- quotabubble-0.1.2/src/quotabubble/__main__.py +4 -0
- quotabubble-0.1.2/src/quotabubble/app/__init__.py +1 -0
- quotabubble-0.1.2/src/quotabubble/app/cache.py +38 -0
- quotabubble-0.1.2/src/quotabubble/app/instance.py +55 -0
- quotabubble-0.1.2/src/quotabubble/app/logging_setup.py +33 -0
- quotabubble-0.1.2/src/quotabubble/app/main.py +92 -0
- quotabubble-0.1.2/src/quotabubble/app/polling.py +159 -0
- quotabubble-0.1.2/src/quotabubble/app/providers.py +45 -0
- quotabubble-0.1.2/src/quotabubble/app/settings.py +59 -0
- quotabubble-0.1.2/src/quotabubble/app/state.py +21 -0
- quotabubble-0.1.2/src/quotabubble/credentials.py +19 -0
- quotabubble-0.1.2/src/quotabubble/credentials_windows.py +65 -0
- quotabubble-0.1.2/src/quotabubble/platform/__init__.py +12 -0
- quotabubble-0.1.2/src/quotabubble/platform/launch.py +9 -0
- quotabubble-0.1.2/src/quotabubble/platform/linux.py +31 -0
- quotabubble-0.1.2/src/quotabubble/platform/macos.py +43 -0
- quotabubble-0.1.2/src/quotabubble/platform/windows.py +49 -0
- quotabubble-0.1.2/src/quotabubble/providers/__init__.py +1 -0
- quotabubble-0.1.2/src/quotabubble/providers/antigravity.py +453 -0
- quotabubble-0.1.2/src/quotabubble/providers/base.py +90 -0
- quotabubble-0.1.2/src/quotabubble/providers/claude.py +303 -0
- quotabubble-0.1.2/src/quotabubble/providers/codex.py +190 -0
- quotabubble-0.1.2/src/quotabubble/providers/copilot.py +159 -0
- quotabubble-0.1.2/src/quotabubble/providers/deepseek.py +130 -0
- quotabubble-0.1.2/src/quotabubble/providers/openrouter.py +106 -0
- quotabubble-0.1.2/src/quotabubble/ui/__init__.py +1 -0
- quotabubble-0.1.2/src/quotabubble/ui/animations.py +1 -0
- quotabubble-0.1.2/src/quotabubble/ui/bubble.py +415 -0
- quotabubble-0.1.2/src/quotabubble/ui/context_menu.py +18 -0
- quotabubble-0.1.2/src/quotabubble/ui/formatting.py +32 -0
- quotabubble-0.1.2/src/quotabubble/ui/icon.py +39 -0
- quotabubble-0.1.2/src/quotabubble/ui/panel.py +197 -0
- quotabubble-0.1.2/src/quotabubble/ui/settings_dialog.py +212 -0
- quotabubble-0.1.2/src/quotabubble/ui/tray.py +58 -0
- quotabubble-0.1.2/tests/conftest.py +16 -0
- quotabubble-0.1.2/tests/fixtures/.gitkeep +1 -0
- quotabubble-0.1.2/tests/fixtures/antigravity_models.json +15 -0
- quotabubble-0.1.2/tests/fixtures/antigravity_quota_summary.json +32 -0
- quotabubble-0.1.2/tests/fixtures/claude_credentials.json +7 -0
- quotabubble-0.1.2/tests/fixtures/claude_usage.json +10 -0
- quotabubble-0.1.2/tests/fixtures/claude_usage_credits.json +24 -0
- quotabubble-0.1.2/tests/fixtures/claude_usage_limits.json +52 -0
- quotabubble-0.1.2/tests/fixtures/codex_credentials.json +6 -0
- quotabubble-0.1.2/tests/fixtures/codex_usage.json +22 -0
- quotabubble-0.1.2/tests/fixtures/codex_usage_credits.json +22 -0
- quotabubble-0.1.2/tests/fixtures/codex_usage_weekly_primary.json +11 -0
- quotabubble-0.1.2/tests/fixtures/copilot_usage.json +16 -0
- quotabubble-0.1.2/tests/fixtures/deepseek_balance.json +11 -0
- quotabubble-0.1.2/tests/fixtures/openrouter_credits.json +6 -0
- quotabubble-0.1.2/tests/test_antigravity.py +200 -0
- quotabubble-0.1.2/tests/test_bubble.py +83 -0
- quotabubble-0.1.2/tests/test_cache.py +24 -0
- quotabubble-0.1.2/tests/test_claude.py +161 -0
- quotabubble-0.1.2/tests/test_codex.py +127 -0
- quotabubble-0.1.2/tests/test_copilot.py +74 -0
- quotabubble-0.1.2/tests/test_deepseek.py +87 -0
- quotabubble-0.1.2/tests/test_formatting.py +33 -0
- quotabubble-0.1.2/tests/test_instance.py +15 -0
- quotabubble-0.1.2/tests/test_logging_setup.py +26 -0
- quotabubble-0.1.2/tests/test_openrouter.py +70 -0
- quotabubble-0.1.2/tests/test_package.py +5 -0
- quotabubble-0.1.2/tests/test_polling.py +115 -0
- quotabubble-0.1.2/tests/test_providers.py +60 -0
- quotabubble-0.1.2/tests/test_settings.py +26 -0
- quotabubble-0.1.2/tests/test_settings_dialog.py +109 -0
- quotabubble-0.1.2/uv.lock +509 -0
- quotabubble-0.1.2/website/.gitignore +3 -0
- quotabubble-0.1.2/website/astro.config.mjs +6 -0
- quotabubble-0.1.2/website/package-lock.json +5492 -0
- quotabubble-0.1.2/website/package.json +14 -0
- quotabubble-0.1.2/website/public/favicon.png +0 -0
- quotabubble-0.1.2/website/public/icon.png +0 -0
- quotabubble-0.1.2/website/public/screenshot-compact.png +0 -0
- quotabubble-0.1.2/website/public/screenshot-expanded.png +0 -0
- quotabubble-0.1.2/website/src/pages/index.astro +319 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: windows-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- uses: astral-sh/setup-uv@v5
|
|
17
|
+
with:
|
|
18
|
+
enable-cache: true
|
|
19
|
+
|
|
20
|
+
- name: Sync dependencies
|
|
21
|
+
run: uv sync
|
|
22
|
+
|
|
23
|
+
- name: Lint
|
|
24
|
+
run: uv run ruff check src tests
|
|
25
|
+
|
|
26
|
+
- name: Test
|
|
27
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "website/**"
|
|
8
|
+
- ".github/workflows/pages.yml"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pages: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: pages
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 22
|
|
29
|
+
cache: npm
|
|
30
|
+
cache-dependency-path: website/package-lock.json
|
|
31
|
+
|
|
32
|
+
- name: Install
|
|
33
|
+
run: npm ci
|
|
34
|
+
working-directory: website
|
|
35
|
+
|
|
36
|
+
- name: Build
|
|
37
|
+
run: npm run build
|
|
38
|
+
working-directory: website
|
|
39
|
+
|
|
40
|
+
- uses: actions/upload-pages-artifact@v3
|
|
41
|
+
with:
|
|
42
|
+
path: website/dist
|
|
43
|
+
|
|
44
|
+
deploy:
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
environment:
|
|
48
|
+
name: github-pages
|
|
49
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
50
|
+
steps:
|
|
51
|
+
- id: deployment
|
|
52
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
target:
|
|
7
|
+
description: Where to publish
|
|
8
|
+
type: choice
|
|
9
|
+
options: [testpypi, pypi]
|
|
10
|
+
default: testpypi
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: astral-sh/setup-uv@v5
|
|
23
|
+
|
|
24
|
+
- name: Build
|
|
25
|
+
run: uv build
|
|
26
|
+
|
|
27
|
+
- uses: actions/upload-artifact@v4
|
|
28
|
+
with:
|
|
29
|
+
name: dist
|
|
30
|
+
path: dist/
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
needs: build
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
environment: ${{ inputs.target }}
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/download-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
|
|
42
|
+
- uses: astral-sh/setup-uv@v5
|
|
43
|
+
|
|
44
|
+
- name: Publish to TestPyPI
|
|
45
|
+
if: inputs.target == 'testpypi'
|
|
46
|
+
run: uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always
|
|
47
|
+
|
|
48
|
+
- name: Publish to PyPI
|
|
49
|
+
if: inputs.target == 'pypi'
|
|
50
|
+
run: uv publish --trusted-publishing always
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
windows:
|
|
13
|
+
runs-on: windows-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
with:
|
|
19
|
+
enable-cache: true
|
|
20
|
+
|
|
21
|
+
- name: Sync dependencies
|
|
22
|
+
run: uv sync
|
|
23
|
+
|
|
24
|
+
- name: Test
|
|
25
|
+
run: uv run pytest -q
|
|
26
|
+
|
|
27
|
+
- name: Build
|
|
28
|
+
run: uv run pyinstaller --noconfirm packaging/quotabubble.spec
|
|
29
|
+
|
|
30
|
+
- name: Package
|
|
31
|
+
shell: pwsh
|
|
32
|
+
run: Compress-Archive -Path dist/QuotaBubble/* -DestinationPath QuotaBubble-windows-x64.zip
|
|
33
|
+
|
|
34
|
+
- name: Publish release
|
|
35
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
36
|
+
uses: softprops/action-gh-release@v2
|
|
37
|
+
with:
|
|
38
|
+
files: QuotaBubble-windows-x64.zip
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
.eggs/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
htmlcov/
|
|
15
|
+
|
|
16
|
+
.idea/
|
|
17
|
+
.vscode/
|
|
18
|
+
.DS_Store
|
|
19
|
+
Thumbs.db
|
|
20
|
+
|
|
21
|
+
.env
|
|
22
|
+
|
|
23
|
+
# Local reference clones (not part of the project)
|
|
24
|
+
external/
|
|
25
|
+
.wakatime-project
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# QuotaBubble — agent guidelines
|
|
2
|
+
|
|
3
|
+
## Workflow
|
|
4
|
+
|
|
5
|
+
- **Never commit directly to `main`.** Create a branch per item: `feat/…`, `fix/…`, `chore/…`, `docs/…`.
|
|
6
|
+
- Push the branch and **open a pull request** describing the change.
|
|
7
|
+
- **Wait for review.** Address review comments by pushing follow-up commits to the same branch.
|
|
8
|
+
- Merge **only after explicit approval**, and **never squash-merge** — use a merge commit (default).
|
|
9
|
+
|
|
10
|
+
## Development
|
|
11
|
+
|
|
12
|
+
- Package manager: `uv`.
|
|
13
|
+
- Lint: `uv run ruff check src tests`.
|
|
14
|
+
- Test: `uv run pytest -q`.
|
|
15
|
+
- Providers live in `src/quotabubble/providers/` behind the `Provider` protocol; they must not import Qt.
|
|
16
|
+
- Platform-specific behavior (window flags, credential stores, autostart) lives in `src/quotabubble/platform/`.
|
|
17
|
+
- The UI (`src/quotabubble/ui/`) renders `UsageSnapshot` objects and must not perform I/O or HTTP itself.
|
|
18
|
+
|
|
19
|
+
## Runtime notes
|
|
20
|
+
|
|
21
|
+
- Config: `%LOCALAPPDATA%\quotabubble\settings.json`.
|
|
22
|
+
- Last-good cache: `%LOCALAPPDATA%\quotabubble\Cache\last_good.json`.
|
|
23
|
+
- Logs: `%LOCALAPPDATA%\quotabubble\Logs\quotabubble.log` (rotating).
|
|
24
|
+
- Only one instance runs; a second launch re-shows the first.
|
|
25
|
+
- Poll interval defaults to 5 minutes; transient errors fall back to the last-good snapshot.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 izzet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: quotabubble
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: A lightweight cross-platform floating widget that shows AI usage quotas.
|
|
5
|
+
Project-URL: Homepage, https://izzet.github.io/quotabubble/
|
|
6
|
+
Project-URL: Repository, https://github.com/izzet/quotabubble
|
|
7
|
+
Project-URL: Issues, https://github.com/izzet/quotabubble/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/izzet/quotabubble/releases
|
|
9
|
+
Author: izzet
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,antigravity,claude-code,codex,copilot,deepseek,desktop-widget,openrouter,pyside6,quota,usage
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: httpx2>=2.12
|
|
25
|
+
Requires-Dist: platformdirs>=4.0
|
|
26
|
+
Requires-Dist: pydantic>=2.0
|
|
27
|
+
Requires-Dist: pyside6>=6.7
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# QuotaBubble
|
|
31
|
+
|
|
32
|
+
**Your AI usage limits, always in sight.**
|
|
33
|
+
|
|
34
|
+
QuotaBubble is a small, frameless desktop widget that keeps the usage limits for your AI coding tools visible without opening a dashboard, terminal, or browser. It floats above your windows, fades to almost nothing when idle, and expands into a compact detail panel when you click it.
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="https://izzet.github.io/quotabubble/screenshot-compact.png?v=2" width="260" alt="Idle bubble">
|
|
38
|
+
<img src="https://izzet.github.io/quotabubble/screenshot-expanded.png?v=2" width="300" alt="Expanded detail">
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Frameless floating bubble** — translucent, rounded, always on top, and it never steals keyboard focus.
|
|
44
|
+
- **Fades away when idle** — a configurable low opacity keeps it unobtrusive; hover to bring it back.
|
|
45
|
+
- **Click to expand** — see each usage window, the percentage used, and a live reset countdown.
|
|
46
|
+
- **Drag anywhere** — move it across monitors; the position is remembered.
|
|
47
|
+
- **Tray icon** — show/hide, settings, open logs, and quit.
|
|
48
|
+
- **Resilient** — refreshes every 5 minutes, caches the last good values, and keeps showing them (dimmed) through transient network or rate-limit errors.
|
|
49
|
+
- **Local only** — it reuses the credentials your tools already store and talks straight to the providers. No telemetry, no QuotaBubble server.
|
|
50
|
+
|
|
51
|
+
## Supported providers
|
|
52
|
+
|
|
53
|
+
| Provider | Authentication |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| Claude Code | `~/.claude/.credentials.json` |
|
|
56
|
+
| Codex | `~/.codex/auth.json` |
|
|
57
|
+
| Google Antigravity | Windows Credential Manager (`gemini:antigravity`) |
|
|
58
|
+
| GitHub Copilot | Windows Credential Manager (`…copilot-cli`) |
|
|
59
|
+
| DeepSeek | API key |
|
|
60
|
+
| OpenRouter | API key |
|
|
61
|
+
|
|
62
|
+
Providers are detected automatically. Enable or disable them in Settings; API keys are entered there and validated inline with a **Test** button. On Windows, Antigravity and Copilot read their existing sign-ins from Credential Manager.
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
### Windows
|
|
67
|
+
|
|
68
|
+
Download the latest `QuotaBubble-windows-x64.zip` from the [Releases page](https://github.com/izzet/quotabubble/releases), unzip it, and run `QuotaBubble.exe`.
|
|
69
|
+
|
|
70
|
+
> The binary is not code-signed yet, so Windows SmartScreen may warn you. Choose **More info → Run anyway**.
|
|
71
|
+
|
|
72
|
+
### From source (Python 3.11+)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git clone https://github.com/izzet/quotabubble.git
|
|
76
|
+
cd quotabubble
|
|
77
|
+
uv tool install --editable .
|
|
78
|
+
quotabubble
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You can also install it as a standalone command with [pipx](https://pipx.pypa.io/): `pipx install quotabubble`.
|
|
82
|
+
|
|
83
|
+
## Usage
|
|
84
|
+
|
|
85
|
+
- **Idle** — a faint bubble; hover to make it fully visible.
|
|
86
|
+
- **Click** — expand the detail panel; click again to collapse.
|
|
87
|
+
- **Drag** — grab and move it anywhere, including across monitors.
|
|
88
|
+
- **Right-click / tray** — Settings, Open logs, Show/Hide, Quit.
|
|
89
|
+
- **Launch at login** — enable it in Settings.
|
|
90
|
+
|
|
91
|
+
## Settings
|
|
92
|
+
|
|
93
|
+
Idle opacity, fade delay, refresh interval (default 5 minutes), show percentage used vs. remaining, launch at login, and which providers are visible.
|
|
94
|
+
|
|
95
|
+
## Where things live
|
|
96
|
+
|
|
97
|
+
On Windows:
|
|
98
|
+
|
|
99
|
+
| Path | Purpose |
|
|
100
|
+
| --- | --- |
|
|
101
|
+
| `%LOCALAPPDATA%\quotabubble\settings.json` | Settings |
|
|
102
|
+
| `%LOCALAPPDATA%\quotabubble\Cache\last_good.json` | Last-good snapshots |
|
|
103
|
+
| `%LOCALAPPDATA%\quotabubble\Logs\quotabubble.log` | Rotating log |
|
|
104
|
+
|
|
105
|
+
On macOS and Linux these map to the standard platform directories.
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
uv sync
|
|
111
|
+
uv run ruff check src tests
|
|
112
|
+
uv run pytest -q
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
See [AGENTS.md](AGENTS.md) for architecture and contribution conventions. The provider layer (`src/quotabubble/providers/`) is pure Python behind a `Provider` protocol, and platform specifics live in `src/quotabubble/platform/`.
|
|
116
|
+
|
|
117
|
+
## Status
|
|
118
|
+
|
|
119
|
+
Windows is the primary, fully supported platform. Claude, Codex, DeepSeek, and OpenRouter work anywhere; Antigravity and Copilot currently use the Windows credential store and need macOS/Linux implementations. API keys are stored in the local settings file for now — moving them to the OS keyring is tracked in [#3](https://github.com/izzet/quotabubble/issues/3).
|
|
120
|
+
|
|
121
|
+
## License
|
|
122
|
+
|
|
123
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# QuotaBubble
|
|
2
|
+
|
|
3
|
+
**Your AI usage limits, always in sight.**
|
|
4
|
+
|
|
5
|
+
QuotaBubble is a small, frameless desktop widget that keeps the usage limits for your AI coding tools visible without opening a dashboard, terminal, or browser. It floats above your windows, fades to almost nothing when idle, and expands into a compact detail panel when you click it.
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="https://izzet.github.io/quotabubble/screenshot-compact.png?v=2" width="260" alt="Idle bubble">
|
|
9
|
+
<img src="https://izzet.github.io/quotabubble/screenshot-expanded.png?v=2" width="300" alt="Expanded detail">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **Frameless floating bubble** — translucent, rounded, always on top, and it never steals keyboard focus.
|
|
15
|
+
- **Fades away when idle** — a configurable low opacity keeps it unobtrusive; hover to bring it back.
|
|
16
|
+
- **Click to expand** — see each usage window, the percentage used, and a live reset countdown.
|
|
17
|
+
- **Drag anywhere** — move it across monitors; the position is remembered.
|
|
18
|
+
- **Tray icon** — show/hide, settings, open logs, and quit.
|
|
19
|
+
- **Resilient** — refreshes every 5 minutes, caches the last good values, and keeps showing them (dimmed) through transient network or rate-limit errors.
|
|
20
|
+
- **Local only** — it reuses the credentials your tools already store and talks straight to the providers. No telemetry, no QuotaBubble server.
|
|
21
|
+
|
|
22
|
+
## Supported providers
|
|
23
|
+
|
|
24
|
+
| Provider | Authentication |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Claude Code | `~/.claude/.credentials.json` |
|
|
27
|
+
| Codex | `~/.codex/auth.json` |
|
|
28
|
+
| Google Antigravity | Windows Credential Manager (`gemini:antigravity`) |
|
|
29
|
+
| GitHub Copilot | Windows Credential Manager (`…copilot-cli`) |
|
|
30
|
+
| DeepSeek | API key |
|
|
31
|
+
| OpenRouter | API key |
|
|
32
|
+
|
|
33
|
+
Providers are detected automatically. Enable or disable them in Settings; API keys are entered there and validated inline with a **Test** button. On Windows, Antigravity and Copilot read their existing sign-ins from Credential Manager.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
### Windows
|
|
38
|
+
|
|
39
|
+
Download the latest `QuotaBubble-windows-x64.zip` from the [Releases page](https://github.com/izzet/quotabubble/releases), unzip it, and run `QuotaBubble.exe`.
|
|
40
|
+
|
|
41
|
+
> The binary is not code-signed yet, so Windows SmartScreen may warn you. Choose **More info → Run anyway**.
|
|
42
|
+
|
|
43
|
+
### From source (Python 3.11+)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/izzet/quotabubble.git
|
|
47
|
+
cd quotabubble
|
|
48
|
+
uv tool install --editable .
|
|
49
|
+
quotabubble
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
You can also install it as a standalone command with [pipx](https://pipx.pypa.io/): `pipx install quotabubble`.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
- **Idle** — a faint bubble; hover to make it fully visible.
|
|
57
|
+
- **Click** — expand the detail panel; click again to collapse.
|
|
58
|
+
- **Drag** — grab and move it anywhere, including across monitors.
|
|
59
|
+
- **Right-click / tray** — Settings, Open logs, Show/Hide, Quit.
|
|
60
|
+
- **Launch at login** — enable it in Settings.
|
|
61
|
+
|
|
62
|
+
## Settings
|
|
63
|
+
|
|
64
|
+
Idle opacity, fade delay, refresh interval (default 5 minutes), show percentage used vs. remaining, launch at login, and which providers are visible.
|
|
65
|
+
|
|
66
|
+
## Where things live
|
|
67
|
+
|
|
68
|
+
On Windows:
|
|
69
|
+
|
|
70
|
+
| Path | Purpose |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `%LOCALAPPDATA%\quotabubble\settings.json` | Settings |
|
|
73
|
+
| `%LOCALAPPDATA%\quotabubble\Cache\last_good.json` | Last-good snapshots |
|
|
74
|
+
| `%LOCALAPPDATA%\quotabubble\Logs\quotabubble.log` | Rotating log |
|
|
75
|
+
|
|
76
|
+
On macOS and Linux these map to the standard platform directories.
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
uv sync
|
|
82
|
+
uv run ruff check src tests
|
|
83
|
+
uv run pytest -q
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
See [AGENTS.md](AGENTS.md) for architecture and contribution conventions. The provider layer (`src/quotabubble/providers/`) is pure Python behind a `Provider` protocol, and platform specifics live in `src/quotabubble/platform/`.
|
|
87
|
+
|
|
88
|
+
## Status
|
|
89
|
+
|
|
90
|
+
Windows is the primary, fully supported platform. Claude, Codex, DeepSeek, and OpenRouter work anywhere; Antigravity and Copilot currently use the Windows credential store and need macOS/Linux implementations. API keys are stored in the local settings file for now — moving them to the OS keyring is tracked in [#3](https://github.com/izzet/quotabubble/issues/3).
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# -*- mode: python ; coding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
ROOT = Path(SPECPATH).parent
|
|
6
|
+
|
|
7
|
+
a = Analysis(
|
|
8
|
+
[str(Path(SPECPATH) / "launcher.py")],
|
|
9
|
+
pathex=[str(ROOT / "src")],
|
|
10
|
+
binaries=[],
|
|
11
|
+
datas=[],
|
|
12
|
+
hiddenimports=[],
|
|
13
|
+
hookspath=[],
|
|
14
|
+
hooksconfig={},
|
|
15
|
+
runtime_hooks=[],
|
|
16
|
+
excludes=[],
|
|
17
|
+
noarchive=False,
|
|
18
|
+
)
|
|
19
|
+
pyz = PYZ(a.pure)
|
|
20
|
+
|
|
21
|
+
exe = EXE(
|
|
22
|
+
pyz,
|
|
23
|
+
a.scripts,
|
|
24
|
+
[],
|
|
25
|
+
exclude_binaries=True,
|
|
26
|
+
name="QuotaBubble",
|
|
27
|
+
debug=False,
|
|
28
|
+
bootloader_ignore_signals=False,
|
|
29
|
+
strip=False,
|
|
30
|
+
upx=False,
|
|
31
|
+
console=False,
|
|
32
|
+
icon=str(ROOT / "assets" / "quotabubble.ico"),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
coll = COLLECT(
|
|
36
|
+
exe,
|
|
37
|
+
a.binaries,
|
|
38
|
+
a.datas,
|
|
39
|
+
strip=False,
|
|
40
|
+
upx=False,
|
|
41
|
+
name="QuotaBubble",
|
|
42
|
+
)
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "quotabubble"
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
description = "A lightweight cross-platform floating widget that shows AI usage quotas."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
requires-python = ">=3.11"
|
|
8
|
+
authors = [{ name = "izzet" }]
|
|
9
|
+
keywords = [
|
|
10
|
+
"ai",
|
|
11
|
+
"usage",
|
|
12
|
+
"quota",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"codex",
|
|
15
|
+
"copilot",
|
|
16
|
+
"antigravity",
|
|
17
|
+
"deepseek",
|
|
18
|
+
"openrouter",
|
|
19
|
+
"desktop-widget",
|
|
20
|
+
"pyside6",
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Development Status :: 3 - Alpha",
|
|
24
|
+
"Environment :: X11 Applications :: Qt",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Operating System :: MacOS",
|
|
27
|
+
"Operating System :: Microsoft :: Windows",
|
|
28
|
+
"Operating System :: POSIX :: Linux",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Topic :: Utilities",
|
|
33
|
+
]
|
|
34
|
+
dependencies = [
|
|
35
|
+
"httpx2>=2.12",
|
|
36
|
+
"platformdirs>=4.0",
|
|
37
|
+
"pydantic>=2.0",
|
|
38
|
+
"pyside6>=6.7",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.gui-scripts]
|
|
42
|
+
quotabubble = "quotabubble.app.main:main"
|
|
43
|
+
|
|
44
|
+
[project.urls]
|
|
45
|
+
Homepage = "https://izzet.github.io/quotabubble/"
|
|
46
|
+
Repository = "https://github.com/izzet/quotabubble"
|
|
47
|
+
Issues = "https://github.com/izzet/quotabubble/issues"
|
|
48
|
+
Changelog = "https://github.com/izzet/quotabubble/releases"
|
|
49
|
+
|
|
50
|
+
[dependency-groups]
|
|
51
|
+
dev = [
|
|
52
|
+
"pyinstaller>=6.0",
|
|
53
|
+
"pytest>=8.0",
|
|
54
|
+
"ruff>=0.6",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[build-system]
|
|
58
|
+
requires = ["hatchling"]
|
|
59
|
+
build-backend = "hatchling.build"
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.wheel]
|
|
62
|
+
packages = ["src/quotabubble"]
|
|
63
|
+
|
|
64
|
+
[tool.ruff]
|
|
65
|
+
line-length = 100
|
|
66
|
+
target-version = "py311"
|
|
67
|
+
extend-exclude = ["external"]
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = ["E", "F", "I", "UP", "B"]
|
|
71
|
+
|
|
72
|
+
[tool.pytest.ini_options]
|
|
73
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import struct
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
|
|
8
|
+
|
|
9
|
+
from PySide6.QtCore import QBuffer
|
|
10
|
+
from PySide6.QtGui import QGuiApplication
|
|
11
|
+
|
|
12
|
+
from quotabubble.ui.icon import _pixmap
|
|
13
|
+
|
|
14
|
+
SIZES = (16, 24, 32, 48, 64, 128, 256)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _png_bytes(size: int) -> bytes:
|
|
18
|
+
buffer = QBuffer()
|
|
19
|
+
buffer.open(QBuffer.OpenModeFlag.WriteOnly)
|
|
20
|
+
_pixmap(size).toImage().save(buffer, "PNG")
|
|
21
|
+
return bytes(buffer.data())
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def build_ico(path: Path) -> None:
|
|
25
|
+
images = [(size, _png_bytes(size)) for size in SIZES]
|
|
26
|
+
header = struct.pack("<HHH", 0, 1, len(images))
|
|
27
|
+
offset = 6 + 16 * len(images)
|
|
28
|
+
entries = b""
|
|
29
|
+
data = b""
|
|
30
|
+
for size, blob in images:
|
|
31
|
+
dimension = 0 if size >= 256 else size
|
|
32
|
+
entries += struct.pack("<BBBBHHII", dimension, dimension, 0, 0, 1, 32, len(blob), offset)
|
|
33
|
+
offset += len(blob)
|
|
34
|
+
data += blob
|
|
35
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
36
|
+
path.write_bytes(header + entries + data)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def main() -> None:
|
|
40
|
+
QGuiApplication([])
|
|
41
|
+
target = Path(__file__).resolve().parent.parent / "assets" / "quotabubble.ico"
|
|
42
|
+
build_ico(target)
|
|
43
|
+
print(f"wrote {target}")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
if __name__ == "__main__":
|
|
47
|
+
main()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|