Skip to content

docs: document TREEHOUSE_DIR and TREEHOUSE_NO_UPDATE_CHECK env vars#34

Open
e-jung wants to merge 2 commits into
kunchenguid:mainfrom
e-jung:docs/env-vars
Open

docs: document TREEHOUSE_DIR and TREEHOUSE_NO_UPDATE_CHECK env vars#34
e-jung wants to merge 2 commits into
kunchenguid:mainfrom
e-jung:docs/env-vars

Conversation

@e-jung

@e-jung e-jung commented Jun 22, 2026

Copy link
Copy Markdown

Intent

Two environment variables are part of treehouse's public API surface but are absent from the docs:

  • TREEHOUSE_DIR — exported into the treehouse get subshell (cmd/get.go:58) and read by treehouse return (cmd/return_cmd.go:82) to know which worktree to return when no path is given. Users see it in their shell after treehouse get.
  • TREEHOUSE_NO_UPDATE_CHECK — set to 1 to skip the startup background update check (cmd/root.go:33). Useful in CI, automation, or air-gapped environments.

Approach

Add a concise Environment Variables section to README.md (placed after Configuration/Hooks, before Development) — one short paragraph per variable: what it does + when you'd set it. Add a matching compact section to AGENTS.md, which already has a Config section.

A reviewer (the no-mistakes document step) caught one accuracy issue in the initial draft: lifecycle hooks run inside pool.Acquire() before TREEHOUSE_DIR is added to the subshell env, so hooks do not see TREEHOUSE_DIR. The README wording was corrected to scope the variable to scripts inside the subshell and to explicitly note that hooks don't see it.

Scope

Two files, docs-only:

  • README.md — new Environment Variables section.
  • AGENTS.md — matching Environment Variables section.

No code changes.

Risk

None. Docs-only; zero build risk.

Verification

Validated through the no-mistakes pipeline: intent, rebase, review, test, document, and lint all passed with zero findings. The document step's accuracy fix (hook visibility of TREEHOUSE_DIR) is included in this PR and verified against the code.

AI disclosure

Human-reviewed. The documentation was drafted autonomously and reviewed by a human operator before opening. The accuracy correction regarding hook visibility of TREEHOUSE_DIR was produced by the no-mistakes document review step and verified against the code path in cmd/get.go and internal/hooks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant