Skip to content

trahma/certwiz

Repository files navigation

certwiz πŸ”

Go Version License

A user-friendly CLI tool for certificate management. Like HTTPie, but for certificates.

certwiz makes working with X.509 certificates as simple as possible. No more wrestling with OpenSSL's arcane syntax or trying to remember complex command flags. Just simple, intuitive commands that do what you expect.

✨ Features

  • πŸ” Inspect certificates from files or live websites
  • πŸ” Generate self-signed certificates with custom SANs
  • πŸ”„ Convert between PEM and DER formats effortlessly
  • βœ… Verify certificates against hostnames
  • πŸ”— View certificate chains to understand trust paths
  • πŸ“Š Detailed extension analysis with human-readable output
  • 🎨 Beautiful terminal output with colors and formatting
  • πŸ’‘ Smart defaults that just work

πŸš€ Quick Start

# Inspect a website's certificate
cert inspect google.com

# Generate a self-signed certificate
cert generate --cn myapp.local --san "*.myapp.local"

# Convert certificate format
cert convert cert.pem cert.der --format der

# View the full certificate chain
cert inspect github.com --chain

πŸ“¦ Installation

Quick Install (Recommended)

Install the latest version with our installer script:

curl -sSL https://raw.githubusercontent.com/trahma/certwiz/main/install.sh | bash

Or install a specific version:

curl -sSL https://raw.githubusercontent.com/trahma/certwiz/main/install.sh | bash -s -- --version v0.1.0

Manual Installation

Download pre-built binaries from the releases page.

macOS

# Apple Silicon (M1/M2/M3)
curl -L https://github.com/trahma/certwiz/releases/latest/download/cert-darwin-arm64.tar.gz | tar xz
sudo mv cert-darwin-arm64 /usr/local/bin/cert

# Intel
curl -L https://github.com/trahma/certwiz/releases/latest/download/cert-darwin-amd64.tar.gz | tar xz
sudo mv cert-darwin-amd64 /usr/local/bin/cert

Linux

# 64-bit
curl -L https://github.com/trahma/certwiz/releases/latest/download/cert-linux-amd64.tar.gz | tar xz
sudo mv cert-linux-amd64 /usr/local/bin/cert

From Source

go install github.com/trahma/certwiz@latest
# or
git clone https://github.com/trahma/certwiz
cd certwiz
make build

Download Binary

Download pre-built binaries from the releases page.

The binary will be named cert for ease of use.

πŸ“– Documentation

🎯 Why certwiz?

Before certwiz (with OpenSSL)

# Inspecting a certificate - hard to remember!
openssl s_client -connect example.com:443 -servername example.com < /dev/null 2>/dev/null | openssl x509 -text -noout

# Generating a certificate with SANs - so complex!
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=example.com" -extensions v3_req -config <(echo "[req]"; echo "distinguished_name=req_distinguished_name"; echo "[v3_req]"; echo "subjectAltName=DNS:example.com,DNS:*.example.com")

With cert - simple and intuitive!

# Inspecting a certificate
cert inspect example.com

# Generating a certificate with SANs
cert generate --cn example.com --san example.com --san "*.example.com"

πŸ”₯ Key Features in Detail

Certificate Inspection

  • View certificates from files (PEM/DER) or live websites
  • Automatic format detection
  • Shows all SANs with intelligent wrapping
  • Highlights expiration status with color coding
  • Displays full certificate chain with --chain
  • Shows detailed extensions with --full

Certificate Generation

  • Create self-signed certificates instantly
  • Support for multiple SANs (DNS names and IP addresses)
  • Customizable validity period and key size
  • Generates both certificate and private key files

Certificate Verification

  • Check certificate validity dates
  • Verify hostname matches
  • Validate against CA certificates
  • Clear pass/fail status indicators

Beautiful Output

  • Color-coded status indicators (🟒 valid, 🟑 expiring soon, πŸ”΄ expired)
  • Clean, bordered tables for certificate information
  • Smart terminal width detection and text wrapping
  • Icons and symbols for better readability

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by HTTPie for its user-friendly approach
  • Built with Cobra for CLI management
  • Styled with Lipgloss for beautiful output

Made with ❀️ by the certwiz team

About

Certwiz - Making certs easy

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •