{"id":48902730,"url":"https://github.com/stephanos/hatch","last_synced_at":"2026-06-08T01:04:09.067Z","repository":{"id":350763559,"uuid":"1208116471","full_name":"stephanos/hatch","owner":"stephanos","description":"A CLI for task-based workspace management","archived":false,"fork":false,"pushed_at":"2026-06-07T14:45:11.000Z","size":304,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-07T16:21:23.808Z","etag":null,"topics":["cli","git","productivity"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/stephanos.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-11T20:56:17.000Z","updated_at":"2026-06-07T14:45:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stephanos/hatch","commit_stats":null,"previous_names":["stephanos/hatch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephanos/hatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanos%2Fhatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanos%2Fhatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanos%2Fhatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanos%2Fhatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephanos","download_url":"https://codeload.github.com/stephanos/hatch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephanos%2Fhatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34043826,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"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":["cli","git","productivity"],"created_at":"2026-04-16T16:42:16.593Z","updated_at":"2026-06-08T01:04:09.055Z","avatar_url":"https://github.com/stephanos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hatch\n\n[![release](https://img.shields.io/github/v/release/stephanos/hatch)](https://github.com/stephanos/hatch/releases/latest)\n\n`hatch` is a CLI for task-scoped Git workspaces, built for AI-assisted development.\n\nIt creates disposable workspaces with isolated repo checkouts and agent context.\n\n## Quick Start\n\n**1. Install**\n\n```sh\ncurl -fsSL https://raw.githubusercontent.com/stephanos/hatch/main/install.sh | sh\n```\n\nOr download the [latest release](https://github.com/stephanos/hatch/releases/latest) manually and copy the `hatch` binary to your `$PATH`.\n\n**2. Init**\n\nChoose where projects should live.\n\n```sh\nhatch workspace new ~/Workspace\n```\n\n**3. Create projects and tasks**\n\nTasks belong to projects.\n\n```sh\nhatch project new my-project\nhatch task new my-project my-task\n```\n\nThis creates `\u003cworkspace\u003e/my-project/my-task`.\n\n**4. Open a task**\n\nTo open a task (directory) in your default editor:\n\n```sh\nhatch task open my-task\n# or\nhatch task open https://github.com/acme/web/pull/123\n```\n\nThis fuzzy matches tasks across all projects, or resolves GitHub PR URLs. \n\n_Tip: Add [tab completion](#tab-completion) to your shell and customize which [editor](#editor) to open._\n\n**5. Clone a repo**\n\nClone a repo into the task as a new local branch `\u003cgithub username\u003e/\u003ctask name\u003e`.\n\n```sh\nhatch repo new my-org/my-repo\n```\n\nHatch caches repos after the first clone.\n\n_Tip: Consider adapting the global or project's default [hooks](#hooks) if you always check out the same repo for a task._\n\n**6. Start an agent**\n\nRun an agent from inside a project, task, or repo.\n\n```sh\nhatch agent start codex\nhatch agent start claude -- --model opus\n```\n\nAgents start inside a sandbox by default with read/write access to the current scope; and applying agent-specific profiles.\n\nSee [agent sandboxing](#agent-sandboxing) for details.\n\n**7. Cleanup tasks**\n\nClean up completed tasks:\n\n```sh\nhatch workspace clean\n```\n\nHatch lists tasks and preselects ones with closed or merged PRs.\n\nOnce submitted, it removes the selected tasks' files locally and deletes their remote branches (see [hooks](#hooks) below to change this).\n\n## Recommended Customizations\n\n### Editor\n\n`hatch task open` uses `VISUAL`, then `EDITOR`, then your platform opener (`open` on macOS, `xdg-open` on Linux).\n\nAdd your preferred editor to your shell config:\n\n```sh\nexport VISUAL='code -n'\n# or\nexport VISUAL='cursor -n'\n# or\nexport EDITOR='vim'\n```\n\n### Tab completion\n\n```sh\n# Bash\necho 'eval \"$(hatch completions bash)\"' \u003e\u003e ~/.bashrc\n\n# Zsh\necho 'source \u003c(hatch completions zsh)' \u003e\u003e ~/.zshrc\n\n# Fish\nhatch completions fish \u003e ~/.config/fish/completions/hatch.fish\n```\n\n### Shell aliases\n\nYou can add these to your shell config:\n\n```sh\nalias new-project='hatch project new'\nalias new-task='hatch task new'\nalias new-repo='hatch repo new'\nalias open-task='hatch task open'\nalias start-agent='hatch agent start'\n```\n\n### Ignore AI agent files\n\nHatch generates AI agent files inside each repo to automatically include project and workspace prompts. Add this to your `~/.gitignore_global`:\n\n```gitignore\nCLAUDE.local.md\nAGENTS.override.md\n```\n\n### Hooks\n\nHooks define the behavior of the corresponding CLI commands. Change them if you want to add or remove behavior.\n\nHooks are shell scripts in `.hatch/hooks`:\n\n- Workspace hooks define the default behavior.\n- Project hooks override workspace hooks.\n- A non-zero hook exit code stops the parent command.\n- Edit `\u003chook\u003e.sh` to customize behavior.\n\nHatch also writes `\u003chook\u003e.default` copies in the workspace hooks directory. These contain Hatch's bundled defaults and are refreshed by workspace-aware commands. Hatch upgrades `\u003chook\u003e.sh` only while it still matches the previous bundled default.\n\nAvailable hook files:\n\n| Hook | Runs for |\n| --- | --- |\n| `agent_start.sh` | `hatch agent start` |\n| `project_new.sh` | `hatch project new` |\n| `repo_new.sh` | `hatch repo new` |\n| `repo_delete.sh` | `hatch workspace clean` or `hatch project clean` when removing task repos |\n| `task_new.sh` | `hatch task new` |\n| `task_open.sh` | `hatch task open`, and after `hatch task new` unless Hatch is non-interactive |\n\n## Development Tasks\n\nTo build from source, install:\n\n- [`mise`](https://github.com/jdx/mise)\n\nAnd then run from this directory:\n\n```sh\nmise trust\nmise install\nmise run install\n```\n\nThe install task builds the Rust CLI and installs it at `~/.local/bin/hatch`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanos%2Fhatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephanos%2Fhatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephanos%2Fhatch/lists"}