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

monolithx

v2.2.0

Published

CLI tool to scaffold GitHub Actions workflows into your project

Readme

🧱 Monolith — Production-Ready CI/CD Scaffolder

One command. Complete, production-grade GitHub Actions pipeline instantly scaffolded into any Node.js, Java, or Python project.


What it does

monolithx is an interactive CLI that writes a full CI/CD pipeline into your repository. Run it once, answer a few prompts, push — and every future commit is automatically linted, tested, built, scanned, deployed to staging, and promoted to production through an approval gate, with instant rollback at any time.


Pipeline architecture

Every push / PR
      │
      ▼
┌─────────────┐
│  CI          │  lint + test  (setup-node / setup-java / setup-python + dep cache)
└──────┬──────┘
       │ success on prod/staging branch
       ▼
┌─────────────┐
│  Build      │  docker build → push to GHCR (immutable SHA tag)
│             │  Trivy image scan (blocks on CRITICAL/HIGH CVEs)
└──────┬──────┘
       │
       ├──────────────────────────────────────────────────────────┐
       │  head_branch == staging                                  │  head_branch == main
       ▼                                                          ▼
┌─────────────┐                                        ┌──────────────────────┐
│  Deploy     │                                        │  Deploy              │
│  Staging    │  auto  (GitHub Environment: staging)   │  Production          │
│             │  SSH → docker pull exact SHA → run      │  ← manual approval   │
│             │  health check → auto-rollback on fail   │  (GitHub Environment)│
└─────────────┘                                        └──────────────────────┘

Manual at any time:
  workflow_dispatch → Rollback workflow → specify any SHA → SSH → redeploy → health check
  workflow_dispatch → Security Scan     → Trivy FS + Gitleaks (also runs weekly)

Quick start

# Install globally
npm install -g monolithx

# Run inside your project root
cd my-project
monolithx

The CLI will prompt you for:

| Prompt | Default | Notes | |---|---|---| | Project name | folder name | Used as container name and image name | | Stack | — | Node.js, Java, Python | | Production branch | main | Auto-deploys here after approval | | Staging branch | staging | Auto-deploys here on every push | | Install command | preset | e.g. npm ci | | Lint command | preset | e.g. npm run lint --if-present | | Test command | preset | e.g. npm test | | Use Docker? | yes | Recommended for production | | Migration command | empty | Optional; run before container swap |


Generated files

.github/
  workflows/
    ci.yml               ← lint + test on every push / PR
    build.yml            ← Docker build → GHCR push + Trivy scan
    deploy.yml           ← staging (auto) / production (approval gate)
    rollback.yml         ← manual rollback to any image SHA
    security-scan.yml    ← weekly Trivy FS + Gitleaks secret scan

scripts/
  deploy.sh              ← runs on server via SSH: pull exact image, restart
  rollback.sh            ← runs on server via SSH: restore previous or explicit SHA
  health-check.sh        ← polls health endpoint until 2xx or timeout

Dockerfile               ← multi-stage, non-root user, HEALTHCHECK
.dockerignore            ← excludes .git, secrets, node_modules, etc.

Prerequisites

GitHub Secrets (Settings → Secrets and variables → Actions)

| Secret | Description | |---|---| | PROD_HOST | Production server IP or hostname | | STAGING_HOST | Staging server IP or hostname | | DEPLOY_USER | SSH username on both servers | | DEPLOY_SSH_KEY | Private SSH key (ed25519 recommended) |

GITHUB_TOKEN is used automatically for GHCR login and SARIF uploads — no manual setup needed.

GitHub Environments (Settings → Environments)

| Environment | Recommended settings | |---|---| | staging | No protection rules (fully automatic) | | production | Add required reviewers → creates an approval gate before every production deploy |

Server setup (one-time, per server)

# Create directories
mkdir -p /opt/scripts/<your-app-name>
mkdir -p /etc/<your-app-name>

# Copy scripts from your repo to the server
scp scripts/deploy.sh  user@server:/opt/scripts/<app>/deploy.sh
scp scripts/rollback.sh user@server:/opt/scripts/<app>/rollback.sh
chmod +x /opt/scripts/<app>/*.sh

# Place environment files (never commit these)
# /etc/<app>/staging.env
# /etc/<app>/production.env

# Add the GitHub Actions SSH public key to authorized_keys
echo "<public-key>" >> ~/.ssh/authorized_keys

# Ensure Docker is installed and the deploy user can run Docker

Rollback

Rollback is a workflow_dispatch — go to Actions → Rollback → Run workflow.

  • Enter the exact image SHA you want to roll back to (visible in the Build & Push job log).
  • Select the target environment (staging or production).
  • The workflow SSHes into the server, docker pulls the exact immutable image, swaps the container, and verifies health.

The deploy.sh script also records the running image tag before each deploy, enabling IMAGE_TAG=previous rollback without needing to look up a SHA.


Security

  • GHCR images are tagged with the full commit SHA (immutable) — latest is never deployed to production.
  • Trivy scans every built image for CRITICAL and HIGH CVEs before the deploy step can run. Results appear in the GitHub Security tab.
  • Gitleaks scans the full git history for accidentally committed secrets on every push to main/staging.
  • Secrets are injected at runtime via --env-file on the server — never baked into the image.
  • Non-root users in all three Dockerfile templates.
  • Supply chain: pinned major versions on all Actions (@v4, @v3, etc.).

Stack presets

| Stack | Runtime | Install | Lint | Test | Server | |---|---|---|---|---|---| | Node.js | Node 20 | npm ci | npm run lint | npm test | npm start | | Java | JDK 21 (Temurin) | mvn dependency:go-offline | Checkstyle | mvn verify | JVM container flags | | Python | Python 3.11 | pip install -r requirements.txt | ruff / flake8 | pytest | gunicorn + uvicorn |


Frequently asked questions

Q: Where does the Docker image actually run?
A: On your own server (VPS, EC2, Droplet, etc.). The GitHub Actions runner builds and pushes the image to GHCR, then SSHes into your server to pull and start it. The runner itself is ephemeral.

Q: Can I use this with Kubernetes?
A: The deploy.sh and rollback.sh scripts are the only server-side concern. Replace their contents with kubectl set image / kubectl rollout undo commands to target a Kubernetes cluster instead.

Q: What if I don't want Docker?
A: Answer "No" to the Docker prompt. The build step uploads a plain artifact (dist/) instead, and you'll need to adapt deploy.sh to copy and run that artifact on your server.

Q: How do I update the pipeline after initial setup?
A: Re-run monolithx — it overwrites the generated files. Commit the changes and push.


License

MIT