Skip to main content

Drive Adobe Premiere Pro from the command line: a Python CLI plus a bundled CEP bridge panel exposing Premiere's scripting APIs over local HTTP

Project description

premiere-cli

Drive Adobe Premiere Pro from the command line.

premiere-cli pairs a zero-dependency Python CLI (premiere-cli, premiere-log) with a bundled CEP panel ("Premiere Bridge") that runs a local HTTP server (port 47823) inside Premiere Pro and exposes its ExtendScript / QE scripting APIs as ~230 JSON-in/JSON-out commands — reading project/sequence/clip state, editing the timeline, applying effects, managing markers and bins, exporting media and frames, and more.

The Claude Code skill for driving this CLI lives in the separate premiere-ai-skills plugin, alongside the AI-assisted workflow skills — install that plugin to give Claude the skill.

Install

# 1. The CLI (isolated, no dependencies)
pipx install premiere-cli
#    or: uv tool install premiere-cli

# 2. The CEP panel (copies it into Adobe's extensions dir + enables PlayerDebugMode)
premiere-cli install-panel

# 3. Restart Premiere Pro, open  Window > Extensions > Premiere Bridge

# 4. Verify the whole chain
premiere-cli doctor

premiere-cli init-project <name> --base-dir <path> scaffolds a fresh, empty .prproj from a bundled template — no Premiere Pro session needed, so it works before step 3.

Supported: macOS and Windows (CEP does not exist on Linux). The panel targets Premiere Pro 2020+ (CEP 10-12); the API behavior notes in docs/BUILD_FINDINGS.md were live-calibrated on Premiere Pro 26.3.0 (macOS) — Premiere's undocumented QE APIs vary by build, so re-verify build-sensitive commands on other versions.

Use from the command line

premiere-cli get-premiere-state
premiere-cli get-active-sequence
premiere-cli add-marker --seconds 12.5 --name "Chapter 1"
premiere-cli export-frame --output /tmp/frame.png --timecode 00:12:05
premiere-log "rendering pass 2/3 started"   # shows up in the panel's log view

Every command prints a JSON object: {"ok": true, "result": ...} or {"ok": false, "error": "..."} (exit code 1). Full command reference: docs/COMMANDS.md.

Use from Claude Code

/plugin marketplace add stefanwebb/premiere-ai-skills
/plugin install premiere-ai-skills@premiere-ai-skills

This gives Claude the premiere-cli skill — a complete, behavior-annotated catalog of the panel's commands (including which ones are verified working, build-sensitive, or destructive). You still need steps 1-4 above so the premiere-cli binary and panel exist on the machine.

How it works

premiere-cli ──HTTP──> CEP panel (Node server, port 47823)
                            │ csInterface.evalScript
                            ▼
                       ppb_dispatch() ──$.evalFile──> host/commands/<name>.jsx
                            │
                            ▼
                Premiere DOM (app.project...) + QE DOM (qe.project...)
  • Each command is one ExtendScript file under src/premiere_cli/panel/host/commands/, lazily loaded on first use.
  • Mutating commands verify their own effect with read-backs (clip counts, property values, undo-stack index) — never by trusting an API's return value, since several Premiere APIs "succeed" without doing anything.
  • docs/ carries the hard-won API findings: which Premiere scripting APIs are broken, which lie, and the calibrated signatures that actually work (BUILD_FINDINGS.md, PREMIERE_API_NOTES.md, QE_DOM_NOTES.md).

Scope

This package deliberately contains only the machinery to drive Premiere Pro's APIs. AI-assisted workflows built on top of it (transcription with word-level timestamps, silence removal, etc.) live separately and depend on this package.

Development

git clone https://github.com/stefanwebb/premiere-cli
cd premiere-cli
pip install -e ".[dev]"
premiere-cli install-panel --symlink   # panel edits apply on next panel reload
pytest

Adding a panel command means three edits: the new host/commands/<name>.jsx, its registration in host/index.jsx (PPB_COMMANDS), and the allowlist in js/main.js (ALLOWED_COMMANDS) — plus a CLI subparser in src/premiere_cli/cli.py and a row in docs/COMMANDS.md. Bump the version in pyproject.toml, premiere_cli/__init__.py, and PANEL_VERSION in js/main.js together (premiere-cli doctor flags mismatches).

License

CC-BY-SA-4.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

premiere_cli-0.3.0.tar.gz (284.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

premiere_cli-0.3.0-py3-none-any.whl (472.3 kB view details)

Uploaded Python 3

File details

Details for the file premiere_cli-0.3.0.tar.gz.

File metadata

  • Download URL: premiere_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 284.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for premiere_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 7dd7b131bb05423ceec5a7a1424bfaef4cf6b4a530a48fd0d244efd49a7a5d1f
MD5 27f3ca0f9a4d8b684f5dd30e7e3ad78d
BLAKE2b-256 09b7f99db884c0e733ea31daff0da7673db3ce33f8e9bedd38aaafaca1981c77

See more details on using hashes here.

Provenance

The following attestation bundles were made for premiere_cli-0.3.0.tar.gz:

Publisher: publish.yml on stefanwebb/premiere-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file premiere_cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: premiere_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 472.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for premiere_cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2a00025d5ad284f95a03d0c6cfda5cf7f3e060812008a24942f81c3f0313d71
MD5 0132b3a920a63e1b5cc2b846c3dafadd
BLAKE2b-256 0211f6bf30170d23249621a5b663e70c304d5e6c2715d6ff36fac1baa32bb265

See more details on using hashes here.

Provenance

The following attestation bundles were made for premiere_cli-0.3.0-py3-none-any.whl:

Publisher: publish.yml on stefanwebb/premiere-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page