CLI
The package ships a urls binary. Install it globally or run it through npx.
pnpm add -g @agntn/urls
Discover
urls discover example.com -p wayback -n 20
One URL per line, nothing else, so it pipes straight into grep, sort -u or whatever you feed URLs to. A reader that quits early, like head, ends the command quietly. No EPIPE stack trace confetti.
| Flag | What it does |
|---|---|
-p, --provider | Source key, or all for every source |
-n, --limit | Stop after this many URLs per source |
-m, --match | Keep URLs containing one of these substrings |
-f, --filter | Drop URLs containing one of these substrings |
--url-scope | Keep URLs matching a prefix or glob |
--url-out-scope | Drop URLs matching a prefix or glob |
--ext | Keep these path extensions |
--has-query | Keep URLs with real query keys |
--from, --to | Capture date window, 2019 or 2019-03-15 |
--no-scope | Turn off the default host check |
-j, --jsonl | One JSON record per line |
Lists are comma separated. Typed a flag the command doesn't know? It's refused, and the error lists the real ones. Only URLs go to stdout, so a pipe won't get a lecture about your typo.
$ urls discover example.com --provder wayback
Invalid arguments: unknown option "--provder"; takes --provider (-p), --limit (-n), --match (-m), --filter (-f), --scope, --url-scope, --url-out-scope, --ext, --has-query, --from, --to, --jsonl (-j)
Filters and scope explains what each filter keeps.
JSONL
urls discover example.com -p wayback -n 2 -j
{"url":"http://example.com:80/","input":"example.com","source":"wayback","firstSeen":"2002-01-20T14:25:10Z","lastSeen":"2002-01-20T14:25:10Z"}
{"url":"http://www.example.com:80/","input":"example.com","source":"wayback","firstSeen":"2002-03-28T01:28:21Z","lastSeen":"2002-03-28T01:28:21Z"}
Fields you don't have stay out of the line instead of showing up as null.
Every source at once
urls discover example.com -p all -n 20
Each source gets its own block with a count, and a failing source gets one line with its error. With -j you get the successful records only, each tagged with its source.
Without -p
The CLI picks a source the way discoverWithFallback does: configured credentials first, then AlienVault OTX, then the next one when access fails. Discovering URLs has the rules.
Providers
urls providers
Prints a table of the registered sources, their endpoints and whether they need a key. urls providers --json prints the same listings as JSON. Pick the format your next reader needs, even if that reader is a pipe.
MCP server
urls mcp
Starts the MCP server on stdio. Agents shows the client config.
Exit codes
0 means the command finished, an empty result included. A bad argument or a failed discovery exits 1. With -p all some sources can fail and the command still exits 0. They don't have to agree to finish the job.