Skip to main content
This page provides a comprehensive reference of all CLI options available across speak-mintlify commands.

Global Options

These options are available for the main CLI:
flag
Display the installed version of speak-mintlify.
flag
Display help information for commands.

Voice Configuration

Options for configuring TTS voices (used in generate command):
string
Command: 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:
Notes:
  • Required unless using speaker-config.yaml
  • Voice IDs must exist in your Fish Audio account
  • Multiple voices enable multi-language or multi-speaker audio
string
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:
string
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 key

S3 Storage Options

Options for configuring S3-compatible storage (used in both generate and cleanup commands):
string
Commands: generate, cleanupS3 bucket name where audio files are stored.Example: --s3-bucket "my-docs-audio"Alternative: Set S3_BUCKET environment variableRequired: Yes
string
default:"us-east-1"
Commands: 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
string
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
Alternative: Set S3_ENDPOINT environment variableRequired: Only for non-AWS S3-compatible services
string
Commands: 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 control
string
Commands: 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 control
string
Commands: 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
Alternative: Set S3_PUBLIC_URL environment variableRequired: YesNotes:
  • This URL is embedded in your documentation
  • Should be publicly accessible
  • Used to construct audio file URLs
string
default:"audio"
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.mp3
  • audio/guides-setup/voice-en.mp3
Important: Use the same prefix for both generate and cleanup

Component Options

Options for MDX component configuration:
string
default:"/snippets/audio-transcript.jsx"
Command: 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:
Notes:
  • Must be a valid import path in your Mintlify project
  • Should point to your custom audio player component
string
default:"AudioTranscript"
Commands: generate, cleanupName of the audio player component.Example: --component-name "AudioPlayer"Default: AudioTranscriptUsage: This is the component used in MDX:
Important:
  • Must match the component name exported from --component-import
  • Use the same name in both generate and cleanup

File Selection Options

Options for selecting which files to process:
string
default:"**/*.mdx"
Commands: generate, cleanupGlob pattern for selecting MDX files.Default: **/*.mdx (all MDX files recursively)Examples:
Pattern syntax:
  • * - 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:
boolean
default:false
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
Use cases:
  • Testing configuration before committing
  • Previewing changes
  • Auditing storage
  • CI/CD validation
Output example:
boolean
default:false
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
Example output:

Environment Variables

All CLI options can be set via environment variables:

Setting Environment Variables

Unix/Linux/macOS:
Windows (PowerShell):
Windows (CMD):

.env File

Create a .env file in your project root:
Note: Add .env to .gitignore to avoid committing secrets:

Configuration Precedence

Options are resolved in this order (highest priority first):
  1. CLI options: --api-key "key"
  2. Environment variables: FISH_API_KEY=key
  3. Configuration file: speaker-config.yaml (for voices only)
  4. 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 in speaker-config.yaml:
Then run without --voices flags:

3. Always Test with Dry Run

4. Use Consistent Options Across Commands

5. Leverage Verbose Mode for Debugging