返回顶部
m

materials-cli

Render JSON schemas to images and generate schemas from prompts using declare-render and AI.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.8
安全检测
已通过
764
下载量
0
收藏
概述
安装方式
版本历史

materials-cli

# Materials CLI Use this skill when the user wants to render JSON schemas to images (PNG/JPG), validate render-data schemas, or generate schemas from natural-language prompts and then render them. ## Commands - **render** — Render a JSON schema file to an image. - **generate** — Use AI (OpenAI) to generate a schema from a prompt, then render it. - **validate** — Validate a JSON schema against the declare-render data schema. ## When to use - User asks to "render a schema to image", "turn JSON into a picture", or "draw from schema". - User wants to "generate an image from a description" or "create a schema from a prompt" and render it. - User wants to "validate" a JSON file against the render data schema. ## Usage Run via Node (from the project or after `npm install -g materials-cli`): ```bash materials render <schema-path> [options] materials generate "<prompt>" [options] materials validate <schema-path> [options] ``` ### Render - `materials render schema.json -o output.png` - Options: `-s, --schema <path>`, `-o, --output <path>` (default `./output.png`), `-f, --format <png|jpg>`, `-w, --width`, `-h, --height`, `--output-schema <path>`, `-i, --interactive` ### Generate (AI) - `materials generate "A red circle with text Hello" -o out.png` - Options: `-o, --output`, `-f, --format`, `-w, --width`, `-h, --height`, `--output-schema`, `--model`, `--api-key`, `--base-url`, `-i, --interactive` - Uses `OPENAI_API_KEY` (and optionally `OPENAI_MODEL`, `OPENAI_BASE_URL`) if not passed via flags. ### Validate - `materials validate schema.json` - Options: `-s, --schema <path>`, `-i, --interactive` ## CLI help ``` Usage: materials <command> [options] Commands: render <schema> Render a JSON schema file to an image generate <prompt> Use AI to generate a schema, then render validate <schema> Validate a schema against the render data schema Examples: materials render schema.json -o output.png materials generate "A red circle with text Hello" materials validate schema.json ``` ## Schema format The JSON schema follows the declare-render format: root has `id`, `width`, `height`, and `layers`. Layer types include text, image, and shape. Use `materials validate <file>` to check a schema before rendering.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 materials-cli-1776420078 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 materials-cli-1776420078 技能

通过命令行安装

skillhub install materials-cli-1776420078

下载 Zip 包

⬇ 下载 materials-cli v1.0.8

文件大小: 43.47 KB | 发布时间: 2026-4-17 18:32

v1.0.8 最新 2026-4-17 18:32
Update CLI documentation and validation

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部