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

@hexa-framework/cli

v2.1.0

Published

CLI tool for Hexa Framework - Code generation and project scaffolding with Laravel Artisan-like commands

Readme

🔷 Hexa Framework CLI

Like Laravel Artisan for TypeScript - Powerful CLI tool for Hexa Framework with code generation, database migrations, and project scaffolding

npm version License: MIT

✨ Features

  • 🎨 Make Commands - Like Laravel Artisan (make:controller, make:service, etc.)
  • 🗄️ Database Migrations - Prisma-powered migration management
  • 🚀 Dev Server - Hot reload development server
  • 📋 List Commands - View routes, controllers, and middleware
  • 🏗️ Full CRUD Generation - Complete resource scaffolding
  • 🎯 Smart Naming - Automatic PascalCase, camelCase, kebab-case conversion

📦 Installation

# Global installation
npm install -g hexa-framework-cli

# Or in your project
npm install --save-dev hexa-framework-cli

🚀 Quick Start

# View all available commands
hexa info

# Create a resource controller
hexa make:controller User --resource

# Start development server
hexa serve

# Run database migrations
hexa migrate

# List all routes
hexa route:list

📚 Usage

Make Commands (New in v1.1.0!)

Create individual components like Laravel Artisan:

# Controllers
hexa make:controller User              # Basic controller
hexa make:controller Product -r        # Resource controller (CRUD)

# Services
hexa make:service User

# Repositories
hexa make:repository User

# Entities
hexa make:entity User

# Middleware
hexa make:middleware Auth

# DTOs
hexa make:dto CreateUser

Database Commands

Manage your database migrations:

hexa migrate                  # Run pending migrations
hexa migrate --seed           # Migrate and seed
hexa migrate:fresh            # Drop all tables and re-migrate
hexa migrate:reset            # Reset database
hexa migrate:status           # Check migration status
hexa db:seed                  # Seed database

Development Commands

hexa serve                    # Start dev server (port 3000)
hexa serve --port 4000        # Custom port
hexa build                    # Build for production

List Commands

hexa route:list              # Display all routes in table
hexa controller:list         # List all controllers
hexa middleware:list         # List all middleware

Generate Resource (All-in-One)

Generate complete resource files (entity, repository, service, controller, router, validation, mapper):

# Interactive mode
hexa generate

# With resource name
hexa generate post

# Shorthand
hexa g product

Permission Commands

# Scan routers and generate permissions.json
hexa permission scan

# Verify permission coverage
hexa permission verify

What Gets Generated?

When you run hexa generate <resource>, the CLI creates:

  1. Entity (src/core/entities/<resource>/<resource>.ts)

    • Type definitions
    • Request/Response types
  2. Repository Interface (src/core/repositories/<resource>.ts)

    • Repository contract
  3. Repository Adapter (src/adapters/postgres/repositories/<Resource>Repository.ts)

    • Prisma implementation
  4. Service (src/core/services/<Resource>Service.ts)

    • Business logic layer
  5. Controller (src/transports/api/controllers/<Resource>Controller.ts)

    • REST API controller
  6. Router (src/transports/api/routers/v1/<resource>.ts)

    • Express routes with middleware
  7. Validation (src/transports/api/validations/<resource>.ts)

    • Zod schemas
  8. Mapper (src/mappers/<resource>/mapper.ts)

    • Entity/Response transformation

Example

$ hexa generate post

🔷 Hexa Framework - Resource Generator

✔ Resource name: post
✔ Field name: title
✔ Field type: string
✔ Is this field required? yes
✔ Field name: content
✔ Field type: string
✔ Is this field required? yes
✔ Field name:  (empty to finish)

✔ Generate 5 files for 'post'? yes

✔ Files generated successfully!

✅ Generated files:
  - src/core/entities/post/post.ts
  - src/core/repositories/post.ts
  - src/adapters/postgres/repositories/PostRepository.ts
  - src/core/services/PostService.ts
  - src/transports/api/controllers/PostController.ts
  - src/transports/api/routers/v1/post.ts
  - src/transports/api/validations/post.ts
  - src/mappers/post/

📝 Next steps:
  1. Add router to src/transports/api/routers/v1/index.ts
  2. Update Prisma schema if needed
  3. Run: npm run build
  4. Test your endpoints!

License

MIT © lutfian.rhdn