vectomancy-cli
星标9
分支0
更新时间2026年6月16日 07:08
Vectomancy CLI: convert images/videos to parametric equations (Spline, Fourier, Chaikin).
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Vectomancy CLI: convert images/videos to parametric equations (Spline, Fourier, Chaikin).
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | vectomancy-cli |
| description | Vectomancy CLI: convert images/videos to parametric equations (Spline, Fourier, Chaikin). |
| tags | ["rust","cli","image-processing","math","bezier","fourier","chaikin","video"] |
| triggers | ["convert image to equations","image to parametric curves","vectomancy CLI usage","spline/fourier/chaikin processing","video to parametric equations","vectomancy video export"] |
High-performance Rust CLI that parses graphic files and converts them into parametric equations.
# From crates.io
cargo install vectomancy-cli
# From AUR (Arch Linux)
yay -S vectomancy
# From Homebrew (macOS)
brew tap Xuepoo/tap
brew install vectomancy
# From Scoop (Windows)
scoop bucket add Xuepoo https://github.com/Xuepoo/scoop-bucket
scoop install vectomancy
image — Process imagesvectomancy image [OPTIONS] [INPUTS]...
Key flags:
-o, --output <PATH> — Output file or directory-f, --format <FMT> — python, html, json, desmos, png, jpg, webp-m, --mode <MODE> — fourier, spline, chaikin--detail <1-100> — Higher = more equations/slower--terms <N> — Fourier term count--chaikin-iters <N> — Chaikin smoothing iterations--min-path-len <N> — Filter noise (5=clean, 15+=noisy)--color <true|false> — Enable color sampling--gpu <true|false> — GPU accelerationtext — Render text as image then processvectomancy text [OPTIONS] <TEXT>
Requires -f, --font <PATH> for a .ttf/.otf file.
Key flags: --color <#HEX>, --gradient <#A,#B,angle>, --letter-spacing <px>
video — Process video filesvectomancy video [OPTIONS] <INPUT>
Key flags: -o, --output <PATH>, -v for verbose.
IMPORTANT: The video subcommand does NOT accept algorithm flags. All settings are read from ~/.config/vectomancy/config.toml [image] section.
Output modes:
mp4, mkv, webm, avi, mov, or gif, stitches frames into video using ffmpegVideo features:
.webm + bg_transparent = true in config| Format | Description |
|---|---|
json | Raw AST with polynomial coefficients per segment |
python | Matplotlib script with compressed equation data |
html | Canvas API rendering with per-stroke colors |
desmos | Desmos Graphing Calculator with LaTeX equations |
png | Native rasterized output |
jpg | Rasterized with solid background |
webp | WebP rasterized output |
# Spline → JSON (fastest)
vectomancy image photo.jpg -o out.json -f json -m spline --detail 30
# Fourier → Python matplotlib script
vectomancy image logo.png -o out.py -f python -m fourier --terms 20
# Chaikin → HTML canvas
vectomancy image art.svg -o out.html -f html -m chaikin --chaikin-iters 3
# Spline → Desmos calculator
vectomancy image diagram.png -o out.html -f desmos -m spline --detail 15
# With GPU acceleration
vectomancy image large.jpg -o out.json -f json -m spline --gpu true --threads 8
# Process directory of images
vectomancy image ./photos/ -o ./output/ -f json -m spline
# Video → Video (with audio)
vectomancy video input.mp4 -o output.mp4
# Video → WebM (transparent background)
vectomancy video input.mp4 -o output.webm # set bg_transparent=true in config
# Text → Image
vectomancy text "Hello" --font /path/to/font.ttf -o out.png --color "#FF0000"
Config file: ~/.config/vectomancy/config.toml
[image]
mode = "spline" # spline, fourier, chaikin
color = true # Enable color sampling
gpu = true # GPU acceleration
threads = 4 # CPU threads
detail = 50 # Detail level (1-100)
min_path_len = 5 # Minimum path length
bg_transparent = false # Transparent background (for webm)
[video]
enabled = true
[text]
font = "default"
text subcommand does NOT accept -m flaggrep, tail, etc. — causes SIGPIPE and truncates videopython format output can be 2MB+ for complex imagesdesmos format outputs HTML (not plain LaTeX)cargo build --release then copy binary, NOT cargo install