ai-cli

Introduction

Generate text, images, video, and audio from the terminal.

ai-cli is a tiny, agent-native CLI for generating text, images, video, and audio with dead-simple commands. It uses the Vercel AI SDK and AI Gateway for unified access to hundreds of models.

What it does

Image generation

Create images from text or existing images.

Video generation

Generate video from text or images.

Text generation

Generate text from prompts with any language model.

Audio generation

Generate speech or transcribe audio files and streams.

Multi-model comparison

Run the same prompt across multiple models in parallel.

Stdin piping

Pipe any content in and out for composable workflows.

Inline preview

See generated images, video frames, and speech playback directly in your terminal.

Quick start

Install globally

bash
npm install -g ai-cli

Set your API key

bash
export AI_GATEWAY_API_KEY="your-key"

Generate something

bash
ai image "a cute dog"
ai video "a spinning triangle"
ai text "explain quantum computing"
ai audio speak "Thanks for trying ai-cli"
ai audio transcribe recording.mp3

Commands