ghq
Manage remote repository clones in a structured directory hierarchy
TLDR
Clone a repository
$ ghq get [https://github.com/owner/repo]
List managed repositories$ ghq list
List with full paths$ ghq list -p
Get repository root$ ghq root
Create new repository$ ghq create [owner]/[repo]
SYNOPSIS
ghq command [options] [arguments]
DESCRIPTION
ghq manages remote repository clones in a structured directory hierarchy. It clones repositories into organized paths based on their URLs, enabling consistent repository organization across projects.
The tool integrates with shell workflows and fuzzy finders like fzf for quick repository navigation. It supports GitHub, GitLab, Bitbucket, and custom Git hosts.
PARAMETERS
get URL
Clone or sync a repository.list
List local repositories.root
Show repository root path.create NAME
Create a new repository.-p
Show full paths (list).--update
Update existing repository.--shallow
Shallow clone.--help
Display help information.
CONFIGURATION
~/.gitconfig
Configure repository root path with `ghq.root` setting.~/.config/ghq/config.toml
Alternative configuration file for setting root paths and Git command options.
CAVEATS
Requires git. Default root is ~/ghq or configurable. URL parsing determines directory structure.
HISTORY
ghq was created by motemen as a tool for organizing Git repositories, inspired by go get's directory structure conventions.
