Install gcx
Quick install using the script
The fastest way to install gcx on Linux or macOS is with the script:
curl -fsSL https://raw.githubusercontent.com/grafana/gcx/main/scripts/install.sh | shThe script:
- Detects your operating system and architecture.
- Downloads the latest release from GitHub
- Verifies the SHA-256 checksum.
- Installs the binary to
~/.local/bin.
Installer configuration options
Use these environment variables to customize the install script:
Examples
Install a specific version:
curl -fsSL https://raw.githubusercontent.com/grafana/gcx/main/scripts/install.sh | VERSION=0.2.4 shInstall to /usr/local/bin:
curl -fsSL https://raw.githubusercontent.com/grafana/gcx/main/scripts/install.sh | INSTALL_DIR=/usr/local/bin shUninstall
To remove gcx, delete the binary:
rm ~/.local/bin/gcxInstall gcx with Homebrew (macOS and Linux)
To install gcx with Homebrew run:
brew install grafana/grafana/gcxTo upgrade an existing installation:
brew upgrade grafana/grafana/gcxHomebrew builds gcx from source on your machine, as it pulls go as a build dependency.
The first install usually takes 30 to 60 seconds, and later upgrades reuse the Homebrew download cache.
This option avoids macOS Gatekeeper because it doesn’t download a prebuilt binary. You won’t need to work around notarisation.
Install a prebuilt binary
Prebuilt binaries are available for a variety of systems and architectures. Refer to the release versions on GitHub for more details.
To install a prebuilt binary:
- Download the archive for the operating system and architecture you need.
- Extract the archive.
- Move the executable to the directory where you want to keep it.
- Make sure that directory is in your
PATH. - Make sure the file has execute permission.
If you use macOS, a manually downloaded binary might be blocked by Gatekeeper. For more information, refer to macOS Gatekeeper and killed: 9.
Install gcx from source
To install gcx with Go, you need:
To install, run:
go install github.com/grafana/gcx/cmd/gcx@latestmacOS Gatekeeper and killed 9
macOS quarantines any downloaded binary by default. Since gcx release binaries are not yet Apple-notarised, macOS may block it the first time you run it. If this happens, you’ll see one of these two symptoms:
- Intel macOS: A dialog says, “Apple could not verify ‘gcx’ is free of malware…”, and the binary doesn’t run.
- Apple Silicon (M-series) macOS: The binary exits immediately with
killed: 9and no visible dialog.
Homebrew users are not affected. Since it compiles gcx from source on your machine, no pre-built binary is downloaded and no xattr is set.
Bypass the macOS gatekeeper
In manual downloads, bypass this by clearing the xattr and ad-hoc sign the binary so Apple Silicon accepts it:
xattr -d com.apple.quarantine "$(command -v gcx)" 2>/dev/null || true
codesign --sign - --force "$(command -v gcx)" # required on Apple SiliconNext, run gcx --version again; subsequent invocations should succeed without the block.
Note that these steps will no longer be necessary once gcx release binaries are Apple-notarised.


