commit-agent-cli 0.1.2 → 0.1.3

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
@@ -30,6 +30,7 @@ You'll be prompted to:
30
30
  - 👁️ Transparent agent actions
31
31
  - ⚙️ Customizable commit styles
32
32
  - 🔒 Secure local storage
33
+ - 🔔 Auto update notifications
33
34
 
34
35
  ## Documentation
35
36
 
package/dist/index.js CHANGED
@@ -386,9 +386,34 @@ ${diff}`)
386
386
 
387
387
  // src/index.ts
388
388
  var import_picocolors = __toESM(require_picocolors(), 1);
389
+ import updateNotifier from "update-notifier";
390
+ import { readFileSync } from "fs";
391
+ import { fileURLToPath } from "url";
392
+ import { dirname, join as joinPath } from "path";
389
393
  import { homedir } from "os";
390
394
  import { join as join2 } from "path";
391
395
  import { readFile as readFile2, writeFile } from "fs/promises";
396
+ var __filename = fileURLToPath(import.meta.url);
397
+ var __dirname = dirname(__filename);
398
+ var packageJson = JSON.parse(
399
+ readFileSync(joinPath(__dirname, "../package.json"), "utf-8")
400
+ );
401
+ var notifier = updateNotifier({
402
+ pkg: packageJson,
403
+ updateCheckInterval: 1e3 * 60 * 60 * 24
404
+ // Check once per day
405
+ });
406
+ if (notifier.update) {
407
+ const currentVersion = import_picocolors.default.dim(notifier.update.current);
408
+ const latestVersion = import_picocolors.default.green(notifier.update.latest);
409
+ const command = import_picocolors.default.cyan(`npm install -g ${packageJson.name}`);
410
+ console.log("");
411
+ console.log(import_picocolors.default.yellow("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"));
412
+ console.log(import_picocolors.default.yellow("\u2502") + " Update available: " + currentVersion + " \u2192 " + latestVersion + " ".repeat(20) + import_picocolors.default.yellow("\u2502"));
413
+ console.log(import_picocolors.default.yellow("\u2502") + " Run " + command + " to update" + " ".repeat(10) + import_picocolors.default.yellow("\u2502"));
414
+ console.log(import_picocolors.default.yellow("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"));
415
+ console.log("");
416
+ }
392
417
  var CONFIG_PATH = join2(homedir(), ".commit-cli.json");
393
418
  async function getStoredKey() {
394
419
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commit-agent-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "AI-powered git commit CLI using LangGraph and Claude 4.5",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -43,14 +43,16 @@
43
43
  "commit-agent-cli": "^0.1.0",
44
44
  "dotenv": "^16.4.5",
45
45
  "execa": "^9.3.1",
46
+ "update-notifier": "^7.3.1",
46
47
  "zod": "^3.23.8"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/node": "^22.5.4",
51
+ "@types/update-notifier": "^6.0.8",
50
52
  "tsup": "^8.2.4",
51
53
  "typescript": "^5.5.4"
52
54
  },
53
55
  "engines": {
54
56
  "node": ">=18"
55
57
  }
56
- }
58
+ }