CLI tool to check domain registration expiration dates
- Go 100%
- Run checkDomain calls concurrently with goroutines + WaitGroup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .gitignore | ||
| CLAUDE.md | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| mise.toml | ||
| README.md | ||
domexp
CLI tool to check domain registration expiration dates.
Usage
domexp [file]
Reads domain names from domains.txt (or a custom file) and prints a sorted table with days until expiry.
DOMAIN EXPIRES DAYS LEFT
------------------------------------------------------------
example.com 2026-03-01 4 days !!!
other.org 2026-05-15 79 days !
mysite.net 2027-01-20 329 days
broken.eu ERROR: ...
Urgency indicators:
!!!— expires in less than 30 days!— expires in less than 90 days
Domain file format
One domain per line. Blank lines and # comments are ignored.
# production
example.com
mysite.net
# staging
staging.example.com
Lookup strategy
For each domain, expiry is resolved in this order:
- Infomaniak API — if
INFOMANIAK_TOKENis set, domains registered at Infomaniak are resolved instantly (required for.eudomains, which EURid does not expose via RDAP or WHOIS) - RDAP — standard protocol, used for most TLDs
- WHOIS — fallback when RDAP is unavailable or returns no expiry
Infomaniak setup
Create an API token at manager.infomaniak.com/v3/infomaniak-api with the Domain scope, then add it to a .env file next to the binary:
INFOMANIAK_TOKEN=your_token_here
Build
go build