Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

ghq

$ ghq Community Low Risk
motemen · Code & DevOps · MIT · macos / linux / windows

Go 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.

FCRS-1.0 Score
77 /100
Good
Medium Confidence
Zero-Friction Install
brew install ghq
CLI vs MCP Decision CLI Only

Purely manages local directory paths and git clone operations; direct shell execution is simpler and faster than MCP.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

Clean non-interactive subcommands (list -p, root, get) suitable for shell pipelines, though there is no --json output.

  • ghq list -p returns clean line-delimited paths
  • Lacks --json metadata output
Trust & Safety 22 / 25

Low-risk local directory and clone helper; never deletes repositories or pushes remote changes.

  • Only performs local clones/fetches under ghq.root
Setup & Portability 15 / 15

Single static Go binary available on macOS, Linux, and Windows via Homebrew, go install, and GitHub Releases.

  • Static Go binary with git as its only external prerequisite
Utility & Efficiency 9 / 15

Handy for discovering local checkouts across multiple orgs, though plain git clone suffices in single-workspace agent sessions.

  • Saves directory layout guesswork when ghq is already adopted by the user
Maintenance & Lineage 8 / 10

Well-maintained community Go project (x-motemen/ghq) under MIT license.

  • Stable open-source repository under MIT license
Docs & Verifiability 7 / 10

Concise README and --help output covering get, list, create, and root.

  • Documented in project README and CLI help

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

Delegates Git remote authentication to local git / SSH agent / credential helper; reads ghq.root from ~/.gitconfig.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source Go binary; free to use.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List full local paths of managed repositories
ghq list -p

Prints absolute paths of all local clones under ghq.root without mutating any repository.

Show configured ghq root directories
ghq root --all

Displays the active root paths configured in git config or GHQ_ROOT.

Controlled Writes & Previews

Shallow-clone a repository into the canonical path
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 -p resolves predictable local repository paths in a single fast call.
  • + Zero-dependency static Go binary with safe local-only mutations.

Caveats & Pitfalls

  • ! No --json output format for repository metadata (remote URL, branch, or dirty status).
  • ! ghq get -u updates existing clones in place; verify working tree cleanliness before updating.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI