{"id":31962067,"url":"https://github.com/leecj/treeai_cli","last_synced_at":"2026-03-15T04:33:33.753Z","repository":{"id":317955576,"uuid":"1069503846","full_name":"leecj/treeai_cli","owner":"leecj","description":"TreeAI CLI is a Node.js/TypeScript terminal tool that orchestrates multi-task Git worktree flows powered by AI assistants such as Claude and Codex.","archived":false,"fork":false,"pushed_at":"2025-10-11T12:09:01.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-13T00:16:55.158Z","etag":null,"topics":["claude-code","codex","worktree"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leecj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":null,"dco":null,"cla":null}},"created_at":"2025-10-04T04:05:29.000Z","updated_at":"2025-10-11T12:09:04.000Z","dependencies_parsed_at":"2025-10-04T06:09:33.231Z","dependency_job_id":"16073930-65ad-481a-a5f4-b4ad2ae3f576","html_url":"https://github.com/leecj/treeai_cli","commit_stats":null,"previous_names":["leecj/treeai_cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leecj/treeai_cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecj%2Ftreeai_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecj%2Ftreeai_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecj%2Ftreeai_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecj%2Ftreeai_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leecj","download_url":"https://codeload.github.com/leecj/treeai_cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leecj%2Ftreeai_cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019566,"owners_count":26086750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["claude-code","codex","worktree"],"created_at":"2025-10-14T16:14:57.148Z","updated_at":"2025-10-14T16:15:01.019Z","avatar_url":"https://github.com/leecj.png","language":"TypeScript","readme":"# TreeAI CLI\n\nTreeAI CLI is a Node.js/TypeScript terminal tool that orchestrates multi-task Git worktree flows powered by AI assistants such as Claude and Codex.\n\nPrefer the Chinese version? See [README.zh-CN.md](README.zh-CN.md).\n\n## Quick Start\n\n```bash\n# Install once globally\nnpm install -g treeai\n\n# 1. Start a task workspace\ntreeai start feature/login\n\n# 2. Wrap up when you're done\ntreeai finish feature/login\n\n# Prefer not to install globally? Use npx on demand\nnpx treeai start bugfix/session-timeout\n```\n\n- `start`: detects the current repository, creates/switches the branch and worktree, then launches the configured AI tool.\n- `switch`: switches to an existing worktree and launches the AI tool to continue working.\n- `finish`: returns to the base branch, cleans up the worktree directory, and offers to delete the merged branch.\n- Append `--help` to any command (for example `treeai start --help`) to inspect available flags.\n\n\u003e TreeAI CLI requires Node.js 20 or newer.\n\n### Local Development (optional)\n\nOnly needed when contributing to or debugging the CLI itself:\n\n```bash\npnpm install\npnpm dev -- start feature/login\npnpm build\n```\n\n- `npm run dev --tool codex` now works as a shorthand for `npm run dev -- --tool codex` (npm may emit a warning about `--tool`; it can be ignored).\n\n## Core Commands\n\n### `treeai start [taskName]`\n\n- Running `treeai` with no subcommand is equivalent to `treeai start` and will, by default, launch the AI tool in the current directory (no worktree).\n- Use `--no-reuse-current` to disable the quick-open behavior and walk through the worktree creation flow.\n- Automatically resolves the Git repository (override via `--repo`).\n- Generates branch and worktree names, defaulting to `~/.treeai/\u003crepo\u003e/\u003ctask\u003e`.\n- Supports custom base branch `--base` and worktree directory `--worktree`.\n- Loads recent tasks for one-shot selection.\n- Launches the configured AI tool by default (default `claude` with `--dangerously-skip-permissions`).\n- Uses the task name directly as the branch name (Unicode-friendly) for easy recognition.\n- Use `--skip-launch`, `--tool`, or `--tool-arg` to control AI launch behavior.\n- Use `--reuse-current` to explicitly reuse the current directory when the quick-open mode has been disabled.\n\n### `treeai switch`\n\n- Lists all existing worktrees in the current repository for interactive selection.\n- Automatically launches the AI tool in the selected worktree directory (default `claude`).\n- Supports `--repo` to specify repository, `--tool` to specify tool, and `--tool-arg` for extra parameters.\n- Use `--skip-launch` to only display the worktree path without launching the tool.\n- Perfect for quickly switching between multiple ongoing tasks without recreating worktrees.\n\n### `treeai finish [taskName]`\n\n- Detects the current worktree or lets you choose from history.\n- By default performs: checkout base branch, delete worktree directory, delete merged branch.\n- Multi-select prompts let you adjust cleanup actions; `--keep-branch` and `--no-cleanup` tweak defaults.\n- Warns when uncommitted changes are present; `--force` skips confirmation.\n- Summaries explain the underlying Git operations so you know exactly what happens.\n\n### `treeai status`\n\n- Shows default repository, AI tool configuration, recent task list, and worktree status.\n\n## Supported AI Tools\n\nTreeAI CLI comes with pre-configured support for multiple AI coding assistants:\n\n- **Claude Code** - Anthropic's official CLI\n- **Codex** - Using gpt-5-codex model with reasoning\n- **Happy** - [Happy Coder](https://github.com/slopus/happy) - An agentic AI pair programmer\n- **Happy Codex** - Happy with gpt-5-codex configuration\n\nYou can specify which tool to use with the `--tool` flag:\n\n```bash\ntreeai start feature/login --tool happy\ntreeai switch --tool happy_codex\n```\n\n## Configuration\n\n- Stored at `~/.config/treeai/config.json`.\n- Supports default repository, recent repositories, AI tool presets, permission mode, and task history.\n- `start` / `finish` keep the configuration in sync; a dedicated `treeai config` subcommand is planned.\n\n## Roadmap\n\n- Expand the `worktrees` and `branches` subcommands to reach feature parity with the original Python CLI.\n- Provide migration helpers and command aliases for teams moving from the Python version.\n- Add unit and integration tests (Vitest + execa).\n- Ship both the npm package and a standalone executable bundle.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecj%2Ftreeai_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleecj%2Ftreeai_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleecj%2Ftreeai_cli/lists"}