mkcert-cli is a Node.js CLI wrapper around the mkcert tool for generating locally trusted HTTPS development certificates, usable outside Vite contexts. Current stable version is 1.5.0, released Apr 2024. It insources logic from vite-plugin-mkcert, removing external dependencies like axios (since v1.4.0) to keep the package small (~20 kB install size). It supports custom output directories, certificate file names, and multiple hostnames, with auto-upgrade of the mkcert binary via the `-u` flag. Compared to using mkcert directly, it simplifies certificate generation via a single npx command without requiring manual installation of the mkcert binary.
npm install mkcert-cliVerified import paths — ran on the pinned version, not inferred.
Generates locally trusted HTTPS certificates for custom hosts in a specified output directory with custom file names.
Use `--host host1 --host host2` syntax; prior versions had a bug ignoring custom hosts.
Use `--host` instead of `--hosts`.
Ensure mkcert is available on PATH or use `-u` in an unrestricted network.
Use `mkcert-cli -f` to force regeneration.
Run with `-u` flag to auto-download mkcert: `npx mkcert-cli -u`
Install mkcert manually from https://github.com/FiloSottile/mkcert and ensure it's on PATH.
Use a custom output directory with write permissions: `npx mkcert-cli --outDir /tmp/certs`
No dependency data recorded yet.