docs: document TREEHOUSE_DIR and TREEHOUSE_NO_UPDATE_CHECK env vars#34
Open
e-jung wants to merge 2 commits into
Open
docs: document TREEHOUSE_DIR and TREEHOUSE_NO_UPDATE_CHECK env vars#34e-jung wants to merge 2 commits into
e-jung wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Two environment variables are part of treehouse's public API surface but are absent from the docs:
TREEHOUSE_DIR— exported into thetreehouse getsubshell (cmd/get.go:58) and read bytreehouse return(cmd/return_cmd.go:82) to know which worktree to return when no path is given. Users see it in their shell aftertreehouse get.TREEHOUSE_NO_UPDATE_CHECK— set to1to 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 toAGENTS.md, which already has a Config section.A reviewer (the
no-mistakesdocument step) caught one accuracy issue in the initial draft: lifecycle hooks run insidepool.Acquire()beforeTREEHOUSE_DIRis added to the subshell env, so hooks do not seeTREEHOUSE_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-mistakespipeline: intent, rebase, review, test, document, and lint all passed with zero findings. The document step's accuracy fix (hook visibility ofTREEHOUSE_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_DIRwas produced by the no-mistakes document review step and verified against the code path incmd/get.goandinternal/hooks.