cp-toolkit 2.2.14 → 2.2.15
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/bin/cp-toolkit.js +10 -2
- package/package.json +1 -1
package/bin/cp-toolkit.js
CHANGED
|
@@ -20,17 +20,25 @@
|
|
|
20
20
|
|
|
21
21
|
import { Command } from 'commander';
|
|
22
22
|
import chalk from 'chalk';
|
|
23
|
+
import { readFileSync } from 'fs';
|
|
24
|
+
import { fileURLToPath } from 'url';
|
|
25
|
+
import { dirname, join } from 'path';
|
|
23
26
|
import { initCommand } from '../src/commands/init.js';
|
|
24
27
|
import { addCommand } from '../src/commands/add.js';
|
|
25
28
|
import { listCommand } from '../src/commands/list.js';
|
|
26
29
|
import { doctorCommand } from '../src/commands/doctor.js';
|
|
27
30
|
|
|
31
|
+
// Get version from package.json
|
|
32
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
33
|
+
const __dirname = dirname(__filename);
|
|
34
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));
|
|
35
|
+
|
|
28
36
|
const program = new Command();
|
|
29
37
|
|
|
30
38
|
program
|
|
31
|
-
.name('cp-
|
|
39
|
+
.name('cp-toolkit')
|
|
32
40
|
.description('GitHub Copilot Agent Toolkit - Initialize AI agents for your project')
|
|
33
|
-
.version(
|
|
41
|
+
.version(packageJson.version);
|
|
34
42
|
|
|
35
43
|
// cp-kit init [directory]
|
|
36
44
|
program
|