# 使用 Homebrew, Nix 安装 otel-cli

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

## 安装

```sh
sudo av install brew:otel-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install otel-cli
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#otel-cli
```

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

## 软件包事实

- **软件包键:** brew:otel-cli
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/otel-cli>
- **版本:** 0.4.5
- **来源摘要:** Tool for sending events from shell scripts & similar environments
- **主页:** <https://github.com/equinix-labs/otel-cli>
- **仓库:** <https://github.com/equinix-labs/otel-cli>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/equinix-labs/otel-cli/archive/refs/tags/v0.4.5.tar.gz>
- **最后更新:** 2026-07-27T23:46:53+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- otel-cli (cli)
- otel-cli (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.4.5
- 管理器更新时间: 2026-07-27
- 本地数据: OK
- 上游仓库: https://github.com/equinix-labs/otel-cli
- 检测到的最新版本: v0.4.5 (当前)
## 项目历史与用法

otel-cli is an Equinix Labs command-line tool for emitting OpenTelemetry traces from shell scripts and other environments where launching a helper process is the simplest instrumentation option.

### 项目历史

GitHub records `equinix-labs/otel-cli` as created on 2021-01-08. The README describes the tool as a Go program for sending OpenTelemetry traces, built for shell scripts and places where executing another program is the best available way to create spans.

The project follows OpenTelemetry's configuration culture: CLI flags, JSON config, and environment variables map onto OTEL-style endpoint, protocol, timeout, header, service-name, and traceparent settings. The README also documents a deliberate non-recording default when no endpoint is configured, so adding the command to a script does not break normal execution before tracing is enabled.

### 采用历史

otel-cli's adoption niche is observability for glue code. OpenTelemetry SDKs cover application languages, but shell scripts, CI jobs, and one-off operational commands often need a lower-friction path. The README recommends using a localhost OpenTelemetry Collector to buffer spans and avoid per-command connection overhead.

Release assets broadened installation beyond Go source builds. The README documents tar.gz, Windows zip, Alpine apk, Red Hat rpm, Debian deb, Docker images, and a Homebrew tap, while the av.db input records a Homebrew formula and Nix package.

### 使用方式

Users wrap commands with `otel-cli exec` to run a process inside a span, call `otel-cli span` to emit spans with explicit start and end times, pass W3C `traceparent` context through environment variables or arguments, and run `otel-cli server tui` or `otel-cli server json` for local inspection and test capture.

The tool is especially useful in CI/CD and operations scripts because it can bridge command execution into an OpenTelemetry backend without rewriting the script in a language SDK. It can send to an OpenTelemetry Collector or to vendors that accept OTLP.

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

otel-cli is package-nerd significant because it turns an observability protocol into a packageable executable. Its release matrix, environment-variable compatibility, and package-manager availability are part of the product: a tracing tool for scripts only works if it is easy to install wherever scripts run.

### 时间线

- 2021-01-08: GitHub records creation of `equinix-labs/otel-cli`.
- 2021-08-18: a GitHub issue from a Jenkins OpenTelemetry plugin maintainer requested binaries to ease adoption.
- 2022-02-24: GitHub release v0.0.20 shipped packaged binaries and changelog entries including `--fail` and OTLP endpoint handling fixes.
- 2024-04-01: GitHub release v0.4.5 was published with multi-platform package assets.

### Related projects

- OpenTelemetry defines the observability APIs, SDKs, OTLP protocol, and semantic conventions that otel-cli emits into.
- The OpenTelemetry Collector is the recommended local receiver/buffer in the README.
- otel-desktop-viewer is documented as a local receiver/UI option for trying spans generated by otel-cli.

### 来源

- <https://api.github.com/repos/equinix-labs/otel-cli>
- <https://api.github.com/repos/equinix-labs/otel-cli/releases>
- <https://formulae.brew.sh/formula/otel-cli>
- <https://github.com/equinix-labs/otel-cli>
- <https://github.com/equinix-labs/otel-cli/issues/37>
- <https://opentelemetry.io/docs/what-is-opentelemetry/>
- <https://raw.githubusercontent.com/equinix-labs/otel-cli/main/README.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:** otel-cli
- **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 - otel-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/ot/otel-cli/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.
- [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.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [lttng-ust](https://pkg.so/zh-hans/brew/lttng-ust/) - Shares pkgdb curated category or tags: cli, developer-tools, observability, tracing.
- [sentry-cli](https://pkg.so/zh-hans/brew/sentry-cli/) - Shares pkgdb curated category or tags: cli, developer-tools, observability.
- [newrelic-cli](https://pkg.so/zh-hans/brew/newrelic-cli/) - Shares pkgdb curated category or tags: cli, developer-tools, observability.
- [parca](https://pkg.so/zh-hans/brew/parca/) - Shares pkgdb curated category or tags: cli, developer-tools, observability.
- [alp](https://pkg.so/zh-hans/brew/alp/) - Shares pkgdb curated category or tags: cli, developer-tools, observability.
- [grafana-alloy](https://pkg.so/zh-hans/brew/grafana-alloy/) - Shares pkgdb curated category or tags: cli, developer-tools, observability, opentelemetry.
- [zipkin](https://pkg.so/zh-hans/brew/zipkin/) - Shares pkgdb curated category or tags: cli, developer-tools, observability, tracing.
- [fzf](https://pkg.so/zh-hans/brew/fzf/) - Shares pkgdb curated category or tags: cli, developer-tools, go.
- [powerline-go](https://pkg.so/zh-hans/brew/powerline-go/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, go, shell.

## Combined YAML source

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