26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds · 26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds

vrk urlinfo

About

Breaks URLs into their components - scheme, host, port, path, query parameters - as structured JSON. You can extract a single piece with –field, including nested query parameters using dot-path syntax. Pure parsing, no network calls.

The problem

You have a URL from an API response and need to extract a query parameter to pass to the next pipeline step. Splitting on ? and & in bash is fragile - encoded characters, missing parameters, and multiple values for the same key all break your parsing.

Before and after

Before

URL="https://api.example.com/callback?code=abc123&state=xyz"
echo "$URL" | grep -oP 'code=\K[^&]+'
# breaks if code= is missing (grep exits 1, pipeline fails)
# breaks on percent-encoded values like code=abc%3D123
# not portable: -P (Perl regex) is GNU grep only

After

echo "$URL" | vrk urlinfo --field query.code

Example

echo 'https://api.example.com:8443/v2/users?page=2' | vrk urlinfo

Exit codes

CodeMeaning
0Success
1Invalid URL that cannot be parsed, I/O error
2Interactive TTY with no stdin or positional arg

Flags

FlagShortTypeDescription
--field-FstringExtract a single field as plain text (supports dot-path for query params)
--json-jboolAppend metadata trailer
--quiet-qboolSuppress stderr output