Configuration
Config object
import { resolveConfig } from "cleya";
const config = resolveConfig({
ffmpeg_path: "/opt/homebrew/bin/ffmpeg",
temp_dir: "/tmp/cleya",
ffmpeg_timeout: 600_000,
});
| Key | Default | Purpose |
|---|---|---|
ffmpeg_path | "ffmpeg" | FFmpeg binary |
ffprobe_path | "ffprobe" | ffprobe binary |
whisper_path | "whisper" | whisper.cpp binary |
temp_dir | "/tmp/cleya" | Working files |
retention_hours | 24 | Temp file cleanup retention |
output_dir | "." | Default output directory |
ffmpeg_timeout | 300000 | FFmpeg execution timeout (ms) |
whisper_timeout | 600000 | Whisper execution timeout (ms) |
platform_presets | see below | Per-platform size, codec and duration |
caption_defaults | { font_size: 24, … } | Default caption styling |
Environment variables
| Variable | Effect |
|---|---|
CLEYA_CHROME | Path to a Chromium-family binary for the render backend |
CLEYA_CHROME_FLAGS | Extra Chrome flags, e.g. --no-sandbox in containers |
CLEYA_RENDER_WORKERS | Parallel frame-capture workers (default: half your cores, capped at 4) |
CLEYA_RENDER_ENGINE | chrome (default) or webkit |
CLEYA_NO_GPU | 1 forces software rasterisation |
CLEYA_STARTERS_DIR | Override the user starter library (default ~/.cleya/starters) |
OPENAI_API_KEY | Required by tts, ignored by everything else |
NO_COLOR | Disables CLI colour entirely |
FORCE_COLOR | Forces colour past a pipe (NO_COLOR still wins) |
Platform presets
| Platform | Resolution | Max duration | Aspect |
|---|---|---|---|
| tiktok | 1080×1920 | 600s | 9:16 |
| reels | 1080×1920 | 90s | 9:16 |
| shorts | 1080×1920 | 60s | 9:16 |
| 1280×720 | 140s | 16:9 | |
| 1920×1080 | 600s | 16:9 | |
| square | 1080×1080 | unlimited | 1:1 |
social_clip caps clip duration to the smallest platform limit in the request; override with
max_duration. Crop strategy (center, top, bottom, left, right, auto) controls where
the crop window sits when changing aspect — top keeps faces in frame for talking heads, auto
uses face detection on macOS.
No persistence
Configuration is passed per call or resolved from defaults. Cleya does not write a config file of its own — pass a config object from the library, or set the environment variables above.