home / github / ghq

ghq

3.5k

Repository checkout manager for cloning, listing, and relocating repos under deterministic local paths.

$brew install ghq
Language
Go
Stars
3,508
Category
GitHub & Git
Agent
AI Analysis

ghq manages local repository checkouts by mapping remote URLs to predictable paths under one or more roots. It is mainly used to clone, find, and reorganize many repos without remembering where each checkout lives.

What It Enables
  • Clone or update repositories from shorthand names, full URLs, or stdin into a consistent host/user/repo directory layout.
  • List local checkouts by query, exact match, VCS, unique subpath, or full path so shell tools can jump to the right repo.
  • Create empty local repos, remove stale clones, or migrate existing checkouts into the managed layout.
Agent Fit
  • Predictable paths and simple stdout output make it useful as plumbing around clone, search, and repo-selection workflows.
  • Commands are non-TUI and mostly scriptable, but output is plain text only; there is no JSON or other structured mode.
  • Best used alongside git, code search, and task CLIs when an agent needs a stable local checkout layout across many repositories.
Caveats
  • rm prompts for confirmation and get --look opens an interactive shell, so some flows are not unattended by default.
  • create initializes a local repo only; it does not provision a remote repository on GitHub or another host.