npm package: @moyuteam/moyukit
Description: MoyuKit CLI and local web UI launcher
Latest version: 0.3.1

# @moyuteam/moyukit

`moyukit` is a local-first Markdown card renderer with three entry points:

- CLI rendering and batch export
- Local web editor launcher
- Local MCP bridge for Claude Code and other agent clients
- Workflow task-pack generation for design, creator, and brand workflows
- Workspace bundle generation for downstream design and creator automation

The published package is a single installable package. CLI, local web editor, and MCP runtime are bundled into `@moyuteam/moyukit`, so you do not need to install any separate MoyuKit sub-packages.

## Install

```bash
npm install -g @moyuteam/moyukit
```

The command name stays:

```bash
moyukit
```

## Quick Start

Check the installation and local dependencies:

```bash
moyukit --version
moyukit doctor
```

Open the full web editor:

```bash
moyukit -ui
```

Start the local render API:

```bash
moyukit serve --host 127.0.0.1 --port 3001
```

List the built-in playbooks:

```bash
moyukit playbooks
```

Inspect the machine-readable catalog and CLI surface:

```bash
moyukit catalog --json
moyukit inspect --json
```

For Claude Code or other automation tools, prefer JSON output whenever possible:

```bash
moyukit doctor --json
moyukit themes --json
moyukit inspect --json
moyukit catalog --json
moyukit playbooks --json
moyukit config --list --json
moyukit list --directory ./notes --json
moyukit mcp inspect --json
moyukit mcp init --output .mcp.json --json
moyukit batch --directory ./notes --output ./dist --json
```

Structured schemas now include:

- `moyukit.render.result.v1`
- `moyukit.batch.result.v1`
- `moyukit.inspect.result.v1`
- `moyukit.catalog.result.v1`
- `moyukit.themes.result.v1`
- `moyukit.playbooks.result.v1`
- `moyukit.list.result.v1`
- `moyukit.config.result.v1`
- `moyukit.doctor.result.v1`
- `moyukit.blueprint.result.v1`
- `moyukit.recommend.result.v1`
- `moyukit.pack.result.v1`
- `moyukit.workspace.result.v1`
- `moyukit.mcp.inspect.result.v1`
- `moyukit.mcp.init.result.v1`
- `moyukit.error.v1`

## Render Cards

Render from a Markdown file:

```bash
moyukit render --input ./article.md --output ./card.png
```

Render a continuous long image:

```bash
moyukit render --input ./article.md --output ./long.png --layout continuous
```

Render from stdin:

```bash
cat ./article.md | moyukit render --stdin --output ./card.png
```

Reuse a full exported web theme config:

```bash
moyukit render \
  --input ./article.md \
  --output ./result.png \
  --config-file ./theme-config.json
```

## Batch Render

```bash
moyukit batch \
  --directory ./notes \
  --output ./dist \
  --theme tomato-headline \
  --layout paginated
```

## MCP for Claude Code

Inspect the local MCP setup:

```bash
moyukit mcp inspect
```

Generate a project-level `.mcp.json`:

```bash
moyukit mcp init --client claude-code
```

Run the stdio MCP server:

```bash
moyukit mcp run
```

Add the server to Claude Code:

```bash
claude mcp add --transport stdio moyukit --scope project -- moyukit mcp run
```

## Workflow Task Packs

Generate a Markdown task pack that Claude Code or other tooling can directly consume:

```bash
moyukit pack \
  --input ./article.md \
  --playbook xiaohongshu-creator \
  --theme-name "橱窗爆款" \
  --ratio 3:4 \
  --layout paginated \
  --audience "小红书创作者" \
  --mood "抓眼、利于停留、适合收藏" \
  --visual-keywords "强标题、对比、封面、结论先行" \
  --images "封面图,细节图,结尾图" \
  --output ./agent-pack.md
```

Generate a JSON payload instead:

```bash
moyukit pack --input ./article.md --playbook design-director --json
```

Generate a structured module blueprint:

```bash
moyukit blueprint --input ./article.md --json
```

Generate a ready-to-paste Claude Code handoff prompt:

```bash
moyukit handoff \
  --input ./article.md \
  --playbook xiaohongshu-creator \
  --mode mcp
```

Generate a complete workspace directory:

```bash
moyukit workspace \
  --input ./article.md \
  --playbook xiaohongshu-creator \
  --theme-name "橱窗爆款" \
  --ratio 3:4 \
  --layout paginated \
  --audience "小红书创作者" \
  --mood "抓眼、利于停留、适合收藏" \
  --output ./.moyukit-workspace
```

This generates a folder with:

- `source.md`
- `document-blueprint.json`
- `task-pack.md`
- `task-pack.json`
- `handoff-cli.md`
- `handoff-mcp.md`
- `catalog.json`
- `.mcp.json`

Recommend playbooks, themes, ratio, and layout before handing off to Claude Code or other tooling:

```bash
moyukit recommend \
  --input ./article.md \
  --goal "小红书封面" \
  --mood "抓眼、适合收藏" \
  --visual-keywords "强标题、对比、结论先行"
```

Older `moyukit agent ...` commands still work as compatibility aliases, but new integrations should prefer the top-level commands above.

## Common Commands

List themes, fonts, and backgrounds:

```bash
moyukit themes
```

List Markdown files in a directory:

```bash
moyukit list --directory ./notes --recursive
```

Set default local config:

```bash
moyukit config --theme notion-minimal --ratio 3:4 --layout paginated
```

## Notes

On the first render, MoyuKit may prepare Chromium and native rendering dependencies. That first run can take longer.