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

fairbooks-certificate-expiry

v0.2.0

Published

Fairbooks Certificate Expiry: an MCP agent that tracks expiry for TLS certificates, domains, licences and vendor certificates of insurance from CSV inventories, checks COIs against your written requirements (per vendor category), extracts COI fields from

Readme

Fairbooks Certificate Expiry (fairbooks-certificate-expiry)

Expiry tracking for TLS certificates, domains, licences and vendor certificates of insurance, with chase-email drafts. Paid renewals, production changes and sends are one human click.

Part of Fairbooks Machine domain agents: one agent, one process, nothing outside its lane. Built on fairbooks-core. MIT, Node ≥ 20, runs on your machine, no account or API key needed.

What it does

Give Fairbooks Certificate Expiry an inventory CSV (id, type, name, holder, issuer, expires, auto_renew, renewal_cost, owner, key_type, key_bits, signature, registrar_lock; names matched loosely) and, if you track vendor insurance, a COI CSV (vendor, coverage, limit, expires, additional_insured, certificate_id) plus your own written requirement list (coverage, min_limit, additional_insured). It:

  • sorts everything by days left: expired, critical (≤ 14 days), warning (≤ 30), upcoming (≤ 90), ok; thresholds are settable;
  • flags TLS certificates with weak keys (RSA < 2048, EC < 256), SHA-1/MD5 signatures or a self-signed issuer, domains with auto-renew or registrar lock off, and items with no owner or no expiry date;
  • says what each item needs next: a confirmation that auto-renew worked, a paid renewal, or a production change to install a new certificate;
  • checks each vendor's COIs against your requirements: missing coverage, limit below the minimum, additional insured missing, expired or expiring;
  • checks each vendor against a requirement profile if you give one as JSON: a default list, per-category lists (for example a stricter list for electrical contractors) and a vendor→category map; it also checks waiver of subrogation when a requirement asks for it. The profile is schema-checked, so a typo fails with the exact JSON path (fairbooks-certificate-expiry validate-config coi_requirements requirements.json);
  • extracts COI fields from certificate text (certs_extract_coi): insured, coverages, limits, policy dates, additional insured, waiver of subrogation, from text exported from ACORD 25-style PDFs (for example pdftotext -layout). It does not read PDF files or images itself. It is pattern matching, so every row is marked needs_review with its source line and any warnings; a person checks it against the certificate before using it;
  • compares two inventory snapshots (certs_diff_inventory): renewed, added, removed, expiry moved earlier, auto-renew turned off, owner changed or removed, new weak-key flags, status worse — riskiest first;
  • writes expiry-report.md, expiry-report.html (self-contained, no scripts), expiry.csv (blank reviewer columns) and renewals.ics (reminders at the warning and critical thresholds and one day before, or your own reminder_days), records the output hash in the audit line, and drafts one chase email per vendor with gaps, marked DRAFT;
  • optionally runs a live TLS check (certs_tls_live_check, see below).

Apart from the opt-in live TLS check, Fairbooks Certificate Expiry reads only the files you export. It does not query registrars or insurers.

Live TLS check (opt-in, network)

certs_tls_live_check is the only tool that touches the network. For each host you list (or each TLS row in your inventory with from_inventory: true, at most 25 per call) it opens one TLS handshake, reads the certificate the server presents and closes the connection. It sends no application data and changes nothing. It reports expiry, issuer, SAN, key, chain trust (chain_untrusted), hostname_mismatch, self_signed, and compares with your inventory (inventory_mismatch when the live expiry differs from your record, not_in_inventory). It writes live-tls.csv.

It is off by default: the policy is ask, so each call waits for a named person's yes (or an explicit --auto certs_tls_live_check opt-in), and it is blocked in review mode. Its tests use an injected transport and a local TLS server with a throwaway self-signed certificate; they make no internet calls.

Exports it reads

Table inputs can be CSV, TSV, semicolon- or pipe-separated text, Excel .xlsx, JSON or JSONL. A file already in this agent's own columns is read as it is. The exports below are recognised by their column names and mapped onto those columns; dates become YYYY-MM-DD, amounts plain decimals (both decimal marks), and yes/no columns yes/no. Each result lists, under sources, which export was recognised, which columns were mapped, and any rows skipped or dates that could be read two ways.

Certificates, domains and licences (arguments certificates, previous)

| System | Export | Layout checked against vendor docs | |---|---|---| | AWS Certificate Manager | aws acm list-certificates JSON | no | | crt.sh | Certificate search JSON (output=json) | no |

Certificates of insurance (argument cois)

No named exports: other column names are matched by a list of common alternatives.

Columns named differently? Run npx fairbooks-certificate-expiry inspect <file> to see how a file is read (column names and shapes only, never values), then name your columns in fairbooks-sources.json in the root:

{ "files": { "exports/users.csv": { "columns": { "email": "Work E-mail" }, "date_order": "dmy" } } }

Where a layout says "checked", its column names were compared with the vendor's documentation on that date. The other layouts were written from knowledge of the export and were not checked. None was tested against a live account. If a real export does not match, the result says which columns were missing; please report it.

Install

npm install -g fairbooks-certificate-expiry
fairbooks-certificate-expiry demo        # runs on the bundled fictional sample data

As an MCP server

Claude Code

claude mcp add fairbooks-certificate-expiry -- npx -y [email protected] mcp --root /path/to/your/exports

Cursor / Claude Desktop / VS Code / Windsurf

{ "mcpServers": { "fairbooks-certificate-expiry": { "command": "npx", "args": ["-y", "[email protected]", "mcp", "--root", "/path/to/your/exports"] } } }

--root is the only folder the tools can read or write. Paths outside it are refused.

Tools

| Tool | Policy | What it does | |---|---|---| | certs_scan | allow | Days left, status, flags and next step per item; COI gaps per vendor | | certs_write_report | allow | Write expiry-report.md, expiry-report.html, expiry.csv, renewals.ics to fairbooks-out/certs (output hash in the audit line) | | certs_diff_inventory | allow | What changed between a previous and the current inventory export | | certs_extract_coi | allow | Extract COI rows from certificate text into coi-extracted.csv, every row needs_review | | certs_tls_live_check | ask (Auto-eligible) · network | Opt-in TLS handshake per listed host; writes live-tls.csv. Blocked in review mode | | certs_draft_chase | ask (Auto-eligible) | Write chase email drafts to fairbooks-out/certs/chase-drafts (not sent) | | certs_request_chase_send | ask · one-click | After a named human approves, record a draft as approved to send | | certs_request_renewal | ask · one-click | After a named human approves, record a paid renewal for whoever holds the card | | certs_request_production_change | ask · one-click | After a named human approves, record a certificate install or rotation for your change process | | purchase_renewal | block | Listed so agents see the refusal. Fairbooks Certificate Expiry never pays. | | deploy_certificate | block | Listed so agents see the refusal. Fairbooks Certificate Expiry never touches a server. | | send_email | block | Listed so agents see the refusal. Fairbooks Certificate Expiry never sends. |

Any other tool name is blocked. fairbooks_info shows the pinned model, mode, caps and every decision.

MCP prompt

certs_renewal_review (arguments certificates, optional cois, requirements, previous, as_of) walks a host model through the review: validate the profile, scan, diff, optional live check (after asking), COI text extraction, report, chase drafts, and the steps a person clicks.

Modes

  • Review (--mode review): read and report only.
  • Assist (default): the policy above. ask returns an approval_id; a person approves once with fairbooks-certificate-expiry approve <id> --as "Your Name".
  • Auto (--mode auto --auto <tool,...>): off by default, opt-in per action, with step/spend caps (--max-steps, --max-spend) and a kill switch (fairbooks-certificate-expiry kill).

certs_draft_chase and certs_tls_live_check can go on Auto if you opt in. A vendor-facing send (binding_send), a renewal that costs money (move_money) and a production change (production_deploy) each stay one-click even in Auto; --auto on those tools is refused. Paying, deploying and sending stay blocked.

Go-live, revoking access, deleting personal data, moving money, legally binding sends and production deploys always need a person's click, in every Fairbooks pack.

CLI

fairbooks-certificate-expiry tools
fairbooks-certificate-expiry call certs_scan '{"certificates":"certificates.csv","cois":"cois.csv","requirements":"requirements.csv","warn_days":45}'
fairbooks-certificate-expiry eval          # private evals on the bundled fixtures

Every call is written to .fairbooks/audit.jsonl (hash-chained JSONL; arguments stored as a hash). Read it with fairbooks-audit-evidence or npx -y -p fairbooks-core fairbooks-verify-log .fairbooks/audit.jsonl.

What it is not

  • Not a certificate scanner or monitoring service. It does not discover certificates or run on a schedule; it checks the inventory you give it (and, if you ask, the hosts you list). Keep that inventory current.
  • Not a PDF reader or OCR tool. COI extraction works on text you export, is pattern-based, and every value needs a person's check.
  • Not a COI management platform, and not insurance or legal advice. It flags possible gaps against your written requirements; a person decides.
  • It never buys, renews, installs or sends anything.
  • Not fully autonomous: anything risky waits for a named person.

Data

Everything runs locally on files you choose. No telemetry. No network calls, except certs_tls_live_check when a person approves it (or opts it in to Auto). The bundled fixtures are fictional.

License

MIT © 2026 Kurt Francisco. Source: https://github.com/fpavia111-creator/fairbooks-agents/tree/master/packages/fairbooks-certificate-expiry