ai-agent-test 0.1.2 → 0.1.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 (3) hide show
  1. package/README.md +8 -8
  2. package/bin/ai +8 -0
  3. package/package.json +5 -1
package/README.md CHANGED
@@ -63,17 +63,17 @@ Create a JSON configuration file at `~/.ai/models.json` with an array of model c
63
63
  ]
64
64
  ```
65
65
 
66
- Set the environment variable in your terminal before running (Default to 0):
67
-
66
+ Start CLI with selected model (default is the first model in the array):
68
67
  ```bash
69
- export AI_MODEL_INDEX=0 # Use the first model in models.json (default)
70
- npx tsx src/index.ts
71
- ```
68
+ # option 1
69
+ ai 1 # to select the second model (Google Gemini)
72
70
 
73
- Or set it inline:
71
+ # option 2
72
+ export AI_MODEL_INDEX=1
73
+ ai
74
74
 
75
- ```bash
76
- AI_MODEL_INDEX=0 npx tsx src/index.ts
75
+ # option 3
76
+ AI_MODEL_INDEX=1 ai
77
77
  ```
78
78
 
79
79
  ### CLI Commands
package/bin/ai CHANGED
@@ -1,3 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // Pass command-line arguments to the main module
4
+ import { argv } from 'process';
5
+
6
+ // Set AI_MODEL_INDEX environment variable if provided as first argument
7
+ if (argv[2]) {
8
+ process.env.AI_MODEL_INDEX = argv[2];
9
+ }
10
+
3
11
  import('../dist/index.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-agent-test",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "ai": "./bin/ai"
@@ -22,6 +22,10 @@
22
22
  "publish": "rm -rf dist && npm run build && npm publish"
23
23
  },
24
24
  "author": "",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/benevbright/ai-agent-test.git"
28
+ },
25
29
  "license": "ISC",
26
30
  "description": "",
27
31
  "devDependencies": {