quotacap 0.0.19 → 0.0.20
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.
- package/README.md +53 -69
- package/dist/src/version.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,69 +1,63 @@
|
|
|
1
1
|
# QuotaCap
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
QuotaCap helps you get more from the AI coding subscriptions you already pay for: Claude Code, Codex, Kimi Code, and Grok. It tracks one current usage window and reset time for each plan, then estimates which plan to use next from remaining usage and recent pace when available.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/quotacap)
|
|
6
|
+
[](https://github.com/carlosboeing/quotacap/actions)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
[](package.json)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## Features
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
- **Visibility**: remaining usage and reset time for one current window per connected plan
|
|
13
|
+
- **Pacing**: recent usage when history is available, or an estimated pace while QuotaCap collects it
|
|
14
|
+
- **Advice**: an estimate of which plan to use next so you can use more of each allowance without exhausting one early
|
|
15
|
+
- **Dashboard, CLI, and MCP**: the same data and advice on every surface
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
## Providers
|
|
18
|
+
|
|
19
|
+
| Provider | Source |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Claude Code | Live |
|
|
22
|
+
| Codex | Live |
|
|
23
|
+
| Kimi Code | Live |
|
|
24
|
+
| Grok | Live |
|
|
25
|
+
| Antigravity / Gemini | Manual (`quotacap ingest`) |
|
|
26
|
+
|
|
27
|
+
Live adapters reuse the matching CLI login.
|
|
14
28
|
|
|
15
29
|
## Install
|
|
16
30
|
|
|
17
31
|
```bash
|
|
18
|
-
# Binary
|
|
32
|
+
# Binary: macOS and Linux, arm64 and x64. No Node.
|
|
19
33
|
curl -fsSL https://raw.githubusercontent.com/carlosboeing/quotacap/main/install.sh | sh
|
|
20
34
|
|
|
21
|
-
# Or
|
|
22
|
-
npm install -g quotacap
|
|
23
|
-
npx quotacap # run without install
|
|
35
|
+
# Or install with npm (Node 22.13+)
|
|
36
|
+
npm install -g quotacap
|
|
24
37
|
```
|
|
25
38
|
|
|
26
|
-
The binary is a self-contained
|
|
27
|
-
The npm package runs the same CLI on Node.
|
|
39
|
+
The binary is a self-contained executable from GitHub Releases.
|
|
40
|
+
The npm package runs the same CLI on Node. To run without a global install, replace `quotacap` with `npx quotacap` in any command, for example `npx quotacap web`.
|
|
28
41
|
|
|
29
42
|
## Quick start
|
|
30
43
|
|
|
31
44
|
```bash
|
|
32
|
-
|
|
33
|
-
quotacap
|
|
34
|
-
quotacap
|
|
35
|
-
quotacap web # http://localhost:8787
|
|
36
|
-
quotacap advise --json # tries HTTP, falls back to local DB
|
|
37
|
-
quotacap advise --json --task heavy
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## HTTP API
|
|
45
|
+
# Terminal 1: leave this running
|
|
46
|
+
quotacap init # writes ~/.quotacap/config.json
|
|
47
|
+
quotacap web # dashboard at http://localhost:8787
|
|
41
48
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
curl "http://localhost:8787/api/recommendation?task=any"
|
|
46
|
-
curl -X POST http://localhost:8787/api/refresh
|
|
49
|
+
# Terminal 2: after the dashboard table fills
|
|
50
|
+
quotacap status
|
|
51
|
+
quotacap advise
|
|
47
52
|
```
|
|
48
53
|
|
|
49
|
-
|
|
50
|
-
* `GET /api/quotas` → `Quota[]` with `stale`, `ageMs`
|
|
51
|
-
* `GET /api/recommendation?task=any` → `{use, reason, advisories}`
|
|
52
|
-
* `POST /api/refresh` → `{fulfilled, rejected, lastPollAt, degraded}` — debounced 60s, always 200
|
|
53
|
-
* `GET /` → `web/dist/index.html` if built, else `web/index.html`
|
|
54
|
+
`web` stays in the foreground and starts the daemon.
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
For a provider without a live adapter:
|
|
56
57
|
|
|
58
|
+
```bash
|
|
59
|
+
quotacap ingest --provider agy --text "65% used · resets Sep 1"
|
|
57
60
|
```
|
|
58
|
-
quotacap status [--json]
|
|
59
|
-
quotacap advise [--json] [--task any|heavy|light]
|
|
60
|
-
quotacap ingest --provider <id> --text "..."
|
|
61
|
-
quotacap web [--port 8787]
|
|
62
|
-
quotacap daemon [--foreground]
|
|
63
|
-
quotacap init
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
`advise` fetches `http://localhost:$port/api/recommendation` with 2s timeout. Falls back to local `recommend()` when daemon is down.
|
|
67
61
|
|
|
68
62
|
## MCP
|
|
69
63
|
|
|
@@ -76,44 +70,34 @@ quotacap init
|
|
|
76
70
|
```
|
|
77
71
|
|
|
78
72
|
Use `"command": "npx", "args": ["quotacap", "mcp"]` when installed via npm only.
|
|
79
|
-
Tools: `get_quotas`, `get_recommendation`, `forecast`. Wrapper over HTTP. Set `QUOTACAP_URL` to override.
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
Tools: `get_quotas`, `get_recommendation`, `forecast`.
|
|
82
75
|
|
|
83
|
-
|
|
84
|
-
Adapters (claude-cli ✓, manual ✓, others → manual-paste)
|
|
85
|
-
→ daemon (poll 15m + jitter, SQLite ~/.quotacap/quotacap.db)
|
|
86
|
-
→ HTTP :8787
|
|
87
|
-
→ dashboard + CLI + MCP (same handler)
|
|
88
|
-
```
|
|
76
|
+
## Privacy
|
|
89
77
|
|
|
90
|
-
|
|
78
|
+
Bound to `127.0.0.1`, with usage history stored under `~/.quotacap/`. Live adapters contact provider usage endpoints or invoke the provider CLI using your existing login. Codex, Kimi, and Grok adapters may refresh expired OAuth tokens and update the CLI-owned credential file. QuotaCap stores no API keys.
|
|
91
79
|
|
|
92
|
-
##
|
|
80
|
+
## Docs
|
|
93
81
|
|
|
94
|
-
|
|
82
|
+
- [Architecture](docs/architecture.md)
|
|
83
|
+
- [Changelog](docs/CHANGELOG.md)
|
|
84
|
+
- [Roadmap](docs/ROADMAP.md)
|
|
95
85
|
|
|
96
|
-
|
|
97
|
-
{ "port": 8787, "pollMinutes": 15, "enabledProviders": ["claude"] }
|
|
98
|
-
```
|
|
86
|
+
## License
|
|
99
87
|
|
|
100
|
-
|
|
88
|
+
MIT. See [LICENSE](LICENSE).
|
|
101
89
|
|
|
102
|
-
|
|
90
|
+
<details>
|
|
91
|
+
<summary>Development</summary>
|
|
103
92
|
|
|
104
93
|
```bash
|
|
105
|
-
npm test # vitest
|
|
94
|
+
npm test # vitest (builds first via pretest)
|
|
106
95
|
bun test tests/bun/ # bun-runtime tests (sqlite adapter, MCP translation)
|
|
107
|
-
npm run build
|
|
108
|
-
npm run build:bin
|
|
109
|
-
npx tsc --noEmit
|
|
96
|
+
npm run build
|
|
97
|
+
npm run build:bin
|
|
110
98
|
```
|
|
111
99
|
|
|
112
|
-
The
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
See `.workbench/2-design/2026-08-28-quotacap-design.md` for spec. See `docs/ROADMAP.md` for next steps.
|
|
116
|
-
|
|
117
|
-
## License
|
|
100
|
+
The store uses `node:sqlite` on Node and `bun:sqlite` on Bun.
|
|
101
|
+
The same code is an npm package and a compiled binary.
|
|
118
102
|
|
|
119
|
-
|
|
103
|
+
</details>
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by scripts/build-embed.mjs — do not edit
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.20";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by scripts/build-embed.mjs — do not edit
|
|
2
|
-
export const VERSION = "0.0.
|
|
2
|
+
export const VERSION = "0.0.20";
|
package/package.json
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quotacap",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
|
+
"description": "Local quota tracker for AI coding plans with a dashboard, CLI, MCP server, and next-plan recommendations.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": ["ai-coding", "cli", "mcp", "quota-tracker", "usage-limits", "usage-tracker", "claude-code", "codex", "kimi-code", "grok"],
|
|
4
7
|
"type": "module",
|
|
5
8
|
"repository": {
|
|
6
9
|
"type": "git",
|
|
7
10
|
"url": "git+https://github.com/carlosboeing/quotacap.git"
|
|
8
11
|
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/carlosboeing/quotacap/issues"
|
|
14
|
+
},
|
|
9
15
|
"bin": {
|
|
10
16
|
"quotacap": "dist/cli/index.js"
|
|
11
17
|
},
|