ai-heatmap 1.14.4 → 1.14.7

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 CHANGED
@@ -12,14 +12,12 @@ Powered by [ccusage](https://github.com/ryoppippi/ccusage) + [react-activity-cal
12
12
 
13
13
  ## Quick Start
14
14
 
15
- ```shell
15
+ ```bash
16
16
  brew install gh
17
17
  gh auth login
18
18
  ```
19
19
 
20
- ```shell
21
- USER=$(gh api user -q .login)
22
-
20
+ ```bash
23
21
  # npx --yes ai-heatmap@latest delete
24
22
  npx --yes ai-heatmap@latest init
25
23
 
@@ -27,10 +25,17 @@ USER=$(gh api user -q .login)
27
25
  open "https://${USER}.github.io/${USER}-ai-heatmap/heatmap.svg"
28
26
  ```
29
27
 
28
+ ```bash
29
+ npx --yes ai-heatmap@latest deploy
30
+
31
+ USER=$(gh api user -q .login)
32
+ open "https://${USER}-ai-heatmap.vercel.app/api/heatmap?colorScheme=dark"
33
+ ```
34
+
30
35
  ## Preview
31
36
 
32
37
  <!-- Replace seunggabi-ai-heatmap.vercel.app with your actual Vercel deployment URL -->
33
- ![AI Heatmap](https://seunggabi-ai-heatmap.vercel.app/api/heatmap)
38
+ ![AI Heatmap](https://seunggabi-ai-heatmap.vercel.app/api/heatmap?colorScheme=dark)
34
39
 
35
40
  ### Variations
36
41
  ```markdown
@@ -111,7 +116,7 @@ A static SVG (`heatmap.svg`) is also generated during build. You can embed it as
111
116
  All options are controlled via query string:
112
117
 
113
118
  ```
114
- https://owner.github.io/{user}-ai-heatmap/?colorScheme=dark&blockSize=14
119
+ https://{user}.github.io/{user}-ai-heatmap/?colorScheme=dark&blockSize=14
115
120
  ```
116
121
 
117
122
  | Parameter | Default | Description |
@@ -142,14 +147,14 @@ https://owner.github.io/{user}-ai-heatmap/?colorScheme=dark&blockSize=14
142
147
  ## Configuration
143
148
 
144
149
  ```
145
- https://owner.github.io/{user}-ai-heatmap/heatmap.svg
150
+ https://{user}.github.io/{user}-ai-heatmap/heatmap.svg
146
151
  ```
147
152
 
148
153
  Customize the static SVG output by editing `heatmap.config.json` in the project root:
149
154
 
150
155
  ```json
151
156
  {
152
- "colorScheme": "light",
157
+ "colorScheme": "dark",
153
158
  "theme": "",
154
159
  "blockSize": 16,
155
160
  "blockMargin": 4,
@@ -178,6 +183,9 @@ npx ai-heatmap update
178
183
  For automated updates, use a local cron job or macOS LaunchAgent:
179
184
 
180
185
  ```bash
186
+ CLAUDE_CODE_OAUTH_TOKEN=sk-ant-xxx
187
+ GH_TOKEN=ghp_xxx
188
+
181
189
  0 0 * * * npx --yes ai-heatmap@latest update
182
190
  ```
183
191
 
package/bin/init.mjs CHANGED
@@ -129,6 +129,9 @@ readmeLines.push(
129
129
  "### Cron (daily update)",
130
130
  "",
131
131
  "```bash",
132
+ "CLAUDE_CODE_OAUTH_TOKEN=sk-ant-xxx",
133
+ "GH_TOKEN=ghp_xxx",
134
+ "",
132
135
  "0 0 * * * npx --yes ai-heatmap@latest update",
133
136
  "```",
134
137
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-heatmap",
3
- "version": "1.14.4",
3
+ "version": "1.14.7",
4
4
  "description": "AI usage cost heatmap powered by ccusage + react-activity-calendar",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,12 +11,12 @@ const args = process.argv.slice(2);
11
11
  const sinceFlag = args.find((a) => a.startsWith("--since"));
12
12
  const untilFlag = args.find((a) => a.startsWith("--until"));
13
13
 
14
- let cmd = "npx ccusage@latest daily --json";
14
+ let cmd = "npx --yes ccusage@latest daily --json";
15
15
  if (sinceFlag) cmd += ` ${sinceFlag}`;
16
16
  if (untilFlag) cmd += ` ${untilFlag}`;
17
17
 
18
18
  console.log(`Running: ${cmd}`);
19
- const raw = execSync(cmd, { encoding: "utf-8", timeout: 30000 });
19
+ const raw = execSync(cmd, { encoding: "utf-8", timeout: 300000 });
20
20
  const { daily } = JSON.parse(raw);
21
21
 
22
22
  const costs = daily.map((d) => d.totalCost);