Shapes images the way a rasp shapes wood.如锉刀塑木,雕琢图像。
In development · CLI first, MCP server next开发中 · CLI 先行,MCP server 在路上 Native macOS · Requires macOS 14 Sonoma or later原生 macOS · 需 macOS 14 Sonoma 或更高版本Rasp is a fast, scriptable image toolkit for the Mac — the common
operations, done natively on Core Graphics and ImageIO, with an interface
built for both humans and AI agents. One engine (RaspKit)
backs a command-line tool today, an MCP server next, and a light native
canvas later.
Rasp(锉刀)是 Mac 上快速、可脚本化的图像工具箱 ——
常用操作全部基于 Core Graphics 和 ImageIO 原生实现,接口同时为人类和
AI agent 设计。一个引擎(RaspKit)撑起今天的命令行工具、
下一步的 MCP server,以及日后的轻量原生画布。
rasp info photo.jpg --json
rasp resize in.png out.png --width 800 # aspect-preserving
rasp resize in.png thumb.jpg --width 200 --height 200 --fit cover
rasp crop in.png out.png --rect 100,100,400,300
rasp rotate in.png out.png --degrees 90 --flip-h
rasp convert in.heic out.png
Strict by design: bad arguments fail loudly instead of guessing,
off-canvas crops are errors unless you ask for --clamp, and EXIF
orientation is applied on load so crop rects mean what a viewer sees —
even for camera photos.
以严格为设计原则:非法参数直接报错而不是瞎猜;
裁剪框越界是错误,除非显式传 --clamp;EXIF 方向在加载时即被应用,
裁剪坐标永远与肉眼所见一致 —— 相机照片也不例外。
--json on every command--jsonCoding agents like Claude Code shouldn't shell out to a pile of flags that silently clamp and guess. Rasp's contract is machine-first: JSON output, meaningful exit codes, and errors that say what went wrong — which happens to be exactly what humans want from a CLI too. Everything runs on your Mac; nothing is uploaded anywhere.
Claude Code 这类编程 agent 不该去调用一堆会悄悄截断、擅自猜测的命令行参数。 Rasp 的契约是机器优先:JSON 输出、有意义的退出码、说清缘由的报错 —— 而这恰恰也是人类想要的 CLI。一切在你的 Mac 上运行,不上传任何东西。