ghq
$ ghq Community Low RiskGo CLI that organizes local VCS clones under a canonical ghq.root directory hierarchy (host/owner/repo). Useful for agents locating already-cloned local repos with ghq list -p, though it only emits newline-delimited text.
brew install ghq Purely manages local directory paths and git clone operations; direct shell execution is simpler and faster than MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-interactive subcommands (list -p, root, get) suitable for shell pipelines, though there is no --json output.
ghq list -preturns clean line-delimited paths- Lacks
--jsonmetadata output
Low-risk local directory and clone helper; never deletes repositories or pushes remote changes.
- Only performs local clones/fetches under
ghq.root
Single static Go binary available on macOS, Linux, and Windows via Homebrew, go install, and GitHub Releases.
- Static Go binary with
gitas its only external prerequisite
Handy for discovering local checkouts across multiple orgs, though plain git clone suffices in single-workspace agent sessions.
- Saves directory layout guesswork when
ghqis already adopted by the user
Well-maintained community Go project (x-motemen/ghq) under MIT license.
- Stable open-source repository under MIT license
Concise README and --help output covering get, list, create, and root.
- Documented in project README and CLI help
Security, Auth & Guardrails
Delegates Git remote authentication to local git / SSH agent / credential helper; reads ghq.root from ~/.gitconfig.
MIT open-source Go binary; free to use.
# ghq Agent Rules - Use `ghq list -p <query>` to find existing local clones before cloning again. - Pass `--shallow` when cloning large repos with `ghq get` unless full git history is needed.
Agent-Ready Command Recipes
Safe Read-Only Queries
ghq list -p
Prints absolute paths of all local clones under ghq.root without mutating any repository.
ghq root --all
Displays the active root paths configured in git config or GHQ_ROOT.
Controlled Writes & Previews
ghq get --shallow https://github.com/x-motemen/ghq
Clones the repository into ghq.root using --shallow to minimize disk and network cost.
Strengths for Agents
- +
ghq list -presolves predictable local repository paths in a single fast call. - + Zero-dependency static Go binary with safe local-only mutations.
Caveats & Pitfalls
- ! No
--jsonoutput format for repository metadata (remote URL, branch, or dirty status). - !
ghq get -uupdates existing clones in place; verify working tree cleanliness before updating.