Skip to content

Configuration

Configuration lives in .env at the repo root (start from .env.example). docker-compose.yml forwards these into the backend container.

VariableMeaning
ANTHROPIC_API_KEYYour Claude API key. Without it the app runs but every call to Claude fails.
SUMISURA_CLAUDE_BACKENDapi (default) calls the Claude API. claude-code runs Selection, Rewrite and Cover Letter drafting through headless Claude Code (claude -p) on your own Claude subscription. See below.
CLAUDE_CODE_OAUTH_TOKENLong-lived token from claude setup-token, used by the claude-code backend.

With SUMISURA_CLAUDE_BACKEND=claude-code, Selection, Rewrite and Cover Letter drafting run as claude -p subprocesses authenticated with your own subscription (Pro/Max) instead of per-token API billing. Run claude setup-token on your machine and put the token in CLAUDE_CODE_OAUTH_TOKEN. The claude binary must be on the backend’s PATH (the published image does not include it yet). ANTHROPIC_API_KEY is removed from the subprocess environment, otherwise Claude Code would bill the key. The cost shown for a Generation is an API-equivalent estimate, not real spend, and the calls count against your subscription’s usage limits.

RAL estimation, contact research, capture hints and Application Method inference still use the API and need ANTHROPIC_API_KEY.

This is for your own use only: Sumisura is single-user and self-hosted, and must not serve anyone else’s requests through your subscription. See ADR-0047.

Each kind of call runs on a model chosen for that kind of work. Calls whose output you review, and the web-research calls, run on Sonnet; calls that only read structured fields out of a previous call’s notes run on Haiku.

Call siteDefaultWhat it doesOverride
selection_rewriteSonnet 5Selection + Rewrite for a GenerationSUMISURA_MODEL_SELECTION_REWRITE
selection_previewSonnet 5Selection-only previewSUMISURA_MODEL_SELECTION_PREVIEW
cover_letterSonnet 5Cover letter draftingSUMISURA_MODEL_COVER_LETTER
ral_researchSonnet 5Salary-range researchSUMISURA_MODEL_RAL_RESEARCH
ral_extractionHaiku 4.5Pulling the range out of those notesSUMISURA_MODEL_RAL_EXTRACTION
application_method_inferenceHaiku 4.5How one appliesSUMISURA_MODEL_APPLICATION_METHOD_INFERENCE
contact_researchSonnet 5Contact researchSUMISURA_MODEL_CONTACT_RESEARCH
contact_extractionHaiku 4.5Pulling the contact out of those notesSUMISURA_MODEL_CONTACT_EXTRACTION
capture_hintsHaiku 4.5Company and Job Title from a Job Description pasted on the phoneSUMISURA_MODEL_CAPTURE_HINTS
import_master_dataSonnet 5Draft Entries from a pasted CV on the Import pageSUMISURA_MODEL_IMPORT_MASTER_DATA

Override one call site, or all of them:

Terminal window
SUMISURA_MODEL_SELECTION_REWRITE=claude-opus-5 # try Opus on Rewrite alone
SUMISURA_MODEL_DEFAULT=claude-haiku-4-5 # everything at once

SUMISURA_MODEL_DEFAULT sets every call site at once. A per-call-site variable beats SUMISURA_MODEL_DEFAULT, which beats the built-in default. Values are passed to the API unchanged — an unknown model id does not stop the backend starting, the affected call just fails with the API’s own error.

Restart the backend after changing .env.

The app tracks usage and estimated cost per Generation and in total — see the usage view. Estimates come from a price table in the repo; a model missing from it estimates at $0 and logs a warning. Your actual bill is whatever Anthropic charges your key.

VariableMeaning
BIND_ADDR127.0.0.1 by default. See LAN-reachable mode.
SUMISURA_API_URLWhere the tailor-cv skill reaches the backend, http://127.0.0.1:8080 by default. Set it in .env when the app runs on another machine, such as a home server; the skill reads it, the backend does not.
LAN_AUTH_TOKENShared token required in LAN mode. Unset means the check is off.
LAN_AUTH_USERWith LAN_AUTH_PASSWORD, lets a browser sign in with a username and password instead of the token. Needs LAN_AUTH_TOKEN; set both or neither. See LAN-reachable mode.
LAN_AUTH_PASSWORDThe password that goes with LAN_AUTH_USER. Changing it signs every browser out; the token keeps working for the extension and the skill.
PORTThe port the backend listens on inside its container, 8080 by default. Change the published port in the compose file instead.
LISTEN_HOSTThe address the backend binds, 0.0.0.0 by default. Leave it in a container, where BIND_ADDR decides who can reach the published port. Running the binary directly on a host behind a reverse proxy, set 127.0.0.1 so only the proxy can reach it.
DATA_DIRWhere Master Data and records live. The default suits a normal checkout.
PROJECT_ROOTThe directory holding template/, output/ and data/ for rendering. The default suits a normal checkout.
STATIC_DIRThe built frontend the backend serves (ADR-0039). Set inside the release image; leave unset from a checkout, where Vite serves the frontend.
SUMISURA_VERSIONWhich published image docker-compose.release.yml runs. Unset means latest; pin a tag for deliberate upgrades.