shelf Docs
On this page

State and paths

VariableDefaultEffect
SHELF_HOME$HOME/.shelfWhere shelf keeps its config, database, library, object store, archive and dashboard token.
HOMEThe OS home directoryYour home: the default SHELF_HOME, the user-level skill directories (~/.agents/skills, ~/.claude/skills, …), and the base for harness config directories. On Windows, the OS home (%USERPROFILE%) is used when HOME isn't set.
CLAUDE_CONFIG_DIR$HOME/.claudeClaude Code's config directory: shelf setup writes hooks to its settings.json.
CODEX_HOME$HOME/.codexCodex's config directory: shelf setup writes hooks to its hooks.json.

SHELF_HOME is how you keep separate libraries, or test without touching your real one:

terminal
export SHELF_HOME="$(mktemp -d)"
shelf setup

shelf setup also writes to your user-level skill directories and harness configs, under HOME, CLAUDE_CONFIG_DIR and CODEX_HOME. Point those somewhere temporary too when experimenting.

Actor detection

Every change is recorded in the activity log with an actor. shelf picks the first that applies:

OrderSourceActor
1--actor <name><name>
2SHELF_ACTORits value
3CODEX_THREAD_ID or CODEX_SESSION_ID is setagent:codex
4CLAUDECODE is setagent:claude-code
5AI_AGENT is setagent: plus its first word, lowercased: claude-code_2-1-289_agent gives agent:claude-code
6stdin is a terminaluser
7otherwiseunknown

Codex is checked before Claude Code because harnesses pass their environment on: a Codex session started from Claude Code sees both, and Codex is the one running shelf. AI_AGENT lets any harness that sets it be recognised without changes to shelf.

Hooks don't use this order: they record agent:<harness> from their --harness option. The dashboard records user:dashboard.

The actor matters in one place besides the log: actors starting with agent: can't import skills from git sources unless allowAgentImports is true. Set SHELF_ACTOR for scheduled jobs (SHELF_ACTOR=cron shelf sweep) so their entries are named.

Other variables

VariableRead byEffect
WSL_DISTRO_NAMEshelf uiWhen set, the browser is opened with cmd.exe /c start (Windows' browser from WSL) instead of xdg-open.
GIT_TERMINAL_PROMPTshelf add, shelf pullshelf sets it to 0 for its git calls, so git never waits for a password. Your other git environment (SSH agent, credential helpers) applies.
TMPDIRshelf add, shelf pullWhere sources are cloned temporarily (the system temp directory).
SHELF_BINThe e2e testsPath of a compiled binary to test instead of the source.
NPM_SCOPEbun run pack:npmThe npm scope to package under (default @limyuquan).