ai-heatmap 1.2.0 → 1.3.0

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 (3) hide show
  1. package/README.md +4 -1
  2. package/bin/cli.mjs +15 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # AI Heatmap
2
2
 
3
- GitHub-style heatmap for your AI usage costs. Powered by [ccusage](https://github.com/ryoppippi/ccusage) + [react-activity-calendar](https://github.com/grubersjoe/react-activity-calendar).
3
+ GitHub-style heatmap for your AI usage costs.
4
+ Powered by
5
+ [ccusage](https://github.com/ryoppippi/ccusage)
6
+ [react-activity-calendar](https://github.com/grubersjoe/react-activity-calendar).
4
7
 
5
8
  ## Preview
6
9
 
package/bin/cli.mjs CHANGED
@@ -16,6 +16,7 @@ Commands:
16
16
  generate [options] Generate data.json from ccusage
17
17
  push [--repo <owner/repo>] Push data.json to target repo (default: {user}/my-ai-heatmap)
18
18
  update [--repo <owner/repo>] generate + push combined (default: {user}/my-ai-heatmap)
19
+ deploy Deploy to Vercel (SVG API endpoint)
19
20
 
20
21
  Generate options:
21
22
  --since YYYYMMDD Start date
@@ -26,6 +27,7 @@ Examples:
26
27
  npx ai-heatmap generate --since 20260101
27
28
  npx ai-heatmap push --repo my-ai-heatmap
28
29
  npx ai-heatmap update --repo my-ai-heatmap
30
+ npx ai-heatmap deploy
29
31
  `;
30
32
 
31
33
  switch (command) {
@@ -55,6 +57,19 @@ switch (command) {
55
57
  execSync(`node ${pushScript} ${pushArgs.join(" ")}`, { stdio: "inherit" });
56
58
  break;
57
59
  }
60
+ case "deploy": {
61
+ try {
62
+ execSync("vercel --version", { stdio: "ignore" });
63
+ } catch {
64
+ console.log("Installing Vercel CLI...");
65
+ execSync("npm install -g vercel", { stdio: "inherit" });
66
+ }
67
+ execSync(`vercel --prod ${args.join(" ")}`, {
68
+ cwd: root,
69
+ stdio: "inherit",
70
+ });
71
+ break;
72
+ }
58
73
  default:
59
74
  console.log(HELP);
60
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-heatmap",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "AI usage cost heatmap powered by ccusage + react-activity-calendar",
5
5
  "type": "module",
6
6
  "bin": {