# 使用 Homebrew, pacman, zypper, scoop 安装 logcli

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

## 安装

```sh
sudo av install brew:logcli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install logcli
```

  证据: local Homebrew formula metadata

### Linux

- pacman (92%):

```sh
sudo pacman -S logcli
```

  证据: Arch Linux sync databases: logcli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install logcli
```

  证据: openSUSE Tumbleweed package metadata: logcli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/logcli
```

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

## 软件包事实

- **软件包键:** brew:logcli
- **软件包管理器:** Homebrew
- **版本:** 3.7.4
- **来源摘要:** Run LogQL queries against a Loki server
- **主页:** <https://grafana.com/oss/loki>
- **仓库:** <https://github.com/grafana/loki>
- **最后更新:** 2026-07-26T13:41:02+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- logcli (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

logcli is Grafana Loki's command-line client for running LogQL queries, inspecting labels and series, and using Loki from scripts or terminal workflows.

### 项目历史

logcli is developed inside the Grafana Loki repository. Loki itself is described by Grafana as a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus, designed to index labels rather than full log contents.

Grafana introduced Loki publicly in 2018 as Prometheus-inspired logging for cloud-native systems, and GitHub release metadata records the v0.1.0 beta in June 2019. logcli became the terminal-facing companion to that stack, giving users a way to query Loki without Grafana's web UI.

### 采用历史

logcli's adoption follows Loki adoption. The Loki README points to an ADOPTERS.md file listing organizations using Loki, including Grafana Labs, Red Hat, Dropbox, ASML, and others. Package metadata in this batch shows logcli distributed through Homebrew, Arch, Scoop, and openSUSE.

In operational teams, logcli fills the same niche that `curl`, `kubectl logs`, and Prometheus query CLIs fill elsewhere: repeatable shell access to observability data, useful for incident response, automation, and checking label cardinality or query volume.

### 使用方式

Grafana's documentation describes logcli as a query tool, not an ingestion tool. Users set `LOKI_ADDR` or `--addr`, optionally provide username/password, bearer token, tenant id, certificate paths, or proxy settings, and run commands such as `query`, `labels`, `series`, `stats`, and `volume`.

The docs recommend matching the logcli version to the Loki server version and downloading binaries from Loki releases or building `cmd/logcli/logcli` from the Loki source tree.

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

logcli is package-nerd significant because it packages a small, scriptable interface to a much larger observability system. Homebrew and other package managers let operators install only the query client without deploying Loki locally, which is exactly the sort of CLI split that package ecosystems are good at.

### 时间线

- 2018: Grafana announces Loki as Prometheus-inspired logging for cloud-native use.
- 2019: Loki v0.1.0 beta release is published on GitHub.
- Current: Grafana documentation lists logcli as the Loki command-line tool for querying and exploring logs.

### Related projects

- Grafana Loki: the log aggregation system queried by logcli.
- LogQL: Loki's query language used by logcli.
- Grafana: the visualization and exploration UI commonly used with Loki.
- Prometheus: the monitoring system whose label model inspired Loki.

### 来源

- <https://github.com/grafana/loki>
- <https://github.com/grafana/loki/blob/main/ADOPTERS.md>
- <https://github.com/grafana/loki/releases/tag/v0.1.0>
- <https://grafana.com/docs/loki/latest/query/logcli/>
- <https://grafana.com/docs/loki/latest/query/logcli/getting-started/>


## 安全说明

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


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

- pacman - logcli - 3.6.6-1: normalized package name match | Arch Linux sync databases: logcli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A command-line for loki | https://github.com/grafana/loki
- zypper - logcli - 3.7.4-1.1: normalized package name match | openSUSE Tumbleweed package metadata: logcli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | LogCLI tool | https://grafana.com/loki
- Scoop - main/logcli: normalized package name match | Scoop official bucket manifest trees: bucket/logcli.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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