|
| 1 | +# Prompt Tools CLI |
| 2 | + |
| 3 | +A command-line tool for IVR/contact center prompt generation (text-to-speech) and audio transcription (speech-to-text). |
| 4 | + |
| 5 | +## Install |
| 6 | + |
| 7 | +**macOS / Linux:** |
| 8 | +```bash |
| 9 | +curl -fsSL https://raw.githubusercontent.com/Cloverhound/prompt-tools-cli/main/install.sh | sh |
| 10 | +``` |
| 11 | + |
| 12 | +**Windows (PowerShell):** |
| 13 | +```powershell |
| 14 | +irm https://raw.githubusercontent.com/Cloverhound/prompt-tools-cli/main/install.ps1 | iex |
| 15 | +``` |
| 16 | + |
| 17 | +Or download from [Releases](https://github.com/Cloverhound/prompt-tools-cli/releases). |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +```bash |
| 22 | +# Interactive setup (API keys, defaults) |
| 23 | +prompt-tools setup |
| 24 | + |
| 25 | +# Generate a prompt |
| 26 | +prompt-tools speak "Welcome to customer support." -o welcome.wav |
| 27 | + |
| 28 | +# Use a Gemini voice (highest quality) |
| 29 | +prompt-tools speak "Welcome to customer support." --voice Achernar -o welcome.wav |
| 30 | + |
| 31 | +# List available voices |
| 32 | +prompt-tools voices --language en-US --output table |
| 33 | + |
| 34 | +# Bulk generate from spreadsheet |
| 35 | +prompt-tools bulk template --output prompts.xlsx # Create template |
| 36 | +prompt-tools bulk generate --file prompts.xlsx --output-dir ./output |
| 37 | + |
| 38 | +# Transcribe audio |
| 39 | +prompt-tools transcribe --file recording.wav |
| 40 | +``` |
| 41 | + |
| 42 | +## TTS Providers |
| 43 | + |
| 44 | +### Google Cloud TTS |
| 45 | + |
| 46 | +400+ voices across multiple model families. Default provider. |
| 47 | + |
| 48 | +| Model | Quality | Example Voice | Notes | |
| 49 | +|-------|---------|---------------|-------| |
| 50 | +| Gemini | Highest | `Achernar`, `Kore`, `Puck` | Bare names, uses Gemini 2.5 Pro | |
| 51 | +| Chirp3-HD | High | `en-US-Chirp3-HD-Achernar` | Same voices, different model | |
| 52 | +| Studio | High | `en-US-Studio-O` | Studio-grade | |
| 53 | +| Neural2 | Good | `en-US-Neural2-F` | Good default | |
| 54 | +| Wavenet | Good | `en-US-Wavenet-A` | DeepMind Wavenet | |
| 55 | +| Standard | Basic | `en-US-Standard-A` | Concatenative | |
| 56 | + |
| 57 | +Gemini voices automatically use `gemini-2.5-pro-tts`. Override with `--model`: |
| 58 | + |
| 59 | +```bash |
| 60 | +prompt-tools speak "Hello" --voice Kore --model gemini-2.5-flash-tts -o hello.wav |
| 61 | +``` |
| 62 | + |
| 63 | +### ElevenLabs |
| 64 | + |
| 65 | +Premium natural voices. Output is converted to IVR-compatible formats (mu-law/A-law WAV) automatically. |
| 66 | + |
| 67 | +```bash |
| 68 | +prompt-tools speak "Hello" --provider elevenlabs --voice <voice-id> -o hello.wav |
| 69 | +``` |
| 70 | + |
| 71 | +## STT Providers |
| 72 | + |
| 73 | +### Google Cloud STT |
| 74 | + |
| 75 | +Sync recognition for short audio, phrase boosting, word-level timestamps. |
| 76 | + |
| 77 | +### AssemblyAI |
| 78 | + |
| 79 | +Async transcription with polling, high accuracy, automatic punctuation. |
| 80 | + |
| 81 | +```bash |
| 82 | +prompt-tools transcribe --file recording.wav --provider assemblyai |
| 83 | +``` |
| 84 | + |
| 85 | +## Bulk Processing |
| 86 | + |
| 87 | +Generate hundreds of prompts from a spreadsheet. Supports `.xlsx` and `.csv`. |
| 88 | + |
| 89 | +```bash |
| 90 | +# Create a template |
| 91 | +prompt-tools bulk template --output prompts.xlsx |
| 92 | + |
| 93 | +# Validate without generating |
| 94 | +prompt-tools bulk validate --file prompts.xlsx |
| 95 | + |
| 96 | +# Generate all prompts |
| 97 | +prompt-tools bulk generate --file prompts.xlsx --output-dir ./output |
| 98 | + |
| 99 | +# With options |
| 100 | +prompt-tools bulk generate --file prompts.csv --output-dir ./output \ |
| 101 | + --concurrency 10 --skip-existing --continue-on-error |
| 102 | +``` |
| 103 | + |
| 104 | +### Spreadsheet Format |
| 105 | + |
| 106 | +| Filename | Voice | Text | SSML | Sample Rate | Encoding | Notes | |
| 107 | +|----------|-------|------|------|-------------|----------|-------| |
| 108 | +| welcome.wav | en-US-Neural2-F | Welcome to support. | no | | | Main greeting | |
| 109 | +| es-MX/welcome.wav | es-MX-Neural2-A | Bienvenido. | no | | | Subdirectory | |
| 110 | +| transfer.wav | Achernar | Hold please. | no | | | Gemini voice | |
| 111 | +| #holiday.wav | en-US-Neural2-F | Closed for holiday. | no | | | Skipped | |
| 112 | + |
| 113 | +- Rows starting with `#` are skipped |
| 114 | +- Voice, Sample Rate, and Encoding are optional (defaults from config) |
| 115 | +- Filename supports subdirectories — folders are created automatically |
| 116 | + |
| 117 | +## Batch Transcription |
| 118 | + |
| 119 | +```bash |
| 120 | +# Transcribe a directory |
| 121 | +prompt-tools batch-transcribe --dir ./recordings --output-dir ./transcripts |
| 122 | + |
| 123 | +# Specific files |
| 124 | +prompt-tools batch-transcribe --files "a.wav,b.wav" --output-format csv |
| 125 | + |
| 126 | +# With concurrency |
| 127 | +prompt-tools batch-transcribe --dir ./recordings --concurrency 10 --continue-on-error |
| 128 | +``` |
| 129 | + |
| 130 | +## Authentication |
| 131 | + |
| 132 | +API keys are stored in the OS keyring (macOS Keychain / Linux keyring / Windows Credential Manager). |
| 133 | + |
| 134 | +```bash |
| 135 | +prompt-tools setup # Interactive wizard |
| 136 | +prompt-tools config set-api-key google # Set Google API key |
| 137 | +prompt-tools config set-api-key elevenlabs # Set ElevenLabs API key |
| 138 | +prompt-tools config set-api-key assemblyai # Set AssemblyAI API key |
| 139 | +prompt-tools config clear-api-key google # Remove a key |
| 140 | +prompt-tools config show # Show config and key status |
| 141 | +``` |
| 142 | + |
| 143 | +Key resolution order: environment variable (`GOOGLE_API_KEY`, `ELEVENLABS_API_KEY`, `ASSEMBLYAI_API_KEY`) > OS keyring. |
| 144 | + |
| 145 | +## Audio Formats |
| 146 | + |
| 147 | +Default output is **8kHz mu-law WAV** — the North American IVR/telephony standard. |
| 148 | + |
| 149 | +| Use Case | Sample Rate | Encoding | Flags | |
| 150 | +|----------|-------------|----------|-------| |
| 151 | +| North American IVR | 8000 | mulaw | (default) | |
| 152 | +| European IVR | 8000 | alaw | `--encoding alaw` | |
| 153 | +| Wideband / modern | 16000 | linear16 | `--sample-rate 16000 --encoding linear16` | |
| 154 | +| General purpose | — | mp3 | `--format mp3` | |
| 155 | + |
| 156 | +```bash |
| 157 | +prompt-tools config set-sample-rate 8000 |
| 158 | +prompt-tools config set-encoding mulaw |
| 159 | +prompt-tools config set-format wav |
| 160 | +``` |
| 161 | + |
| 162 | +## Output Formats |
| 163 | + |
| 164 | +Control output with `--output`: |
| 165 | + |
| 166 | +| Format | Description | |
| 167 | +|--------|-------------| |
| 168 | +| `json` | Pretty-printed JSON (default) | |
| 169 | +| `table` | ASCII table with terminal-width formatting | |
| 170 | +| `csv` | CSV with headers | |
| 171 | +| `raw` | Raw output | |
| 172 | + |
| 173 | +```bash |
| 174 | +prompt-tools voices --language en-US --output table |
| 175 | +``` |
| 176 | + |
| 177 | +## Global Flags |
| 178 | + |
| 179 | +| Flag | Description | |
| 180 | +|------|-------------| |
| 181 | +| `--output json\|table\|csv\|raw` | Output format (default: json) | |
| 182 | +| `--debug` | Show HTTP request/response details | |
| 183 | +| `--dry-run` | Show plan without executing | |
| 184 | + |
| 185 | +## Shell Completions |
| 186 | + |
| 187 | +```bash |
| 188 | +# Zsh |
| 189 | +prompt-tools completion zsh > "${fpath[1]}/_prompt-tools" |
| 190 | + |
| 191 | +# Bash |
| 192 | +prompt-tools completion bash > /etc/bash_completion.d/prompt-tools |
| 193 | + |
| 194 | +# Fish |
| 195 | +prompt-tools completion fish > ~/.config/fish/completions/prompt-tools.fish |
| 196 | +``` |
| 197 | + |
| 198 | +## Claude Code Integration |
| 199 | + |
| 200 | +A Claude Code skill is included in `skill/SKILL.md`. To install: |
| 201 | + |
| 202 | +```bash |
| 203 | +mkdir -p ~/.claude/skills/prompt-tools |
| 204 | +cp skill/SKILL.md ~/.claude/skills/prompt-tools/SKILL.md |
| 205 | +``` |
| 206 | + |
| 207 | +## Development |
| 208 | + |
| 209 | +See [CLAUDE.md](CLAUDE.md) for project structure and conventions. |
| 210 | + |
| 211 | +```bash |
| 212 | +make build # Build binary |
| 213 | +make check # Build + go vet |
| 214 | +go test ./... # Run tests |
| 215 | +``` |
| 216 | + |
| 217 | +## License |
| 218 | + |
| 219 | +MIT |
0 commit comments