Developer

AI Video CLI: Generate UGC Videos from Your Terminal

Nobody else ships a CLI for AI video generation. agent-media gives you npm install -g agent-media-cli, and you can generate UGC videos without ever opening a browser. Write scripts in your editor, batch-generate across actors, pipe output into your CI/CD pipeline. See pricing.

Install and Authenticate

The CLI is a single npm package. Install it globally and log in with your agent-media account. Authentication opens your browser once, then stores the token locally.

terminal

$ npm install -g agent-media-cli

$ agent-media login

Logged in as you@example.com

Generate Your First Video

One command. Script, actor, duration, style. The --sync flag waits for the video to finish and downloads the MP4 to your current directory.

terminal

$ agent-media ugc "This changed everything for me. I used to spend hours on content." \

--actor sofia \

--duration 10 \

--style tiktok \

--tone energetic \

--sync

Generating... done (2m 14s)

Saved: ./sofia-tiktok-10s.mp4

Browse Actors and Variants

List all 200 actors from the terminal. Each actor has multiple variants with different outfits and backgrounds. Use agent-media actor list to browse and agent-media actor variants to see a specific actor's looks.

terminal

$ agent-media actor list

sofia female 10 variants

marco male 10 variants

emma female 10 variants

... (200 actors)

$ agent-media actor variants sofia

variant-1 crop top, apartment background

variant-2 tank top, kitchen background

variant-3 fitted tee, office background

... (10 variants)

Batch Generation via Shell Scripting

Because it runs in the terminal, you can wrap agent-media in a shell loop. Generate the same script across 5 actors in one shot. Or loop over a file of scripts and actors.

batch.sh
#!/bin/bash
SCRIPT="Stop scrolling. This product changed my morning routine."
ACTORS=("sofia" "marco" "emma" "naomi" "james")

for ACTOR in "${ACTORS[@]}"; do
  echo "Generating for $ACTOR..."
  agent-media ugc "$SCRIPT" \
    --actor "$ACTOR" \
    --duration 10 \
    --style tiktok \
    --sync
done

echo "All videos generated."

Five videos, five different faces, same script. Upload them all to your ad platform and test which actor drives the best click-through rate. Total cost: $15 (1,500 credits).

CI/CD Integration

Run agent-media in GitHub Actions, GitLab CI, or any pipeline that supports Node.js. Set your API key as a secret, install the CLI, and generate videos on every push or on a schedule.

.github/workflows/generate-ugc.yml
name: Generate UGC Videos
on:
  schedule:
    - cron: '0 9 * * 1'  # Every Monday at 9am

jobs:
  generate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20

      - run: npm install -g agent-media-cli

      - run: agent-media login --token ${{ secrets.AGENT_MEDIA_KEY }}

      - run: |
          agent-media ugc "New week, new routine." \
            --actor sofia --duration 10 --style tiktok --sync

      - uses: actions/upload-artifact@v4
        with:
          name: ugc-videos
          path: "*.mp4"

Claude Code Skill Integration

agent-media works as a Claude Code skill. Your AI coding assistant can generate videos directly from the conversation. Write a prompt describing the video you want, and Claude calls the CLI under the hood.

claude code

> Generate a 10-second UGC video with Sofia reviewing a fitness app. Use the tiktok subtitle style.

Running: agent-media ugc "I found this fitness app..." --actor sofia --style tiktok --duration 10 --sync

Video saved: ./sofia-tiktok-10s.mp4

This is useful when you want an AI assistant to handle the creative copy and video generation in one step. No context-switching between tools.

CLI Commands Reference

CommandDescription
agent-media loginAuthenticate with your account (opens browser)
agent-media login --token KEYAuthenticate with an API key (for CI/CD)
agent-media ugc "script" --actor NAMEGenerate a UGC video
agent-media actor listList all 200 available actors
agent-media actor variants SLUGShow variants for a specific actor
agent-media review "Product Name"Generate a SaaS review video
--duration 5|10|15Video length in seconds
--style NAMESubtitle style (tiktok, hormozi, minimal, etc.)
--tone NAMEVoice tone (energetic, calm, confident, dramatic)
--syncWait for video and download MP4

Why the agent-media CLI

Blue ocean

No other AI video tool has a CLI. If you work in the terminal, this is the only option.

Scriptable

Wrap it in bash, python, or any language. Loop over actors, scripts, and durations programmatically.

CI/CD native

Run in GitHub Actions, GitLab CI, or any pipeline. Generate fresh creatives on a schedule.

Same credits

CLI, API, and dashboard all share the same credit pool. 300 credits per 10-second video.

Claude Code ready

Works as an AI coding assistant skill. Let Claude write the script and generate the video in one step.

Fast iteration

Change one flag, hit enter, get a new video. No clicking through menus or waiting for page loads.