@writepanda/cli
v1.269.0
Published
Drive PandaStudio (a desktop video editor for YouTube creators) from the command line. Talks to a localhost HTTP API the desktop app exposes.
Maintainers
Readme
@writepanda/cli
The pandastudio command-line interface — drive PandaStudio (a desktop video editor for YouTube creators) from your terminal, shell scripts, or AI agents.
PandaStudio's signature feature — editing video by deleting words from the transcript — is now scriptable. Plus headless export, motion-graphic generation, FX overlays, lower-thirds, captions, AI title/description generation. Everything the human editor does, callable from the CLI.
You also need the desktop app installed. The CLI is a thin HTTP client; the actual rendering happens in PandaStudio's localhost-only automation server. Get the app at writepanda.ai.
Install
npm install -g @writepanda/cli
# or run without installing:
npx @writepanda/cli system.statusThe same pandastudio binary also ships bundled inside every PandaStudio install (Settings → Local automation → Install to PATH). The npm version is convenient for AI agents and CI pipelines that want to script the editor without going through the in-app install button.
Quickstart
# 1. Install + open PandaStudio (writepanda.ai). Settings → Local automation → toggle ON.
# 2. Confirm reachability:
pandastudio system.status
# 3. Discover the surface (62 verb-noun commands):
pandastudio commands
# 4. Render a motion graphic:
JOB=$(pandastudio motion.generate \
--templateId=title-card-vox \
--slots='{"title":"How I Built This","subtitle":"in 24 hours"}' \
--aspectRatio=16:9 \
--json | jq -r '.data.jobId')
pandastudio job.wait --id="$JOB" --json | jq '.data.job.result.outputPath'If PandaStudio isn't running, the CLI auto-launches it and waits up to 60s for the HTTP listener. Pass --no-launch to opt out.
The agentic edit flow
The 13-step "agent gets two videos and produces a polished MP4" workflow is documented in full at writepanda.ai/cli. Headline:
pandastudio project.new --withMedia='[...]' --json
pandastudio transcript.transcribe --id=$ID
pandastudio transcript.remove-fillers --id=$ID
pandastudio motion.generate ...
pandastudio project.add-motion-graphic ...
pandastudio caption.toggle --enabled=true
pandastudio caption.set-template --templateId=bold
pandastudio export.start --id=$IDReview items: the user can pin notes, drawings and picked graphics on the editor preview and send them to the agent. Read and close them with:
pandastudio review.list --json # open project; each item has imagePath (frame crop)
pandastudio review.resolve --id=$ID --annotationIds='["ITEM_ID"]'Same Tier-3 PixiJS render pipeline the in-app Export Video button uses (v1.24+ — convergence release). Reuses an open editor window if it's already on the target project, otherwise spawns a hidden one for the duration of the render. Identical output to a UI-driven export.
For AI agents (Claude Code, Claude Desktop)
If you're an agent: install the bundled Claude Skill instead — it teaches you the full surface in one auto-discovered SKILL.md. From the running PandaStudio app: Settings → Local automation → Install Skill. The Skill copies to ~/.claude/skills/pandastudio/ and Claude auto-loads it.
For Cursor / Continue / Cline / other MCP clients, use the companion package: @writepanda/mcp.
Auth
Every PandaStudio launch generates a fresh 256-bit token, written 0600 to:
| Platform | Path |
|---|---|
| macOS / Linux | ~/.config/pandastudio/{token,port,audit.log} |
| Windows | %APPDATA%\pandastudio\{token,port,audit.log} |
The CLI reads both files on every invocation; no env vars, no caching. Closing and reopening the desktop app rotates the token automatically. PANDASTUDIO_CONFIG_DIR overrides the path (used in tests).
Licensing
The CLI honours the same license gate the desktop app does:
| State | What's allowed |
|---|---|
| Licensed | Every command |
| Active trial | Every command |
| Trial expired, no license | Only system.* and window.focus |
Run pandastudio system.status to see automationGated: true/false in the response.
Output modes
- Default: pretty one-line summaries to stdout
--json: raw{ ok, data, error }envelope — pipe throughjqfor scripting
Documentation
- Full command catalogue + recipes: writepanda.ai/cli
- Source: github.com/kamskans/openscreen
License
MIT.
Confirm language before re-transcription
pandastudio transcript.detect-language --id=PROJECT --clipId=CLIP runs local
language ID on up to 30 seconds and returns { guess: { language, confidence } | null }.
It needs the bundled Whisper model and never downloads it or uploads audio.
Ask/confirm the language when a transcript looks wrong or speech is non-English.
pandastudio transcript.transcribe --id=PROJECT --clipId=CLIP --force=true --language=tamil --provider=deepgram
overrides workspace preferences for this run only. Supported language names include
English, Parakeet's European set and the Whisper languages. Provider is
local|apple|deepgram|elevenlabs. Never use cloud or apple with auto; choose a language first.
Cloud needs a connected key and user consent to upload audio. Surface job warnings
when a network/provider failure caused a local fallback.
Close a timeline gap
pandastudio project.close-gap --id=PROJECT --startMs=2500 --endMs=4000 --lane=media:0 --json
The timeline's right-click "Close gap". Times are edited milliseconds. Omit lane (or use main) to ripple-delete the range from the video; inserted pauses inside it are shortened or removed rather than cutting footage, and anchored regions follow. Use media[:index], audio[:index] or effects[:index] to close an empty span of that sub-lane: every later item in the lane shifts left. Sub-lanes are zero based and packed by start time, matching the editor; speed changes never move. A range that is not empty fails and changes nothing. expectedRevision is supported. MCP: project_close_gap.
