# 使用 Homebrew, Nix 安装 leetgo

查看 leetgo 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install leetgo
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

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

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

## 软件包事实

- **软件包键:** brew:leetgo
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/leetgo>
- **版本:** 1.4.17
- **来源摘要:** CLI tool for LeetCode
- **主页:** <https://github.com/j178/leetgo>
- **仓库:** <https://github.com/j178/leetgo>
- **许可证:** MIT
- **源码归档:** <https://github.com/j178/leetgo/archive/refs/tags/v1.4.17.tar.gz>
- **最后更新:** 2026-07-26T13:41:00+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- leetgo (cli)
- leetgo (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.4.17
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/j178/leetgo
- 检测到的最新版本: v1.4.17 (当前)
## 项目历史与用法

`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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 为什么软件包爱好者会关心

`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.

### 时间线

- 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.

### 来源

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


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- 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
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** leetgo
- **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

## 其他软件包管理器记录

- 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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [leetcode-cli](https://pkg.so/zh-hans/brew/leetcode-cli/) - Shares pkgdb curated category or tags: cli, coding-practice, competitive-programming, developer-tools, leetcode.
- [leetup](https://pkg.so/zh-hans/brew/leetup/) - Shares pkgdb curated category or tags: cli, coding-practice, developer-tools, leetcode.
- [exercism](https://pkg.so/zh-hans/brew/exercism/) - Shares pkgdb curated category or tags: cli, coding-practice, developer-tools.
- [leetsolv](https://pkg.so/zh-hans/brew/leetsolv/) - Shares pkgdb curated category or tags: cli, coding-practice, developer-tools, leetcode.
- [fbthrift](https://pkg.so/zh-hans/brew/fbthrift/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [swiftgen](https://pkg.so/zh-hans/brew/swiftgen/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.
- [sourcery](https://pkg.so/zh-hans/brew/sourcery/) - Shares pkgdb curated category or tags: cli, code-generation, developer-tools.

## Combined YAML source

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


## 来源

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