Skip to content

urlscan/urlscan-cli

Repository files navigation

urlscan-cli

The official urlscan CLI.

Installation

Built Binaries

The built binaries can be found on the releases page.

Note

Apple's Gatekeeper may prevent the binary from running. Use xattr -c urlscan to unblock it or install via Homebrew Cask (see below).

macOS/Linux

Homebrew Cask is supported for macOS/Linux:

brew install --cask urlscan/tap/urlscan-cli

Windows

Note

There is a WinGet package but it's not maintained by urlscan. Use at your own risk. For any issues regarding the WinGet package, please report them to the winget-pkgs repository and not here

Manual Build

See the docs.

Usage

Configuring Your API Key

There are two ways for configuring your API key:

  1. URLSCAN_API_KEY environment variable
  2. Keyring (e.g., macOS Keychain, GNOME Keyring)

Note

Ordered by the higher precedence.

If you want to use the keyring, you can set it via the terminal or via standard input:

$ urlscan key set
Enter a urlscan.io API key:
# or
$ echo "<api_key>" | urlscan key set -

Note

Keyring suport for Linux depends on GNOME Keyring. See troubleshooting for details.

Basic Commands

Scan

urlscan scan submit <url>
urlscan scan result <uuid>
urlscan search <query>

Alternatively, you can pass an argument via the standard input by passing -.

echo "<uuid>" | urlscan scan result -

See urlscan --help and also the document for more details.

Proxy

HTTP_PROXY and HTTPS_PROXY environment variables are respected by default. Additionally, you can set the proxy via the --proxy option:

urlscan --proxy http://proxy:1234 <command>