certsmith
v1.0.0
Published
Unified CLI Hub for Certsmith - Cloudflare SaaS, step-ca, Docker, and PKI Management
Maintainers
Readme
certsmith
Unified CLI Hub for Certsmith - Cloudflare SaaS, step-ca, Docker, and PKI Management.
Installation
# Global installation via npm
npm install -g certsmith
# Or via pnpm
pnpm add -g certsmith
# Or run directly via npx / pnpx
npx certsmithFeatures
- Dynamic ASCII Branding: Clean, dynamically-rendered terminal banner via
figlet. - Dual Execution Engine:
- Direct non-interactive execution for CI/CD and scripting (e.g.
certsmith cf sync,certsmith docker status). - Interactive menu hub when launched in terminal without arguments or via
certsmith -i.
- Direct non-interactive execution for CI/CD and scripting (e.g.
- Hierarchical Configuration: Securely store credentials in
~/.config/certsmith/config.jsoncinstead of committing them to shared.envfiles. - Robust Error Diagnostics & Exit Codes: Standardized UNIX exit codes (
0success,1operational failure,2invalid syntax,130user cancellation) with helpful troubleshooting guidance.
Configuration Hierarchy
Certsmith resolves configuration in the following order of precedence:
- CLI Flags:
--config <path>,--domains <list> - Environment Variables:
CLOUDFLARE_API_TOKEN,CERTSMITH_DOMAINS, etc. - Local Project Config:
./certsmith.jsoncor./.certsmithrc.jsonc - User Global Config:
~/.config/certsmith/config.jsonc(recommended for tokens/credentials) - System Defaults
Managing Configuration via CLI
# Initialize personal global config
certsmith config init --global
# Set credentials securely
certsmith config set cloudflare.apiToken "your-api-token" --global
certsmith config set cloudflare.accountId "your-account-id" --global
certsmith config set cloudflare.tunnelId "your-tunnel-uuid" --global
certsmith config set cloudflare.zoneId "your-zone-id" --global
# Check active configuration paths
certsmith config path
# Inspect current configuration
certsmith config getUsage
1. Interactive Mode
Run certsmith without arguments inside an interactive terminal to launch the menu hub:
certsmith2. Direct Subcommands (Scripted / CI)
# Cloudflare Zero Trust & SaaS
certsmith cf sync # Sync hostnames & strict TLS ingress
certsmith cf list # List custom hostnames
certsmith cf tunnel # Inspect tunnel ingress rules
# step-ca Operations
certsmith ca health # Check health of all 6 tiers
certsmith ca provisioners [tier] # List provisioners (cr1..cr3, ce1..ce3)
certsmith ca revoke [tier] # Revoke certificate
# Docker Operations
certsmith docker status # Container health and running status
certsmith docker restart # Stop, remove, and recreate container
certsmith docker build [path] # Build image
certsmith docker logs [lines] # Follow live logs
# PKI Operations
certsmith pki audit # Audit expiry of root & intermediates
certsmith pki verify # Verify full chain integrity with OpenSSL
certsmith pki renew-portal # Renew portal leaf certificates
certsmith pki rotate # Rotate intermediate CA
certsmith pki ceremony # Trigger offline root forge ceremony
# Unified Full Healthcheck
certsmith health # Comprehensive multi-engine checkLicense
MIT © 2026 Certsmith Authors (dyzulk)
