Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down