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

@erickxavier/nojs-cli

v1.11.0

Published

Official CLI for No.JS — scaffold projects, optimize HTML, run dev server, validate templates, and manage plugins

Readme

NoJS CLI

Official CLI for the No.JS framework

Scaffold projects, optimize HTML for production, run a dev server with live reload, validate templates, and manage plugins — all from the command line.


Install

npm install -g @erickxavier/nojs-cli

Requires Node.js >= 18.


Commands

| Command | Alias | Description | |---------|-------|-------------| | nojs init [path] | i | Scaffold a new No.JS project with optional routing, i18n, and API base | | nojs prebuild [dir] | b | Build-time HTML optimization (resource hints, speculation rules, sitemap, OG tags, image optimization) | | nojs dev [path] | d | Local dev server with live reload (SSE), SPA fallback, colored request logging | | nojs validate [files] | v | Validate No.JS templates against 10 rules (CI-friendly JSON output) | | nojs plugin <action> | p | Manage plugins — search, install, update, remove, list | | nojs help | | Show help | | nojs version | | Show version |


Quick Start

# Create a new project
nojs init my-app
cd my-app

# Start the dev server
nojs dev

# Validate your templates
nojs validate *.html

# Optimize for production
nojs prebuild

Init

Interactive wizard that generates a ready-to-go No.JS project:

nojs init ./my-app

Non-interactive mode:

nojs init ./my-app --routing --i18n --locales en,pt --api https://api.example.com --yes

Generates index.html, route pages (.tpl), i18n locale files, and a nojs.config.json.


Dev Server

nojs dev              # serve current directory
nojs dev ./docs/      # serve a specific path
nojs dev --port 8080  # custom port
nojs dev --open       # open browser on start
nojs dev --quiet      # suppress request logging
nojs dev --no-reload  # disable live reload

Features: live reload via SSE, SPA fallback (serves index.html for unmatched routes), MIME type detection, path traversal protection.


Prebuild

Build-time HTML optimization pipeline with 6 plugins:

nojs prebuild            # process current directory
nojs prebuild ./dist/    # process a specific path

| Plugin | What it does | |--------|-------------| | inject-resource-hints | Preload, prefetch, preconnect for get= and route templates | | inject-head-attrs | Static page-title, page-description, page-canonical, page-jsonld | | inject-speculation-rules | Speculation Rules API from <template route> definitions | | inject-og-twitter | Open Graph and Twitter Card meta tags from page-* directives | | generate-sitemap | sitemap.xml from route definitions and canonical URLs | | optimize-images | Lazy loading, LCP preload, fetchpriority hints |


Validate

nojs validate *.html
nojs validate src/ --format json   # JSON output for CI

Rules: missing as on fetch, each without in, foreach without from, model on non-form elements, bind-html warning, routes without route-view, empty event handlers, loops without key, duplicate store names, validate outside <form>.


Plugin Manager

Hybrid plugin manager — CDN for official plugins, npm for community packages:

nojs plugin search analytics
nojs plugin install @nojs/analytics
nojs plugin list
nojs plugin update @nojs/analytics
nojs plugin remove @nojs/analytics

CDN plugins get SRI integrity hashes (sha384) computed automatically.


Project Structure

src/
├── cli.js              # CLI entry point — argument parsing, command routing
├── commands/           # Top-level command handlers
├── init/               # Project scaffolding templates and wizard
├── prebuild/           # HTML optimization plugins
├── dev/                # Dev server (HTTP + SSE live reload)
├── validate/           # Template validation rules
└── plugin/             # Plugin manager (CDN + npm)

__tests__/              # Jest unit tests
bin/
└── nojs.js             # Executable entry point

Ecosystem

| Tool | Description | |------|-------------| | No.JS | The HTML-first reactive framework | | NoJS-LSP | VS Code extension — autocomplete, hover docs, diagnostics | | NoJS-MCP | MCP server — AI tools for building No.JS apps | | NoJS-CLI | This package |


Contributing

Contributions are welcome! Please read the Contributing Guide and our Code of Conduct before submitting a PR.

License

MIT