# Install ghq with Homebrew, apk, MacPorts, Nix, pacman, scoop, winget

Remote repository management made easy. Version 1.10.1 via Homebrew; verified 2026-04-11.

## Install

```sh
sudo av install brew:ghq
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install ghq
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ghq
```

  Evidence: MacPorts ports tree: sysutils/ghq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ghq
```

  Evidence: Alpine Linux edge package indexes: ghq from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#ghq
```

  Evidence: nixpkgs package indexes: pkgs/by-name/gh/ghq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S ghq
```

  Evidence: Arch Linux sync databases: ghq from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/ghq
```

  Evidence: Scoop official bucket manifest trees: bucket/ghq.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id x-motemen.ghq -e
```

  Evidence: Windows Package Manager source index: x-motemen.ghq from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:ghq
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/ghq>
- **Version:** 1.10.1
- **Source summary:** Remote repository management made easy
- **Homepage:** <https://github.com/x-motemen/ghq>
- **Repository:** <https://github.com/x-motemen/ghq>
- **Upstream docs:** <https://github.com/x-motemen/ghq#readme>
- **License:** MIT
- **Source archive:** <https://github.com/x-motemen/ghq.git>
- **Last updated:** 2026-04-11T17:29:40Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- ghq (cli)
- ghq (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.10.1
- Package-manager updated: 2026-04-11
- Local data: ok
- Upstream repository: https://github.com/x-motemen/ghq
- info: No cached GitHub release or tag data was available.
## Project history and usage

ghq is a command-line repository manager that gives remote Git and other VCS clones a predictable local directory layout.

### Project history

The ghq repository was created in 2013. Its README describes the tool as a way to organize remote repository clones like `go get`: a `ghq get` command places a checkout under a root directory, using the remote URL host and path as the local directory structure.

The project grew from a simple clone-and-list helper into a workspace manager with multiple roots, git-config based settings, support for several VCS backends, repository removal, migration of existing repositories into ghq layout, shallow and partial clone options, shell completions, and Windows packaging.

### Adoption history

ghq has a durable following among developers who keep many open-source and work repositories on one machine. Its official README lists installation paths through Homebrew, Void Linux, GNU Guix, Scoop, Go install, conda, asdf, mise, source build, and release binaries.

### How it is used

Practitioners use ghq to fetch repositories into `~/ghq` or another configured root, list known checkouts, pipe repository paths into fuzzy finders or editors, remove managed clones, and migrate older working trees into a consistent host/user/project hierarchy.

### Why package nerds care

Package nerds care about ghq because it turns a developer's source tree into an indexable package-like store. It is small, scriptable, and especially useful when combined with shell functions, fuzzy search, and editor launchers.

### Timeline

- 2013: GitHub repository created.
- 2014: v0.2 published on GitHub Releases.
- 2020: README documents installation through multiple package managers and release binaries.
- 2024: ghq added repository removal support.
- 2026: ghq added migration support for existing repositories and worktree-aware operations.

### Related projects

- ghq is related to `go get` style source layouts, Git configuration, Mercurial and other VCS backends, fuzzy finders, editor launchers, and the community ghq-handbook project.

### Sources

- <https://api.github.com/repos/x-motemen/ghq>
- <https://github.com/x-motemen/ghq>
- <https://github.com/x-motemen/ghq/blob/master/CHANGELOG.md>
- <https://github.com/x-motemen/ghq/blob/master/README.adoc>
- <https://github.com/x-motemen/ghq/releases/tag/v0.2>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.gitconfig
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ghq
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - ghq: normalized package name match | nixpkgs package indexes: pkgs/by-name/gh/ghq/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - ghq - 1.8.0-r11: normalized package name match | Alpine Linux edge package indexes: ghq from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | CLI to manage remote repository clones | https://github.com/x-motemen/ghq
- apk - ghq-bash-completion - 1.8.0-r11: normalized package name match | Alpine Linux edge package indexes: ghq-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Bash completions for ghq | https://github.com/x-motemen/ghq
- apk - ghq-doc - 1.8.0-r11: normalized package name match | Alpine Linux edge package indexes: ghq-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | CLI to manage remote repository clones (documentation) | https://github.com/x-motemen/ghq
- apk - ghq-fish-completion - 1.8.0-r11: normalized package name match | Alpine Linux edge package indexes: ghq-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fish completions for ghq | https://github.com/x-motemen/ghq
- apk - ghq-zsh-completion - 1.8.0-r11: normalized package name match | Alpine Linux edge package indexes: ghq-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Zsh completions for ghq | https://github.com/x-motemen/ghq
- pacman - ghq - 1.10.1-1: normalized package name match | Arch Linux sync databases: ghq from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Remote repository management made easy | https://github.com/x-motemen/ghq
- MacPorts - ghq: normalized package name match | MacPorts ports tree: sysutils/ghq/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/ghq: normalized package name match | Scoop official bucket manifest trees: bucket/ghq.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - x-motemen.ghq: normalized package name match | Windows Package Manager source index: x-motemen.ghq from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [ghorg](https://www.automicvault.com/pkg/brew/ghorg/) - Shares av.db curated category or tags: cli, developer-tools, git, repository-management, source-control.
- [scm-manager](https://www.automicvault.com/pkg/brew/scm-manager/) - Shares av.db curated category or tags: cli, developer-tools, git, repository-management, source-control.
- [gickup](https://www.automicvault.com/pkg/brew/gickup/) - Shares av.db curated category or tags: cli, developer-tools, git, source-control.
- [hut](https://www.automicvault.com/pkg/brew/hut/) - Shares av.db curated category or tags: cli, developer-tools, git, source-control.
- [scmpuff](https://www.automicvault.com/pkg/brew/scmpuff/) - Shares av.db curated category or tags: cli, developer-tools, git, source-control.
- [all-repos](https://www.automicvault.com/pkg/brew/all-repos/) - Shares av.db curated category or tags: cli, developer-tools, git, repository-management.
- [fetch](https://www.automicvault.com/pkg/brew/fetch/) - Shares av.db curated category or tags: cli, developer-tools, source-control.
- [gibo](https://www.automicvault.com/pkg/brew/gibo/) - Shares av.db curated category or tags: cli, developer-tools, source-control.
- [git-workspace](https://www.automicvault.com/pkg/brew/git-workspace/) - Local package facts share a topical domain. Shared terms: cli, control, developer, developer-tools, git.
- [git-get](https://www.automicvault.com/pkg/brew/git-get/) - Local package facts share a topical domain. Shared terms: cli, control, developer, developer-tools, git.

## Combined YAML source

View the package source record on GitHub. [combined/ghq.yml](https://github.com/automic-vault/db/blob/main/combined/ghq.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
