mcpknife 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.
Files changed (2) hide show
  1. package/dist/cli.js +12 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -77,6 +77,15 @@ function resolveBinary(subcommand2) {
77
77
  }
78
78
  return path2.resolve(pkgRoot, binEntry);
79
79
  }
80
+ function resolveVersion(packageName) {
81
+ try {
82
+ const pkgJsonPath = require2.resolve(`${packageName}/package.json`);
83
+ const pkgJson = JSON.parse(readFileSync2(pkgJsonPath, "utf-8"));
84
+ return pkgJson.version ?? "unknown";
85
+ } catch {
86
+ return "not installed";
87
+ }
88
+ }
80
89
 
81
90
  // src/args.ts
82
91
  var CONFIG_FLAG_MAP = [
@@ -185,6 +194,9 @@ if (args.length === 0 || args[0] === "--help" || args[0] === "-h") {
185
194
  }
186
195
  if (args[0] === "--version" || args[0] === "-V") {
187
196
  console.log(`mcpknife v${version}`);
197
+ for (const [cmd, pkg] of Object.entries(BINARY_MAP)) {
198
+ console.log(` ${cmd}: ${pkg} v${resolveVersion(pkg)}`);
199
+ }
188
200
  process.exit(0);
189
201
  }
190
202
  var subcommand = args[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcpknife",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Swiss Army knife for MCP servers — generate, transform, and add UIs with Unix pipes",
5
5
  "type": "module",
6
6
  "bin": {