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

@melodicdev/cli

v1.2.3

Published

Scaffolding and code generation for Melodic apps and monorepos.

Readme

Melodic CLI

A lightweight scaffolding and code generation tool for Melodic apps and monorepos.

Install

npm install -g @melodicdev/cli
melodic --help

Local dev build:

npm --workspace @melodicdev/cli run build
node packages/cli/dist/index.js --help

Quick Start

melodic init my-app
cd my-app
npm install
npm run dev

Commands

melodic init <directory> [--monorepo] [--app-name <name>]

Create a new Melodic project.

  • Single app:

    melodic init my-app
  • Monorepo with apps/ and libs/:

    melodic init my-repo --monorepo --app-name web

    Uses tsconfig.build.json for tsc -b builds and keeps references updated when you run melodic add app/lib.

    Apps generated by the CLI set build.target to es2022 in Vite so top-level await works in production builds.

melodic create is an alias of melodic init.

melodic add app <name> [--dir apps]

Add a new app folder (useful inside a monorepo).

melodic add app admin
melodic add app marketing --dir apps

melodic add lib <name> [--dir packages]

Add a new shared library folder.

melodic add lib shared
melodic add lib ui --dir packages

melodic add testing [--path .]

Add a basic Vitest + happy-dom test setup to an existing project.

melodic add testing --path apps/web

melodic generate component <name> [--path src/components]

Create a component with .component.ts, .template.ts, and .styles.ts.

melodic generate component user-card
melodic generate component user-card --path apps/web/src/components

melodic generate directive <name> [--path src/directives]

Create a template directive.

melodic generate directive auto-focus

melodic generate attribute-directive <name> [--path src/directives]

Create and register an attribute directive.

melodic generate attribute-directive tooltip

melodic generate service <name> [--path src/services]

Create an injectable service.

melodic generate service auth

melodic generate interceptor <name> [--path src/http/interceptors]

Create HTTP request/response interceptors.

melodic generate interceptor auth

melodic generate class <name> [--path src]

Create a plain TypeScript class.

melodic generate class user
melodic generate class user --path src/models

Templates

The CLI uses built-in templates and replaces placeholders automatically:

  • app-basic: single app scaffold
  • monorepo-basic: repo with apps/ + packages/ and a default app
  • lib-basic: minimal shared library scaffold

Template notes:

  • App templates include vite-plugin-melodic-styles.ts, a src/styles/global.css sample, and a <link melodic-styles> entry in index.html.

Placeholders:

  • __APP_NAME__
  • __REPO_NAME__
  • __LIB_NAME__

Behavior Notes

  • The CLI writes files only if the target directory is empty.
  • Existing files are never overwritten.
  • Use --path and --dir to target specific subfolders.