npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mijuu/drawthings

v1.2.4

Published

An AI-native CLI interface for Draw Things. It manages the official gRPC server and provides a professional local image generation bridge for AI agents on macOS.

Readme

Draw Things for AI Agents

中文版

A high-performance Node.js interface for AI Agents (including OpenClaw, Claude, Gemini CLI, and OpenCode) that enables local AI image generation by managing and connecting to the official Draw Things gRPC backend on macOS.

This skill makes the professional-grade local generation of Draw Things "AI-native" and easily controllable for any agent that supports CLI tool usage.

🤖 AI Agent Integration

This package provides two primary ways to connect your AI agents to Draw Things:

1. Model Context Protocol (MCP) —— The Golden Path

The recommended way for Claude Desktop, Cursor, and Zed. This turns Draw Things into a native "tool" for these AI clients. If your agent supports MCP, this is the only interface you should use for generation.

Installation:

npm install -g @mijuu/drawthings

Claude Desktop Configuration: Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "drawthings": {
      "command": "dt-mcp"
    }
  }
}

2. OpenClaw / Gemini CLI Skill

For OpenClaw users, install the package in your skills directory:

cd ~/.openclaw/skills
# Recommended: If you want to use the repository for development:
git clone https://github.com/mijuu/drawthings-agent.git drawthings
cd drawthings && npm install

🚀 Key Features

  • Centralized CLI: Powerful dt-skill command for generation, configuration, and server management.
  • Auto-Discovery: Automatically detects standard Draw Things model paths on macOS.
  • Memory Optimized: Efficient large image transfers (up to 4K/8K) with minimal memory footprint.
  • Pure Node.js: No Python or external image processing scripts required.
  • High Performance: Uses gRPC protocol for low-latency communication and efficient binary serialization (FlatBuffers).
  • Secure: Full support for SSL/TLS with integrated Draw Things Root CA.
  • Fast Generation: Optimized for "Turbo" models (e.g., SDXL Turbo, Flux) with real-time progress updates.

🛠️ Prerequisites

  • macOS: Draw Things is a macOS-native application.
  • Draw Things App: Installed with models downloaded.
  • gRPCServerCLI (Optional for headless mode): Download from Official Releases.
  • Node.js: Version 16 or higher.
  • CRITICAL SETTING: In Draw Things settings, DISABLE "Response Compression" (also known as FPY). This script does not support FPY compressed tensors.

📦 Installation

Install globally via npm:

npm install -g @mijuu/drawthings

If you have cloned the repository for local development:

# Inside the project directory
npm install

After installation, the dt-skill command will be available.

⚙️ Configuration

The skill uses a centralized configuration system stored in ~/.drawthings-skill/config.json.

  1. Automatic Detection: The skill automatically finds your Draw Things models if they are in the standard macOS location.
  2. Manual Setup: Run the doctor command to check your setup:
    dt-skill doctor
  3. Configure Paths: If needed, set your gRPC server path:
    dt-skill config --server-path "/path/to/gRPCServerCLI-macOS"

🚀 Usage

1. Start the Server

Option A: Use Draw Things App (Easiest)

  1. Open Draw Things on your Mac.
  2. Go to Settings and enable gRPC Server.

Option B: Use CLI (Headless)

dt-skill server start

2. Generate Images

# Basic generation
dt-skill gen --prompt "a serene mountain lake at sunrise" --output landscape.png

# Advanced usage (Turbo model, 2x upscale)
dt-skill gen --prompt "cyberpunk city" --model z_image_turbo_1.0_q6p.ckpt --steps 8 --upscale 2

3. Utility Commands

# Check server health
dt-skill server status

# List available models
dt-skill models

# Run diagnostics
dt-skill doctor

📂 Project Structure

  • scripts/cli.js: Main entry point for dt-skill.
  • scripts/generate.js: Core generation logic.
  • scripts/setup.js: Configuration management.
  • scripts/imageService.proto: gRPC service definitions.
  • references/: Detailed documentation on gRPC protocols and samplers.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📜 License

MIT License. See LICENSE for details.