DeepSHPlugins
dsh-pixel-studio#dsh-cli-anything-aseprite 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-pixel-studio#dsh-cli-anything-aseprite

娛樂PythonMIT

Aseprite 風格畫素畫工作室:AI 像人類一樣分步繪製精靈,支援選區、圖層、動畫幀、漸變、對稱、參考層與 rgb16 4096 色,每一步實時渲染為 ANSI 終端幀。

1 StarsKongChengZhi 更新時間 2026-08-15
訪問 GitHub 倉庫
dsh-pixel-studio#dsh-cli-anything-aseprite 專案預覽

專案介紹

中文

Aseprite 風格畫素畫工作室:AI 像人類一樣分步繪製精靈,支援選區、圖層、動畫幀、漸變、對稱、參考層與 rgb16 4096 色,每一步實時渲染為 ANSI 終端幀。

English

Aseprite-style pixel art studio: the AI draws sprites stroke by stroke with selections, layers, animation frames, gradients, symmetry and reference layers, each step rendered live as ANSI terminal frames.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
KongChengZhi
倉庫
KongChengZhi/dsh-pixel-studio#dsh-cli-anything-aseprite
GitHub Stars
1
Forks
0
開發語言
Python
許可證
MIT
最近推送
2026-08-15
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

47/ 100
維護活躍
81
文件與實用資訊
50
生態關注度
9
安裝便捷訊號
100
專案宣告訊號
100

關注度尚低(1);標準命令一鍵安裝。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add github:KongChengZhi/dsh-pixel-studio#path:/dsh-cli-anything-aseprite

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-cli-anything-aseprite

Aseprite pixel-art studio for DeepSeek Harness (DSH).

An agent-usable CLI harness for the Aseprite pixel-art editor, built with the CLI-Anything methodology, plus a DSH plugin that turns it into 18 model tools. The AI draws pixel art like a human — one deliberate stroke at a time — and every stroke is rendered live as an ANSI terminal frame, so humans can watch the AI work in real time.

DSH 像素画工作室:AI 像人类一样分步绘制像素画(打形→底色→阴影→高光),
每一步操作实时渲染到终端,人类全程可见。

✨ Features

  • Human drawing vocabulary: pixel / line (Bresenham) / rect / ellipse /

flood fill / eraser — plus symmetry (h/v/both), tiled mode (seamless textures), gradient (rgb16 interpolation).

  • Selection (Aseprite semantics): fill / stroke / clear / copy (persistent

clipboard) / paste / move / get.

  • Layers: add / remove / duplicate / merge / opacity / visibility /

reference layers (rotoscoping, excluded from render).

  • Animation: frames, durations, frame tags, onion-skin ghost

rendering in the terminal.

  • Canvas: free size 1..1024², presets (icon…max), **resize with 9-grid

anchor, nearest-neighbor rescale**.

  • Colors: classic palettes (pico8/db16/sweetie16/na16) + **rgb16:r,g,b

4096-color mode** (16×16×16 indexed RGB).

  • Export: PNG (nearest upscale) / animated GIF / sprite sheet PNG+JSON /

PNG sequence / native .aseprite binary (hand-written ASE writer, opens in the real Aseprite).

  • Undo/redo across CLI processes (sidecar persistence), crash-safe

concurrent saves.

  • 73/73 tests (unit + E2E, including byte-level .aseprite format checks).
  • Optional live monitor UI (draggable overlay: ANSI canvas, preview zoom,

layers with opacity sliders, export buttons, project switcher, workdir picker) — loaded as a DSH dynamic plugin, see monitor/.

📦 Install

1. Install the Python harness

pip install -e ./python        # provides the `cli-anything-aseprite` CLI

Requires Python ≥ 3.10, click, Pillow. No Aseprite binary needed — the harness implements the document model, drawing primitives, and the native .aseprite file format itself. If a real aseprite binary exists, set ASEPRITE_BIN to enable advanced batch conversion.

2. Install the DSH plugin

From a checkout:

dsh plugin add ./dsh-cli-anything-aseprite

From npm (once published):

dsh plugin add dsh-cli-anything-aseprite

From GitHub:

dsh plugin add github:YOUR_USER/dsh-cli-anything-aseprite

Then verify the layer applied:

dsh --dump-config | grep cli-anything-aseprite

The plugin registers 18 pixelart_* tools in every session of that profile. Workdir defaults to ~/.dsh/aseprite-work (override with the plugin config: workdir: row or ASEPRITE_WORKDIR env).

🚀 Quick start (AI draws a sprite)

  1. Open a DSH session (profile with this bundle installed).
  2. Ask: *"画一个 32×32 的像素勇者,pico8 调色板"* — or drive the tools manually:
   pixelart_new {name: "hero", preset: "sprite", palette: "pico8"}
   pixelart_draw {op: "line", x: 9, y: 7, x1: 9, y1: 13, color: "#1d2b53"}
   pixelart_draw {op: "rect", x: 10, y: 7, w: 12, h: 7, color: "#1d2b53"}
   pixelart_draw {op: "rect", x: 10, y: 7, w: 12, h: 4, color: "#ff004d", fill: true}
   pixelart_terminal {}     # → live ANSI frame (human-watchable)
   pixelart_export {format: "png", scale: 8}
   pixelart_export {format: "aseprite"}   # → hero.aseprite, opens in Aseprite
  1. Watch the terminal frame after every stroke — the AI's canvas is always

visible.

🗂️ Project layout

dsh-cli-anything-aseprite/
├── src/index.js            # DSH Host plugin: 18 pixelart_* tools (defineTool)
├── cordis.patch.yml        # DSH bundle patch layer
├── package.json            # dsh.bundle manifest
├── python/                 # cli-anything-aseprite Python harness
│   └── cli_anything/aseprite/
│       ├── core/           # model, canvas (drawing+symmetry+tiled+gradient),
│       │                   # palette, layers, animation, export (.aseprite
│       │                   # binary writer), session (undo)
│       ├── utils/          # terminal (ANSI frames + onion skin), io, backend
│       ├── tests/          # TEST.md plan + 73 tests
│       └── skills/SKILL.md # AI pixel-art methodology (human drawing passes)
└── monitor/                # optional live GUI monitor (dynamic DSH plugin)

🧪 Test

python3 -m pytest python/cli_anything/aseprite/tests/ -q   # 73 passing

🏗️ How it works (architecture)

model tools (pixelart_*)                 DSH Host plugin (src/index.js)
      │  JSON args
      ▼
cli-anything-aseprite --file X.pxa --json <cmd>     Python harness (python/)
      │
      ├── core/canvas.py   drawing primitives → sparse cel model
      ├── core/export.py   PNG/GIF/sheet/PNG-seq + .aseprite binary writer
      └── utils/terminal.py ANSI truecolor half-block frames (human view)

State persists per project as <name>.pxa (JSON document) + sidecars (.history.json undo stack, .clipboard.json selection clipboard, .modes.json symmetry/tiled) — so undo, clipboard and modes survive separate CLI processes, exactly like a real editor session.

Every mutating tool refreshes the in-memory state and returns version, which drives the live monitor UI (polling pix-state).

📚 References

manifests, dsh plugin add, npm/git install)

License

MIT — see LICENSE.

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案