A powerful command-line tool for managing SSL certificates, both for local development and production environments. This tool simplifies the process of creating and managing SSL certificates, including setting up Nginx with Let's Encrypt certificates.
- 🚀 Create local Certificate Authority (CA) for development
- 🔐 Generate SSL certificates for domains
- 🌐 Set up Nginx with Let's Encrypt certificates
- 🎨 Beautiful CLI interface with animations and colors
- 🔄 Automatic certificate renewal support
- 🛠️ Comprehensive error handling and user guidance
# Install globally
npm install -g ssl-cli
# Or install locally
npm install ssl-cli
- Node.js (v14 or higher)
- OpenSSL (for local certificate generation)
- Nginx (for production setup)
- Certbot (for Let's Encrypt certificates)
ssl-cli --help
- Shows all available commands and their descriptions
- Provides basic usage information
- Lists command-line options
ssl-cli check-openssl
- Verifies if OpenSSL is installed on your system
- Checks if OpenSSL is properly configured in PATH
- Displays the installed OpenSSL version
- Provides installation instructions if OpenSSL is missing
ssl-cli create-local-ca
- Creates a local Certificate Authority (CA) for development
- Generates a CA private key (
myCA.key
) - Creates a CA certificate (
myCA.pem
) - Stores files in
~/certs
directory - Provides platform-specific installation instructions
- Features:
- Password protection for CA key
- 5-year validity period
- Secure key generation (2048-bit RSA)
- Overwrite protection for existing CA files
ssl-cli create-cert
- Creates SSL certificates for specific domains
- Generates certificates signed by your local CA
- Features:
- Domain name validation
- Private key generation
- Certificate signing request (CSR) creation
- Subject Alternative Names (SAN) support
- Overwrite protection for existing certificates
- Creates files:
-
domain.key
: Private key -
domain.crt
: Certificate -
domain.csr
: Certificate signing request -
domain.ext
: Extension file
-
ssl-cli setup-nginx
- Sets up Nginx with Let's Encrypt certificates
- Features:
- Nginx installation check and setup
- Certbot installation and configuration
- DNS verification setup
- Automatic certificate renewal
- Custom port configuration
- Steps:
- Checks system requirements
- Installs necessary packages
- Configures Nginx
- Sets up DNS verification
- Generates SSL certificates
- Configures automatic renewal
# 1. Create local CA
ssl-cli create-local-ca
# 2. Install CA certificate in your system/browser
# 3. Create certificates for your domains
ssl-cli create-cert
# Set up Nginx with Let's Encrypt
ssl-cli setup-nginx
# Check OpenSSL installation
ssl-cli check-openssl
- Generates a self-signed CA certificate
- Creates private keys with secure encryption
- Provides platform-specific installation instructions
- Supports certificate overwrite protection
- Generates certificates signed by your local CA
- Supports multiple domains and subdomains
- Creates both certificate and private key files
- Includes proper Subject Alternative Names (SAN)
- Installs and configures Nginx
- Sets up Let's Encrypt certificates
- Configures automatic renewal
- Provides DNS verification guidance
- Supports custom port configuration
- Private keys are generated with strong encryption
- Certificates include proper security extensions
- Automatic renewal ensures certificates don't expire
- Proper file permissions are maintained
- Sensitive files are excluded from version control
Contributions are welcome! Please feel free to submit a Pull Request.
ISC
For support, please open an issue in the GitHub repository.