
Ai Cli
- 132 installs
- 659 repo stars
- Updated July 27, 2026
- vercel-labs/ai-cli
ai-cli terminal tool for generating text, images, and video with AI models.
About
Vercel Labs ai-cli skill for terminal-based AI generation. Enables generating text completions, images, and video content directly from the command line using configured AI model providers. Provides invocation patterns, model selection flags, and output handling for scripting and automation workflows. Useful when developers need quick AI outputs in shell pipelines, CI scripts, or local experimentation without building a full application integration.
- Terminal CLI for text, image, and video AI generation
- Model provider selection from command line flags
- Scriptable output for shell pipelines and automation
- Quick local experimentation without app integration
- Part of vercel-labs AI tooling family
Ai Cli by the numbers
- 132 all-time installs (skills.sh)
- +6 installs in the week ending Jul 27, 2026 (Skillselion tracking)
- Ranked #231 of 560 CLI & Terminal skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
ai-cli capabilities & compatibility
- Capabilities
- generate text cli · generate image cli · generate video cli
- Works with
- openai · vercel
- Use cases
- orchestration
- Runs
- Runs locally
What ai-cli says it does
Generate text, images, and video from the terminal using AI models.
npx skills add https://github.com/vercel-labs/ai-cli --skill ai-cliAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 132 |
|---|---|
| repo stars | ★ 659 |
| Security audit | 3 / 3 scanners passed |
| Last updated | July 27, 2026 |
| Repository | vercel-labs/ai-cli ↗ |
How do I generate AI text or images from the terminal?
Generate text, images, and video from the terminal using AI models via the ai-cli tool.
Who is it for?
Developers scripting AI generation in terminal or CI without full SDK integration.
Skip if: Production app UI integration requiring Vercel AI SDK patterns.
When should I use this skill?
User wants to generate text, images, or video from terminal with AI models.
What you get
AI content generated via ai-cli with selected model and captured output.
Files
ai-cli
Generate text, images, and video from the terminal using AI models.
When to Use
Use when you need to:
- Generate images from text prompts or existing images
- Generate video from text prompts or images
- Generate text (summaries, explanations, code reviews) from prompts or piped content
- Compare outputs across multiple models side-by-side
- Build composable media pipelines by chaining commands via stdin/stdout
Prerequisites
Requires AI_GATEWAY_API_KEY or a provider-specific key (e.g. OPENAI_API_KEY) in the environment.
Commands
ai text "explain this code" # generate text
ai image "a sunset over mountains" # generate an image
ai video "a spinning triangle" # generate a video
ai models --type image # list available modelsKey Flags
-m, --model <id> Model ID (provider/name or short name), comma-separated for multi-model
-o, --output <path> Output file or directory
-n, --count <n> Number of generations per model
-q, --quiet Suppress progress output
--json Output structured metadata as JSON (paths, timing, success/failure)Piping Patterns
Chain commands for agent workflows:
# Pipe content in for summarization
cat file.txt | ai text "summarize this"
git diff | ai text "write a commit message"
# Image-to-video pipeline
ai image "a dragon" | ai video "animate this"
# Image editing via stdin
cat photo.png | ai image "make it a watercolor"Structured Output
Use --json to get machine-readable results:
ai image "a sunset" --jsonReturns:
{
"elapsed_ms": 3420,
"count": 1,
"results": [
{
"index": 1,
"model": "openai/gpt-image-2",
"elapsed_ms": 3420,
"success": true,
"file": "/path/to/output.png"
}
]
}Multi-Model Comparison
ai image "a sunset" -m "openai/gpt-image-1,bfl/flux-2-pro,xai/grok-imagine-image"Output Behavior
- Interactive (TTY): saves to file, prints path to stderr
- Piped (non-TTY): writes raw content to stdout for chaining
- `-o <dir>`: saves inside directory with auto-generated names
Important for agents: Always use -o to save to a file when generating images or video. Without -o in a non-TTY context, raw binary data is written to stdout, which wastes context and is not useful for agents. Use -o output.png (or a directory) and read the file path from --json output instead.
Timeouts
- text/image: 120 seconds
- video: 300 seconds
Exit Codes
0— success1— all generations failed2— partial failure (some succeeded)
Related skills
FAQ
What can ai-cli generate?
Text, images, and video from the terminal using AI models.
Is this for scripting?
Yes. Output is designed for shell pipelines and automation workflows.
How does this relate to Vercel AI SDK?
ai-cli is a standalone terminal tool; use AI SDK for application integration.
Is Ai Cli safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.