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

@asdsadw12312dwd2112xz/ssl-gen-cli

v1.0.0

Published

Generate self-signed SSL certificates for local development

Readme

ssl-gen-cli

Generate self-signed SSL certificates for local development — fast, zero config.

Features

  • Self-signed cert + key pair generation
  • Custom domain/CN (--domain)
  • Custom validity days (--days)
  • Subject Alternative Names / SANs (--san)
  • Custom output directory (--output)
  • PKCS12/PFX export (--pfx)
  • RSA key size: 2048 or 4096 (--key-size)
  • Local CA generation + signing (--ca, ca subcommand)
  • Certificate info display (info subcommand)
  • OS-specific trust instructions

Requirements

  • Node.js ≥ 18
  • openssl available in PATH

Installation

npm install -g ssl-gen-cli

Or run directly:

npx ssl-gen-cli generate --domain myapp.local

Usage

Generate a certificate

# Quickstart — localhost self-signed
ssl-gen-cli generate

# Custom domain
ssl-gen-cli generate --domain myapp.local

# With local CA (recommended for browsers)
ssl-gen-cli generate --domain myapp.local --ca

# Multiple SANs
ssl-gen-cli generate --domain myapp.local \
  --san api.local --san admin.local --san 192.168.1.10

# 2-year cert with 4096-bit key
ssl-gen-cli generate --domain myapp.local --days 730 --key-size 4096

# Export PFX bundle (e.g. for IIS / .NET)
ssl-gen-cli generate --domain myapp.local --pfx --pfx-password mypass

# Custom output directory
ssl-gen-cli generate --domain myapp.local --output ./ssl/certs

# Sign with an existing CA
ssl-gen-cli generate --domain myapp.local \
  --ca-key ./ca/ca.key --ca-cert ./ca/ca.crt

Generate a CA only

ssl-gen-cli ca --output ./ca --days 3650

Show certificate info

ssl-gen-cli info ./certs/myapp.local.crt

Print trust instructions for a CA

ssl-gen-cli trust ./certs/ca.crt

Options (generate)

| Flag | Default | Description | |------|---------|-------------| | -d, --domain <domain> | localhost | Primary domain / CN | | --days <number> | 365 | Validity in days | | -s, --san <name...> | — | Extra SANs (domain or IP) | | -o, --output <dir> | ./certs | Output directory | | --pfx | false | Export PKCS12/PFX bundle | | --pfx-password <pass> | changeit | PFX password | | --key-size <bits> | 2048 | RSA key size (2048 or 4096) | | --ca | false | Generate local CA and sign with it | | --ca-key <path> | — | Existing CA key to sign with | | --ca-cert <path> | — | Existing CA cert to sign with |

Output Files

| File | Description | |------|-------------| | <domain>.key | Private key (chmod 600) | | <domain>.crt | Certificate | | <domain>.csr | CSR (only when signing with CA) | | <domain>.p12 | PKCS12 bundle (when --pfx) | | ca.key | CA private key (when --ca) | | ca.crt | CA certificate (when --ca) |

Trusting the CA Certificate

After generating with --ca:

Ubuntu/Debian:

sudo cp ./certs/ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates

RHEL/Fedora:

sudo cp ./certs/ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust

macOS:

sudo security add-trusted-cert -d -r trustRoot \
  -k /Library/Keychains/System.keychain ./certs/ca.crt

Windows (Admin PowerShell):

certutil -addstore -f "ROOT" .\certs\ca.crt

Firefox: Settings → Privacy & Security → View Certificates → Authorities → Import

License

MIT