Environment Variables
vrk reads environment variables in only two of its 28 tools: vrk prompt and vrk kv. The other tools need no configuration, and vrk has no config file.
vrk prompt
vrk prompt is the only tool that needs an environment variable. Set one API key to start.
| Variable | Required | What it does | Default |
|---|---|---|---|
ANTHROPIC_API_KEY | Required for Anthropic models | Authenticates requests to the Anthropic API | none |
OPENAI_API_KEY | Required for OpenAI models | Authenticates requests to the OpenAI API | none |
VRK_LLM_KEY | Optional | Generic Bearer token for OpenAI-compatible endpoints that don’t use the standard key names | none |
VRK_DEFAULT_MODEL | Optional | Default model when --model is not specified | claude-sonnet-4-6 or gpt-4o-mini |
VRK_LLM_URL | Optional | Base URL for an OpenAI-compatible API endpoint | Provider default |
At least one of ANTHROPIC_API_KEY or OPENAI_API_KEY is required. Provider selection is automatic: claude-* models use Anthropic, gpt-* models use OpenAI. If only one key is set, that provider is used regardless of model name.
When VRK_LLM_URL (or --endpoint) is set, there is no default model. Pass --model or set VRK_DEFAULT_MODEL, or prompt exits 2 with “–model is required when using –endpoint”.
vrk kv
vrk kv works without setup. The only environment variable sets where the database is stored.
| Variable | Required | What it does | Default |
|---|---|---|---|
VRK_KV_PATH | Optional | Path to the SQLite database file | ~/.vrk.db |
Everything else
The other 26 tools (tok, chunk, grab, mask, validate, jwt, epoch, uuid, sse, coax, links, plain, jsonl, emit, assert, sip, throttle, digest, base, recase, slug, moniker, pct, urlinfo, pdf, sql) need no environment variables. They work without setup.
Flag precedence
When both a flag and an environment variable are set, the flag wins:
| Flag | Overrides |
|---|---|
--model | VRK_DEFAULT_MODEL |
--endpoint | VRK_LLM_URL |
VRK_KV_PATH has no flag equivalent. Set it in your shell profile or per-pipeline with export.