Requirements
whyfile post-processes graphify graphs and depends on graphifyy (the graphify runtime that every backend calls), which is installed automatically (ADR-0010). By default it uses your Claude Pro/Max subscription via the Claude Code CLI, so no API key is required. To use a billed API key instead, see LLM backend.
Installation
whyfile is a standalone dev tool — install it the way you install your other CLIs:
| You have… | Install with |
|---|---|
uv | uvx whyfile — or uv tool install whyfile to put it on PATH |
npm / Node | npx whyfile — delegates to uv; if uv is missing it prints the one-line install |
| neither / no Python | install uv (curl -LsSf https://astral.sh/uv/install.sh | sh, brew install uv, or winget install astral-sh.uv), then uvx whyfile — uv brings its own Python |
claude CLI (subscription default) or an API key — see LLM backend.
For an API backend, add the provider extra so graphify has its SDK (the subscription backend needs neither):
LLM backend
By default,whyfile uses your Claude Pro/Max subscription through the
Claude Code CLI (claude): no API key,
no per-token billing (the run still counts against your plan’s usage limits; see
What a run costs). It falls back to a billed API key if the CLI isn’t
available.
--backend | Behaviour |
|---|---|
| (unset) | Subscription if the claude CLI is on your PATH, else a detected API key |
subscription | Force the Claude Code CLI (subscription auth) |
api | Force a billed API key (ANTHROPIC_API_KEY / GEMINI_API_KEY) |
claude / gemini / … | Force a specific graphify backend |
GRAPHIFY_INTENT_BACKEND. For subscription mode, install the claude
CLI and run it once to sign in. For API mode, install the matching extra
(graphifyy[anthropic] or graphifyy[gemini]) and provide the key.
Keep API keys out of .env and your shell history
If you do use an API key, prefer a password-manager CLI over inlining the secret. With
1Password’s op, inject it at runtime so it
never lands on disk in plaintext:
op run so the secret lives only for that process:
.env risks leaking into git history, CI logs, and backups; a
manager keeps it encrypted, access-audited, and revocable. Best of all, the default
subscription backend needs no key at all.
graphify runtime dependency
Every backend routes through graphify’sgraphify.llm, so whyfile declares graphifyy as a runtime dependency; pip install whyfile installs it (ADR-0010). For an API backend, add the provider extra so graphify’s SDK is present:
claude), installed and signed in. If the graphify runtime is somehow missing, whyfile exits immediately with a clear install message rather than failing deep inside a run.