cli-anything-wps
FreeWPS Office CLI — JSON数据驱动PPT自动生成 + 命令行操控WPS文字/表格/演示文稿
The English summary is being prepared. Showing the original description.
通过 COM 自动化操控 Adobe Photoshop 的 CLI harness。支持项目管理、图层操作、选区控制、文字编辑、图像调整和多格式导出。
The English summary is being prepared. Showing the original description.
See how to installReview the instructions the agent will receive before you install.
通过 Windows COM 自动化接口操控 Adobe Photoshop 的命令行工具。
pywin32 包cd photoshop-harness/agent-harness
pip install -e .
安装后可使用 cli-anything-photoshop 命令。
cli-anything-photoshop [--json] [--project <path>] [--dry-run] <command-group> <command> [options]
| 选项 | 描述 |
|---|---|
--json | 以 JSON 格式输出(供 AI Agent 解析) |
--project <path> | 自动打开或创建 PSD 项目文件 |
--dry-run | 执行命令但不保存到磁盘 |
| 命令 | 选项 | 描述 |
|---|---|---|
new <path> | -w width, -h height, -r resolution, -m mode, -b bg-color | 创建新 PSD |
open <path> | 打开 PSD 文件 | |
save [path] | 保存文档 | |
close | --no-save | 关闭文档 |
| 命令 | 选项 | 描述 |
|---|---|---|
info | 文档信息 | |
resize | -w width, -h height, -r resolution | 调整尺寸 |
canvas | -w width, -h height, -a anchor | 调整画布 |
crop | --left --top --right --bottom | 裁切 |
rotate | -a angle | 旋转画布 |
flip | -d direction | 翻转画布 |
mode | -m mode | 更改色彩模式 |
trim | -t type | 裁切边缘 |
| 命令 | 选项 | 描述 |
|---|---|---|
add | -n name, -t type, -o opacity, -b blend | 添加图层 |
delete | -n name | 删除图层 |
duplicate | -n name, --new-name name | 复制图层 |
rename | --old name, --new name | 重命名 |
show / hide | -n name | 显示/隐藏 |
opacity | -n name, -o opacity | 设置透明度 |
blend | -n name, -m mode | 设置混合模式 |
list | 列出所有图层 | |
reorder | -n name, -p position | 调整顺序 |
merge | -n name, --with-layer name | 合并图层 |
| 命令 | 选项 | 描述 |
|---|---|---|
all | 全选 | |
none | 取消选区 | |
invert | 反转选区 | |
feather | -r radius | 羽化 |
expand | -p pixels | 扩展 |
contract | -p pixels | 收缩 |
border | -w width | 边框选区 |
rect | --left --top --right --bottom | 矩形选区 |
fill | -c color, -o opacity | 填充选区 |
| 命令 | 选项 | 描述 |
|---|---|---|
add | -t text, -f font, -s size, -c color | 添加文字 |
edit | -n name, -t text, -f font, -s size, -c color | 编辑文字 |
info | -n name | 文字信息 |
| 命令 | 选项 | 描述 |
|---|---|---|
save <path> | -f format, -q quality, -w width, -h height | 导出文件 |
| 命令 | 描述 |
|---|---|
repl | 启动交互式 REPL 模式 |
# 创建新项目并获取 JSON 输出
cli-anything-photoshop --json project new -w 800 -h 600 poster.psd
# 添加文字图层
cli-anything-photoshop --json --project poster.psd text add -t "Hello World" -f Arial -s 48 -c "#FF0000"
# 列出所有图层(JSON 格式)
cli-anything-photoshop --json --project poster.psd layer list
# 导出为 PNG
cli-anything-photoshop --json --project poster.psd export save -f png output.png
# 预览(不保存)
cli-anything-photoshop --dry-run --project poster.psd layer add -n "draft" --type text
# 打开 PSD,交互编辑
cli-anything-photoshop --project work.psd layer list
# 启动 REPL
cli-anything-photoshop repl
--json 标志 获取结构化输出--dry-run 预览,确认后再正式保存stderr 中的 JSON 错误对象--project 自动管理文件打开/保存CLI 命令 → Click CLI → Core 模块 → ComBridge (单例) → Photoshop.Application COM → Photoshop 引擎
Photoshop 通过 Windows COM 接口暴露全部编辑能力。本 harness 封装了最常用的操作。如需扩展,参考 Adobe Photoshop COM 文档添加新方法到 utils/com_bridge.py。
No reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
WPS Office CLI — JSON数据驱动PPT自动生成 + 命令行操控WPS文字/表格/演示文稿
The English summary is being prepared. Showing the original description.
CLI harness for Zotero.
The English summary is being prepared. Showing the original description.