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 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
  ```