Skip to content

Configuration

All configuration is via environment variables, validated at startup by Zod. Invalid values cause immediate failure with descriptive error messages.

Video Format

VariableDefaultDescription
VIDEO_FORMATmessagesPipeline format: classic (narrated TTS) or messages (iMessage conversation)

Reddit Scraping

VariableDefaultDescription
TARGET_SUBREDDITStifu,AmItheAssholeComma-separated subreddits
MIN_POST_SCORE1000Minimum upvote score
MAX_POST_AGE_HOURS48Maximum post age
MAX_TEXT_LENGTH3000Maximum text length for TTS
REDDIT_SORTtopSort order (top, hot)
REDDIT_TIME_FILTERdayTime filter (hour, day, week, month, year)
REDDIT_MAX_PAGES5Max pages to scrape per subreddit
REDDIT_TIME_FILTER_ESCALATIONtrueAuto-escalate time filter if no posts found

Browser

VariableDefaultDescription
BROWSER_HEADLESStrueRun browser in headless mode
BROWSER_USER_DATA_DIR./data/browser-stateSession storage path
BROWSER_TIMEOUT_MS30000Browser operation timeout
BROWSER_HUMANIZE_DELAYStrueAdd human-like delays

TTS (Kokoro)

VariableDefaultDescription
KOKORO_MODEL_IDonnx-community/Kokoro-82M-v1.0-ONNXONNX model ID
KOKORO_VOICEaf_heartVoice preset
KOKORO_DTYPEq8Quantization (fp32, fp16, q8, q4, q4f16)
WHISPER_MODELbase.enWhisper alignment model

Video Composition

VariableDefaultDescription
VIDEO_WIDTH1080Output video width
VIDEO_HEIGHT1920Output video height
BACKGROUND_DIR./assets/backgroundsBackground video directory
BACKGROUND_SEARCH_TERMS(see .env.example)YouTube search terms for backgrounds
BACKGROUND_MIN_VIDEOS5Min background videos to maintain
BACKGROUND_MAX_DURATION_SEC600Max background video duration
OUTPUT_DIR./outputOutput directory for generated videos
CAPTION_FONT_SIZE24Caption font size
CAPTION_STYLEword-highlightCaption style (word-highlight, karaoke, static)
MUSIC_DIR./assets/musicBackground music directory
MUSIC_VOLUME_DB-20Background music volume (dB)
HOOK_AUDIO_DIR./assets/hooksHook sound effects directory
HOOK_ENABLEDtrueEnable hook audio overlay

Messages Format

VariableDefaultDescription
MESSAGE_TARGET_COUNT14Target number of messages in conversation
MESSAGE_FRAMERATE10Frame rate for message video
MESSAGE_TYPING_DURATION_MS800Typing indicator duration
MESSAGE_MIN_HOLD_MS600Minimum hold time per message

LLM

VariableDefaultDescription
LLM_BASE_URLhttp://localhost:4000/v1OpenAI-compatible endpoint
LLM_MODELqwen3.5-9bModel name
LLM_MAX_TOKENS2048Max output tokens
LLM_TEMPERATURE0.8Sampling temperature
LLM_TIMEOUT_MS60000Request timeout

TikTok Publishing

VariableDefaultDescription
TIKTOK_EMAIL(empty)TikTok account email
TIKTOK_PASSWORD(empty)TikTok account password
TIKTOK_HASHTAGS#reddit,#storytime,#fyp,#viralHashtag pool
TIKTOK_MENTIONS(empty)Creator mentions pool
TIKTOK_HASHTAGS_PER_POST5Hashtags per post
TIKTOK_MENTIONS_PER_POST5Mentions per post
TIKTOK_UPLOAD_TIMEOUT_MS120000Upload timeout

Scheduling

VariableDefaultDescription
POSTING_CRON0 */4 * * *Cron schedule (every 4 hours)
MAX_POSTS_PER_DAY6Daily post limit
PIPELINE_RETRY_MAX_ATTEMPTS2Max retry attempts per stage
PIPELINE_RETRY_DELAY_MS5000Base retry delay (linear backoff)

Server

VariableDefaultDescription
PORT3000HTTP server port
LOG_LEVELinfoLog level (debug, info, warn, error)
SQLITE_DB_PATH./data/posts.dbSQLite database path

Built with VitePress