Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"overview/guides/openai-migration",
"overview/guides/langchain",
"overview/guides/vercel-ai-sdk",
"overview/guides/crewai"
"overview/guides/crewai",
"overview/guides/venice-cli"
]
}
]
Expand Down
236 changes: 236 additions & 0 deletions overview/guides/venice-cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
---
title: 'Venice CLI'
description: 'Access Venice AI from your terminal — chat, search, images, TTS, and more'
icon: 'terminal'
---

# Venice CLI

The official Venice CLI provides full access to Venice AI capabilities from your command line. Chat with AI models, generate images, convert text to speech, and more — all with Venice's privacy-preserving infrastructure.

## Installation

```bash
npm install -g venice-cli
```

Or run directly with npx:

```bash
npx venice-cli chat "Hello, Venice!"
```

## Quick Start

```bash
# Set your API key
venice config set api_key YOUR_API_KEY

# Start chatting
venice chat "Explain quantum computing in simple terms"

# Generate an image
venice image "A sunset over mountains" --output sunset.png

# Web search with AI synthesis
venice search "latest developments in AI"
```

## Features

### Core Commands

| Command | Description |
|---------|-------------|
| `venice chat <prompt>` | Chat with AI models |
| `venice search <query>` | Web search with AI synthesis |
| `venice image <prompt>` | Generate images |
| `venice upscale <file>` | Upscale images |
| `venice tts <text>` | Text-to-speech |
| `venice transcribe <audio>` | Speech-to-text |
| `venice embeddings <text>` | Generate embeddings |
| `venice models` | List available models |

### Chat Options

```bash
# Choose a specific model
venice chat "Hello" --model llama-3.3-70b

# Use a system prompt
venice chat "Write a poem" --system "You are a creative poet"

# Continue a conversation
venice chat "Tell me more" --continue

# Stream output (default)
venice chat "Long explanation please" --stream

# Use a character persona
venice chat "Ahoy!" --character pirate
```

### Output Formats

```bash
# Pretty output (default for TTY)
venice chat "Hello" --format pretty

# JSON output (great for scripting)
venice chat "Hello" --format json

# Markdown output
venice chat "Hello" --format markdown

# Raw output (no formatting)
venice chat "Hello" --format raw
```

### Image Generation

```bash
# Generate and save to file
venice image "A cat in space" --output cat.png

# Specify dimensions
venice image "Abstract art" --width 1024 --height 768

# Choose a model
venice image "Portrait" --model fluently-xl
```

### Text-to-Speech

```bash
# Generate speech
venice tts "Hello, world!" --output greeting.mp3

# Choose a voice
venice tts "Welcome to Venice" --voice alloy

# List available voices
venice voices
```

### Configuration

```bash
# Set API key
venice config set api_key YOUR_API_KEY

# Set default model
venice config set default_model llama-3.3-70b

# View current config
venice config show

# Reset to defaults
venice config reset
```

## Environment Variables

You can also configure the CLI via environment variables:

```bash
export VENICE_API_KEY=your_api_key
export VENICE_DEFAULT_MODEL=llama-3.3-70b
```

## Shell Completions

Generate shell completions for your shell:

```bash
# Bash
venice completions bash >> ~/.bashrc

# Zsh
venice completions zsh >> ~/.zshrc

# Fish
venice completions fish > ~/.config/fish/completions/venice.fish
```

## Function Calling

The CLI supports function calling with built-in tools:

```bash
venice chat "What's 15% of 847?" --tools

# Available tools:
# - calculator: Math operations
# - weather: Current weather (requires API key)
# - datetime: Current date/time
# - uuid: Generate UUIDs
# - base64: Encode/decode base64
# - hash: Generate hashes (MD5, SHA256)
```

## Character Personas

Add personality to your chats:

```bash
# List available characters
venice characters

# Use a character
venice chat "Tell me about treasure" --character pirate
venice chat "Cast a spell" --character wizard
venice chat "Explain relativity" --character scientist
```

## Usage Tracking

Track your API usage locally:

```bash
# View usage statistics
venice usage

# View detailed breakdown
venice usage --detailed

# Reset usage stats
venice usage --reset
```

## Piping & Scripting

The CLI is pipe-friendly and auto-detects when output is being piped:

```bash
# Pipe input
echo "Summarize this" | venice chat

# Pipe output
venice chat "Generate a haiku" | tee haiku.txt

# Chain commands
cat document.txt | venice chat "Summarize this document" --format json | jq .content
```

## Privacy

Venice CLI reinforces Venice's privacy-first values:

- **No browser tracking** — Terminal interactions leave no browser fingerprints
- **No cookies** — No persistent tracking across sessions
- **Local config** — Your API key is stored locally with secure permissions
- **Open source** — Full transparency into what the CLI does

## Source Code

The Venice CLI is open source and available on GitHub:

<Card title="GitHub Repository" icon="github" href="https://github.com/veniceai/venice-cli">
View source, report issues, or contribute to the Venice CLI
</Card>

## Support

- [GitHub Issues](https://github.com/veniceai/venice-cli/issues) — Report bugs or request features
- [Venice Discord](https://discord.gg/venice) — Community support
- [API Documentation](/api-reference/api-spec) — Full API reference