speak-mintlify commands.
Global Options
These options are available for the main CLI:Display the installed version of speak-mintlify.
Display help information for commands.
Voice Configuration
Options for configuring TTS voices (used ingenerate command):
Command: Notes:
generateComma-separated list of Fish Audio voice IDs.Example: --voices "voice-id-1,voice-id-2,voice-id-3"Alternative: Define in speaker-config.yaml:- Required unless using
speaker-config.yaml - Voice IDs must exist in your Fish Audio account
- Multiple voices enable multi-language or multi-speaker audio
Command:
generateComma-separated list of human-readable voice names.Example: --voice-names "English,Spanish,French"Alternative: Define in speaker-config.yamlRequirements:- Must match the number of voice IDs
- Names appear in the audio player UI
- If omitted, defaults to “Voice 1”, “Voice 2”, etc.
Fish Audio API
Options for Fish Audio TTS service:Command:
generateYour Fish Audio API key for generating text-to-speech.Example: --api-key "fa-12345678-abcd-efgh"Alternative: Set FISH_API_KEY environment variableRequired: Yes (via CLI or environment variable)How to get: Sign up at Fish Audio and generate an API keyS3 Storage Options
Options for configuring S3-compatible storage (used in bothgenerate and cleanup commands):
Commands:
generate, cleanupS3 bucket name where audio files are stored.Example: --s3-bucket "my-docs-audio"Alternative: Set S3_BUCKET environment variableRequired: YesCommands:
generate, cleanupAWS region for your S3 bucket.Example: --s3-region "us-west-2"Alternative: Set S3_REGION environment variableDefault: us-east-1Common values:us-east-1- US East (N. Virginia)us-west-2- US West (Oregon)eu-west-1- EU (Ireland)ap-southeast-1- Asia Pacific (Singapore)auto- For Cloudflare R2
Commands:
generate, cleanupCustom S3 endpoint URL for S3-compatible services.Examples:- Cloudflare R2:
https://account-id.r2.cloudflarestorage.com - MinIO:
https://minio.example.com - DigitalOcean Spaces:
https://nyc3.digitaloceanspaces.com
S3_ENDPOINT environment variableRequired: Only for non-AWS S3-compatible servicesCommands:
generate, cleanupS3 access key ID for authentication.Example: --s3-access-key-id "AKIAIOSFODNN7EXAMPLE"Alternative: Set S3_ACCESS_KEY_ID environment variableRequired: YesSecurity: Never commit credentials to version controlCommands:
generate, cleanupS3 secret access key for authentication.Example: --s3-secret-access-key "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"Alternative: Set S3_SECRET_ACCESS_KEY environment variableRequired: YesSecurity: Never commit credentials to version controlCommands:
generate, cleanupPublic CDN URL for accessing uploaded audio files.Examples:- Cloudflare R2:
https://pub-abc123.r2.dev - Custom domain:
https://cdn.example.com - Direct S3:
https://bucket-name.s3.amazonaws.com
S3_PUBLIC_URL environment variableRequired: YesNotes:- This URL is embedded in your documentation
- Should be publicly accessible
- Used to construct audio file URLs
Commands:
generate, cleanupDirectory prefix for organizing audio files in S3.Example: --s3-path-prefix "tts-audio"Default: audioStructure: Files are stored as {prefix}/{page-slug}/{voice-id}.mp3Example paths:audio/quickstart/voice-1.mp3audio/guides-setup/voice-en.mp3
generate and cleanupComponent Options
Options for MDX component configuration:Command: Notes:
generateImport path for the audio player component.Example: --component-import "/components/AudioPlayer.jsx"Default: /snippets/audio-transcript.jsxUsage: This path is used in the import statement:- Must be a valid import path in your Mintlify project
- Should point to your custom audio player component
Commands: Important:
generate, cleanupName of the audio player component.Example: --component-name "AudioPlayer"Default: AudioTranscriptUsage: This is the component used in MDX:- Must match the component name exported from
--component-import - Use the same name in both
generateandcleanup
File Selection Options
Options for selecting which files to process:Commands: Pattern syntax:
generate, cleanupGlob pattern for selecting MDX files.Default: **/*.mdx (all MDX files recursively)Examples:*- Matches any characters except/**- Matches any characters including/?- Matches single character[abc]- Matches any character in brackets{a,b}- Matches any of the patterns
Execution Options
Options that control how commands execute:Commands:
generate, cleanupSimulate execution without making actual changes.Example: --dry-runDefault: falseBehavior:- generate: Shows diff preview of MDX changes, doesn’t call APIs or write files
- cleanup: Lists orphaned files without deleting them
- Testing configuration before committing
- Previewing changes
- Auditing storage
- CI/CD validation
Commands:
generate, cleanupShow detailed processing information.Example: --verboseDefault: falseAdditional output:- Extracted text content for TTS
- Content hashes
- File-by-file processing status
- Detailed error messages
- Full result summary
Environment Variables
All CLI options can be set via environment variables:| CLI Option | Environment Variable | Required |
|---|---|---|
--api-key | FISH_API_KEY | Yes (generate) |
--s3-bucket | S3_BUCKET | Yes |
--s3-region | S3_REGION | No (default: us-east-1) |
--s3-endpoint | S3_ENDPOINT | No |
--s3-access-key-id | S3_ACCESS_KEY_ID | Yes |
--s3-secret-access-key | S3_SECRET_ACCESS_KEY | Yes |
--s3-public-url | S3_PUBLIC_URL | Yes |
Setting Environment Variables
Unix/Linux/macOS:.env File
Create a.env file in your project root:
.env to .gitignore to avoid committing secrets:
Configuration Precedence
Options are resolved in this order (highest priority first):- CLI options:
--api-key "key" - Environment variables:
FISH_API_KEY=key - Configuration file:
speaker-config.yaml(for voices only) - Defaults: Built-in default values
Example
Option Validation
The CLI validates options before execution:- Required options: Error if missing
- API key format: Must be valid Fish Audio key
- S3 credentials: Tested during initialization
- Voice IDs: Must be non-empty strings
- Voice names: Must match voice ID count
- Glob patterns: Must be valid glob syntax
- URLs: Must be valid HTTP/HTTPS URLs
Validation Errors
Best Practices
1. Use Environment Variables for Secrets
Never pass secrets via CLI options in scripts:2. Use Configuration Files for Voice Management
Manage voices inspeaker-config.yaml:
--voices flags:
