{"id":48178762,"url":"https://github.com/kunchenguid/treehouse","last_synced_at":"2026-04-04T17:41:24.621Z","repository":{"id":344477271,"uuid":"1181899027","full_name":"kunchenguid/treehouse","owner":"kunchenguid","description":"Manage worktrees without managing worktrees.","archived":false,"fork":false,"pushed_at":"2026-03-28T18:52:41.000Z","size":1583,"stargazers_count":28,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T20:40:37.372Z","etag":null,"topics":["agents","coding","git","worktree"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kunchenguid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-14T19:20:20.000Z","updated_at":"2026-03-28T18:52:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kunchenguid/treehouse","commit_stats":null,"previous_names":["atinylittleshell/treehouse","kunchenguid/treehouse"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/kunchenguid/treehouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunchenguid%2Ftreehouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunchenguid%2Ftreehouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunchenguid%2Ftreehouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunchenguid%2Ftreehouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kunchenguid","download_url":"https://codeload.github.com/kunchenguid/treehouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunchenguid%2Ftreehouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","coding","git","worktree"],"created_at":"2026-04-04T17:41:23.113Z","updated_at":"2026-04-04T17:41:24.612Z","avatar_url":"https://github.com/kunchenguid.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003etreehouse\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/kunchenguid/treehouse/actions/workflows/ci.yml\"\u003e\u003cimg alt=\"CI\" src=\"https://img.shields.io/github/actions/workflow/status/kunchenguid/treehouse/ci.yml?style=flat-square\u0026label=CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/kunchenguid/treehouse/actions/workflows/release.yml\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/actions/workflow/status/kunchenguid/treehouse/release.yml?style=flat-square\u0026label=Release\" /\u003e\u003c/a\u003e\n  \u003ca href=\"#\"\u003e\u003cimg alt=\"Platform\" src=\"https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://x.com/kunchenguid\"\u003e\u003cimg alt=\"X\" src=\"https://img.shields.io/badge/X-@kunchenguid-black?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/BW4aJuQhTf\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1439901831038763092?style=flat-square\u0026label=discord\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eManage worktrees without managing worktrees.\u003c/h3\u003e\n\nAre you still only working on one task at a time? Are you manually juggling between a few clones of the same repo?\n\nOr... are you starting a new worktree for every agent session, losing all your installed dependencies and build cache each time, and wondering why your agents are slow?\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/kunchenguid/treehouse/main/demo.gif\" alt=\"treehouse demo\" width=\"800\" /\u003e\n\u003c/p\u003e\n\nTreehouse helps you manage a pool of reusable, isolated worktrees so each of your agents gets its own environment instantly — no cloning, no conflicts, no coordination overhead.\n\n- **Instant isolation** — `treehouse` puts you into a clean worktree with zero hassel.\n- **Reusable worktrees** — worktrees are preserved in a pool when you're done, with dependencies and build cache intact, ready for the next agent.\n- **Conflict-free** — automatic detection of in-use worktrees and your agents never step on each other's toes.\n\n## Quick Start\n\n```sh\n$ cd myproject                 # start in your repo as usual\n$ treehouse                    # get a worktree and drop into a subshell\n🌳 Entered worktree at ~/.treehouse/myproject-a1b2c3/1/myproject. Type 'exit' to return.\n\n# You're now in an isolated worktree.\n# Run your AI agent, make changes, do whatever you need.\n\n$ exit                         # exit the subshell when you're done\n🌳 Worktree returned to pool.\n```\n\n## Install\n\n**macOS / Linux**\n\n```sh\ncurl -fsSL https://kunchenguid.github.io/treehouse/install.sh | sh\n```\n\n**Windows (PowerShell)**\n\n```powershell\nirm https://kunchenguid.github.io/treehouse/install.ps1 | iex\n```\n\n**Go**\n\n```sh\ngo install github.com/kunchenguid/treehouse@latest\n```\n\n**From source**\n\n```sh\ngit clone https://github.com/kunchenguid/treehouse.git\ncd treehouse\nmake install\n```\n\n## How It Works\n\nTreehouse manages a **pool of git worktrees** per repository, stored under `~/.treehouse/`.\n\n```\n  treehouse\n      │\n      ▼\n  Find repo root\n      │\n      ▼\n  git fetch origin\n      │\n      ▼\n  ┌────────────────────────────────────┐\n  │  Scan pool for available worktree  │\n  │  (not in-use, not dirty)           │\n  └──────────┬─────────────────────────┘\n             │\n        ┌────┴────┐\n        │  Found? │\n        └────┬────┘\n         yes/ \\no\n           /   \\\n          ▼     ▼\n   Reset to   Create new worktree\n   latest     (detached HEAD at\n   default    latest default\n   branch     branch)\n              \u0026 add to pool\n          \\   /\n           \\ /\n            ▼\n  Spawn subshell in worktree\n  (agent works here)\n           │\n           ▼\n     exit subshell\n           │\n           ▼\n  Reset worktree \u0026 return to pool\n  (ready for next agent)\n```\n\n- **Detached HEAD** — worktrees use detached HEAD mode, reset to whichever of the local or remote default branch is further ahead, avoiding branch name conflicts entirely.\n- **No daemon** — all operations are inline CLI commands. No background processes, no state to get corrupted.\n- **In-use detection** — treehouse scans running processes to determine which worktrees are in-use. Usage state is never persisted, so it's always accurate.\n\n## CLI Reference\n\n| Command                    | Description                                          |\n| -------------------------- | ---------------------------------------------------- |\n| `treehouse`                | Get a worktree and open a subshell (alias for `get`) |\n| `treehouse get`            | Acquire a worktree from the pool                     |\n| `treehouse status`         | Show pool status (highlights your current worktree)  |\n| `treehouse return [path]`  | Return a worktree to the pool                        |\n| `treehouse destroy [path]` | Remove a worktree from the pool                      |\n| `treehouse init`           | Create a default `treehouse.toml` config file        |\n| `treehouse update`         | Update treehouse to the latest version               |\n\n### Flags\n\n| Command   | Flag      | Description                       |\n| --------- | --------- | --------------------------------- |\n| `return`  | `--force` | Skip dirty-check prompt           |\n| `destroy` | `--force` | Force destroy even if in-use      |\n| `destroy` | `--all`   | Destroy all worktrees in the pool |\n\n## Configuration\n\nCreate a config file with `treehouse init`, or add one manually:\n\n**Repo-level:** `treehouse.toml` in the repository root\n\n**User-level:** `~/.config/treehouse/config.toml`\n\n```toml\n# Maximum number of worktrees in the pool\nmax_trees = 16\n```\n\nThe repo-level config takes precedence. If no config is found, the default pool size is 16.\n\n## Development\n\n```sh\nmake build          # Build the binary\nmake test           # Run tests\nmake lint           # Run gofmt + go vet\nmake dist           # Cross-compile for all platforms\nmake install        # Install to $GOPATH/bin or /usr/local/bin\nmake clean          # Remove build artifacts\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunchenguid%2Ftreehouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunchenguid%2Ftreehouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunchenguid%2Ftreehouse/lists"}