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

Remote repository management made easy. Version 1.10.1 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#ghq.

## 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
- **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>
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- ghq (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.10.1
## 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
## 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-r12: 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-r12: 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-r12: 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-r12: 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-r12: 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


## Combined YAML source

View the package source record on GitHub. [combined/ghq.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ghq.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
