# Install leetgo with Homebrew, Nix

CLI tool for LeetCode. Version 1.4.17 via Homebrew; verified 2026-07-26. Also installable with nix: nix profile install nixpkgs#leetgo.

## Install

```sh
sudo av install brew:leetgo
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install leetgo
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#leetgo
```

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

## Package facts

- **Package key:** brew:leetgo
- **Package manager:** Homebrew
- **Version:** 1.4.17
- **Source summary:** CLI tool for LeetCode
- **Homepage:** <https://github.com/j178/leetgo>
- **Repository:** <https://github.com/j178/leetgo>
- **Last updated:** 2026-07-26T13:41:00+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- leetgo (alias)

## Install behavior

- Bottle: not available

## Freshness

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

`leetgo` is a Go-based LeetCode CLI that generates problem descriptions, skeleton code, test harnesses, contest files, and local test workflows for people who want to solve LeetCode problems from a terminal and editor.

### Project history

The project README describes `leetgo` as a terminal companion for LeetCode with code generation, local testing, contest support, automatic browser-cookie reading, and optional OpenAI-assisted fix support. It supports both leetcode.com and leetcode.cn.

The v1.4 configuration change is a useful marker in the project's evolution: the README states that since v1.4, `leetgo` stopped reading the global `~/.config/leetgo/config.yaml` file and moved configuration into a project-local `leetgo.yaml` discovered by walking upward from the working directory.

### Adoption history

The repository shows hundreds of stars, dozens of forks, and many tagged releases. The README documents Homebrew, Scoop, Arch, installer-script, and `go install` installation paths, which is a broader packaging surface than many LeetCode helper CLIs.

### How it is used

A typical workflow is `leetgo init`, edit `leetgo.yaml`, `leetgo pick`, `leetgo test`, and `leetgo submit`. The tool can generate complete runnable programs for several languages and uses browser cookies, explicit cookies, or environment variables for LeetCode authentication.

### Why package nerds care

`leetgo` is a good package-nerd example of a language-specific productivity CLI that still needs cross-platform release automation, shell installation paths, browser-cookie integration, per-project config discovery, and generated source layouts for many programming languages.

### Timeline

- 2024: v1.4-era documentation moved configuration into project-local `leetgo.yaml` files.
- 2024-11-04: v1.4.10 release notes document a Chrome cookie decryption fix.
- 2024-12-28: v1.4.13 release added support for multiple credential sources.
- 2026-04-04: v1.4.17 was released.

### Related projects

- The README credits EndlessCheng/codeforces-go, clearloop/leetcode-cli, budougumi0617/leetgode, and skygragon/leetcode-cli as inspirations.

### Sources

- <https://github.com/j178/leetgo>
- <https://github.com/j178/leetgo/releases>


## 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: leetgo.yaml

## Credential files

- Unix: .env
## Other Package-Manager Records

- Nix - leetgo: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/leetgo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/leetgo.yml](https://github.com/mxcl/pkgdb/blob/main/combined/leetgo.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
