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

@express-tool/cli

v2.0.1

Published

Production-grade CLI for Express.js applications

Readme

🚀 Express Tool CLI

npm version License: MIT PRs Welcome

A production-grade Command Line Interface for generating robust, scalable Express.js applications. express-tool automates the boring setup, enforcing best practices, modern tooling, and clean architecture from day one.

✨ Features

  • Language Support: First-class TypeScript support (recommended) or modern JavaScript (ES Modules).
  • Architecture: Choose between Feature-based (great for scalability) or Classic MVC.
  • Database Integration:
    • Prisma ORM: PostgreSQL (Self-managed or Managed), MySQL, MongoDB.
    • Mongoose: Native MongoDB support.
  • Authentication: Built-in simple JWT authentication boilerplate.
  • Template Engines: Support for Server-Side Rendering (SSR) with EJS or Pug.
  • API Documentation: Automatic Swagger/OpenAPI options.
  • Package Managers: Support for npm, pnpm, yarn, and bun.
  • Production Ready:
    • 🐳 Docker & Docker Compose setup included.
    • 🧪 Testing with Vitest + Supertest.
    • 🧹 Linting & Formatting (ESLint + Prettier + Husky).
    • 📝 Structured logging with Pino.

📦 Installation

Install globally via your preferred package manager:

npm

npm install -g @express-tool/cli

pnpm (Recommended)

pnpm add -g @express-tool/cli

Yarn

yarn global add @express-tool/cli

Bun

bun add -g @express-tool/cli

⚡ Execution without Installation

You can also execute the CLI instantly without installing it globally:

npx (Node.js)

npx @express-tool/cli init

pnpm dlx

pnpm dlx @express-tool/cli init

bunx

bunx @express-tool/cli init

🛠 Usage

1. Initialize a New Project

The init command launches an interactive wizard to configure your new application.

express-tool init

Interactive Prompts:

  1. Project Name: Name of your project directory (kebab-case).
  2. Language: TypeScript (Recommended) or JavaScript.
  3. Package Manager: Select npm, pnpm, yarn, or bun.
  4. Architecture:
    • Feature-based: Groups files by domain feature (e.g., src/modules/users/).
    • MVC: Classic layering (src/controllers, src/routes, src/models).
  5. API Type:
    • REST API + Swagger: Includes setup for auto-generated API docs.
    • REST API (Basic): Simple setup without documentation tools.
  6. Database:
    • PostgreSQL (Prisma)
    • PostgreSQL (Prisma Postgres Managed)
    • MySQL (Prisma)
    • MongoDB (Mongoose)
    • None
  7. Authentication:
    • JWT (JSON Web Token)
    • None
  8. Template Engine:
    • EJS
    • Pug
    • None (API only)
  9. Linting: (Yes/No) Include ESLint & Prettier.
  10. Runtime Validation: (Yes/No) Include Zod.

2. Generate Resources (generate or g)

Quickly scaffold new resources (features) into your existing application. This command respects your project's language (TS/JS).

Syntax:

express-tool generate <resource-name>
# or shorcut
express-tool g <resource-name>

Example:

express-tool g blogs

Output: This will create the following files (example for a blogs feature):

  • 📄 src/controllers/blogs.controller.ts (CRUD handlers)
  • 🛣️ src/routes/blogs.routes.ts (Router definition)
  • 🧪 test/blogs.test.ts (Integration tests)

After Generation: The CLI will print instructions on how to register the new route in your src/index.ts (or app.ts):

import { blogsRouter } from './routes/blogs.routes.js';
app.use('/blogs', blogsRouter);

3. Utility Commands

Check Environment

View debugging information about your local environment. useful for reporting issues.

express-tool info

Update CLI

Check for updates or self-update the CLI tool.

express-tool upgrade

📂 Project Structure

A typical project created with @express-tool/cli looks like this:

my-express-app/
├── 🐳 .dockerignore
├── ⚙️ .env
├── ⚙️ eslint.config.mjs
├── 🐙 .github/               # CI/CD Workflows
├── 🙈 .gitignore
├── 💅 .prettierrc
├── 🐳 docker-compose.yml
├── 🐳 Dockerfile
├── 📦 package.json
├── 📘 README.md
├── 📐 tsconfig.json          # (If TypeScript)
├── 🧪 vitest.config.ts
├── src/
│   ├── 📁 controllers/       # Route handlers
│   ├── 📁 middleware/        # Custom middleware (auth, validation, error)
│   ├── 📁 models/            # Database models (Mongoose schemas)
│   ├── 📁 routes/            # Route definitions
│   ├── 📁 utils/             # Utility functions and Logger
│   ├── 📄 index.ts           # Application entry point
│   └── 📄 app.test.ts        # App setup tests
└── prisma/                   # (If Prisma selected)
    └── 📄 schema.prisma

💻 Local Development

If you want to contribute to the project or run it from source, please check out our Development Guide.

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request on our GitHub Repository.

📄 License

MIT © Mustak Ahmed Khan