cli-anything-kdenlive

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-anything-kdenlive

cli-anything-kdenlive

A stateful command-line interface for video editing, following the same patterns as the Blender CLI harness. Uses a JSON project format with MLT XML generation for Kdenlive/melt.
一个有状态的视频编辑命令行界面,遵循与Blender CLI工具相同的模式。采用JSON项目格式,可为Kdenlive/melt生成MLT XML。

Installation

安装

This CLI is installed as part of the cli-anything-kdenlive package:
bash
pip install cli-anything-kdenlive
Prerequisites:
  • Python 3.10+
  • kdenlive must be installed on your system
此CLI作为cli-anything-kdenlive包的一部分进行安装:
bash
pip install cli-anything-kdenlive
前置要求:
  • Python 3.10+
  • 系统中必须安装kdenlive

Usage

使用方法

Basic Commands

基础命令

bash
undefined
bash
undefined

Show help

显示帮助信息

cli-anything-kdenlive --help
cli-anything-kdenlive --help

Start interactive REPL mode

启动交互式REPL模式

cli-anything-kdenlive
cli-anything-kdenlive

Create a new project

创建新项目

cli-anything-kdenlive project new -o project.json
cli-anything-kdenlive project new -o project.json

Run with JSON output (for agent consumption)

以JSON格式输出(供Agent使用)

cli-anything-kdenlive --json project info -p project.json
undefined
cli-anything-kdenlive --json project info -p project.json
undefined

REPL Mode

REPL模式

When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-kdenlive
当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-kdenlive

Enter commands interactively with tab-completion and history

交互式输入命令,支持自动补全和历史记录

undefined
undefined

Command Groups

命令组

Project

项目

Project management commands.
CommandDescription
new
Create a new project
open
Open an existing project
save
Save the current project
info
Show project information
profiles
List available video profiles
json
Print raw project JSON
项目管理命令。
命令描述
new
创建新项目
open
打开现有项目
save
保存当前项目
info
显示项目信息
profiles
列出可用的视频配置文件
json
打印原始项目JSON

Bin Group

媒体库组

Media bin management commands.
CommandDescription
import
Import a clip into the media bin
remove
Remove a clip from the bin
list
List all clips in the bin
get
Get detailed clip info
媒体库管理命令。
命令描述
import
将剪辑导入媒体库
remove
从媒体库中移除剪辑
list
列出媒体库中的所有剪辑
get
获取剪辑详细信息

Timeline

时间线

Timeline management commands.
CommandDescription
add-track
Add a track to the timeline
remove-track
Remove a track
add-clip
Add a clip to a track
remove-clip
Remove a clip from a track
trim
Trim a clip's in/out points
split
Split a clip at a time offset
move
Move a clip to a new position
list
List all tracks
时间线管理命令。
命令描述
add-track
向时间线添加轨道
remove-track
移除轨道
add-clip
向轨道添加剪辑
remove-clip
从轨道移除剪辑
trim
修剪剪辑的入点/出点
split
在指定时间偏移处分割剪辑
move
将剪辑移动到新位置
list
列出所有轨道

Filter Group

滤镜组

Filter/effect management commands.
CommandDescription
add
Add a filter to a clip
remove
Remove a filter from a clip
set
Set a filter parameter
list
List filters on a clip
available
List all available filters
滤镜/效果管理命令。
命令描述
add
为剪辑添加滤镜
remove
从剪辑移除滤镜
set
设置滤镜参数
list
列出剪辑上的滤镜
available
列出所有可用滤镜

Transition

转场

Transition management commands.
CommandDescription
add
Add a transition between tracks
remove
Remove a transition
set
Set a transition parameter
list
List all transitions
转场管理命令。
命令描述
add
在轨道之间添加转场
remove
移除转场
set
设置转场参数
list
列出所有转场

Guide

辅助线

Guide/marker management commands.
CommandDescription
add
Add a guide at a position (seconds)
remove
Remove a guide
list
List all guides
辅助线/标记管理命令。
命令描述
add
在指定位置(秒)添加辅助线
remove
移除辅助线
list
列出所有辅助线

Export

导出

Export and render commands.
CommandDescription
xml
Generate Kdenlive/MLT XML
presets
List available render presets
导出与渲染命令。
命令描述
xml
生成Kdenlive/MLT XML
presets
列出可用的渲染预设

Session

会话

Session management commands.
CommandDescription
status
Show session status
undo
Undo the last operation
redo
Redo the last undone operation
history
Show undo history
会话管理命令。
命令描述
status
显示会话状态
undo
撤销上一次操作
redo
重做上一次撤销的操作
history
显示撤销历史

Examples

示例

Create a New Project

创建新项目

Create a new kdenlive project file.
bash
cli-anything-kdenlive project new -o myproject.json
创建一个新的kdenlive项目文件。
bash
cli-anything-kdenlive project new -o myproject.json

Or with JSON output for programmatic use

或使用JSON格式输出以用于程序化调用

cli-anything-kdenlive --json project new -o myproject.json
undefined
cli-anything-kdenlive --json project new -o myproject.json
undefined

Interactive REPL Session

交互式REPL会话

Start an interactive session with undo/redo support.
bash
cli-anything-kdenlive
启动支持撤销/重做的交互式会话。
bash
cli-anything-kdenlive

Enter commands interactively

交互式输入命令

Use 'help' to see available commands

使用'help'查看可用命令

Use 'undo' and 'redo' for history navigation

使用'undo'和'redo'导航历史记录

undefined
undefined

Export Project

导出项目

Export the project to a final output format.
bash
cli-anything-kdenlive --project myproject.json export render output.pdf --overwrite
将项目导出为最终输出格式。
bash
cli-anything-kdenlive --project myproject.json export render output.pdf --overwrite

State Management

状态管理

The CLI maintains session state with:
  • Undo/Redo: Up to 50 levels of history
  • Project persistence: Save/load project state as JSON
  • Session tracking: Track modifications and changes
CLI通过以下方式维护会话状态:
  • 撤销/重做:最多支持50级历史记录
  • 项目持久化:以JSON格式保存/加载项目状态
  • 会话跟踪:跟踪修改和变更

Output Formats

输出格式

All commands support dual output modes:
  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (
    --json
    flag): Structured JSON for agent consumption
bash
undefined
所有命令支持两种输出模式:
  • 人类可读格式(默认):表格、颜色、格式化文本
  • 机器可读格式
    --json
    标志):结构化JSON,供Agent使用
bash
undefined

Human output

人类可读输出

cli-anything-kdenlive project info -p project.json
cli-anything-kdenlive project info -p project.json

JSON output for agents

供Agent使用的JSON输出

cli-anything-kdenlive --json project info -p project.json
undefined
cli-anything-kdenlive --json project info -p project.json
undefined

For AI Agents

面向AI Agent

When using this CLI programmatically:
  1. Always use
    --json
    flag
    for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Verify outputs exist after export operations
当以程序化方式使用此CLI时:
  1. 始终使用
    --json
    标志
    以获得可解析的输出
  2. 检查返回码 - 0表示成功,非零表示错误
  3. 解析stderr以获取失败时的错误消息
  4. 使用绝对路径进行所有文件操作
  5. 导出操作后验证输出是否存在

More Information

更多信息

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin
  • 完整文档:查看包中的README.md
  • 测试覆盖率:查看包中的TEST.md
  • 方法论:查看cli-anything-plugin中的HARNESS.md

Version

版本

1.0.0
1.0.0