Rasp

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,以及日后的轻量原生画布。

A CLI that means what it says说到做到的 CLI

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 方向在加载时即被应用, 裁剪坐标永远与肉眼所见一致 —— 相机照片也不例外。

Today and next现在与下一步

v0.1 — todayv0.1 — 已就绪

  • info · resize · crop · rotate · convert
  • --json on every command
  • Non-zero exit + structured errors
  • HEIC, PNG, JPEG in & out
  • info · resize · crop · rotate · convert
  • 每个命令都支持 --json
  • 非零退出码 + 结构化错误
  • HEIC、PNG、JPEG 双向读写

On the bench工作台上

  • Annotate: arrows, boxes, text, redaction blur
  • Trim-to-content & adjustments
  • Background removal (on-device Vision)
  • MCP server — every op as a typed tool
  • 标注:箭头、方框、文字、打码模糊
  • 裁边到内容 & 明暗调整
  • 背景移除(端上 Vision)
  • MCP server —— 每个操作即一个类型化工具

Built for agents, honest for humans为 agent 而生,对人类诚实

Coding 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 上运行,不上传任何东西。

Support支持

Email邮箱larry.l@merlionos.dev
Maker开发商MerlionOS Pte. Ltd.