# 使用 Homebrew, Nix 安装 erg

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

## 安装

```sh
sudo av install brew:erg
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install erg
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#erg
```

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

## 软件包事实

- **软件包键:** brew:erg
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/erg>
- **版本:** 0.6.53
- **来源摘要:** Statically typed language that can deeply improve the Python ecosystem
- **主页:** <https://github.com/erg-lang/erg>
- **仓库:** <https://github.com/erg-lang/erg>
- **许可证:** Apache-2.0 OR MIT
- **源码归档:** <https://github.com/erg-lang/erg/archive/refs/tags/v0.6.53.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- erg (cli)
- erg (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.6.53
- 本地数据: OK
- 上游仓库: https://github.com/erg-lang/erg
- 检测到的最新版本: v0.6.53 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

Erg is an experimental statically typed programming language implemented in Rust and designed to interoperate with Python. The official README presents it as a language for Python users who want stronger static guarantees, readable errors, and a practical mix of functional and object-oriented programming.

### 项目历史

The public GitHub repository was created in 2022, with an initial 0.1.1 GitHub release shortly afterward. The README states that the repository contains the compiler and documentation and lists features such as refinement-style type checks, Python API imports, optional language-server builds, and localized diagnostics.

### 采用历史

Erg's adoption is early-stage and developer-experimental. The README points users to Cargo, source builds, Nix, a web playground, and multilingual documentation, while the supplied input lists Homebrew and Nix package availability.

### 使用方式

Users run the `erg` compiler or REPL, build it with Cargo or Nix, and can enable feature flags such as language-specific diagnostics, the Erg Language Server, debug mode, or richer REPL behavior. Its core usage story is trying a Python-compatible language with static checks rather than replacing the Python runtime outright.

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

Erg is interesting to package nerds as a young language-runtime formula: it mixes a Rust compiler, Python runtime requirements, optional language-server pieces, and docs/playground expectations. Its package-manager presence is more about discoverability for language experimenters than mass production use.

### 时间线

- 2022: The GitHub repository was created.
- 2022: Version 0.1.1 was published on GitHub releases.
- 2020s: The README documents Cargo, source, Nix, and optional ELS installation paths.

### Related projects

- Erg is related to Python, Rust, Nix, Cargo, and editor language-server tooling.

### 来源

- <https://github.com/erg-lang/erg>
- <https://github.com/erg-lang/erg/releases>
- <https://api.github.com/repos/erg-lang/erg>
- <https://erg-lang.org/the-erg-book>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

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

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

- Nix - erg: normalized package name match | nixpkgs package indexes: pkgs/by-name/er/erg/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.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [rust](https://pkg.so/zh-hans/brew/rust/) - Build dependency declared by Homebrew.
- [ocaml](https://pkg.so/zh-hans/brew/ocaml/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, programming-languages.
- [odin](https://pkg.so/zh-hans/brew/odin/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, programming-languages.
- [faust](https://pkg.so/zh-hans/brew/faust/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, programming-languages.
- [fantom](https://pkg.so/zh-hans/brew/fantom/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, programming-languages.
- [oak](https://pkg.so/zh-hans/brew/oak/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, programming-languages.
- [erlang](https://pkg.so/zh-hans/brew/erlang/) - Shares pkgdb curated category or tags: cli, language-runtime, programming-language, programming-languages.
- [nim](https://pkg.so/zh-hans/brew/nim/) - Shares pkgdb curated category or tags: cli, compiler, language-runtime, programming-language, statically-typed.
- [hy](https://pkg.so/zh-hans/brew/hy/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, programming.
- [three-body](https://pkg.so/zh-hans/brew/three-body/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, compiler, language, language-runtime, programming.
- [nesc](https://pkg.so/zh-hans/brew/nesc/) - Local package facts share a topical domain. Shared terms: cli, compiler, deeply, language, language-runtime.

## Combined YAML source

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


## 来源

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