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

@prism-dev/nexus-cli

v1.1.8

Published

A CLI tool for generating Nexus framework projects and components.

Downloads

20

Readme

Nexus CLI

Nexus. The composable backend. Build with intention

A simple and powerful CLI tool for generating projects and components for the Nexus framework.

This CLI helps you bootstrap new Nexus projects and manage your architecture (Layers, Events, Services) as your application grows.

Features

  • Project Bootstrapping: Create a new Nexus project with all TypeScript configuration the new EventType.ts file ready to go.

  • Component Scaffolding: Quickly generate boilerplate files for Layers, Events, and Services that are compatible with the latest Nexus architecture.

  • Smart Configuration: Reads a nexus.config.json in your project root to know where to place new files.

  • Always Up-to-Date: Automatically fetches the latest versions of @prism-dev/nexus, typescript, and @types/node from the NPM registry.

  • Update Notifier: Notifies you when a new version of the CLI itself is available.

Installation

To use the CLI globally, install it using npm:

npm install -g @prism-dev/nexus-cli

Usage

The main command is nexus. You can see all available commands by running:

nexus --help

Commands

Create a New Project

This command generates a complete, ready-to-run project structure, including the new EventType.ts starter file.

nexus create:project <project-name>

# Alias:
nexus cp <project-name>

Example: nexus create:project my-app

This will create a new folder my-app/ with the following structure:

my-app/
├── .gitignore
├── nexus.config.json
├── package.json
├── tsconfig.json
└── Source/
    ├── main.ts
    ├── Events/
    │   └── Types/
    │       └── EventType.ts  <-- NEW: Includes helpful default event types
    ├── Layers/
    │   └── MyLayer.ts
    └── Services/
        └── .gitkeep

The generated package.json will already include the latest versions of @prism-dev/nexus and its development dependencies.

Scaffolding Components

These commands are used inside an existing Nexus project. They will read your nexus.config.json to determine where to place the files.

Important: The generator automatically appends the component type (Layer, Event, Service) to the name you provide.

Create a Layer

nexus create:layer <LayerName>

# Alias:
nexus cl <LayerName>

Example: Running nexus cl Http will create the file Source/Layers/HttpLayer.ts containing the HttpLayer class.

Create an Event

nexus create:event <EventName>

# Alias:
nexus ce <EventName>

Example: Running nexus ce UserRegistered will create the file Source/Events/UserRegisteredEvent.ts containing the UserRegisteredEvent class.

Create a Service

nexus create:service <ServiceName>

# Alias:
nexus cs <ServiceName>

Example: Running nexus cs Database will create the file Source/Services/DatabaseService.ts containing the DatabaseService class (which correctly implements OnInitialize and OnShutdown).

Configuration (nexus.config.json)

When you run the create:layer, create:event, or create:service commands, the CLI will look for a nexus.config.json file in the current directory.

If not found, it will use these defaults:

nexus.config.json (Default)

{
  "paths": {
    "layers": "Source/Layers",
    "events": "Source/Events",
    "services": "Source/Services"
  }
}

You can customize this file. For example, if you prefer to have your services in an App/Infrastructure/ folder, you can change it:

nexus.config.json (Custom)

{
  "paths": {
    "layers": "Source/Application/Layers",
    "events": "Source/Application/Events",
    "services": "Source/Infrastructure/Services"
  }
}

Now, running nexus cs DatabaseService will create the file at Source/Infrastructure/Services/DatabaseService.ts.

License

MIT