ai-agent-test 0.3.0 → 0.3.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 (2) hide show
  1. package/bin/ai +33 -0
  2. package/package.json +1 -1
package/bin/ai CHANGED
@@ -3,6 +3,39 @@
3
3
  // Pass command-line arguments to the main module
4
4
  import { argv } from 'process';
5
5
 
6
+ // Handle --version command
7
+ if (argv[2] === '--version') {
8
+ import('fs').then(({ readFileSync }) => {
9
+ const packageJson = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
10
+ console.log(packageJson.version);
11
+ process.exit(0);
12
+ });
13
+ }
14
+
15
+ // Handle --help command
16
+ if (argv[2] === '--help') {
17
+ console.log(`ai-agent-test v${process.argv.slice(3).includes('--version') ? '' : '0.3.0'}
18
+
19
+ Usage: ai [options] [model-index]
20
+
21
+ Commands:
22
+ update Update the ai-agent-test package to the latest version
23
+ --version Show version number
24
+ --help Show help message
25
+
26
+ Arguments:
27
+ model-index Index of the model to use (from ~/.ai/models.json)
28
+
29
+ Examples:
30
+ ai # Run with default model
31
+ ai 1 # Run with second model in config
32
+ ai update # Update to latest version
33
+ ai --version # Show version
34
+ ai --help # Show help
35
+ `);
36
+ process.exit(0);
37
+ }
38
+
6
39
  // Handle update command
7
40
  if (argv[2] === 'update') {
8
41
  import('child_process').then(({ execSync }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agent-test",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "ai": "./bin/ai"