Guide

CLI

The urls command. Discover from one source or all of them. Print bare URLs or JSONL. List the sources or start the MCP server.

The package ships a urls binary. Install it globally or run it through npx.

shell
pnpm add -g @agntn/urls

Discover

shell
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.

FlagWhat it does
-p, --providerSource key, or all for every source
-n, --limitStop after this many URLs per source
-m, --matchKeep URLs containing one of these substrings
-f, --filterDrop URLs containing one of these substrings
--url-scopeKeep URLs matching a prefix or glob
--url-out-scopeDrop URLs matching a prefix or glob
--extKeep these path extensions
--has-queryKeep URLs with real query keys
--from, --toCapture date window, 2019 or 2019-03-15
--no-scopeTurn off the default host check
-j, --jsonlOne 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.

text
$ 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

shell
urls discover example.com -p wayback -n 2 -j
json
{"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

shell
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

shell
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

shell
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.