certguard
Check SSL certificate expiry from the command line.
Install
pip install certguard
uv tool install certguard
brew install hamzaplojovic/tap/certguard
Usage
Check a single host:
certguard check example.com
Check multiple hosts at once:
certguard check example.com google.com github.com
Use a custom port:
certguard check example.com:8443
Read hosts from a file (one per line, comments with #):
certguard check --file hosts.txt
Output as JSON:
certguard check example.com --json
Set a custom warning threshold (default is 30 days):
certguard check example.com --warn-days 14
Output
certguard prints a table with one row per host. Columns include the host, port, status, expiry date, days remaining, and certificate issuer.
Status is color-coded:
- OK (green) means the certificate is valid and not expiring soon.
- EXPIRING (yellow) means the certificate expires within the warning threshold.
- EXPIRED (red) means the certificate has already expired.
- ERROR (red) means the connection failed (DNS, timeout, refused, etc.).
The exit code is 0 if all certificates are valid and not expiring soon, or 1 if any certificate is expired, expiring, or unreachable.
Options
| Option | Short | Description |
|---|---|---|
--file PATH |
-f |
Read hosts from a file |
--json |
-j |
Output results as JSON |
--warn-days N |
-w |
Warning threshold in days (default: 30) |
--timeout N |
-t |
Connection timeout in seconds (default: 10) |
--version |
-V |
Show version and exit |
Why I built this
I got tired of manually checking certificate expiry dates across a bunch of domains. I wanted a single command I could run (or throw into a cron job) that tells me which certs are about to expire so I can fix them before they cause downtime. certguard does that and nothing more.
License
MIT
Metadata
Release files for certguard 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| certguard-0.1.0.tar.gz | 6.1 kB | Without provenance | Details for certguard-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| certguard-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for certguard-0.1.0-py3-none-any.whl |
Total release size: 12.9 kB
Release files / certguard-0.1.0.tar.gz
| Download URL | certguard-0.1.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42b89ffb4540cf7d3770c62cb49650b0d77ab0e38de3af177797e5044d16b88f
|
|
BLAKE2b-256 checksum How to use checksums |
4ceecfac911ffdc4de76ef84a7ceb83331d43bdd7af0ae0d349eb0163fea84d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Release files / certguard-0.1.0-py3-none-any.whl
| Download URL | certguard-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc32977358964d1d8ceacec59702bafcec0b8b37346e201cc606b84752aa9139
|
|
BLAKE2b-256 checksum How to use checksums |
6a8bc7d14a3ef605a8145ca67386b730cd3349763f572c3c91023d802d5d8b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Security for certguard 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.