# 使用 Homebrew, Nix 安装 gcx

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

## 安装

```sh
sudo av install brew:gcx
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gcx
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gcx
```

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

## 软件包事实

- **软件包键:** brew:gcx
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gcx>
- **版本:** 0.6.0
- **来源摘要:** CLI for managing Grafana Cloud resources
- **主页:** <https://github.com/grafana/gcx>
- **仓库:** <https://github.com/grafana/gcx>
- **上游文档:** <https://grafana.com/docs/grafana/latest/as-code/observability-as-code/grafana-cli/gcx>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/grafana/gcx/archive/refs/tags/v0.6.0.tar.gz>
- **最后更新:** 2026-07-24T16:01:44Z
- **已生成:** 2026-07-25T07:20:51+00:00

## 可执行文件

- gcx (cli)
- gcx (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-25
- 管理器版本: 0.6.0
- 管理器更新时间: 2026-07-24
- 本地数据: OK
- 上游仓库: https://github.com/grafana/gcx
- 检测到的最新版本: v0.6.0 (当前)
## 项目历史与用法

gcx is Grafana Labs' command-line interface for structured access to Grafana dashboards, alerts, data sources, telemetry, and Grafana Cloud products. It is designed for both interactive terminal work and automation by coding agents.

### 项目历史

Grafana opened the gcx repository in March 2026 and published its earliest currently listed GitHub release, v0.2.0, in April 2026. The project entered public preview as a successor path for users of the older grafanactl tool.

### 采用历史

Grafana's official documentation identifies gcx as the recommended Grafana CLI and documents migration from the deprecated grafanactl command. Grafana distributes it through release archives, Go's module toolchain, an install script, and the official grafana/grafana Homebrew tap.

### 使用方式

Users create named contexts with gcx login, then query metrics, logs, traces, dashboards, alert rules, SLOs, and other Grafana resources. JSON and YAML output, predictable exit codes, resource pull and push commands, and bundled agent skills make the tool suitable for CI, GitOps, and agentic workflows.

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

gcx is notable as a young vendor CLI that deliberately unifies previously fragmented Grafana and Grafana Cloud workflows. Its Go binary, Homebrew distribution, structured output, environment-variable authentication, multi-context configuration, and explicit AI-agent support reflect contemporary CLI packaging and automation practice.

### 时间线

- 2026-03: Official GitHub repository created.
- 2026-04: v0.2.0 published as the earliest currently listed GitHub release.
- 2026: Grafana documents gcx as the recommended replacement path for grafanactl and marks it public preview.

### Related projects

- Grafana is the observability platform gcx manages.
- grafanactl is the older Grafana CLI that official documentation now describes as deprecated.
- Grafana Assistant supplies agent-oriented investigation capabilities exposed through gcx.

### 来源

- <https://github.com/grafana/gcx>
- <https://github.com/grafana/gcx/releases>
- <https://grafana.com/docs/grafana/latest/as-code/observability-as-code/grafana-cli/gcx/>
- <https://grafana.com/docs/grafana/latest/as-code/observability-as-code/grafana-cli/gcx/installation/>


## 安全说明

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



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/gcx/config.yaml, ./.gcx.yaml
## 源数据库详情

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


## 相关链接

- [Cloud CLI packages](https://www.automicvault.com/zh-hans/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [AI and agent packages](https://www.automicvault.com/zh-hans/pkg/ai-agent-tools/) - Matched AI model, agent, coding-agent, orchestration, or MCP metadata.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [go](https://www.automicvault.com/zh-hans/pkg/brew/go/) - Build dependency declared by Homebrew.
- [logcli](https://www.automicvault.com/zh-hans/pkg/brew/logcli/) - Shares av.db curated category or tags: cli, cloud-infrastructure, grafana, observability.
- [mimirtool](https://www.automicvault.com/zh-hans/pkg/brew/mimirtool/) - Shares av.db curated category or tags: cli, cloud-infrastructure, grafana, observability.
- [newrelic-infra-agent](https://www.automicvault.com/zh-hans/pkg/brew/newrelic-infra-agent/) - Shares av.db curated category or tags: cli, cloud-infrastructure, observability.
- [ansible](https://www.automicvault.com/zh-hans/pkg/brew/ansible/) - Shares av.db curated category or tags: automation, cli, cloud, cloud-infrastructure.
- [atlantis](https://www.automicvault.com/zh-hans/pkg/brew/atlantis/) - Shares av.db curated category or tags: automation, cli, cloud-infrastructure, gitops.
- [awscli](https://www.automicvault.com/zh-hans/pkg/brew/awscli/) - Shares av.db curated category or tags: automation, cli, cloud, cloud-infrastructure.
- [awscli@1](https://www.automicvault.com/zh-hans/pkg/brew/awscli-1/) - Shares av.db curated category or tags: automation, cli, cloud, cloud-infrastructure.
- [grizzly](https://www.automicvault.com/zh-hans/pkg/brew/grizzly/) - Shares av.db curated category or tags: cli, cloud-infrastructure, grafana, observability.
- [newrelic](https://www.automicvault.com/zh-hans/pkg/npm/newrelic/) - Local package facts share a topical domain. Shared terms: agent, cli, cloud, cloud-infrastructure, infrastructure.
- [kubespy](https://www.automicvault.com/zh-hans/pkg/brew/kubespy/) - Local package facts share a topical domain. Shared terms: cli, cloud, cloud-infrastructure, infrastructure, observability.

## Combined YAML source

View the package source record on GitHub. [combined/gcx.yml](https://github.com/automic-vault/db/blob/main/combined/gcx.yml)


## 来源

- Nucleus package database
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
