Skip to content

Command Line

Damilola Ogunsakin edited this page Oct 18, 2026 · 10 revisions

Command Line

Everything the studio does is also a command, so scripts, CI and AI agents can make videos too. Add --json for output a program can read.

Command What it does
video-demo:install Set up or upgrade: config, migrations, the recorder's browser, the sample database. See Installation.
video-demo:doctor Check everything making videos needs (the studio, the AI key, the app's address, a separate frontend and its sign-in, Node, Playwright, ffmpeg, the queue and a worker, the user to record as, sample data, the storage disk, the voice) and say how to fix what isn't right. --json; exits non-zero when something must be fixed.
video-demo:generate "<description>" Make a video. Waits for it, printing an estimated cost first; exits non-zero if it fails.
video-demo:suggest Ideas for the videos worth making first (--replace starts over)
video-demo:work Make several videos at once: runs that many workers for the package's queue (--workers=N, 2 by default; --stop-when-empty)
video-demo:list Every video, with its status and cost
video-demo:publish <slug> Publish to the library (--unpublish takes it out)
video-demo:refresh Record published videos again from their plans, at no AI cost (--changed=<ref> only those made from changed code, --fix a new plan when one no longer works, --json). See On deploy
video-demo:verify Check that videos still work after a change, without recording them or using AI (--changed=origin/main, --fix). See Keeping Videos Up To Date.
video-demo:translate <slug> <languages…> Make a video in other languages from its plan (--voice=, --publish, --queue). See Other Languages.
video-demo:export <slug> A GIF, square or vertical copy (--format=gif|square|vertical, --device=, --out=), or with --format=pest the video's steps as a Pest browser test. See Styles and Screens and The Studio.
video-demo:preview Record the published videos a change touches into a folder, from their plans, as MP4s and GIFs with a summary.md for a pull request, without publishing anything (--changed=<ref>, --frontend-changed=<ref>, --out=, --no-gif, --json). See On pull requests.
video-demo:sample-database Build the sample database now (--fresh to rebuild)
video-demo:install-voice Install the free local voice for voice-overs
video-demo:clean Free disk space (--dry-run to see what would go, --browser to remove Playwright too)

Disk space

The package itself is about 500 KB; the example videos stream from GitHub. What takes space is on the machine that makes videos: the recorder's browser (a few hundred MB, shared with other projects that use Playwright), each video's finished MP4s, raw recordings left by runs that stopped early, and sample databases.

php artisan video-demo:clean --dry-run   # what would be removed, and how much it frees
php artisan video-demo:clean             # raw recordings, temporary files, files of deleted videos, old sample databases
php artisan video-demo:clean --browser   # also the Playwright install (video-demo:install puts it back)

Finished videos, their copies (GIF, square, vertical) and "Where to put it" pictures, the current sample database and the library are never touched, nor is anything a video is using while it's being made, checked or placed. Production needs only the published videos on the storage disk.

video-demo:generate

php artisan video-demo:generate "How a recruiter posts a job, from the jobs page to a live listing" \
    --length=60 --style=clean --devices=desktop,mobile

# An ad-style video, published when it's ready
php artisan video-demo:generate "Show off posting a job" --style=ad --publish
Option What it does
--title= The video's title (the AI suggests one otherwise)
--length= Target length in seconds
--style= clean, quick, detailed, showcase, ad, spotlight, promo, or a style of your own
--devices= desktop, tv, tablet, mobile, comma-separated
--model=, --effort= The AI model, and its effort (Claude only)
--start= The page to start on, such as /jobs
--as= A user type such as admin or member, guest, or a user id or email
--own-data Record on your own local data instead of sample data
--voice= A voice-over, such as kokoro:af_heart; none for no voice
--language= The language of the titles, captions and voice-over, such as fr or pt-BR; the language of your app's pages when left out
--music= A background music track's key; none for no music
--max-cost= The spending limit in dollars, such as 0.50
--max-steps= The most steps the plan may have
--speed= Playback speed, from 0.25 to 4
--private List it in the private library only
--publish Publish it when it's ready
--queue Queue it and return straight away, instead of waiting
--json Print the result as JSON

With --json, the result has the video's id, slug, status, error, cost, length and links, and any broken pages found before recording under issues. An agent can read it, fix what failed and run the command again.

For AI agents

The MCP server

With Laravel MCP installed (composer require laravel/mcp) and the studio enabled, coding agents such as Claude Code and Cursor get the package's MCP server, video-demos. Add it to your agent:

claude mcp add -s local -t stdio video-demos php artisan mcp:start video-demos

or, for other agents, a server whose command is php with the arguments artisan mcp:start video-demos.

Tool What it does
check-setup The video-demo:doctor checks, with how to fix what fails
list-videos Every video: slug, title, status, whether published, length and cost
get-video One video: status, why it failed, its latest progress, cost, studio and library links
make-video Queue a video from a description (with length, style, screens, user type, start page, spending limit). It spends AI credit within the video's limit, so the agent is told to say what it may cost and only make one when asked
verify-videos Which published videos a change broke, at which step, with no AI or recording (changed for a git ref)
publish-video Publish a ready video, or take it out of the library
pest-test A video's plan as a Pest browser test, with a suggested path
  • The package ships Laravel Boost guidelines and a laravel-video-demos agent skill: run php artisan boost:install and tick the package. The skill is loaded only when the agent works on videos.
  • llms.txt is a short summary of the package for AI models.

Clone this wiki locally