@hasna/configs 0.2.4 → 0.2.5

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/dist/cli/index.js +20 -0
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -4075,5 +4075,25 @@ program.command("push").description("Alias for sync --to-disk (write DB configs
4075
4075
  const result = await syncToDisk({ dryRun: opts.dryRun, agent: opts.agent });
4076
4076
  console.log(chalk.green("\u2713") + ` Pushed: updated:${result.updated} unchanged:${result.unchanged} skipped:${result.skipped.length}`);
4077
4077
  });
4078
+ program.command("update").description("Check for updates and install latest version").option("--check", "only check, don't install").action(async (opts) => {
4079
+ try {
4080
+ const proc = Bun.spawn(["npm", "view", "@hasna/configs", "version"], { stdout: "pipe", stderr: "pipe" });
4081
+ const latest = (await new Response(proc.stdout).text()).trim();
4082
+ await proc.exited;
4083
+ if (latest === pkg.version) {
4084
+ console.log(chalk.green("\u2713") + ` Already on latest version (${pkg.version})`);
4085
+ } else {
4086
+ console.log(`Current: ${chalk.dim(pkg.version)} \u2192 Latest: ${chalk.green(latest)}`);
4087
+ if (!opts.check) {
4088
+ console.log(chalk.dim("Installing..."));
4089
+ const install = Bun.spawn(["bun", "install", "-g", `@hasna/configs@${latest}`], { stdout: "inherit", stderr: "inherit" });
4090
+ await install.exited;
4091
+ console.log(chalk.green("\u2713") + ` Updated to ${latest}`);
4092
+ }
4093
+ }
4094
+ } catch (e) {
4095
+ console.error(chalk.red("Failed to check for updates: " + (e instanceof Error ? e.message : String(e))));
4096
+ }
4097
+ });
4078
4098
  program.version(pkg.version).name("configs");
4079
4099
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/configs",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "AI coding agent configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",