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 🙏

© 2025 – Pkg Stats / Ryan Hefner

nopi.js

v0.3.6

Published

CLI Tool/Framework for generating Node APIs, MVC Projects, and Files

Readme

nopi

Nopi is a CLI Tool / Framework for generating simple Node APIs, MVC projects, and Files.


Installation

To Install Nopi:

$ npm install nopi.js -g

To see a list of commands:

$ nopi


Project Generation

To Generate a new API or MVC project:

$ nopi new name

When you create a new project, Nopi will ask for project type and run npm install automatically in the project directory Nopi generates. All you have to do is be patient, it is not frozen.

Once it is done, cd to new project and start the server with:

$ npm run dev

Database Selection

When generating a new project, you can select from two database types:

mongo || postgres

In your projects package.json there is a nopi_database field that is used in Model file creation.

Example Projects

Nopi API / MongoDB Example

Nopi MVC / MongoDB Example(Coming Soon!)

Nopi API / Postgresql Example

Nopi MVC / Postgresql Example(Coming Soon!)


File Generation

To generate a new view, controller, or model file:

$ nopi view fileName

$ nopi controller fileName

$ nopi model fileName

View Files

View files generated by Nopi are just functions that return a template literal string. Instead of using a template framework, Nopi MVC uses regular template strings to produce HTML and inject data. Once a view file is generated, you can connect it to a route in a controller.

Controller Files

Controller files which are generated by Nopi should be added to the index.js controller file. Once added to the index, they are connected to the Express server. Within the Controller files generated by Nopi, you can route, create CRUD actions, and do anything you wish with your API.

Model Files

Model files which are generated by Nopi change depending on the type of project API that was generated. Within the package.json there is a nopi_database field with the type of DB chosen on generation.

Nopi uses this field inside the package.json to determine which Model file it needs to generate.

MongoDB: If mongo is chosen on API generation, mongoose.js is used by default and Models which work with mongoose.js which be chosen.

Postgresql: If postgres is chosen on API generation, sequelize.js is used and Models and Migrations used within sequelize.js will be generated.

Example Postgresql: $ nopi model User then supply the column and data you want like, username:string, email:string, password:string

Use these commands in the root of your project.

On File Creation Specifics:

On file creation, Nopi will look through your working project directory for controller and model folders and create the corresponding file type. If none of these folders exist, Nopi will create the file in the root of your project.

Nopi also creates .nopiPath folder in your project and saves the path of the file type generated. This is to optimize the speed of file creation. By saving this path Nopi does not have to dynamically find the folder again after each generated file.

If your project directory changes at all, delete .nopiPath folder to recache folder paths. .nopiPath folder is added to .gitignore also.

You cannot create files that already exist.

Contribute

If you would like to contribute, it would be greatly appreciated.


For help and more commands:

$ nopi -h | $ nopi -V | $ nopi