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 prompt

About

Sends a prompt to an LLM and prints the response to stdout. Works with Anthropic and OpenAI APIs. You pipe content in, optionally set a system prompt, and get the response back - no curl commands, no JSON escaping, no response parsing. Temperature defaults to 0 for deterministic output.

The problem

You need to call an LLM from a shell script. You write a curl command with JSON escaping, header management, and response parsing. The prompt changes and you break the JSON. The API returns an error and you parse it wrong.

Before and after

Before

curl -s https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"Summarize this"}]}'

After

cat article.md | vrk prompt --system 'Summarize this' --model claude-sonnet-4-6

Example

cat article.md | vrk prompt --system 'Summarize this' --model claude-sonnet-4-6 --json

Exit codes

CodeMeaning
0Success
1API failure, budget exceeded, or schema mismatch
2Usage error - no input, missing flags

Flags

FlagShortTypeDescription
--model-mstringLLM model (default from VRK_DEFAULT_MODEL or claude-sonnet-4-6)
--systemstringSystem prompt text, or @file.txt to read from file
--budgetintExit 1 if prompt exceeds N tokens
--fail-fboolFail on non-2xx API response or schema mismatch
--json-jboolEmit response as JSON envelope with metadata
--quiet-qboolSuppress stderr output
--schema-sstringJSON schema for response validation
--explainboolPrint equivalent curl command, no API call
--retryintRetry N times on schema mismatch (escalates temperature)
--endpointstringOpenAI-compatible API base URL