@chamba/claude-extras 0.6.0 → 0.6.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 (3) hide show
  1. package/README.md +3 -0
  2. package/dist/cli.js +16 -1
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -13,8 +13,11 @@ slash commands, subagents and hooks on top of the chamba MCP server.
13
13
  npx @chamba/claude-extras install # add commands, agents, hooks + register MCP
14
14
  npx @chamba/claude-extras install --force # overwrite existing files
15
15
  npx @chamba/claude-extras uninstall # remove them
16
+ npx @chamba/claude-extras --version # print the installed version
16
17
  ```
17
18
 
19
+ Check the MCP server's version the same way: `npx @chamba/mcp --version`.
20
+
18
21
  It installs into `~/.claude/`:
19
22
 
20
23
  - **Slash commands**: `/orq`, `/workspace`, `/worktrees`, `/recall`
package/dist/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/cli.ts
2
+ import { readFileSync } from "fs";
2
3
  import { homedir as homedir2 } from "os";
3
4
  import { fileURLToPath as fileURLToPath2 } from "url";
4
5
  import { NodeFilesystem as NodeFilesystem2 } from "@chamba/adapters";
@@ -601,8 +602,22 @@ function summarize(result) {
601
602
  function labelFor(dir) {
602
603
  return CATEGORIES.find((c) => c.dir === dir)?.label ?? dir;
603
604
  }
605
+ function readPackageVersion() {
606
+ try {
607
+ const pkgPath = fileURLToPath2(new URL("../package.json", import.meta.url));
608
+ const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
609
+ return pkg.version ?? "unknown";
610
+ } catch {
611
+ return "unknown";
612
+ }
613
+ }
604
614
  async function main() {
605
615
  const [command, ...rest] = process.argv.slice(2);
616
+ if (command === "--version" || command === "-v" || command === "version") {
617
+ process.stdout.write(`${readPackageVersion()}
618
+ `);
619
+ return;
620
+ }
606
621
  const installer = buildInstaller2();
607
622
  if (command === "uninstall") {
608
623
  const result = await installer.uninstall();
@@ -633,7 +648,7 @@ async function main() {
633
648
  return;
634
649
  }
635
650
  process.stderr.write(
636
- `Unknown command "${command}". Usage: chamba-install [install|uninstall|apply|config <sub>] [--force]
651
+ `Unknown command "${command}". Usage: chamba-install [install|uninstall|apply|config <sub>] [--force] [--version]
637
652
  `
638
653
  );
639
654
  process.exitCode = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chamba/claude-extras",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Optional Claude Code extras for chamba: slash commands, subagents and hooks installer",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@inquirer/prompts": "^7.0.0",
34
- "@chamba/adapters": "0.6.0",
35
- "@chamba/core": "0.6.0"
34
+ "@chamba/adapters": "0.6.1",
35
+ "@chamba/core": "0.6.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^22.0.0",