@howaboua/opencode-usage-plugin 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +11 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,6 +6,7 @@ Track AI provider rate limits and quotas in real-time.
6
6
 
7
7
  - **Live rate limits** – See Codex/OpenAI hourly/weekly limits at a glance
8
8
  - **Proxy quota stats** – Monitor Mirrowel Proxy credentials and tier usage
9
+ - **Copilot usage** – Track GitHub Copilot chat + completions quotas
9
10
  - **Inline status** – Results appear directly in your chat, no context switching
10
11
  - **Zero setup** – Auto-detects providers from your existing config
11
12
 
@@ -18,7 +19,7 @@ Add to your `opencode.json`:
18
19
  ```json
19
20
  {
20
21
  "$schema": "https://opencode.ai/config.json",
21
- "plugins": ["@howaboua/opencode-usage-plugin"]
22
+ "plugin": ["@howaboua/opencode-usage-plugin"]
22
23
  }
23
24
  ```
24
25
 
@@ -37,6 +38,7 @@ OpenCode installs dependencies automatically on next launch.
37
38
  ```
38
39
  /usage codex
39
40
  /usage proxy
41
+ /usage copilot
40
42
  ```
41
43
 
42
44
  ### Support the proxy
@@ -51,6 +53,7 @@ OpenCode installs dependencies automatically on next launch.
51
53
  |----------|--------|
52
54
  | **Codex / OpenAI** | Auth tokens + `/wham/usage` endpoint |
53
55
  | **Mirrowel Proxy** | Local `/v1/quota-stats` endpoint |
56
+ | **GitHub Copilot** | GitHub internal usage APIs |
54
57
 
55
58
  ## Configuration
56
59
 
@@ -70,21 +73,20 @@ Optional config at `~/.config/opencode/usage-config.jsonc`:
70
73
  // Show/hide providers in /usage output
71
74
  "providers": {
72
75
  "openai": true,
73
- "proxy": true
76
+ "proxy": true,
77
+ "copilot": true
74
78
  }
75
79
  }
76
80
  ```
77
81
 
78
82
  If missing, the plugin creates a default template on first run.
79
83
 
80
- ## Development
84
+ ### Copilot auth
81
85
 
82
- ```bash
83
- # Check DB contents
84
- bun run debug-db.ts
86
+ Copilot is detected from either of these locations:
85
87
 
86
- # Verify path resolution
87
- bun run debug-path.ts
88
- ```
88
+ - `~/.local/share/opencode/copilot-usage-token.json`
89
+ - `~/.local/share/opencode/auth.json` with a `github-copilot` entry
90
+ - `~/.config/opencode/copilot-quota-token.json` (optional override)
89
91
 
90
92
  See `AGENTS.md` for internal architecture.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@howaboua/opencode-usage-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "opencode plugin for tracking AI provider usage, rate limits, and quotas",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",