npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@avelor/ttl

v1.0.0

Published

SSL certificate expiry checker. Warns before certs expire. CI-friendly.

Readme

ttl

SSL certificate expiry checker. Warns before certs expire. CI-friendly.

demo

  ✓  avelor.es        76d             expires 2026-08-17 · Let's Encrypt
  ✓  api.avelor.es    76d             expires 2026-08-17 · Let's Encrypt
  ✖  old.avelor.es    expired 3d ago  expires 2026-05-30 · Let's Encrypt

  ✖ 1 cert below threshold (30d).

Install

npm install -g @avelor/ttl

Requires Node.js 18+.


Usage

ttl                            # scan using .ttl.yml in current directory
ttl avelor.es api.avelor.es    # check domains directly
ttl --threshold 14             # warn when less than 14 days remain
ttl --format github            # GitHub Actions annotations

Exit code is 0 if all certs are above the threshold, 1 if any are not — including connection errors.


.ttl.yml

threshold: 30
timeout: 10000

domains:
  - avelor.es
  - api.avelor.es
  - app.avelor.es

Domains passed as CLI arguments override the config file list entirely.

| Field | Description | Default | |-------------|-----------------------------------------------------------|---------| | threshold | Days remaining before a cert is considered a violation | 30 | | timeout | Connection timeout per domain, in milliseconds | 10000 | | domains | List of domains to check (port 443) | — |


CI / GitHub Actions

Use --format github to emit native annotations that appear inline on the PR or workflow summary.

- name: Check SSL certificates
  run: npx @avelor/ttl --format github

Output:

::error::ttl: old.avelor.es expires in -3d (threshold: 30d)
::warning::ttl: staging.avelor.es expires in 12d (threshold: 30d)

Errors for certs below the threshold. Warnings for certs within 1.5× the threshold.

For scheduled monitoring, run it as a cron job:

on:
  schedule:
    - cron: '0 9 * * 1'  # every Monday at 9am

Options

--threshold <days>   Warn when cert expires within N days (default: 30)
--format <type>      human (default), json, github
--config <path>      Path to config file (default: .ttl.yml)
-v, --version
-h, --help

JSON output

ttl --format json | jq '.[] | select(.violation)'

Each entry:

{
  "domain": "avelor.es",
  "daysLeft": 76,
  "expiresAt": "2026-08-17",
  "issuer": "Let's Encrypt",
  "violation": false
}

On connection errors, error replaces the cert fields and violation is true.


How it works

ttl opens a TLS connection to each domain on port 443, reads the peer certificate, and calculates the number of days until valid_to. All domains are checked in parallel. No external dependencies — uses Node's built-in tls module.


License

MIT