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

mage-cli

v2.0.4

Published

AI-powered CLI for web development with pluggable pattern repositories.

Readme

⚡ mage

Automation and code generation driven by patterns and artificial intelligence.

Mage is an advanced CLI for developers who want to scale project patterns. It allows you to maintain a centralized repository of patterns (components, hooks, services, etc.) and uses AI to intelligently apply them or generate new autonomous solutions directly in your terminal.


🚀 Discovery Guide (AI/Agent Protocol)

To test the CLI in sequence, follow these 5 fundamental phases:

Phase 1: Environment Setup

First, connect the CLI to your patterns repository and configure the AI provider.

# 1. Configure the patterns repository (automatically detects clone or scaffold)
mage config set repo your-user/your-patterns-repo

# 2. List available models to ensure the exact name (Discovery)
mage config list-ai-models

# 3. Configure AI Provider and API Key
mage config set ai-provider gemini
mage config set ai-model gemini-1.5-flash
mage config set ai-key YOUR_KEY_HERE

# 4. Verify the active configuration
mage config show

Phase 2: Patterns and Branches Management

Mage allows you to isolate patterns in different branches. Use this to organize projects.

# List existing branches in your remote repository
mage patterns branch list

# Create a new branch for a specific project (copying from main)
mage patterns branch create project-alpha --copy-from main

# Switch to the new branch in your local environment
mage patterns branch switch project-alpha

Phase 3: Synchronization and Patterns

Ensure your local cache is up to date with the patterns defined in the active branch.

# List available patterns organized by scope (frontend/backend)
mage patterns list

# Force synchronization of manifest.json if you recently edited it on GitHub
mage patterns sync

# Pull or push changes from your local patterns repository
mage patterns pull
mage patterns push

Phase 4: Autonomous Intelligence (The Agent Mode)

This is the most powerful feature. The do command decides between using a pattern, generating code, or running system commands.

# Intelligent Generation Test: AI chooses between a pattern or manual creation
mage do "create a UserProfile component with avatar and bio"

# Terminal Autonomy Test: AI proposes shell commands for you
mage do "initialize a vite project with typescript"

Phase 5: Structured Workflow

Use for fast automation based on known patterns.

# Direct generation using a specific pattern name
mage generate component Navbar

# Generation with AI assistance to fill variables
mage generate --description "A contact form with Yup validation"

🛠 Command Manual

Configuration (mage config)

  • set <key> <value>: Set global configurations (repo, repo-branch, repo-token, ai-provider, ai-model, ai-key).
  • list-ai-models: List supported models for the current provider.
  • show: Display the consolidated active configuration (Global + Local).
  • init: Initialize a local .magerc.json file in the project directory.

Patterns & Git (mage patterns)

  • list: List patterns filtering by scope or framework.
  • add <path>: Add a local file or folder as a new pattern (with automatic templatization).
  • update <name> [path]: Update the content of an existing pattern.
  • remove <name>: Remove a pattern from the repository and manifest.
  • branch list/create/switch/delete: Full patterns branch management.
  • sync/push/pull: Keep your patterns repository synchronized with GitHub.

AI & Automation

  • do [prompt]: The Intelligent Agent analyzes, decides, and executes.
  • generate [pattern] [name]: Standard generator with optional AI assistance.

🔒 Security

The do command, when suggesting terminal commands (run_commands), will always prompt for your explicit confirmation before executing any action in the shell.


Tech Stack: Commander, Inquirer, Handlebars, OpenAI & Google Gemini SDKs, TSUP.