ghq is a command line tool and repository manager designed to automate the cloning, organization, and lifecycle management of remote version control repositories. It functions as a wrapper for cloning that maps remote repository URLs to a consistent, structured local directory hierarchy.
The tool differentiates itself by implementing deterministic URL-to-path mapping and a VCS-agnostic cloning pipeline. It supports shallow copies, recursive submodule fetching, and the ability to resolve repository locations from various hosts and version control systems.
Its broader capabilities cover repository discovery through local indexing and filtering, maintenance via automated updates, and migration tools that identify linked worktrees. It also provides utilities for URL normalization and the safe removal of managed repositories from the filesystem.