ai-cli 0.0.1-security → 0.0.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.
- package/README.md +42 -3
- package/dist/ai.mjs +81 -0
- package/package.json +30 -4
package/README.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ai-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AI CLI using OpenAI's open source model.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g ai-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Setup
|
|
12
|
+
|
|
13
|
+
Set your AI Gateway API key in your shell configuration:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Add to ~/.zshrc or ~/.bashrc
|
|
17
|
+
export AI_GATEWAY_API_KEY=your-api-key
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Get your API key at https://vercel.com/docs/ai-gateway
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
ai "whats up bro"
|
|
26
|
+
ai hello
|
|
27
|
+
echo "explain this code" | ai
|
|
28
|
+
ai -m openai/gpt-oss-120b "who is rauchg"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Options
|
|
32
|
+
|
|
33
|
+
- `-m, --model` - Specify AI model (default: openai/gpt-oss-120b)
|
|
34
|
+
- `-h, --help` - Show help message
|
|
35
|
+
|
|
36
|
+
## Switching Models
|
|
37
|
+
|
|
38
|
+
You can use any model available through Vercel AI Gateway by using the `-m` flag:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
ai -m claude-4-sonnet "who am i"
|
|
42
|
+
ai -m openai/gpt-4o "count to 3"
|
|
43
|
+
ai -m anthropic/claude-4.1-opus "spend my money"
|
|
44
|
+
```
|