ElevenLabs CLI
⚠️ Unofficial CLI: This is an independent, community-built CLI client. It is not officially released by ElevenLabs.
A comprehensive command-line interface for the ElevenLabs AI audio platform. Generate speech, transcribe audio, clone voices, manage agents, and more - all from your terminal.
Official Documentation: This CLI wraps the ElevenLabs API. For detailed API documentation, visit the official ElevenLabs Docs.
Features
- Text-to-Speech: Convert text to natural speech with 100+ voices
- Speech-to-Text: Transcribe audio with speaker diarization and timestamps
- Voice Cloning: Clone voices from audio samples
- Sound Effects: Generate sound effects from text descriptions
- Voice Changer: Transform voice in audio files
- Dubbing: Translate and dub video/audio to other languages
- Audio Isolation: Remove background noise from audio
- Agents: Create and manage conversational AI agents
- Dialogue: Generate multi-voice dialogues
- MCP Support: Use as an MCP server for AI assistants
Installation
From Source
# Clone the repository
# Build and install
With MCP Support
Configuration
API Key
Set your ElevenLabs API key via environment variable:
Get your API key: ElevenLabs API Keys Settings
Or pass it with each command:
Or save it to config:
Config File
Config is stored at ~/.config/elevenlabs-cli/config.toml:
= "your-api-key"
= "Brian"
= "eleven_multilingual_v2"
= "mp3_44100_128"
# MCP Server settings (optional)
[]
= "tts,stt" # Only enable specific tools
= "agents,phone" # Disable specific tools
= false # Disable delete, create, update operations
= false # Disable only delete operations
= false # Read-only mode
Usage
Text-to-Speech
API Docs: Text-to-Speech API Reference
# Basic usage
# With specific voice and model
# Save to file
# Read from file
# With voice settings
# Play after generation (macOS)
Speech-to-Text
API Docs: Speech-to-Text API Reference
# Transcribe audio file
# With speaker diarization
# Output as SRT subtitles
# With timestamps
Voice Management
API Docs: Voices API Reference
# List all voices
# Get voice details
# Clone a voice
# Clone from directory
# Delete a voice
Sound Effects
API Docs: Sound Effects API Reference
# Generate sound effect
# With specific duration
# Save to file
Voice Changer
API Docs: Voice Changer API Reference
# Transform voice in audio file
Audio Isolation
API Docs: Audio Isolation API Reference
# Remove background noise
Dubbing
API Docs: Dubbing API Reference
# Create dubbing project
# Check status
# Download dubbed file
Agents
API Docs: Conversational AI API Reference
# List agents
# Create agent
# Get agent details
# List agent summaries (lightweight)
# Manage branches
# Batch calls
Dialogue (Multi-Voice)
API Docs: Text-to-Dialogue API Reference
# Create dialogue with multiple voices
# With specific model
# Save to file
Knowledge Base
API Docs: Knowledge Base API Reference
# List documents
# Add from URL
# Add from text
# Add from file
# Delete document
Webhooks
API Docs: Webhooks API Reference
# List webhooks
# Create webhook
History
API Docs: History API Reference
# List generation history
# Get history item details
# Download audio from history
# Delete history item
Usage Statistics
API Docs: Usage API Reference
# Get usage stats
# With date range
# With breakdown
Workspace
API Docs: Workspace API Reference
# Get workspace info
# List pending invites
# Invite member
# Revoke invite
MCP Server
The CLI can run as an MCP (Model Context Protocol) server, exposing all ElevenLabs functionality to AI assistants like Claude, OpenCode, Cursor, and others.
Learn more: Model Context Protocol
# Run as MCP server (requires --features mcp)
# Enable only specific tools
# Disable specific tools
# Disable all administrative operations (delete, create, update)
# Disable only destructive operations (delete only)
# Read-only mode (same as --disable-admin)
This allows AI assistants to:
- Generate speech and sound effects
- Transcribe audio
- Manage voices and agents
- Access all ElevenLabs API features (80+ tools)
MCP Tool Filtering
You can control which tools are available in the MCP server:
--enable-tools: Comma-separated list of tools to enable (others disabled)--disable-tools: Comma-separated list of tools to disable--disable-admin: Disable all administrative operations (delete, create, update)--disable-destructive: Disable only destructive operations (delete only)--read-only: Read-only mode (same as --disable-admin)
Administrative tools blocked by --disable-admin:
- Voice: delete_voice, clone_voice, edit_voice_settings, share_voice
- Agents: create_agent, update_agent, delete_agent, duplicate_agent
- Knowledge: add_knowledge, delete_knowledge, create_rag, delete_rag, rebuild_rag
- And many more...
MCP Configuration
Add to your MCP client configuration:
Available MCP Tools
The MCP server exposes 80+ tools organized by category:
| Category | Tools |
|---|---|
| TTS & Audio | text_to_speech, speech_to_text, generate_sfx, audio_isolation, voice_changer |
| Voice Management | list_voices, get_voice, delete_voice, clone_voice, voice_settings, edit_voice_settings, create_voice_design, get_voice_design, start_voice_fine_tune, get_voice_fine_tune_status, cancel_voice_fine_tune, share_voice, get_similar_voices |
| Dubbing | create_dubbing, get_dubbing_status, delete_dubbing |
| History | list_history, get_history_item, delete_history_item, history_feedback, download_history |
| Agents | list_agents, get_agent_summaries, create_agent, get_agent, update_agent, delete_agent, agent_branches, batch_list |
| Conversation | converse_chat, list_conversations, get_conversation, get_signed_url, get_conversation_token, delete_conversation, get_conversation_audio |
| Knowledge & RAG | list_knowledge, add_knowledge, delete_knowledge, create_rag, get_rag_status, delete_rag, rebuild_rag, get_rag_index_status |
| Projects | list_projects, get_project, delete_project, convert_project, list_project_snapshots, get_project_audio |
| Music | generate_music, list_music, get_music, download_music, delete_music |
| Phone | list_phones, get_phone, import_phone, update_phone, delete_phone, test_phone_call |
| Workspace | workspace_info, list_workspace_members, list_workspace_invites, invite_workspace_member, revoke_workspace_invite, list_workspace_api_keys, list_secrets, add_secret, delete_secret, share_workspace |
| Other | list_models, get_model_rates, get_usage, get_user_info, get_user_subscription, list_webhooks, create_webhook, delete_webhook, list_library_voices, list_library_collections, list_pronunciations, add_pronunciation, delete_pronunciation, list_samples, delete_sample, list_tools, get_tool, delete_tool, list_audio_native, get_audio_native, create_audio_native |
Output Formats
Supported audio output formats:
| Format | Description | Docs |
|---|---|---|
mp3_44100_128 |
MP3 44.1kHz 128kbps (default) | Audio Formats |
mp3_44100_192 |
MP3 44.1kHz 192kbps | |
pcm_16000 |
PCM 16kHz | |
pcm_22050 |
PCM 22.05kHz | |
pcm_44100 |
PCM 44.1kHz | |
wav_8000 |
WAV 8kHz | |
wav_16000 |
WAV 16kHz | |
wav_44100 |
WAV 44.1kHz | |
opus_48000_64 |
Opus 48kHz 64kbps | |
opus_48000_128 |
Opus 48kHz 128kbps | |
ulaw_8000 |
μ-law 8kHz |
Models
| Model | Use Case | Docs |
|---|---|---|
eleven_multilingual_v2 |
Best quality, 29 languages | Models Guide |
eleven_flash_v2_5 |
Lowest latency | |
eleven_turbo_v2_5 |
Balanced quality and speed | |
eleven_v3 |
Expressive, emotional speech | |
scribe_v1 |
Speech-to-text transcription | STT Models |
scribe_v1_base |
Faster, lower cost STT |
Shell Completion
Generate shell completions:
# Bash
# Zsh
# Fish
# PowerShell
Interactive Mode
Run in interactive REPL mode:
Available commands in interactive mode:
tts <text>- Text to speechstt <file>- Speech to textvoices- List voicesmodels- List modelsuser- User infoexit- Exit interactive mode
JSON Output
For scripting, use JSON output mode:
Error Handling
The CLI includes automatic retry logic for transient failures:
- Retries up to 3 times with exponential backoff
- Handles 5xx server errors and rate limits (429)
Learn more: API Error Codes
Resources
| Resource | Link |
|---|---|
| API Reference | https://elevenlabs.io/docs/api-reference |
| Documentation | https://elevenlabs.io/docs |
| API Keys | https://elevenlabs.io/app/settings/api-keys |
| Dashboard | https://elevenlabs.io/app |
| Voice Library | https://elevenlabs.io/app/voice-library |
| Changelog | https://elevenlabs.io/docs/changelog |
| Status Page | https://status.elevenlabs.io |
License
MIT License - see LICENSE file.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.