expirely-cli

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0

README

expirely

Find every TLS certificate you serve and when it expires.

expirely connects to each target, completes a TLS handshake, reads the certificate chain and closes the connection. It reports what is expired, what expires soon and what could not be read, in a short list for people and in JSON for CI and agents. It sends no application data, holds no credentials and never touches a private key.

expirely example.com api.example.com:8443   # scan targets
expirely -f targets.txt --warn-days 21       # read targets from a file
kubectl get ingress -A -o jsonpath='{range .items[*].spec.tls[*].hosts[*]}{@}{"\n"}{end}' | expirely -f -
expirely --json example.com | jq '.results[] | select(.status != "ok")'

Exit code 1 means a certificate is expired or expiring, so the same command works as a CI gate or a cron alert.

Status

expirely is in early development. Until 1.0, a release can change flags, JSON fields and codes, and the changelog says what to change.

Install

With Go 1.27 or newer:

go install github.com/bycavii/expirely-cli/cmd/expirely@latest

Documentation

The documentation lives in docs and runs locally with just and Node.js 18 or newer:

just docs   # http://localhost:3000

It covers targets and files, CI and cron, every flag, the JSON output and every exit and error code.

Contributing

See CONTRIBUTING.md.

License

expirely is licensed under Apache-2.0.

Directories

Path Synopsis
cmd
expirely command
Command expirely finds TLS certificates and reports when they expire.
Command expirely finds TLS certificates and reports when they expire.
internal
cli
Package cli implements the expirely command line: it parses arguments, writes results to stdout and errors to stderr, and returns the process exit code instead of calling os.Exit, so tests drive it through Run.
Package cli implements the expirely command line: it parses arguments, writes results to stdout and errors to stderr, and returns the process exit code instead of calling os.Exit, so tests drive it through Run.
probe
Package probe connects to a TLS endpoint and reads the certificate chain it presents.
Package probe connects to a TLS endpoint and reads the certificate chain it presents.
scan
Package scan turns probe results into findings: for each target, whether the certificate chain it serves is ok, expiring within a warning window, expired, or could not be read.
Package scan turns probe results into findings: for each target, whether the certificate chain it serves is ok, expiring within a warning window, expired, or could not be read.
target
Package target parses the endpoints expirely scans.
Package target parses the endpoints expirely scans.
tlstest
Package tlstest runs TLS servers on 127.0.0.1 with certificates generated in the test, so that tests read real handshakes without the network.
Package tlstest runs TLS servers on 127.0.0.1 with certificates generated in the test, so that tests read real handshakes without the network.
ui
Package ui styles what expirely shows a person at a terminal.
Package ui styles what expirely shows a person at a terminal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL