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

@sceon/microstack-cli

v0.1.2

Published

Scaffolding CLI for @sceon/microstack microservices

Readme

microstack-cli

A scaffolding CLI for @sceon/microstack microservices. Pick the modules you want and it generates a ready-to-run NestJS service with exactly the right packages, AppBuilder calls, YAML config, and .env — all kept in sync.

It works like nest new: a global microstack binary collects your selection via an interactive checkbox, then runs a bundled NestJS/Angular-DevKit schematic to generate the project and install dependencies.

Install

npm install -g @sceon/microstack-cli

Usage

# Interactive — prompts you to pick modules
microstack new orders

# Non-interactive — pass modules explicitly
microstack new orders --modules mongo,redis,cache

# Useful flags
microstack new orders --skip-install        # generate without npm install
microstack new orders --dry-run             # show what would be written
microstack new orders -p pnpm               # use pnpm/yarn for the install
microstack new orders -d services/orders    # custom output directory

# See the available modules
microstack list

Selectable modules

Each maps to one optional withXxx() builder method. Selecting one adds its npm package(s), the withXxx() call in src/main.ts, a config block in config/local.example.yaml, and its .env vars.

| Module | Builder | Packages added | Notes | | --- | --- | --- | --- | | mongo | withMongo | mongoose, @nestjs/mongoose | | | mysql | withMySQL | typeorm, mysql2, @nestjs/typeorm | configured with discrete fields (needs database) | | redis | withRedis | ioredis | | | elastic | withElastic | @elastic/elasticsearch | | | cache | withCache | — | Redis-backed; auto-enables redis | | lock | withLock | redlock | Redlock; auto-enables redis | | alert | withAlert | — | dispatches to the alarmist service | | rabbitmqApi | withRabbitmqApi | — | RabbitMQ HTTP management client |

Core modules (config, logger, tracing, metrics, Swagger, health, graceful shutdown, AMQP, events, RPC service, discovery, ACL) are always enabled — they are wired automatically by AppBuilder and need no flag.

What gets generated

orders/
├── src/main.ts                  # AppBuilder.create('orders').withConfig(...)<selected withXxx()>
├── src/app.{module,controller,service}.ts
├── config/local.example.yaml    # committed template (core + selected module blocks)
├── config/local.yaml            # working copy (gitignored), created for you
├── .env.example                 # committed template
├── .env                         # working copy (gitignored), created for you
├── package.json                 # base deps + the selected modules' packages
├── tsconfig*.json, nest-cli.json, eslint.config.mjs, .prettierrc, .gitignore
└── test/                        # e2e + unit test scaffolding

Commit the *.example files; the gitignored config/local.yaml and .env hold your real values. Configuration uses ${ENV_VAR:default} interpolation resolved by the microstack ConfigModule.

How it works

The single source of truth is schematics/microservice/manifest.ts: one ModuleDef per optional module, declaring its withXxx method, npm deps, YAML config block, .env vars, and any requires (e.g. cache/lock require redis). Both the interactive prompt and the schematic read from it, so adding a new module is a one-entry change.

  • src/bin/microstack.ts — the commander program (new, list).
  • src/commands/new.command.ts — the @inquirer/prompts checkbox + requires resolution.
  • src/lib/run-schematic.ts — drives the schematic through an Angular-DevKit NodeWorkflow.
  • schematics/microservice/index.ts — the rule factory that renders templates, merges deps, materializes working config copies, and schedules npm install.

Development

npm install
npm run build          # tsc + copy schematic assets into dist/
node dist/src/bin/microstack.js new demo --modules mongo,cache --dry-run

# The schematic can also be run directly:
# schematics ./dist/schematics/collection.json:microservice --name=demo --modules=redis

License

UNLICENSED