cli-anything-kdenlive
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecli-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-kdenlivePrerequisites:
- 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
undefinedbash
undefinedShow 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
undefinedcli-anything-kdenlive --json project info -p project.json
undefinedREPL Mode
REPL模式
When invoked without a subcommand, the CLI enters an interactive REPL session:
bash
cli-anything-kdenlive当不指定子命令调用时,CLI会进入交互式REPL会话:
bash
cli-anything-kdenliveEnter commands interactively with tab-completion and history
交互式输入命令,支持自动补全和历史记录
undefinedundefinedCommand Groups
命令组
Project
项目
Project management commands.
| Command | Description |
|---|---|
| Create a new project |
| Open an existing project |
| Save the current project |
| Show project information |
| List available video profiles |
| Print raw project JSON |
项目管理命令。
| 命令 | 描述 |
|---|---|
| 创建新项目 |
| 打开现有项目 |
| 保存当前项目 |
| 显示项目信息 |
| 列出可用的视频配置文件 |
| 打印原始项目JSON |
Bin Group
媒体库组
Media bin management commands.
| Command | Description |
|---|---|
| Import a clip into the media bin |
| Remove a clip from the bin |
| List all clips in the bin |
| Get detailed clip info |
媒体库管理命令。
| 命令 | 描述 |
|---|---|
| 将剪辑导入媒体库 |
| 从媒体库中移除剪辑 |
| 列出媒体库中的所有剪辑 |
| 获取剪辑详细信息 |
Timeline
时间线
Timeline management commands.
| Command | Description |
|---|---|
| Add a track to the timeline |
| Remove a track |
| Add a clip to a track |
| Remove a clip from a track |
| Trim a clip's in/out points |
| Split a clip at a time offset |
| Move a clip to a new position |
| List all tracks |
时间线管理命令。
| 命令 | 描述 |
|---|---|
| 向时间线添加轨道 |
| 移除轨道 |
| 向轨道添加剪辑 |
| 从轨道移除剪辑 |
| 修剪剪辑的入点/出点 |
| 在指定时间偏移处分割剪辑 |
| 将剪辑移动到新位置 |
| 列出所有轨道 |
Filter Group
滤镜组
Filter/effect management commands.
| Command | Description |
|---|---|
| Add a filter to a clip |
| Remove a filter from a clip |
| Set a filter parameter |
| List filters on a clip |
| List all available filters |
滤镜/效果管理命令。
| 命令 | 描述 |
|---|---|
| 为剪辑添加滤镜 |
| 从剪辑移除滤镜 |
| 设置滤镜参数 |
| 列出剪辑上的滤镜 |
| 列出所有可用滤镜 |
Transition
转场
Transition management commands.
| Command | Description |
|---|---|
| Add a transition between tracks |
| Remove a transition |
| Set a transition parameter |
| List all transitions |
转场管理命令。
| 命令 | 描述 |
|---|---|
| 在轨道之间添加转场 |
| 移除转场 |
| 设置转场参数 |
| 列出所有转场 |
Guide
辅助线
Guide/marker management commands.
| Command | Description |
|---|---|
| Add a guide at a position (seconds) |
| Remove a guide |
| List all guides |
辅助线/标记管理命令。
| 命令 | 描述 |
|---|---|
| 在指定位置(秒)添加辅助线 |
| 移除辅助线 |
| 列出所有辅助线 |
Export
导出
Export and render commands.
| Command | Description |
|---|---|
| Generate Kdenlive/MLT XML |
| List available render presets |
导出与渲染命令。
| 命令 | 描述 |
|---|---|
| 生成Kdenlive/MLT XML |
| 列出可用的渲染预设 |
Session
会话
Session management commands.
| Command | Description |
|---|---|
| Show session status |
| Undo the last operation |
| Redo the last undone operation |
| Show undo 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.jsonOr with JSON output for programmatic use
或使用JSON格式输出以用于程序化调用
cli-anything-kdenlive --json project new -o myproject.json
undefinedcli-anything-kdenlive --json project new -o myproject.json
undefinedInteractive REPL Session
交互式REPL会话
Start an interactive session with undo/redo support.
bash
cli-anything-kdenlive启动支持撤销/重做的交互式会话。
bash
cli-anything-kdenliveEnter commands interactively
交互式输入命令
Use 'help' to see available commands
使用'help'查看可用命令
Use 'undo' and 'redo' for history navigation
使用'undo'和'redo'导航历史记录
undefinedundefinedExport 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 --overwriteState 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 (flag): Structured JSON for agent consumption
--json
bash
undefined所有命令支持两种输出模式:
- 人类可读格式(默认):表格、颜色、格式化文本
- 机器可读格式(标志):结构化JSON,供Agent使用
--json
bash
undefinedHuman 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
undefinedcli-anything-kdenlive --json project info -p project.json
undefinedFor AI Agents
面向AI Agent
When using this CLI programmatically:
- Always use flag for parseable output
--json - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use absolute paths for all file operations
- Verify outputs exist after export operations
当以程序化方式使用此CLI时:
- 始终使用标志以获得可解析的输出
--json - 检查返回码 - 0表示成功,非零表示错误
- 解析stderr以获取失败时的错误消息
- 使用绝对路径进行所有文件操作
- 导出操作后验证输出是否存在
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