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

arere-plugin-create

v0.1.3

Published

Create new Arere actions and plugins from interactive prompts

Readme

arere-plugin-create

Create new actions and plugins interactively from stubs

Japanese | English

Overview

This plugin provides interactive generators for creating Arere actions and plugins from pre-defined stubs. No more manual file creation!

Features

create-action

  • Interactive Prompts: Step-by-step guidance for action creation
  • Multiple Stubs:
    • Basic: Minimal action structure
    • Advanced: With prompts, shell execution, error handling
    • With i18n: Internationalization support
  • Scope Selection: Choose workspace-specific or global actions
  • Duplicate Check: Warns if action file already exists

create-plugin

  • Plugin Generator: Create complete plugin projects from stubs
  • Three Stub Types:
    • Minimal: Basic plugin structure without i18n or config
    • Standard: Standard plugin with i18n and config support
    • Full: Complete plugin with multiple action examples and tests
  • Git Integration: Automatically extracts author info from git config
  • Validation: Plugin name and email validation
  • Directory Creation: Automatic output directory setup

General

  • i18n Support: English and Japanese translations
  • Type Safety: Full TypeScript support with type checking

Installation

# Install from local workspace (for development)
cd packages/arere-plugin-create
npm run build
npm link

# Link to arere
cd ../arere
npm link arere-plugin-create

Usage

Creating an Action

  1. Run arere in your terminal
  2. Select "create-action" from the action list
  3. Follow the interactive prompts:
    • Action name (kebab-case)
    • Description
    • Category
    • Tags (multiple selection)
    • Stub type
    • Scope (workspace or global)
  4. Restart arere to load the new action

Creating a Plugin

  1. Run arere in your terminal
  2. Select "create-plugin" from the action list
  3. Follow the interactive prompts:
    • Plugin name (must start with arere-plugin-)
    • Description
    • Author name (auto-filled from git config)
    • Author email (auto-filled from git config)
    • Stub type (minimal/standard/full)
    • Output directory
  4. Navigate to the created directory:
    cd your-plugin-name
    npm install
    npm run build

Action Templates

Basic

Minimal action structure for quick start:

import { defineAction } from 'arere'

export default defineAction({
  name: 'my-action',
  description: 'My action description',
  category: 'utility',
  tags: ['demo'],
  async run({ tui }) {
    // Your action logic here
  },
})

Advanced

Includes examples of:

  • Prompt API (text, confirm, select)
  • Shell execution ($)
  • Error handling (try-catch)
  • Output formatting (section, step, success, error)
  • Control API (spinner)

With i18n

Demonstrates internationalization for user actions (not plugins):

  • Inline translations (en/ja) using translations property
  • Translation key usage with t() (no prefix needed for action's own translations)
  • Parameter interpolation

Note for Plugin Development: If you're creating a plugin action (not a user action), use the plugin: prefix to access plugin translations:

// In plugin actions
t('plugin:greeting')  // ✓ Accesses plugin's locales/
t('greeting')         // ✗ Accesses action's own namespace (empty)

See Plugin Development Guide for plugin i18n details.

Plugin Templates

Minimal

Basic plugin structure without i18n or configuration:

  • src/index.ts - Plugin definition
  • actions/hello.ts - Simple hello world action
  • Basic package.json and TypeScript configuration

Use case: Quick prototyping, simple plugins without localization needs

Standard

Standard plugin with i18n and configuration support:

  • All Minimal template files
  • locales/en/ and locales/ja/ - Translation files
  • configSchema - Zod-based configuration validation
  • Example action demonstrating plugin: prefix usage

Use case: Most production plugins that need i18n and user configuration

Full

Complete plugin with multiple action examples and tests:

  • All Standard template files
  • Three action examples: basic, prompts, config
  • tests/ directory ready for testing
  • CHANGELOG.md for versioning
  • Comprehensive README with documentation

Use case: Complex plugins with multiple features, teams wanting best practices

Directory Structure

packages/arere-plugin-generator/
├── src/
│   ├── index.ts                      # Plugin entry point
│   ├── template-renderer.ts          # Action template rendering
│   ├── plugin-template-renderer.ts   # Plugin template rendering
│   ├── file-writer.ts                # File writing utilities
│   └── git-utils.ts                  # Git config extraction
├── actions/
│   ├── create-action.ts              # Action generator
│   └── create-plugin.ts              # Plugin generator
├── stubs/
│   ├── action/                       # Action stubs
│   │   ├── basic.ts.template
│   │   ├── advanced.ts.template
│   │   └── with-i18n.ts.template
│   └── plugin/                       # Plugin stubs
│       ├── minimal/
│       ├── standard/
│       └── full/
├── locales/
│   ├── en/translation.json
│   └── ja/translation.json
└── README.md

Development

# Build
npm run build

# Watch mode
npm run dev

# Type check
npm run typecheck

# Run tests (if implemented)
npm test

License

MIT