Command Line Interface
The Program CLI is designed for AI agents and automation. Execute tools, manage projects, and run workflows from your terminal or through your coding assistant.
Installation
npm install -g @program-video/cliAuthentication
program auth loginDisplays a code and URL for device authorization. Visit the URL on any device, enter the code, and authorize access. Credentials are stored in ~/.program/credentials.json.
program auth status
program auth logoutCommands
project
Manage video projects.
program project create --title "My Video"
program project list
program project get <projectId>| Option | Description |
|---|---|
--title | Project title |
--description | Project description |
--json | Output as JSON |
tool
Execute composition tools directly. This is how AI agents interact with projects.
program tool list
program tool exec <toolName> --project <projectId> --params '<json>'program tool exec addScene \
--project proj_abc123 \
--params '{"title":"Intro","duration":5,"code":"export default () => <h1>Hello</h1>"}'program tool exec generateSpeech \
--project proj_abc123 \
--params '{"text":"Welcome to the demo","model":"resemble-ai/chatterbox"}'# List available video models first
program tool exec listVideoModels --project proj_abc123
# Generate a video
program tool exec generateVideo \
--project proj_abc123 \
--params '{"prompt":"A cat playing piano in a jazz club","model":"minimax/video-01"}'# List available image models first
program tool exec listImageModels --project proj_abc123
# Generate an image
program tool exec generateImage \
--project proj_abc123 \
--params '{"prompt":"A beautiful sunset over mountains","model":"stability-ai/sdxl"}'See API Reference for all available tools.
workflow
Run template workflows for reproducible video generation.
program workflow list
program workflow run <templateId> --project <projectId> --input '<json>'
program workflow status <executionId>| Option | Description |
|---|---|
--project | Project ID to associate with execution |
--input | JSON input for the workflow |
--watch | Continuously poll for status updates |
message
View and log messages in the project chat. Note: message send logs to the chat history but does not trigger the AI agent.
program message list --project <projectId>
program message send "Status update" --project <projectId> --role assistantdocs
Display CLI documentation.
program docs
program docs --schemaFor AI agents
The CLI exposes tools that AI agents can call directly. The typical workflow:
1. Create or select a project
2. Execute tools with program tool exec
3. Messages logged via program message send appear in the web UI
# Create a project
PROJECT=$(program project create --title "Demo" --json | jq -r '.id')
# Note: JSON output structure may vary - check with --json first
# Add a scene
program tool exec addScene \
--project $PROJECT \
--params '{"title":"Intro","duration":5,"code":"..."}'
# Generate narration
program tool exec generateSpeech \
--project $PROJECT \
--params '{"text":"Hello world","model":"resemble-ai/chatterbox"}'
# Generate a video clip
program tool exec generateVideo \
--project $PROJECT \
--params '{"prompt":"Cinematic sunrise over mountains","model":"minimax/video-01"}'
# Log progress to chat
program message send "Added intro scene with narration and video" --project $PROJECTAll changes sync to the web editor in real-time.
JSON output
All commands support --json for structured output:
program project list --json | jq '.[0]._id'Errors return non-zero exit codes with JSON error details.