{"id":41697683,"url":"https://github.com/tasuku43/gion","last_synced_at":"2026-02-05T06:04:38.676Z","repository":{"id":331640388,"uuid":"1127981153","full_name":"tasuku43/gion","owner":"tasuku43","description":"Task workspaces as code, with guardrails. Built on Git worktrees: define a YAML inventory, then plan/apply to reconcile safely.","archived":false,"fork":false,"pushed_at":"2026-01-31T12:53:22.000Z","size":3035,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-01T00:42:19.101Z","etag":null,"topics":["agentic-coding","cli","git","git-workspace-tool","github","go","golang","guardrails","inventory","issues","monorepo","reconcile","review","workspace","workspaces","worktree","worktree-manager"],"latest_commit_sha":null,"homepage":"https://tasuku43.github.io/gion/","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/tasuku43.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":"SUPPORT.md","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-01-05T00:37:29.000Z","updated_at":"2026-01-31T13:54:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tasuku43/gion","commit_stats":null,"previous_names":["tasuku43/gws","tasuku43/gwst","tasuku43/gwiac"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/tasuku43/gion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasuku43%2Fgion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasuku43%2Fgion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasuku43%2Fgion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasuku43%2Fgion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tasuku43","download_url":"https://codeload.github.com/tasuku43/gion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasuku43%2Fgion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29114525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T05:31:32.482Z","status":"ssl_error","status_checked_at":"2026-02-05T05:31:29.075Z","response_time":65,"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":["agentic-coding","cli","git","git-workspace-tool","github","go","golang","guardrails","inventory","issues","monorepo","reconcile","review","workspace","workspaces","worktree","worktree-manager"],"created_at":"2026-01-24T20:51:35.083Z","updated_at":"2026-02-05T06:04:38.660Z","avatar_url":"https://github.com/tasuku43.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gion — task workspaces (built on Git worktrees) as code, with guardrails.\n\nDefine workspaces in YAML, then plan/apply to reconcile safely.\n\nWorktree sprawl brings pain:\n- Risky cleanup and cognitive load from too many worktrees.\n- Bulk creation is powerful but tedious to set up and place.\n\ngion makes it safe and repeatable: declare task workspaces in YAML, review diffs (including deletion risk), then create and clean them up in bulk.  \nYou don’t have to edit YAML directly—`gion manifest ...` lets you add/remove workspaces interactively and updates the inventory behind the scenes.\n\nhttps://github.com/user-attachments/assets/70da3e63-2bfe-4cca-b5a4-ffc8c153eb4a\n\n## Who it’s for\n\n- Developers working on tasks that span multiple repositories.\n- GitHub-centric, PR/issue-driven workflows (spin up local worktrees for reviews/issues and work in parallel).\n- People using AI agents to create and remove many worktrees.\n\n## Features\n\n- **Reproducible inventory:** `gion.yaml` is the source of truth\n- **Bulk create:** spin up many worktrees at once.\n- **Bulk cleanup:** remove worktrees in bulk (diff + confirmation, risk surfaced for dirty/unpushed/diverged/unknown).\n- **Fast navigation:** `giongo` jumps to any workspace or repo\n- **Multi-repo tasks:** group repos under a single workspace via presets\n- **GitHub-aware entry points:** create from PRs or issues with `gh`\n\nTip: `gion manifest` can be shortened to `gion m` or `gion man`.\n\n## Guardrails (safety by default)\n\n- **Plan-first:** always shows a diff before applying changes.\n- **Deletion risk visibility:** removal plans include a risk summary (e.g., dirty / unpushed / diverged / unknown).\n  - **dirty:** working tree has changes.\n  - **unpushed:** local branch is ahead of upstream.\n  - **diverged:** local and upstream have both advanced.\n  - **unknown:** status cannot be determined (e.g., git error or missing upstream).\n- **Confirm destructive changes:** removals require an explicit confirmation; `--no-prompt` refuses destructive changes.\n- **Conservative bulk cleanup:** `gion manifest gc` excludes anything uncertain and acts only when it is highly likely safe.\n- **Clear safety boundary:** gion reconciles only under `GION_ROOT/` (workspaces + repo stores).\n\n## Installation\n\n### Homebrew\n\n```bash\nbrew tap tasuku43/gion\nbrew install gion\n```\n\n### Other options\n\n- Version pinning with mise (optional): `mise use -g github:tasuku43/gion@\u003cversion\u003e`\n- Manual install via GitHub Releases (download archive → put `gion` and `giongo` on your PATH)\n- Build from source requires Go 1.24+\n\n### Requirements\n\n- Git\n- `gh` CLI (optional; required for `gion manifest add --review` and `gion manifest add --issue` — GitHub only)\n\n## Quickstart (5 minutes)\n\n### 1) Initialize the root (once per machine)\n\n```bash\ngion init\n```\n\nBy default, gion uses `~/gion` as the root:\n\n```text\n~/gion/\n  gion.yaml\n  bare/        # bare repo store (shared Git objects)\n  workspaces/  # task workspaces (worktrees)\n```\n\n### 2) Prepare a repo store\n\n```bash\ngion repo get git@github.com:org/backend.git\n```\n\nBare repo store location:\n\n```text\n~/gion/bare/github.com/org/backend.git\n```\n\n### 3) Create a workspace (review first)\n\nAdd a workspace interactively (example output, trimmed):\n\n```bash\ngion manifest add\n```\n```bash\nInputs\n  • repo: git@github.com:org/backend.git\n  • workspace id: PROJ-123\n  • repo #1 (git@github.com:org/backend.git)\n    └─ branch: PROJ-123-sample\n\nInfo\n  • manifest: updated gion.yaml\n\nPlan\n  • + add workspace PROJ-123\n    └─ backend (branch: PROJ-123-sample)\n       repo: github.com/org/backend\n\n  • Apply changes? (default: No) (y/n)\n    └─ y\n\nApply\n  • create workspace PROJ-123\n  • worktree add backend\n  └─ $ git worktree add -b PROJ-123-sample …/workspaces/PROJ-123/backend origin/main\n     (git output trimmed)\n\nResult\n  • applied: add=1 update=0 remove=0\n  • gion.yaml rewritten\n```\n\nResulting worktree:\n\n```text\n~/gion/workspaces/PROJ-123/backend\n```\n\n### 4) Jump into a workspace (interactive)\n\n```bash\n# Setup (once):\neval \"$(giongo init)\"\ngiongo\n```\n\n### 5) Remove safely (guardrails on by default)\n\n```bash\ngion manifest rm\n```\n\nSelect a workspace, review the plan, then confirm to apply.\n\n## Usage\n\nFor a command overview, see `docs/guides/COMMANDS.md` (or run `gion help`).\n\n### Core workflow (Declare → Diff → Reconcile)\n\nDeclare in `gion.yaml`, diff with `gion plan`, reconcile with `gion apply`.\n\nExample plan (add + remove, trimmed):\n\n```text\nPlan\n  • + add workspace PROJ-123\n    └─ backend  PROJ-123\n       repo: github.com/org/backend.git\n  • - remove workspace PROJ-099\n    └─ backend  PROJ-099\n       risk: dirty (unstaged=2)\n       sync: upstream=origin/main ahead=1 behind=0\n\nApply destructive changes? (default: No)\n```\n\n### Create workspaces\n\nInteractive front-end to the inventory:\n\n```bash\ngion manifest add\n```\n\nRun with flags to skip prompts:\n\n```bash\ngion manifest add --repo git@github.com:org/backend.git PROJ-123\n```\n\n#### From PRs / issues (GitHub only)\n\nThis path is optimized for bulk creation from PRs/issues with one apply.\n\nInteractive bulk selection (multi-select in the picker):\n\n```bash\ngion manifest add\n```\n\nNotes:\n- Requires `gh` (authenticated) to fetch metadata.\n- The picker supports bulk selection of PRs/issues, then a single apply.\n\nDirect URL (single workspace):\n\n```bash\ngion manifest add --review https://github.com/owner/repo/pull/123\ngion manifest add --issue  https://github.com/owner/repo/issues/123\n```\n\n#### From presets (multi-repo “task workspace”)\n\nCreate a preset:\n\n```bash\ngion manifest preset add app --repo git@github.com:org/backend.git --repo git@github.com:org/frontend.git\n```\n\n```yaml\npresets:\n  app:\n    repos:\n      - git@github.com:org/backend.git\n      - git@github.com:org/frontend.git\n      - git@github.com:org/infra.git\n```\n\n```bash\ngion manifest add --preset app PROJ-123\n```\n\n### Move fast with giongo\n\n`giongo` is a small companion binary that jumps into a workspace or repo using a picker.  \nIt does not change any state.\n\nExample (zsh function):\n\n```bash\ngiongo() {\n  if [[ \"$1\" == \"init\" || \"$1\" == \"--help\" || \"$1\" == \"-h\" || \"$1\" == \"--version\" || \"$1\" == \"--print\" ]]; then\n    command giongo \"$@\"\n    return $?\n  fi\n  local dest\n  dest=\"$(command giongo --print \"$@\")\" || return $?\n  [[ -n \"$dest\" ]] \u0026\u0026 cd \"$dest\"\n}\n```\n\nShortcut (auto-generate the function for your shell):\n\n```bash\neval \"$(giongo init)\"\n```\n\nNotes:\n- `giongo init` outputs a bash/zsh function definition.\n- For a permanent setup, paste the output into `~/.zshrc` or `~/.bashrc`.\n\n### Cleanup\n\nManual removal (explicit human judgment):\n\n```bash\ngion manifest rm\n```\n\nAutomatic cleanup (conservative):\n\n```bash\ngion manifest gc\n```\n\n`gion manifest gc` removes workspace entries from `gion.yaml` only when they are highly likely safe to delete, then (by default) runs `gion apply` to reconcile.\n\nGC safety rules (summary):\n- Excludes any workspace with dirty / unpushed / diverged / unknown state.\n- Considers a workspace safe only when all repos are strictly merged into their target base.\n- Uses Git data from the local repo store (no PR metadata).\n\n### Import\n\nIf the filesystem is the source of truth, rebuild the inventory:\n\n```bash\ngion import\n```\n\n## Inventory (`gion.yaml`)\n\n### Root (`GION_ROOT`)\n\n`GION_ROOT` is resolved in this order:\n\n1. `--root \u003cpath\u003e`\n2. `GION_ROOT` environment variable\n3. default `~/gion`\n\n### Location and layout\n\n- Inventory file: `\u003cGION_ROOT\u003e/gion.yaml`\n- Bare repo stores (shared Git objects): `\u003cGION_ROOT\u003e/bare/`\n- Workspaces (task directories containing worktrees): `\u003cGION_ROOT\u003e/workspaces/`\n\n```\nGION_ROOT/  (safety boundary: gion only touches under this directory)\n├─ gion.yaml                      # desired state (inventory)\n│\n├─ bare/                          # shared Git object store (bare clones)\n│  └─ github.com/org/\n│     ├─ backend.git              # bare repo store (shared)\n│     ├─ frontend.git\n│     └─ infra.git\n│\n└─ workspaces/                    # task-scoped directories (each contains worktrees)\n   ├─ PROJ-123/                   # workspace_id (task)\n   │  ├─ backend/                 # worktree checkout (repo: backend)\n   │  │  ├─ .git                  # gitdir file -\u003e points into .../backend.git/worktrees/...\n   │  │  └─ ...                   # working directory (your changes live here)\n   │  ├─ frontend/\n   │  └─ infra/\n   │\n   └─ PROJ-456/\n      └─ backend/\n```\n\n### Terminology\n\n- **Workspace:** a task-scoped directory under `GION_ROOT/workspaces/\u003cWORKSPACE_ID\u003e/` that can contain multiple repos.\n- **Worktree:** a Git worktree checkout for a repo, placed under a workspace (e.g. `.../workspaces/\u003cid\u003e/\u003calias\u003e/`).\n- **Repo store:** a shared bare clone cache under `GION_ROOT/bare/` (used to create and update worktrees efficiently).\n- **Manifest:** the inventory file `gion.yaml` and the `gion manifest ...` subcommands that update it.\n\nInvariants (short):\n- `version: 1` is the current inventory schema; future changes will be versioned.\n- gion only reads/writes under `GION_ROOT/` (safety boundary).\n- Workspace IDs must be valid Git branch names (used as worktree branches).\n\n`gion.yaml` is plain YAML. You can edit it directly (humans or AI), then review/apply changes:\n\n```bash\ngion plan\ngion apply\n```\n\nFor the full schema, see `docs/spec/core/INVENTORY.md`.\n\nMinimal example:\n\n```yaml\nversion: 1\nworkspaces:\n  PROJ-123:\n    description: \"fix login flow\"\n    mode: repo\n    repos:\n      - alias: backend\n        repo_key: github.com/org/backend.git\n        branch: PROJ-123\n```\n\nNotes:\n- `gion.yaml` is gion-managed and rewritten; don’t rely on ordering or comments.\n- You can edit `gion.yaml` directly (humans or AI). For interactive changes, `gion manifest ...` is convenient.\n- If you hand-edit, run `gion plan` before `gion apply`. If the filesystem is the source of truth, use `gion import`.\n\n## Contributing\n\nSee `CONTRIBUTING.md`.\n\n## Security\n\nSee `SECURITY.md`.\n\n## License\n\nSee `LICENSE`.\n\n## Maintainer\n\n- @tasuku43\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasuku43%2Fgion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftasuku43%2Fgion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasuku43%2Fgion/lists"}