diff --git a/AGENTS.md b/AGENTS.md index 99d0cc4..4cfcddb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -81,3 +81,9 @@ pre_destroy = ["./scripts/teardown.sh"] ``` Hooks are ignored in repo-level config for safety. + +## Environment Variables + +- `TREEHOUSE_DIR` - exported into the `treehouse get` subshell (worktree path); `treehouse return` reads it to pick the worktree when no path is given. +- `TREEHOUSE_LEASE_HOLDER` - default lease holder for `get --lease` when `--lease-holder` is not given; recorded on the lease and shown by `status`. +- `TREEHOUSE_NO_UPDATE_CHECK` - set to `1` to disable the startup background update check (CI, automation, air-gapped). diff --git a/README.md b/README.md index 83dceca..47c3564 100644 --- a/README.md +++ b/README.md @@ -298,6 +298,14 @@ Commands in each list run sequentially in the worktree directory, via the OS she If a command exits non-zero, treehouse logs the command, exit code, and stderr, then continues with the remaining commands. A failing hook does not fail the overall `get`, `destroy`, or `prune` operation. +## Environment Variables + +- **`TREEHOUSE_DIR`** — `treehouse get` exports this into the subshell, set to the worktree path it drops you into, and `treehouse return` reads it to know which worktree to return when no path is given. You usually don't set it yourself; reference it from your own scripts inside the subshell to target the worktree you're currently in. (Lifecycle hooks run before the subshell is spawned, so they do not see this variable.) + +- **`TREEHOUSE_LEASE_HOLDER`** — default lease holder label recorded by `treehouse get --lease` when `--lease-holder` is not passed on the command line; `treehouse status` then shows it next to the `leased` state. + +- **`TREEHOUSE_NO_UPDATE_CHECK`** — set to `1` to skip the background update check treehouse runs on startup. Useful in CI, automation, or air-gapped environments where you don't want treehouse reaching out for new releases. + ## Development ```sh