# 使用 Homebrew, apt, MacPorts, Nix, scoop 安装 legit

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

## 安装

```sh
sudo av install brew:legit
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install legit
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install legit
```

  证据: MacPorts ports tree: devel/legit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install legit
```

  证据: Debian stable package indexes: legit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#legit
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/legit
```

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

## 软件包事实

- **软件包键:** brew:legit
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/legit>
- **版本:** 1.2.0.post0
- **来源摘要:** Command-line interface for Git, optimized for workflow simplicity
- **主页:** <https://frostming.github.io/legit/>
- **仓库:** <https://github.com/frostming/legit>
- **上游文档:** <https://frostming.github.io/legit>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://files.pythonhosted.org/packages/cb/e4/8cc5904c486241bf2edc4dd84f357fa96686dc85f48eedb835af65f821bf/legit-1.2.0.post0.tar.gz>
- **最后更新:** 2026-07-22T10:44:30Z
- **已生成:** 2026-07-25T07:20:51+00:00

## 可执行文件

- legit (cli)
- legit (别名)

## 依赖

- python@3.14

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-07-25
- 管理器版本: 1.2.0.post0
- 管理器更新时间: 2026-07-22
- 本地数据: OK
- 上游仓库: https://frostming.github.io/legit/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Legit is a small Python CLI that wraps common Git branch workflows in human-oriented commands such as `sync`, `switch`, `publish`, and `unpublish`.

### 项目历史

Kenneth Reitz created Legit in the early 2010s as part of his broader 'for Humans' style of developer tools. The project translated parts of GitHub for Mac's opinionated branch workflow back to the command line: auto-stashing during branch switches, simple publish/unpublish commands, and a sync operation that handled fetch, merge or rebase, push, and unstash.

The maintained package identity later centered on Frost Ming's `frostming/legit` repository and `frostming.github.io/legit` documentation. PyPI metadata for the package lists Kenneth Reitz among maintainers and authorship, while the repository topic and README preserve the GitHub-for-Mac inspiration.

### 采用历史

Legit spread through Python packaging first, with PyPI releases beginning in 2011 and later system packaging through Homebrew, Debian, Ubuntu, MacPorts, Nix, and Scoop. Its appeal peaked in the period when Git workflows were still intimidating to many new developers and GUI clients were influencing command-line ergonomics.

### 使用方式

Package users install the `legit` command and run it inside Git repositories. Its commands are deliberately narrower than raw Git: switch branches while preserving worktree changes, sync a published branch, publish or unpublish branches, and list branch publication status.

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

Legit is package-nerd history because it captures a particular moment in Git tooling: instead of exposing every Git feature, it offered a tiny vocabulary for a common feature-branch workflow. It also sits in the lineage of Kenneth Reitz's Python packaging era, where branding, API empathy, and CLI polish were treated as part of open-source distribution.

### 时间线

- 2011-06-27: PyPI recorded the 0.0.1 source distribution upload.
- 2012-03-25: PyPI recorded the 0.1.0 release page for Legit.
- 2019-12-10: GitHub releases listed v1.2.0 for `frostming/legit`.
- 2020-03-14: PyPI recorded the 1.2.0.post0 wheel and source uploads.

### Related projects

- Related Git ergonomics tools include GitHub Desktop, GitHub for Mac, hub, gh, git-extras, and custom Git aliases. Related Kenneth Reitz projects include Requests, Pipenv, Records, Maya, Delegator, and other 'for Humans' tools.

### 来源

- <https://frostming.github.io/legit/>
- <https://github.com/frostming/legit>
- <https://kennethreitz.org/software/legit>
- <https://pypi.org/project/legit/0.1.0/>
- <https://pypi.org/pypi/legit/json>


## 安全说明

没有找到 legit 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** legit
- **Version Scheme:** 0
- **Revision:** 11
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - legit - 1.2.0.post0-5: normalized package name match | Debian stable package indexes: legit from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Git extension to assist in manipulating branches | https://github.com/frostming/legit
- Nix - legit: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/legit/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - legit - 1.2.0.post0-3: normalized package name match | Ubuntu 24.04 LTS package indexes: legit from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Git extension to assist in manipulating branches | https://github.com/frostming/legit
- MacPorts - legit: normalized package name match | MacPorts ports tree: devel/legit/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/legit: normalized package name match | Scoop official bucket manifest trees: bucket/legit.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [git-fresh](https://www.automicvault.com/zh-hans/pkg/brew/git-fresh/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control, workflow.
- [all-repos](https://www.automicvault.com/zh-hans/pkg/brew/all-repos/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [bit-git](https://www.automicvault.com/zh-hans/pkg/brew/bit-git/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [braid](https://www.automicvault.com/zh-hans/pkg/brew/braid/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [codeberg-cli](https://www.automicvault.com/zh-hans/pkg/brew/codeberg-cli/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [commitizen](https://www.automicvault.com/zh-hans/pkg/brew/commitizen/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [commitlint](https://www.automicvault.com/zh-hans/pkg/brew/commitlint/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [committed](https://www.automicvault.com/zh-hans/pkg/brew/committed/) - Shares av.db curated category or tags: cli, developer-tools, git, version-control.
- [pygitup](https://www.automicvault.com/zh-hans/pkg/brew/pygitup/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, control, developer, developer-tools, git.

## Combined YAML source

View the package source record on GitHub. [combined/legit.yml](https://github.com/automic-vault/db/blob/main/combined/legit.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
