ai-cli 0.1.1 → 0.2.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 +30 -3
- package/dist/index.js +30027 -0
- package/{src/lib/openh264.wasm → dist/openh264-d6yed0d8.wasm} +0 -0
- package/package.json +9 -5
- package/src/cli.test.ts +0 -95
- package/src/commands/completions.ts +0 -296
- package/src/commands/image.ts +0 -136
- package/src/commands/models.ts +0 -117
- package/src/commands/text.ts +0 -117
- package/src/commands/video.ts +0 -113
- package/src/index.ts +0 -30
- package/src/lib/color.ts +0 -5
- package/src/lib/h264-wasm.ts +0 -164
- package/src/lib/h264.test.ts +0 -48
- package/src/lib/jobs.ts +0 -192
- package/src/lib/kitty.ts +0 -55
- package/src/lib/models.test.ts +0 -197
- package/src/lib/models.ts +0 -163
- package/src/lib/mp4.test.ts +0 -231
- package/src/lib/mp4.ts +0 -560
- package/src/lib/openh264.d.mts +0 -28
- package/src/lib/openh264.mjs +0 -423
- package/src/lib/openh264.wasm.d.ts +0 -2
- package/src/lib/output.ts +0 -97
- package/src/lib/p-map.test.ts +0 -63
- package/src/lib/p-map.ts +0 -30
- package/src/lib/parse.test.ts +0 -114
- package/src/lib/parse.ts +0 -44
- package/src/lib/png.test.ts +0 -104
- package/src/lib/png.ts +0 -90
- package/src/lib/progress.ts +0 -214
- package/src/lib/shimmer.test.ts +0 -39
- package/src/lib/shimmer.ts +0 -42
- package/src/lib/stdin.ts +0 -31
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A tiny, agent-native CLI for generating images, video and text with dead-simple
|
|
|
8
8
|
npm install -g ai-cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Requires an [AI Gateway](https://vercel.com/docs/ai-gateway) API key or a provider-specific key (e.g. `OPENAI_API_KEY`).
|
|
11
|
+
Requires Node.js 20+ and an [AI Gateway](https://vercel.com/docs/ai-gateway) API key or a provider-specific key (e.g. `OPENAI_API_KEY`).
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
@@ -40,6 +40,13 @@ All commands support:
|
|
|
40
40
|
--json Output metadata as JSON
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
Model IDs can be specified as `creator/model-name` or just `model-name` (resolved against models fetched from the gateway):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ai text -m gpt-5.5 "hello" # resolves to openai/gpt-5.5
|
|
47
|
+
ai image -m flux-2-pro "a sunset" # resolves to bfl/flux-2-pro
|
|
48
|
+
```
|
|
49
|
+
|
|
43
50
|
### image
|
|
44
51
|
|
|
45
52
|
```
|
|
@@ -71,11 +78,11 @@ All commands support:
|
|
|
71
78
|
|
|
72
79
|
```
|
|
73
80
|
--type <type> Filter by type: text, image, video
|
|
74
|
-
--
|
|
81
|
+
--creator <name> Filter by creator (e.g. openai, google)
|
|
75
82
|
--json Output as JSON (includes descriptions)
|
|
76
83
|
```
|
|
77
84
|
|
|
78
|
-
All model types (text, image, video) are fetched live from the AI Gateway.
|
|
85
|
+
All model types (text, image, video) are fetched live from the AI Gateway.
|
|
79
86
|
|
|
80
87
|
### Multi-Model Comparison
|
|
81
88
|
|
|
@@ -112,9 +119,29 @@ When running in a terminal that supports the [Kitty graphics protocol](https://s
|
|
|
112
119
|
| `AI_CLI_VIDEO_MODEL` | Default video model (overrides `bytedance/seedance-2.0`) |
|
|
113
120
|
| `AI_CLI_OUTPUT_DIR` | Default output directory for generated files |
|
|
114
121
|
| `AI_CLI_PREVIEW` | Set to `1` to force inline image preview, `0` to disable |
|
|
122
|
+
| `NO_COLOR` | Disable ANSI color output |
|
|
123
|
+
| `FORCE_COLOR` | Force color output even when not a TTY |
|
|
115
124
|
|
|
116
125
|
The `-m` flag always takes priority over `AI_CLI_*_MODEL` env vars. The `-o` flag always takes priority over `AI_CLI_OUTPUT_DIR`.
|
|
117
126
|
|
|
127
|
+
### Timeouts
|
|
128
|
+
|
|
129
|
+
Requests that exceed the timeout are aborted automatically:
|
|
130
|
+
|
|
131
|
+
| Command | Timeout |
|
|
132
|
+
|---|---|
|
|
133
|
+
| `text` | 120 seconds |
|
|
134
|
+
| `image` | 120 seconds |
|
|
135
|
+
| `video` | 300 seconds |
|
|
136
|
+
|
|
137
|
+
### Exit Codes
|
|
138
|
+
|
|
139
|
+
| Code | Meaning |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `0` | Success |
|
|
142
|
+
| `1` | All generations failed |
|
|
143
|
+
| `2` | Partial failure (some succeeded, some failed) |
|
|
144
|
+
|
|
118
145
|
## License
|
|
119
146
|
|
|
120
147
|
[Apache-2.0](LICENSE)
|