# 使用 Homebrew, Nix 安装 cling

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

## 安装

```sh
sudo av install brew:cling
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cling
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cling
```

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

## 软件包事实

- **软件包键:** brew:cling
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/cling>
- **版本:** 1.3
- **来源摘要:** C++ interpreter
- **主页:** <https://root.cern/cling/>
- **仓库:** <https://github.com/root-project/cling>
- **上游文档:** <https://root.cern/cling/>
- **许可证:** (LGPL-2.1-only OR NCSA) AND (Apache-2.0 WITH LLVM-exception)
- **源码归档:** <https://github.com/root-project/cling/archive/refs/tags/v1.3.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- cling (cli)
- cling (别名)

## 依赖

- zstd

## 构建依赖

- cmake

## macOS 提供的库

- libedit
- libxml2
- ncurses

## 安装行为

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

## 版本和新鲜度

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

Cling is an interactive C++ interpreter built on Clang and LLVM. The official README describes it as a REPL that reuses Clang diagnostics, supports interactive C++ development, and can be used from the command line or as a Jupyter kernel.

### 项目历史

Cling emerged from the ROOT high-energy physics ecosystem as the new interpreter for ROOT 6. The official README includes a peer-reviewed CHEP 2012 citation, 'Cling - The New Interactive Interpreter for ROOT 6', and the ROOT documentation presents Cling as ROOT's C++ interpreter.

### 采用历史

Cling's adoption is strongest through ROOT rather than as an isolated package. In package-manager culture, standalone formulae such as Homebrew and Nix expose it to users who want an interactive C++ REPL without installing or centering an entire ROOT workflow.

### 使用方式

The README documents building Cling with the matching root-project LLVM branch, running cling with inline C++ snippets or an interactive prompt, using .help, and enabling a Jupyter kernel. The ROOT manual covers prompt commands and interactive C++ usage inside ROOT.

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

Cling is package-nerd significant because it turns a compiled language and a large compiler infrastructure into a packaged interactive runtime. It also illustrates the maintenance burden of packaging tools that track LLVM and Clang closely, which is why distribution recipes matter for users who just want a working C++ REPL.

### 时间线

- 2012: CHEP publication describes Cling as the new interactive interpreter for ROOT 6.
- 2010s: Cling release tags progress from v0.4 through v1.x in the official repository tag list.
- 2020s: Official README documents standalone builds, LLVM/Clang integration, Jupyter support, and ROOT manual integration.
- 2026: Batch input lists Homebrew and Nix distribution.

### Related projects

- Cling is directly related to ROOT, Clang, LLVM, and Jupyter. It belongs near other interactive language runtimes and C++ exploration tools, but its official lineage is ROOT and LLVM/Clang rather than a general scripting-language implementation.

### 来源

- <https://github.com/root-project/cling#readme>
- <https://root.cern/cling>
- <https://root.cern/manual/cling>
- <https://github.com/root-project/cling/blob/master/docs/ReleaseNotes.md>


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cling
- **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 - cling: normalized package name match | nixpkgs package indexes: pkgs/by-name/cl/cling/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [zstd](https://pkg.so/zh-hans/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [cpi](https://pkg.so/zh-hans/brew/cpi/) - Shares pkgdb curated category or tags: cli, cpp, interpreter, language-runtime, repl.
- [yaegi](https://pkg.so/zh-hans/brew/yaegi/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, repl.
- [bic](https://pkg.so/zh-hans/brew/bic/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, repl.
- [woxi](https://pkg.so/zh-hans/brew/woxi/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime, repl.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime.
- [python@3.13](https://pkg.so/zh-hans/brew/python-3-13/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime.
- [python@3.12](https://pkg.so/zh-hans/brew/python-3-12/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime.
- [ruby](https://pkg.so/zh-hans/brew/ruby/) - Shares pkgdb curated category or tags: cli, interpreter, language-runtime.
- [julia](https://pkg.so/zh-hans/brew/julia/) - Local package facts share a topical domain. Shared terms: cli, language, language-runtime, repl, runtime.

## Combined YAML source

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