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

skelr

v3.0.0

Published

Modern CLI tool to scaffold Express service files with CRUD generation

Downloads

78

Readme

skelr banner

Service Scaffolding CLI — Generate production-ready service files in seconds.

npm version License: MIT Node.js Version Downloads

FeaturesInstallationQuick StartConfigurationAPI


⚠️ Repository Renamed: This project has moved from scaffold-service to skelr.

  • Old (Deprecated): https://github.com/abubakar-shaikh-dev/scaffold-service
  • New: https://github.com/abubakar-shaikh-dev/skelr

Please update your bookmarks and git remotes.


✨ Features

| Feature | Description | |---------|-------------| | 🏗️ Two Architecture Modes | Choose between Separate (layer-based) or Modular (domain-driven) structures | | 📘 TypeScript Support | Generate .ts files with proper type annotations | | ⚡ CRUD Generation | Auto-generate complete Create, Read, Update, Delete operations | | 🔧 Config File Support | Pre-configure defaults with .skelrrc.json | | 🚀 Non-Interactive Mode | Skip prompts with CLI flags for automation | | 🎨 Beautiful CLI | Interactive prompts with color-coded output | | 📦 Zod Validations | Pre-configured validation schemas with type inference | | 🗑️ Soft Delete | Built-in soft delete support (timestamp or boolean) |


📦 Installation

Run with npx (Recommended)

npx skelr

Global Installation

npm install -g skelr

🚀 Quick Start

Interactive Mode

Simply run the command and follow the prompts:

npx skelr

The CLI will guide you through:

  1. Folder Structure — Separate or Modular
  2. Language — JavaScript or TypeScript
  3. CRUD APIs — Generate pre-made CRUD operations (optional)
  4. Service Name — Enter a snake_case name
  5. Preview & Confirm — Review and create files

Non-Interactive Mode

Skip all prompts with CLI flags:

# TypeScript + Modular structure
skelr --name=payment --structure=modular --typescript

# JavaScript + Separate structure
skelr -n user_profile -s separate

# Show help
skelr --help

🎛️ CLI Options

| Flag | Short | Description | |------|-------|-------------| | --name <name> | -n | Service name in snake_case | | --structure <type> | -s | separate or modular | | --typescript | -ts | Generate TypeScript files | | --help | -h | Show help message |


⚙️ Configuration

Create a .skelrrc.json file in your project root to pre-configure defaults:

{
  "structure": "modular",
  "language": "ts",
  "crud": {
    "enabled": true,
    "soft_delete": "timestamp"
  }
}

Configuration Options

| Option | Values | Description | |--------|--------|-------------| | structure | "separate" | "modular" | Default folder structure | | language | "js" | "ts" | Default programming language | | crud.enabled | true | false | Enable CRUD generation by default | | crud.soft_delete | "timestamp" | "boolean" | Soft delete approach |

When a config file is detected, skelr will use these values as defaults (you can still override via CLI flags).


📂 Folder Structures

Option 1: Separate (Layer-Based)

Best for: Traditional MVC, large teams with strict separation of concerns

src/
├── controllers/
│   └── payment.controller.ts
├── services/
│   └── payment.service.ts
├── validations/
│   └── payment.validation.ts
└── routes/
    └── v1/
        └── payment.routes.ts

Option 2: Modular (Domain-Driven)

Best for: Microservices, feature-based organization, high cohesion

src/
└── modules/
    └── payment/
        ├── payment.controller.ts
        ├── payment.service.ts
        ├── payment.validation.ts
        └── payment.routes.ts

🔥 CRUD Generation

When you enable CRUD APIs, skelr generates complete implementations:

Generated Endpoints

| Method | Route | Description | |--------|-------|-------------| | POST | / | Create new record | | GET | / | Get all records (paginated) | | GET | /:id | Get record by ID | | PUT | /:id | Update record by ID | | DELETE | /:id | Soft delete record by ID |

Features Included

  • ✅ Prisma ORM integration
  • ✅ Zod request validation
  • ✅ Pagination with search & sorting
  • ✅ Duplicate checking
  • ✅ Soft delete (timestamp or boolean)
  • ✅ Proper error handling with http-errors

🛠️ Post-Scaffolding

After generating files, register your new route:

// src/routes/index.js
import paymentRoutes from './routes/v1/payment.routes.js';
// or for modular:
import paymentRoutes from './modules/payment/payment.routes.js';

router.use('/payments', paymentRoutes);

📚 API (Programmatic Usage)

skelr can also be used programmatically in your own scripts:

import { generateFiles, snakeToCamel, snakeToPascal } from 'skelr';

// Generate files programmatically
await generateFiles('payment', 'payment', 'modular', 'ts', {
  enabled: true,
  modelName: 'payments',
  softDeleteApproach: 'timestamp'
});

// Use utility functions
const camelCase = snakeToCamel('user_profile'); // 'userProfile'
const pascalCase = snakeToPascal('user_profile'); // 'UserProfile'

Exports

// CLI
import { main, parseCliArgs, validateCliArgs, printHelp } from 'skelr';

// Config
import { loadConfig, CONFIG_FILE } from 'skelr';

// Generators
import { generateFiles } from 'skelr';

// Utils
import { snakeToCamel, snakeToPascal, c, printSuccess, printInfo, errorExit } from 'skelr';

// Templates (for customization)
import { getServiceTemplate, getCrudServiceTemplate, /* ... */ } from 'skelr';

💻 Development

# Clone the repository
git clone https://github.com/abubakar-shaikh-dev/skelr.git

# Install dependencies
npm install

# Run locally
npm start

# Or run directly
node bin/skelr.js

Project Structure

skelr/
├── bin/skelr.js           # CLI entry point
├── src/
│   ├── index.js           # Library exports
│   ├── cli/               # Argument parsing, help, main
│   ├── config/            # .skelrrc.json loader
│   ├── generators/        # File generation logic
│   ├── prompts/           # Interactive prompts
│   ├── templates/         # JS & TS templates
│   ├── ui/                # Banner, preview, summary
│   └── utils/             # Helpers & utilities
└── package.json

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

👤 Author

ABUBAKAR SHAIKH