Focus on project script read/write capabilities: create tasks, read scripts, save scripts, upload deliverables, and handle script relationships in derivative/fission chains.
Interaction Guidelines
- For user output results and next steps, do not show command details.
- Before writing, first confirm the target object:
project-idorscript-id。 - When overwriting or batch-related updates are involved, first confirm the scope of impact.
Processing Order
- First confirm login status (depends on
cbi-shared)。 - When creating a script task, confirm
project-idand the task name. - Before saving content, first get the current script content (to avoid accidental overwriting).
- After saving, read back the script to confirm that the format and related information have taken effect.
Capability List
| Scenario | Key Points |
|---|---|
| Create Script Task | script-create, supports normal tasks/subtasks/derived source tasks |
| Get Script Content | script-get, reads basic information, related information, and content |
| Save Script Content | script-save, supports JSON/Markdown, supports related information updates |
| Upload Deliverables | deliverable-upload, uploads videos/images, supports multiple files and MD5 deduplication |
| Deliverable List | deliverable-list, view the deliverables and attachments of a script task |
Key Rules
script-create:- Required:
project-id、name - Optional:
parent-id(fission subtask),source-object(derived source)
- Required:
script-get:- Required:
script-id - Optional:
project-id(permission verification)
- Required:
script-save:- Required:
script-id - Content parameters: choose one or combine updates:
script(JSON)/markdown - Optional updates:
name、product-ids、app-ids、ratios、ref-repo-file-ids - Format constraint: only normal and editing formats are allowed (storyboard/voiceover formats are no longer used)
- Required:
deliverable-upload:- Required:
script-id、--file(file path, can be specified multiple times) - File count limit: 1-50 files
- The first file is the main file, and subsequent files are fission files (multi-size variants)
- Automatic MD5 deduplication: files that already exist are skipped for upload
- Required:
deliverable-list:- Required:
script-id - Optional:
project-id(permission verification)
- Required:
Format Rules
- Format enumeration:
1=普通、4=剪辑。 - When
formatis not passed, it is automatically inferred from the content (see references/script-format.md)。
Internal Command Skeleton
cbi project script-create --project-id <id> --name "<name>"
cbi project script-get --script-id <id>
cbi project script-save --script-id <id> --script '<json>'
cbi project script-save --script-id <id> --markdown "# 标题"
cbi project deliverable-upload --script-id <id> --file <path> [--file <path>...]
cbi project deliverable-list --script-id <id>
Reference
- references/script-format.md
- Repository root directory
README.mdthe "Project Module (project)" section