ai-cli

Introduction

Generate text, images, and video from the terminal.

ai-cli is a tiny, agent-native CLI for generating text, images, and video 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.

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 and video frames 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"

Commands