Skip to content

Environment variables ​

VariableWhat it changesDefault
LOGBOOK_DBLog Book: The warehouse file, an absolute path; its lock and host files move with it$XDG_DATA_HOME/log-book/warehouse.db, else ~/.local/share/log-book/warehouse.db
XDG_DATA_HOMELog Book: Log Book's data directory (log-book inside it)
OpenCode: OpenCode's data directory (opencode inside it)
~/.local/share
LOGBOOK_DEBUGLog Book: 1 prints a stack trace before an error's lineunset
CLAUDE_BINLog Book: The claude binary labelling runsclaude on the PATH
CLAUDE_CONFIG_DIRClaude Code: Claude Code's configuration directory; Log Book reads the projects directory inside itClaude Code's own default
OPENCODE_DBOpenCode: OpenCode's database file; a relative path is inside its data directoryOpenCode's own default
OPENCODE_DISABLE_CHANNEL_DBOpenCode: 1 or true reads opencode.db, instead of the newest opencode-<channel>.dbOpenCode's own default

LOGBOOK_DB moves the warehouse file only; XDG_DATA_HOME moves Log Book's whole data directory, its sync logs among them, and the warehouse with it unless LOGBOOK_DB is set too. XDG_DATA_HOME also moves OpenCode's data, as OpenCode itself reads it.

ANTHROPIC_API_KEY is not in the table because it changes nothing Log Book does. Labelling checks only whether it is set, and when it is, warns before the first request that Claude Code may bill the run to that key instead of your plan.

Source-available under the PolyForm Noncommercial License 1.0.0.