Node cli wrapper for mkcert
based entirely on the fantastic work done in vite-plugin-mkcert
.
Create locally trusted development certificates in default folder $HOME/.mkcert-cli/certs
> npx -y mkcert-cli
# => Created "dev.cert" and "dev.key" in $HOME/.mkcert-cli/certs
Explicitly define output directory for files
> npx -y mkcert-cli --outDir .
# => Created "dev.cert" and "dev.key" in ./
Set file names, default to dev.cert
and dev.key
> npx -y mkcert-cli --outDir . --cert localhost.pem --key localhost.key
# => Created "localhost.pem" and "localhost.key" in ./
Custom hosts, default value is localhost
+ local ip addrs
.
To pass multiple values, just pass several named args.
> npx -y mkcert-cli --host localhost --host my-site.local
# => Created "dev.cert" and "dev.key" for ["localhost", "my-site.local"]
npx -y mkcert-cli -h
Force regenerate certificate files
npx -y mkcert-cli -f
Install latest version of mkcert that's available before generating certificates.
npx -y mkcert-cli -u