ai-cli 0.2.0 → 0.3.0
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 +23 -2
- package/dist/index.js +30184 -0
- package/{src/lib/openh264.wasm → dist/openh264-d6yed0d8.wasm} +0 -0
- package/package.json +9 -5
- package/src/cli.test.ts +0 -70
- package/src/commands/image.ts +0 -189
- package/src/commands/models.ts +0 -106
- package/src/commands/text.ts +0 -118
- package/src/commands/video.ts +0 -114
- package/src/index.ts +0 -28
- 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 -307
- package/src/lib/models.ts +0 -173
- 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
|
|
|
@@ -19,10 +19,14 @@ ai text "explain quantum computing"
|
|
|
19
19
|
ai models # list available models
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
### Piping
|
|
22
|
+
### Piping and References
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
ai image "a dragon" | ai video "animate this"
|
|
26
|
+
ai image --image reference.png "make a sticker in this style"
|
|
27
|
+
ai image -i sketch.png -i palette.jpg "render this product concept"
|
|
28
|
+
ai text --image screenshot.png "what is broken in this UI?"
|
|
29
|
+
cat photo.png | ai text "describe this image"
|
|
26
30
|
cat notes.txt | ai text "summarize this"
|
|
27
31
|
git diff | ai text "explain these changes"
|
|
28
32
|
```
|
|
@@ -50,6 +54,7 @@ ai image -m flux-2-pro "a sunset" # resolves to bfl/flux-2-pro
|
|
|
50
54
|
### image
|
|
51
55
|
|
|
52
56
|
```
|
|
57
|
+
-i, --image <path-or-url> Reference image path or URL (repeatable)
|
|
53
58
|
--size <WxH> Image size (e.g. 1024x1024)
|
|
54
59
|
--aspect-ratio <W:H> Aspect ratio (e.g. 16:9)
|
|
55
60
|
--quality <level> Quality (standard, hd)
|
|
@@ -57,6 +62,14 @@ ai image -m flux-2-pro "a sunset" # resolves to bfl/flux-2-pro
|
|
|
57
62
|
--no-preview Disable inline image preview
|
|
58
63
|
```
|
|
59
64
|
|
|
65
|
+
Reference images can be local paths, `file://` URLs, `http(s)://` URLs or data URLs. You can repeat `--image` to pass multiple references, and you can still pipe one image through stdin:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cat input.png | ai image -i style.png "combine the subject with this style"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Reference-image support is model-dependent; unsupported models may reject image inputs.
|
|
72
|
+
|
|
60
73
|
### video
|
|
61
74
|
|
|
62
75
|
```
|
|
@@ -69,11 +82,19 @@ ai image -m flux-2-pro "a sunset" # resolves to bfl/flux-2-pro
|
|
|
69
82
|
|
|
70
83
|
```
|
|
71
84
|
-f, --format <fmt> Output format: md, txt (default: md)
|
|
85
|
+
-i, --image <path-or-url> Image input path or URL for vision (repeatable)
|
|
72
86
|
-s, --system <prompt> System prompt
|
|
73
87
|
--max-tokens <n> Maximum tokens to generate
|
|
74
88
|
-t, --temperature <n> Temperature (0-2)
|
|
75
89
|
```
|
|
76
90
|
|
|
91
|
+
For vision-capable text models, `ai text` accepts images from `--image` or piped stdin:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
ai text -i chart.png -i table.jpg "summarize the data"
|
|
95
|
+
cat screenshot.png | ai text "list the visible errors"
|
|
96
|
+
```
|
|
97
|
+
|
|
77
98
|
### models
|
|
78
99
|
|
|
79
100
|
```
|