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

@newagesmb/api-cli

v2.2.2

Published

Nest Core CLI for NewAgeSys Inc.

Readme

Table of Contents

🚀 Getting Started

To scaffold an app using @newagesmb/api-cli, run any of the following commands:

npm

npm i -g @newagesmb/api-cli
nac new my-awesome-app

yarn

yarn global add @newagesmb/api-cli
nac new my-awesome-app

pnpm

pnpm add -g @newagesmb/api-cli
nac new my-awesome-app

✨ Features

  • 🎯 GitHub-Based Architecture: Always uses the latest core template from the repository
  • 🗄️ Database Support: Choose between MongoDB and SQL (MySQL/PostgreSQL)
  • 📦 Modular Packages: Add third-party integrations like Firebase, Stripe, Twilio
  • 🚀 Smart Caching: Templates are cached locally for faster project creation
  • 🔧 Module Generation: Generate CRUD modules with a single command
  • ➕ Add Packages: Add new packages to existing projects seamlessly
  • 🏷️ TypeScript First: Full TypeScript support with strict type checking
  • 🧪 Testing Ready: Comes with Jest setup for unit and e2e tests
  • 📚 Production Ready: PM2 configuration, environment setup, and more

📦 Available Packages

| Package | Description | Use Case | |---------|-------------|----------| | email | Email service with templates | Transactional emails, notifications | | firebase | Firebase Admin SDK | Authentication, push notifications | | stripe | Stripe payment processing | Payments, subscriptions | | square | Square payment processing | In-person and online payments | | twilio | SMS and communication | SMS notifications, voice calls | | geocoder | Location services | Address geocoding, maps | | recaptcha | Bot protection | Form validation, security |

🛠️ Commands

Create New Project

# Interactive mode (recommended)
nac new my-app

# With specific database
nac new my-app --mongo
nac new my-app --sql --mysql
nac new my-app --sql --postgresql

# Skip package selection
nac new my-app --noPackages

# Skip git initialization
nac new my-app --noGit

# Skip dependency installation
nac new my-app --noInstall

Add Packages to Existing Project

# Add a single package
nac add stripe

# Add without installing dependencies
nac add firebase --noInstall

Generate Modules

# Generate a new CRUD module
nac module user-profile

# Generate without test files
nac module payment --noSpec

# Force specific database engine
nac module order --useMongo
nac module invoice --useSql

Cache Management

# Show cache information
nac cache --info

# Clear template cache
nac cache --clear

🏗️ Architecture

GitHub-Based Templates

The CLI uses a revolutionary GitHub-based architecture that eliminates template duplication:

  • Single Source of Truth: All templates come from the core repository
  • Always Up-to-Date: Automatically gets the latest features and fixes
  • Smart Caching: Templates are cached locally for performance
  • Zero Maintenance: No need to maintain separate template copies

Template Modification Engine

The CLI includes a sophisticated template modification system:

  • Selective Packaging: Only includes selected modules and dependencies
  • Database Engine Selection: Removes unused database modules
  • Import Management: Automatically manages TypeScript imports
  • Configuration Updates: Updates package.json, tsconfig, and environment files

Project Structure

Generated projects follow a modular architecture:

my-app/
├── libs/                    # Shared library modules
│   ├── mongo/              # MongoDB integration
│   ├── email/              # Email service
│   └── stripe/             # Payment processing
├── src/
│   ├── core/               # Core utilities and decorators
│   ├── config/             # Configuration files
│   ├── modules/            # Feature modules
│   │   ├── mongo/          # MongoDB-specific modules
│   │   └── sql/            # SQL-specific modules
│   └── main.ts
├── test/                   # E2E tests
├── .nac-metadata.json      # CLI metadata
└── package.json

📖 Examples

Full-Stack E-commerce App

nac new ecommerce-api --sql --mysql
cd ecommerce-api
nac add stripe
nac add email
nac module product
nac module order
nac module customer

Real-time Chat Application

nac new chat-api --mongo
cd chat-api
nac add firebase
nac add twilio
nac module chat-room
nac module message
nac module user-presence

Location-based Service

nac new location-api --postgresql
cd location-api
nac add geocoder
nac add recaptcha
nac module location
nac module search

🔧 Development

Building the CLI

# Install dependencies
npm install

# Type checking
npm run typecheck

# Build
npm run build

# Development mode
npm run dev

Testing

# Run type checking
npm run typecheck

# Build and test
npm run build
node dist/index.js new test-app

cd test-app
node ../dist/index.js m

Local Development

For local development, the CLI can use a local core repository:

  1. Clone the core repository
  2. Update src/core/repository.ts with the local path
  3. Set cache: false for immediate changes