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

create-wp-ai-block

v1.0.1

Published

Zero-auth scaffolding CLI tool for creating WordPress AI blocks.

Readme

create-wp-ai-block

A zero-config CLI tool for scaffolding AI-powered WordPress blocks. It sets up a fully functional Gutenberg block plugin that connects directly to AI APIs like OpenAI or Google Gemini out of the box.

Requirements

  • Node.js
  • npm
  • WordPress environment (local or live)

🎉 Now Available on NPM!

create-wp-ai-block is officially published to the NPM registry! You don't need to clone this repository or install anything globally.

Anyone can scaffold a new AI block anywhere on their computer instantly using npx:

npx create-wp-ai-block my-ai-plugin

If you prefer to install it globally:

npm install -g create-wp-ai-block
create-wp-ai-block my-ai-plugin

Setup Process

  1. When you run the command, it will ask you for a project slug and display title (if you didn't provide one).
  2. It will prompt you to select an AI provider:
    • OpenAI (GPT-4o-mini)
    • Google Gemini (Flash models with multi-model auto-failover)
  3. The CLI will generate a complete WordPress block plugin inside a new folder matching your project name, replace all placeholders, and install the necessary dependencies via npm install.

✨ Features

  • In-Block Canvas & Sidebar Controls: Interactive UI directly inside the editor canvas with quick prompt suggestion chips, progress indicators, clear button, and inspector sidebar controls.
  • Clean HTML Formatting (No Raw Markdown): AI output is automatically converted to semantic HTML (<p>, <h3>, <strong>, <ul>, <li>), ensuring no raw ** or ## markdown characters appear in Gutenberg.
  • Name & Entity Preservation: Strict system instructions ensure all specific names, brands, titles, and entities in the prompt are preserved without alteration.
  • Multi-Model Auto-Failover (Gemini): Cascades through gemini-3.6-flash, gemini-3.5-flash, gemini-3.7-flash, and gemini-flash-latest so your block never fails during temporary provider demand spikes.
  • Local Dev Friendly: Built-in SSL verification bypass for local environments (XAMPP, LocalWP, Docker, Windows, macOS, Linux).

Using the Scaffolded Plugin

After the scaffolding finishes, navigate into your new project folder:

cd my-ai-plugin
  1. Build the block assets:

    npm run build

    Note: Use npm start while developing to automatically recompile your code when you save.

  2. Add to WordPress: Copy the my-ai-plugin folder into your WordPress wp-content/plugins/ directory.

  3. Activate the Plugin: Log into your WordPress admin dashboard, go to Plugins, and activate it.

  4. Add your API Key: Open the main plugin PHP file (e.g., my-ai-plugin.php) or your wp-config.php and add your API key for the provider you chose. For example:

    // If using OpenAI:
    define( 'OPENAI_API_KEY', 'your-actual-api-key-here' );
    
    // If using Google Gemini:
    define( 'GEMINI_API_KEY', 'your-actual-api-key-here' );
  5. Test it out: Open any post or page, insert your new block from the block inserter, enter a prompt (or click one of the quick suggestions), hit Generate AI Content, and see the formatted content appear right in the block!

License

GPL-2.0