Communitygithub.com

cli-anything-kdenlive

一个用于视频编辑的有状态命令行界面,遵循与Blender CLI harness相同的模式。使用JSON项目格式,并生成MLT XML供Kdenlive/melt使用。

cli-anything-kdenlive 是什么?

该技能提供了一个强大的命令行界面(CLI),用于自动化视频编辑工作流,并专门针对Kdenlive和melt引擎。它遵循与Blender CLI harness相同的设计模式,允许开发者通过脚本或以交互方式管理整个视频编辑管道。主要功能包括创建和管理项目、导入媒体文件、编辑时间线(添加/修剪/分割/移动片段)、应用滤镜和转场效果、添加指南标记,以及将项目导出为Kdenlive详解的MLT XML格式。该CLI还具备完整的状态管理能力,支持最多50步的撤销/重做历史,确保编辑操作的可逆性。它支持人类可读的表格输出以及机器可读的JSON输出(通过--json标志),非常适合AI代理程序化使用。支持的平台包括所有安装了Python 3.10+和Kdenlive的系统,通过pip安装cli-anything-kdenlive包即可使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/HKUDS/CLI-Anything/tree/main/skills/cli-anything-kdenlive

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

cli-anything-kdenlive 是做什么的?

一个用于视频编辑的有状态命令行界面,遵循与Blender CLI harness相同的模式。使用JSON项目格式,并生成MLT XML供Kdenlive/melt使用。

安装

该CLI作为cli-anything-kdenlive包的一部分安装:

pip install cli-anything-kdenlive

先决条件:

  • Python 3.10+
  • 系统上必须安装kdenlive

使用方法

基本命令

# 显示帮助
cli-anything-kdenlive --help

# 启动交互式REPL模式
cli-anything-kdenlive

# 创建新项目
cli-anything-kdenlive project new -o project.json

# 以JSON输出运行(供代理使用)
cli-anything-kdenlive --json project info -p project.json

REPL模式

当不带子命令调用时,CLI会进入交互式REPL会话:

cli-anything-kdenlive
# 使用Tab补全和历史记录交互式输入命令

命令组

项目

项目管理命令。

命令描述
new创建新项目
open打开现有项目
save保存当前项目
info显示项目信息
profiles列出可用的视频配置文件
json打印原始项目JSON

素材库

媒体素材库管理命令。

命令描述
import将剪辑导入素材库
remove从素材库中移除剪辑
list列出素材库中的所有剪辑
get获取详细的剪辑信息

时间线

时间线管理命令。

命令描述
add-track向时间线添加轨道
remove-track移除轨道
add-clip向轨道添加剪辑
remove-clip从轨道中移除剪辑
trim修剪剪辑的入/出点
split在指定时间偏移处分割剪辑
move将剪辑移动到新位置
list列出所有轨道

滤镜组

滤镜/效果管理命令。

命令描述
add向剪辑添加滤镜
remove从剪辑中移除滤镜
set设置滤镜参数
list列出剪辑上的滤镜
available列出所有可用的滤镜

转场

转场管理命令。

命令描述
add在轨道之间添加转场
remove移除转场
set设置转场参数
list列出所有转场

指南

指南/标记管理命令。

命令描述
add在指定位置(秒)添加指南
remove移除指南
list列出所有指南

导出

导出和渲染命令。

命令描述
xml生成Kdenlive/MLT XML
presets列出可用的渲染预设

会话

会话管理命令。

命令描述
status显示会话状态
undo撤销上一次操作
redo重做上一次被撤销的操作
history显示撤销历史

示例

创建新项目

创建一个新的kdenlive项目文件。

cli-anything-kdenlive project new -o myproject.json
# 或者以JSON输出供程序化使用
cli-anything-kdenlive --json project new -o myproject.json

交互式REPL会话

启动一个支持撤销/重做的交互式会话。

cli-anything-kdenlive
# 交互式输入命令
# 使用'help'查看可用命令
# 使用'undo'和'redo'进行历史导航

导出项目

将项目导出为最终输出格式。

cli-anything-kdenlive --project myproject.json export render output.pdf --overwrite

状态管理

CLI维护会话状态,具有:

  • 撤销/重做:最多50级历史记录
  • 项目持久化:以JSON格式保存/加载项目状态
  • 会话跟踪:跟踪修改和变更

输出格式

所有命令支持双输出模式:

  • 人类可读(默认):表格、颜色、格式化文本
  • 机器可读(--json标志):针对代理使用的结构化JSON
# 人类输出
cli-anything-kdenlive project info -p project.json

# 供代理使用的JSON输出
cli-anything-kdenlive --json project info -p project.json

供AI代理使用

当以程序化方式使用此CLI时:

  1. 始终使用--json标志以获取可解析输出
  2. 检查返回码 - 0表示成功,非0表示错误
  3. 解析stderr以获取失败时的错误消息
  4. 对所有文件操作使用绝对路径
  5. 验证输出存在在导出操作之后

更多信息

  • 完整文档:参见包内的README.md
  • 测试覆盖:参见包内的TEST.md
  • 方法论:参见cli-anything-plugin中的HARNESS.md

版本

1.0.0

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cli-anything-adguardhome

>-

cli-anything-anygen

>-

cli-anything-audacity

>-

cli-anything-blender

>-

cli-anything-browser

Browser automation CLI using DOMShell MCP server. Maps Chrome

cli-anything-calibre

>-

cli-anything-ccswitch

CLI interface for CC Switch — manage AI coding tool configurations from the terminal

cli-anything-chromadb

>-

cli-anything-cloudanalyzer

Command-line interface for CloudAnalyzer — Agent-friendly harness for CloudAnalyzer, a QA platform for mapping, localization, and perception outputs. Supports 27 commands across 8 groups: point cloud evaluation, trajectory evaluation, ground segmentation QA, config-driven quality gates, baseline evolution, processing, visualization, and interactive REPL.

cli-anything-cloudcompare

Command-line interface for CloudCompare — Agent-friendly harness for CloudCompare, the open-source 3D point cloud and mesh processing software. Supports 41 commands across 9 groups: project management, session control, point cloud operations (subsample, filter, segment, analyze), mesh operations, distance computation (C2C, C2M), transformations (ICP, matrix), export (LAS/LAZ/PLY/PCD/OBJ/STL/E57), and interactive REPL.

cli-anything-comfyui

>-

cli-anything-dify-workflow

Wrapper for the Dify workflow DSL CLI. Create, inspect, validate, edit, and export Dify workflow files through a CLI-Anything harness.

cli-anything-drawio

>-

cli-anything-eez-studio

Use EEZ Studio from the command line: inspect and modify native .eez-project files, edit LVGL screens/widgets, manage SCPI commands, and invoke the real EEZ Studio backend for LVGL builds.

cli-anything-eth2-quickstart

>-

cli-anything-exa

>-

cli-anything-firefly-iii

Firefly III CLI - Personal finance management via CLI-Anything

cli-anything-freecad

Complete CLI harness for FreeCAD parametric 3D CAD modeler (258 commands). Covers ALL workbenches: Part (29 primitives + boolean + mirror + loft + sweep), Sketcher (26 cmds: geometry + constraints + editing), PartDesign (38 cmds: pad/pocket/groove/fillet/chamfer/patterns/hole/datum), Assembly (11 cmds), Mesh (16 cmds), TechDraw (15 cmds: views + dimensions + PDF/SVG), Draft (33 cmds: 2D shapes + arrays + transforms), FEM (12 cmds), CAM/CNC (10 cmds), Surface (6 cmds), Spreadsheet (7 cmds), Import (13 formats), Export (17 formats), Measure (12 cmds), Materials (21 presets). Headless FreeCAD export to STEP/IGES/STL/OBJ/DXF/PDF/glTF/3MF.

cli-anything-gimp

>-

cli-anything-godot

>-

相关技能