# Install g-ls with Homebrew, MacPorts, Nix, apk, apt, dnf, scoop

Powerful and cross-platform ls. Version 0.31.2 via Homebrew; verified 2026-07-27. Also installable with nix: nix profile install nixpkgs#g-ls.

## Install

```sh
sudo av install brew:g-ls
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install g-ls
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install g-ls
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#g-ls
```

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

- apk (92%):

```sh
sudo apk add g++
```

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

- Debian apt (92%):

```sh
sudo apt install g++
```

  Evidence: Debian stable package indexes: g++ from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install gcc-c++
```

  Evidence: Fedora Rawhide package metadata: gcc-c++ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/g
```

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

## Package facts

- **Package key:** brew:g-ls
- **Package manager:** Homebrew
- **Version:** 0.31.2
- **Source summary:** Powerful and cross-platform ls
- **Homepage:** <https://equationzhao.github.io/g/>
- **Repository:** <https://github.com/Equationzhao/g>
- **Last updated:** 2026-07-27T14:57:48+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- g (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.31.2
## Project history and usage

g is a Go-based, cross-platform `ls` alternative packaged in Homebrew as `g-ls` and installed as the `g` executable. The upstream README describes it as feature-rich and customizable, with icons, colors, multiple layouts, git status integration, fuzzy path matching, and hyperlink support.

### Project history

The repository was created in April 2023, and GitHub Releases show v0.2.1 published the same day. The README frames g as an enhanced directory lister rather than a file manager, adding visual layouts and metadata to the familiar `ls` role.

The project continued through frequent 0.x releases; by 2025 it had reached the 0.30 series, and the visible release feed shows v0.31.2 in 2026. The bundled manual documents a broad option surface for display formats, filtering, fuzzy indexing, shell initialization, sorting, and metadata columns.

### Adoption history

Official installation notes document Arch AUR, Homebrew, a Homebrew tap, MacPorts, Scoop, pre-built release artifacts, deb packages, install scripts, and `go install`. That spread follows the usual adoption route for Go CLIs: direct binary releases, Go module installation, and native package-manager recipes.

### How it is used

Users run `g path(s)` as an `ls` replacement and enable options such as icons, long format, tree layout, JSON, markdown, CSV, git status, MIME and charset display, fuzzy path matching, and shell initialization scripts for Bash, Zsh, Fish, PowerShell, and Nushell.

### Why package nerds care

g is interesting in the crowded modern-ls category because it combines exa/eza-style visual listing, lsd-style icons, git metadata, multiple machine-readable output formats, and shell integration in a single Go binary. For package maintainers, the main wrinkle is name collision: the package is `g-ls` in Homebrew while the executable is `g`.

### Timeline

- 2023: GitHub repository created.
- 2023: Release v0.2.1 published.
- 2025: Release v0.30.0 published.
- 2026: Release v0.31.2 published.

### Related projects

- The README says g is highly inspired by exa/eza, lsd, and ls-go. It also describes zoxide- and fzf-like fuzzy path matching, placing g near both modern `ls` replacements and shell-navigation helpers.

### Sources

- <https://api.github.com/repos/Equationzhao/g>
- <https://github.com/Equationzhao/g>
- <https://github.com/Equationzhao/g/releases>
- <https://raw.githubusercontent.com/Equationzhao/g/master/README.md>
- <https://raw.githubusercontent.com/Equationzhao/g/master/docs/man.md>


## Security Notes

narrow executable package without higher-risk signals.

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

## Other Package-Manager Records

- Nix - g-ls: normalized package name match | nixpkgs package indexes: pkgs/by-name/g-/g-ls/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - g-ls: normalized package name match | MacPorts ports tree: sysutils/g-ls/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - g++ - 4:14.2.0-1: installed executable or alias match | Debian stable package indexes: g++ from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C++ compiler
- Ubuntu apt - g++ - 4:13.2.0-7ubuntu1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: g++ from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GNU C++ compiler
- apk - g++ - 15.2.0-r8: installed executable or alias match | Alpine Linux edge package indexes: g++ from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | GNU C++ standard library and compiler | https://gcc.gnu.org
- dnf - gcc-c++ - 16.1.1-4.fc45.1: installed executable or alias match | Fedora Rawhide package metadata: gcc-c++ from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C++ support for GCC | http://gcc.gnu.org
- Scoop - main/g: installed executable or alias match | Scoop official bucket manifest trees: bucket/g.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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


## Sources

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