{"id":37164637,"url":"https://github.com/equationzhao/g","last_synced_at":"2026-01-14T19:33:07.188Z","repository":{"id":154089068,"uuid":"631466180","full_name":"Equationzhao/g","owner":"Equationzhao","description":"powerful and cross-platform ls 🌈","archived":false,"fork":false,"pushed_at":"2025-07-04T23:24:00.000Z","size":3965,"stargazers_count":327,"open_issues_count":11,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-04T06:47:02.240Z","etag":null,"topics":["cli","command-line-tool","darwin","golang","linux-shell","ls","macos","utility","windows"],"latest_commit_sha":null,"homepage":"https://g.equationzhao.space","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Equationzhao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-23T05:27:31.000Z","updated_at":"2025-09-03T23:20:11.000Z","dependencies_parsed_at":"2024-02-10T08:28:32.793Z","dependency_job_id":"b2e4265f-859a-42a3-9ebf-8a761d4e6e7c","html_url":"https://github.com/Equationzhao/g","commit_stats":null,"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/Equationzhao/g","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Equationzhao%2Fg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Equationzhao%2Fg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Equationzhao%2Fg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Equationzhao%2Fg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Equationzhao","download_url":"https://codeload.github.com/Equationzhao/g/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Equationzhao%2Fg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line-tool","darwin","golang","linux-shell","ls","macos","utility","windows"],"created_at":"2026-01-14T19:33:06.439Z","updated_at":"2026-01-14T19:33:07.180Z","avatar_url":"https://github.com/Equationzhao.png","language":"Go","readme":"# g\r\n\r\n---\r\n[![GitHub stars](https://img.shields.io/github/stars/Equationzhao/g)](https://github.com/Equationzhao/g/stargazers)\r\n[![GitHub forks](https://img.shields.io/github/forks/Equationzhao/g)](https://github.com/Equationzhao/g/network)\r\n[![GitHub issues](https://img.shields.io/github/issues/Equationzhao/g)](https://github.com/Equationzhao/g/issues)\r\n[![GitHub license](https://img.shields.io/github/license/Equationzhao/g)](https://github.com/Equationzhao/g/blob/master/LICENSE)\r\n\r\nA feature-rich, customizable, and cross-platform `ls` alternative.\r\n\r\nExperience enhanced visuals with type-specific icons, various layout options, and git status integration.\r\n\r\n---\r\n\r\n## Key Features\r\n\r\n1. **Customizable Display**: Icons and colors specific to file types, easy to customize.\r\n2. **Multiple Layouts**: Choose from grid, across, byline, zero, comma, table, json, markdown, and tree layouts.\r\n3. **Git Integration**: View file git-status/repo-status/repo-branch directly in your listings.\r\n4. **Advanced Sorting**: Highly customizable sorting options like version-sort.\r\n5. **Cross-Platform Compatibility**: Works seamlessly on Linux, Windows, and MacOS.\r\n6. **Fuzzy Path Matching**: [`zoxide`](https://github.com/ajeetdsouza/zoxide) and [`fzf`](https://github.com/junegunn/fzf) like fuzzy path matching.\r\n7. **Hyperlink support**: Open files/directories with a single click.\r\n\r\n## Screenshots\r\n\r\n![image](asset/screenshot_3.png)\r\n\r\n## Usage\r\n\r\n```bash\r\ng path(s)\r\n```\r\n\r\n```bash\r\ng --icon --long path(s) # show icons and long format\r\n```\r\n\r\n```bash\r\ng --tree --long path(s) # show tree layout\r\n```\r\n\r\n## More options\r\n\r\n[man.md](docs/man.md)\r\n\r\n## Installation Guide\r\n\r\n### Via package manager\r\n\r\n#### Arch Linux (AUR)\r\n\r\n```bash\r\nyay -S g-ls\r\n```\r\n\r\n#### Homebrew\r\n\r\n```bash\r\nbrew install g-ls\r\n```\r\nor use the homebrew tap:\r\n\r\n```bash\r\nbrew tap equationzhao/core git@github.com:Equationzhao/homebrew-g.git\r\n```\r\n\r\n```bash\r\nbrew install g-ls\r\n```\r\n\r\n#### MacPort\r\n\r\n```bash\r\nsudo port install g-ls\r\n```\r\n\r\n#### Windows\r\n\r\nwindows scoop:\r\n\r\n```powershell\r\nscoop install https://raw.githubusercontent.com/Equationzhao/g/master/scoop/g.json\r\n```\r\n\r\n```powershell\r\n# upgrade\r\nscoop uninstall g # uninstall first\r\nscoop install https://raw.githubusercontent.com/Equationzhao/g/master/scoop/g.json\r\n```\r\n\r\n#### Winget\r\n\r\nTODO, see [issue](https://github.com/Equationzhao/g/issues/119)\r\n\r\n### Pre-built executable\r\n\r\n#### install script\r\n\r\n##### install\r\n```sh\r\nbash -c \"$(curl -fsSLk https://raw.githubusercontent.com/Equationzhao/g/master/script/install.sh)\"\r\n```\r\n\r\n##### uninstall\r\n```sh\r\ncurl -fsSLk https://raw.githubusercontent.com/Equationzhao/g/master/script/install.sh | bash /dev/stdin -r     \r\n```\r\n\r\n#### deb\r\n\r\ndownload from [release](https://github.com/Equationzhao/g/releases) page\r\n\r\n```bash\r\nsudo dpkg -i g_$version_$arch.deb\r\n```\r\n\r\n#### tar.gz/zip\r\n\r\njust download from [release page](https://github.com/Equationzhao/g/releases), extract the gzip and add the executable file to your `PATH`\r\n\r\n### From source\r\n\r\nRequires Go version \u003e= 1.24\r\n\r\n```bash\r\ngo install -ldflags=\"-s -w\"  github.com/Equationzhao/g@latest\r\n```\r\n\r\nAlternatively, clone the repo for a dev version:\r\n\r\n```bash\r\ngit clone github.com/Equationzhao/g\r\ncd g\r\ngo build -ldflags=\"-s -w\" \r\n# then add the executable file to your `PATH`\r\n```\r\n\r\n#### Build options\r\nSee [BuildOption.md](docs/BuildOption.md) for optional build tags to enable or disable features.\r\n\r\n## Recommended terminal\r\n\r\nmacOS:\r\n- [Iterm2](https://iterm2.com/)\r\n- [Warp](https://www.warp.dev)\r\n\r\nWindows:\r\n- [Windows Terminal](https://github.com/microsoft/terminal)\r\n\r\ncross-platform:\r\n- [Hyper](https://hyper.is/)\r\n- [WezTerm](https://wezfurlong.org/wezterm/index.html)\r\n\r\n\r\n## Shell Integration\r\n\r\n### completion\r\n\r\n\u003e\u003e *if you install `g` through brew or the install script, the completion is usually installed already.*\r\n\r\n#### zsh\r\n```zsh\r\nwget https://raw.githubusercontent.com/Equationzhao/g/master/completions/zsh/_g\r\n```\r\n\r\ninstall the file to your zsh completion directory, usually `/usr/local/share/zsh/site-functions` or `/usr/share/zsh/site-functions` (or anywhere in your $FPATH)\r\n\r\n```zsh\r\nmv _g ~/.zsh/completions\r\n```\r\n\r\nmake sure `autoload -Uz compinit` and `compinit` are in the `~/.zshrc` or `~/.zprofile`\r\n\r\nif not, add them to at least one of them.\r\n\r\n```zsh\r\nautoload -Uz compinit\r\ncompinit\r\n```\r\n\r\n#### bash\r\n\r\n```bash\r\nwget https://raw.githubusercontent.com/Equationzhao/g/master/completions/bash/g-completion.bash\r\n```\r\n\r\nadd the following lines to your ~/.bashrc file:\r\n\r\n```bash\r\nsource /path/to/g-completion.bash\r\n```\r\n\r\n#### fish\r\n\r\n```fish\r\nwget https://raw.githubusercontent.com/Equationzhao/g/master/completions/fish/g.fish\r\n```\r\n\r\nInstall the file to your fish completion directory, usually ~/.config/fish/completions\r\n\r\n```fish\r\nmv g.fish ~/.config/fish/completions\r\n```\r\n\r\nRestart your terminal session or run the following command to immediately enable the completion functionality:\r\n\r\n```fish\r\nsource ~/.config/fish/config.fish\r\n```\r\n\r\n### alias\r\n\r\nGenerate initialization scripts(alias) for various shells:\r\n\r\n```bash\r\ng -init bash/zsh/fish/pwsh\r\n```\r\n\r\n##### bash\r\n\r\n```.bash\r\n# add the following command to .bashrc\r\neval \"$(g --init bash)\"\r\n# then `source ~/.bashrc`\r\n```\r\n\r\n##### zsh\r\n\r\n```zsh\r\n# add the following command to .zshrc\r\neval \"$(g --init zsh)\"\r\n# then `source ~/.zshrc`\r\n```\r\n\r\n##### fish\r\n\r\n```fish\r\n#  add to fish config:\r\ng --init fish | source\r\n#  then `source ~/.config/fish/config.fish`\r\n```\r\n\r\n##### powershell\r\n\r\n```powershell\r\n# add the following line to your profile\r\nInvoke-Expression (\u0026 { (g --init powershell | Out-String) })\r\n```\r\n\r\nuse command `echo $profile` to find your profile path\r\n\r\n##### nushell\r\n\r\nthe nushell has a nice built-in ls command, but if you wanna try `g` in nushell, you can do the following:\r\n\r\nps: the script is not guaranteed to work, if you have any problem, please [file an issue](https://github.com/Equationzhao/g/issues/new/choose)\r\n\r\n```nu\r\n# add the following to your $nu.env-path\r\n^g --init nushell | save -f ~/.g.nu\r\n# then add the following to your $nu.config-path\r\nsource ~/.g.nu\r\n\r\n# if you want to replace nushell's g command with g\r\n# add the following definition and alias to your $nu.config-path\r\n#\r\n# def nug [arg?] {\r\n#     if ($arg == null) {\r\n#         g $arg\r\n#     } else {\r\n#         g\r\n#     }\r\n# }\r\n# alias g = ^g\r\n```\r\n\r\n## Custom theme\r\n\r\n[theme](docs/Theme.md)\r\n\r\n## CONTRIBUTING\r\n\r\nInterested in contributing? Check out the [contributing guidelines](./CONTRIBUTING.md).\r\n\r\n## Alternatives\r\n\r\n`g` is highly inspired by following projects that you may wanna try!\r\n\r\n- [exa](https://github.com/ogham/exa) or [eza](https://github.com/eza-community/eza)\r\n- [lsd](https://github.com/lsd-rs/lsd)\r\n- [ls-go](https://github.com/acarl005/ls-go)\r\n\r\n|                | eza                                                                                           | g                                                                            |\r\n|----------------|-----------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|\r\n| display mode   | oneline,grid,across,tree,recurse                                                              | oneline,grid,across,zero,comma,table,json,markdown,tree,recurse              |\r\n| unique feature | -Z: list each file’s security context,-@: list each file’s extended attributes and sizes ...  | --mime: list each file's mime type, --charset: list each file's charset  ... |\r\n| performance    | better                                                                                        | slower                                                                       |\r\n\r\n## Star History\r\n\r\n[![Star History Chart](https://api.star-history.com/svg?repos=Equationzhao/g\u0026type=Date)](https://www.star-history.com/#Equationzhao/g\u0026Date)","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequationzhao%2Fg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequationzhao%2Fg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequationzhao%2Fg/lists"}