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

@crittercodes/express-cli

v1.0.0

Published

CLI tool to create Express projects

Readme

Express CLI Tool

express-cli is a command-line tool designed to quickly scaffold an Express.js project with pre-configured directory structures, middleware, and database support. This tool simplifies the process of setting up new Express projects by automating many of the repetitive tasks associated with initial project setup.

Features

  • Project Initialization: Quickly create a new Express project with a standardized structure.
  • Database Support: Choose between MongoDB and PostgreSQL for database integration.
  • JWT Secret Generation: Automatically generate a JWT secret and include it in the .env file.
  • Route Generation: Easily generate routes with associated controller, coordinator, and model files.
  • Middleware Generation: Create predefined or custom middleware for your project.
  • Project Deletion: Quickly delete a project directory and its contents.

Installation

To install the express-cli tool globally, run:

npm install -g @crittercodes/express-cli

Usage

Initialize a New Project

To create a new Express project, run:

exp new <project-name>

This will create a new project with the specified name and prompt you to choose between MongoDB and PostgreSQL. It will also ask if you want to generate a JWT secret.

Generate a New Route

To generate a new route along with its associated files, run:

exp generate route <route-name>

This will create:

routes/<route-name>.route.js
controllers/<route-name>.controller.js
coordinators/<route-name>.coordinator.js
models/<route-name>.model.js

Generate a New Middleware

To generate a new middleware, run:

exp generate middleware <middleware-name>

You can generate predefined middlewares like auth, admin, logger, or rateLimit, or create a custom middleware.

Generate a New Class

To generate a new class, run:

exp generate class <class-name>

This will create a new class file in the classes directory with a constructor and an example method.

Delete a Project

To delete an entire project directory, run:

exp delete <project-name>

Project Structure

When you create a new project, the following structure will be generated:

Copy code
<project-name>/
│
├── classes/
├── controllers/
├── coordinators/
├── middleware/
├── models/
├── routes/
├── app.js
└── package.json

Example Workflow

Create a new project:

exp new my-express-app

Generate a new route:

exp generate route user

Add middleware:

exp generate middleware auth

Delete the project if needed:

exp delete my-express-app

Contributing Contributions are welcome! If you have any ideas, suggestions, or bugs to report, please open an issue or submit a pull request on GitHub.

License This project is licensed under the MIT License.

Notes:

  • Features: Describes the key functionalities of your CLI tool.
  • Installation: Provides the command to globally install your CLI tool.
  • Usage: Details how to use the various commands provided by your CLI tool.
  • Project Structure: Illustrates the structure of a generated project.
  • Example Workflow: Walks the user through an example of how they might use the tool.
  • Contributing: Encourages others to contribute to the project.
  • License: Specifies the licensing of the project.

You can expand on this or modify it as needed based on your specific requirements and the feedback you receive from users.