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

hexagonizer

v1.3.0

Published

Scaffold Node.js projects with hexagonal architecture — interactive CLI + headless mode for AI agents (opencode, claude code, etc.).

Readme

Hexagonizer

CLI tool for scaffolding Node.js projects with a clean hexagonal architecture — domain, application, infrastructure, HTTP interfaces, and automated tests.

Designed for both humans (interactive menu) and AI agents (headless CLI commands) to rapidly bootstrap production-ready projects with DDD principles.


Installation

npm install -g hexagonizer

Usage — Human mode

Run without arguments for an interactive menu:

hexagonizer

Select options with arrow keys: Init project, Generate entity, Server commands, Stats.


Usage — AI / Headless mode

All commands work non-interactively with flags. Perfect for AI agents (opencode, claudecode) and automation.

Initialize a project

hexagonizer init <name> [--middlewares] [--docker]

Creates a directory with the project inside.

| Flag | Description | |------|-------------| | --middlewares | Include auth, roles, error handler | | --docker | Add Dockerfile + docker-compose | | -y, --yes | Auto-confirm all |

Example:

hexagonizer init my-api --middlewares --docker

Generate an entity

Run inside the generated project directory.

hexagonizer entity <name> [-y] [--json [path]]

Creates: Domain class, Factory, Validation, Repository, Use cases (CRUD), Controller, Routes, Tests.

| Flag | Description | |------|-------------| | -y, --yes | Quick mode (auto-approve default fields) | | --json [path] | Define fields from a JSON schema file |

Examples:

cd my-api
hexagonizer entity user -y
hexagonizer entity product --json ./product-schema.json

Help

hexagonizer --help

Typical AI workflow

# 1. Install
npm install -g hexagonizer

# 2. Scaffold project with middlewares and docker
hexagonizer init my-store-api --middlewares --docker

# 3. Generate entities
cd my-store-api
hexagonizer entity user -y
hexagonizer entity product -y
hexagonizer entity order -y

# 4. Start developing
npm run dev

The generated project comes with Express preconfigured, routes wired, tests ready, and everything connected.


Generated project structure

my-project/
├── src/
│   ├── domain/
│   │   └── <entity>/
│   │       ├── <Entity>.js
│   │       ├── <entity>-factory.js
│   │       ├── <entity>-validation.js
│   │       └── <entity>-constants.js
│   ├── application/
│   │   └── <entity>/
│   │       └── use-cases/
│   │           ├── create-<entity>.js
│   │           ├── get-<entity>.js
│   │           ├── update-<entity>.js
│   │           ├── delete-<entity>.js
│   │           └── list-<entity>.js
│   ├── infrastructure/
│   │   └── <entity>/
│   │       ├── in-memory-<entity>-repository.js
│   │       └── database-<entity>-repository.js
│   ├── interfaces/http/
│   │   ├── <entity>/
│   │   │   ├── <entity>.controller.js
│   │   │   └── <entity>.routes.js
│   │   └── middlewares/
│   │       ├── auth.js
│   │       ├── error-handler.js
│   │       └── role.js
│   ├── config/
│   └── index.js
├── tests/
│   └── application/<entity>/
└── package.json

AI integration

Hexagonizer ships with an opencode skill that teaches AI agents how to use it. When working with opencode inside a project, the AI can load the skill:

skill({ name: "hexagonizer" })

This gives the AI full context on commands, flags, and the generated project structure. The skill is auto-detected when opencode scans .opencode/skills/.


Built with

| Dependency | Purpose | |---|---| | Inquirer | Interactive CLI prompts and menus | | Chalk | Terminal text styling and colors | | Express | HTTP server (generated projects) |


Feature status

| Feature | Status | |---|---| | Interactive CLI (human mode) | Complete | | Headless CLI (AI / automation mode) | Complete | | Base project initialization | Complete | | Generic entity generation | Complete | | Dynamic validations | Complete | | Query middlewares (q, etc.) | Complete | | Automated tests per entity | Complete | | JSON schema entity generation | Partial | | AI skill for opencode | Complete | | Global npm installation | Complete |


Requirements

  • bash (Linux, macOS, WSL on Windows, or Git Bash)
  • Node.js 18+ (for generated projects)
  • npm (for dependency installation)

Contributing

Contributions, ideas, and bug reports are welcome. Open an issue or submit a pull request.


License

MIT — 2025 Franco Toledo