cli-anything-inkscape
它能做什么
这个技能让你的智能体通过 Inkscape 的命令行工具制作和修改矢量图形。适合需要能无损缩放的标志、图标或图画的设计师。
适用场景
- ✓当你想根据文字要求创建一个新的矢量图或标志的时候。
- ✓当你想在 SVG 文件中添加或修改图形的时候。
- ✓当你想通过命令行编辑现有 SVG 文件的时候。
技能链接
https://github.com/HKUDS/CLI-Anything/blob/main/inkscape/agent-harness/cli_anything/inkscape/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我创建一个新的 SVG 文档,其中有一个蓝色圆形和一段写着 Welcome 的文字。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能直接编辑 SVG 文档,并将其状态保存在项目文件中。你的系统中必须安装 Inkscape。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
cli-anything-inkscape
A stateful command-line interface for vector graphics editing, following the same patterns as the GIMP and Blender CLI harnesses. Directly manipulates SVG (XML) documents with a JSON project format for state tracking.
Installation
This CLI is installed as part of the cli-anything-inkscape package:
pip install cli-anything-inkscape
Prerequisites:
- Python 3.10+
- inkscape must be installed on your system
Usage
Basic Commands
# Show help
cli-anything-inkscape --help
# Start interactive REPL mode
cli-anything-inkscape
# Create a new document
cli-anything-inkscape document new -o project.json
# Run with JSON output (for agent consumption)
cli-anything-inkscape --json document info -p project.json
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-inkscape
# Enter commands interactively with tab-completion and history
You can also start the REPL with a nonexistent project path. The CLI now seeds a new in-memory document instead of failing immediately:
cli-anything-inkscape --project /abs/path/new-title.inkscape-cli.json
Command Groups
Document
Document management commands.
| Command | Description |
|---|---|
new |
Create a new document |
open |
Open an existing project |
save |
Save the current project |
info |
Show document information |
profiles |
List available document profiles |
canvas-size |
Set the canvas size |
units |
Set the document units |
json |
Print raw project JSON |
Shape
Shape management commands.
| Command | Description |
|---|---|
add-rect |
Add a rectangle |
add-circle |
Add a circle |
add-ellipse |
Add an ellipse |
add-line |
Add a line |
add-polygon |
Add a polygon |
add-path |
Add a path |
add-star |
Add a star |
remove |
Remove a shape by index |
duplicate |
Duplicate a shape |
list |
List all shapes/objects |
get |
Get detailed info about a shape |
Text
Text management commands.
| Command | Description |
|---|---|
add |
Add a text element; supports --box-width, --box-height, and --line-height for wrapped layouts |
set |
Set a text property (text, font-family, font-size, fill, box-width, box-height, line-height, etc.) |
list |
List all text objects |
Style
Style management commands.
| Command | Description |
|---|---|
set-fill |
Set the fill color of an object |
set-stroke |
Set the stroke color (and optionally width) of an object |
set-opacity |
Set the opacity of an object (0.0-1.0) |
set |
Set an arbitrary style property on an object |
get |
Get the style properties of an object |
list-properties |
List all available style properties |
Transform
Transform operations (translate, rotate, scale, skew).
| Command | Description |
|---|---|
translate |
Translate (move) an object |
rotate |
Rotate an object |
scale |
Scale an object |
skew-x |
Skew an object horizontally |
skew-y |
Skew an object vertically |
get |
Get the current transform of an object |
clear |
Clear all transforms from an object |
Layer
Layer management commands.
| Command | Description |
|---|---|
add |
Add a new layer |
remove |
Remove a layer by index |
move-object |
Move an object to a different layer |
set |
Set a layer property (name, visible, locked, opacity) |
list |
List all layers |
reorder |
Move a layer from one position to another |
get |
Get detailed info about a layer |
Path Group
Path boolean operations.
| Command | Description |
|---|---|
union |
Union of two objects |
intersection |
Intersection of two objects |
difference |
Difference of two objects (A minus B) |
exclusion |
Exclusion (XOR) of two objects |
convert |
Convert a shape to a path |
list-operations |
List available path boolean operations |
Gradient
Gradient management commands.
| Command | Description |
|---|---|
add-linear |
Add a linear gradient |
add-radial |
Add a radial gradient |
apply |
Apply a gradient to an object |
list |
List all gradients |
Export Group
Export/render commands.
| Command | Description |
|---|---|
png |
Render the document to PNG |
| `svg |
常见问题
我需要安装 Inkscape 吗?
需要,你的系统中必须安装 Inkscape。
它使用什么文件格式?
它处理 SVG 格式,这是一种基于 XML 的矢量格式。
我可以不带文件开始吗?
可以,交互式会话可以以新路径开始,并为你创建一个空文档。
详情
作者的原始描述
Command-line interface for Inkscape - A stateful command-line interface for vector graphics editing, following the same patterns as the GI...
repo: HKUDS/CLI-Anything
热度
- GitHub 星标
- 58k
- 排名
- #3210
- 许可证
- Apache-2.0
- 更新时间
- 2026/9/21
评论
- …
同一仓库的更多技能
cli-anything-3mf
58k帮你的智能体检查和修复 3D 打印文件,包括查找圆孔、调整孔径、修复网格,以及比较两个文件。
cli-anything-qgis
58k帮你的智能体在终端中打开、编辑和导出 QGIS 地图项目,包括图层、要素、打印布局和处理工具。
cli-anything-adguardhome
58k帮你的智能体管理 AdGuard Home,这是一款全网络广告拦截器,可管理过滤规则、DNS 重写、客户端和查询日志。
cli-anything-anygen
58k帮你的智能体借助 AnyGen 服务,根据文字提示生成幻灯片、文档、网站和图表。