# 使用 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
- **版本:** 1.3
- **来源摘要:** C++ interpreter
- **主页:** <https://root.cern/cling/>
- **仓库:** <https://github.com/root-project/cling>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cling (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.3
## 项目历史与用法

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

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

- 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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
