Grafana Cloud Enterprise Open source

gcx CLI

Manage Grafana and Grafana Cloud from the terminal and from agentic coding tools.

Overview

gcx is the Grafana CLI that allows you and your AI coding agent to work with Grafana Cloud, Grafana Enterprise, and Grafana OSS.

gcx is designed to be used in common scenarios such as authentication against Grafana, query telemetry, inspect and manage resources, and automate observability workflows as code.

It’s also integrated with Grafana Assistant, combining the previously fragmented user experience into one single tool.

Get started

Note

Refer to the gcx repository in GitHub for the source code, architecture information, and contributor documentation.

  • Introduction to gcx
    What gcx is, what it costs, which Grafana versions it works with, and how its documentation is organized.
  • Install gcx
    Install `gcx` with the quick installer, Homebrew, Windows, a prebuilt binary, or a container.
  • Authenticate gcx
    Sign in with browser OAuth, a service account token, or basic authentication.
  • Configure gcx
    Set up contexts with the configuration file or environment variables.
  • Roles and permissions
    Roles and access policy scopes that `gcx` commands need, and how to fix authorization errors.
  • Log in to gcx
    Create or re-authenticate a gcx context with gcx login, and troubleshoot common login errors.
  • Work with your resources
    Grafana and Grafana Cloud resources you can manage with gcx, and the commands to use for each.
  • User guides
    gcx user guides.
  • Use gcx with AI agents
    How gcx behaves when an AI coding agent runs it, and how to set up skills, sign-in, destructive operations, detection, and output for agents.
  • Usage statistics
    What `gcx` reports to Grafana Labs, and how to opt out.
  • Costs and billing
    Which gcx commands operate billable Grafana Cloud products, and which do not.
  • Keychain credential storage
    How `gcx` stores credentials in your operating system's keychain, and when it falls back to plaintext.
  • CLI reference
    Complete gcx command, flag, and environment variable reference.
  • Migrate your gcx configuration
    Move a legacy `gcx` configuration to the version 1 format.