openfun-cli
v0.1.0
Published
CLI for OpenFun.ai — AI video factory. Optimized for AI agent consumption.
Maintainers
Readme
openfun-cli
CLI for OpenFun.ai — the AI video factory that reverse-engineers viral patterns and creates original short-form videos.
Optimized for AI agent consumption (OpenClaw, Codex, Claude). All output is JSON by default.
Install
npm install -g openfun-cliAuthenticate
# Browser-based login
openfun login
# Or use a token directly
openfun login --token <your-token>
# Or set env var
export OPENFUN_API_TOKEN=<your-token>Quick Start
# 1. Check what's trending
openfun trends --niche saas
# 2. Remix a viral video into an original script
openfun remix "https://tiktok.com/@creator/video/123" --niche saas --tone casual
# 3. Render the video
openfun render <remix-id> --voice echo
# 4. Check progress
openfun render status <job-id> --poll
# 5. Download
openfun download <job-id> -o my-video.mp4Commands
| Command | Description |
|---|---|
| openfun login | Authenticate with OpenFun |
| openfun trends | Get trending viral patterns |
| openfun remix <url> | Create a remix script from a URL, hook, or idea |
| openfun render <remix-id> | Generate video from a remix |
| openfun render status <job-id> | Check render progress |
| openfun download <job-id> | Download rendered video |
| openfun videos | List completed videos |
| openfun account | Check account and usage |
Agent Usage
All commands output JSON to stdout by default. Pipe through jq for specific fields:
# Get the overall score from a remix
openfun remix "https://..." --niche saas | jq '.remix.overall_score'
# Get hook variants
openfun remix "https://..." | jq '.remix.hook_variants[] | {text, score, principle}'
# Get trending hook texts
openfun trends --niche fitness | jq '.patterns[].exampleHook'Add --pretty for human-readable output:
openfun trends --niche saas --pretty
openfun remix "https://..." --prettyConfiguration
Config stored at ~/.openfun/config.json:
# Set Convex deployment URL
openfun login --deployment-url https://your-deployment.convex.cloudOr use environment variables:
| Variable | Description |
|---|---|
| OPENFUN_API_TOKEN | API token (skips login) |
| OPENFUN_DEPLOYMENT_URL | Convex deployment URL |
Pricing
| Tier | Remixes/mo | Videos/mo | Price | |---|---|---|---| | Free | 5 | 3 (watermarked) | $0 | | Pro | Unlimited | 50 | $19/mo | | Scale | Unlimited | 200 | $49/mo |
License
MIT
