---
title: "Introduction to the Grafana CLI | Grafana documentation"
description: "Overview of Grafana CLI, a command line tool for managing Grafana resources as code."
---

# Introduction to the Grafana CLI

Grafana command-line tools are designed to simplify interaction with Grafana instances. You can authenticate, manage multiple environments, and perform administrative tasks through the Grafana REST API, all from the terminal. Whether you’re automating workflows in CI/CD pipelines or switching between staging and production environments, the Grafana CLI tool provides a flexible and efficient way to manage your Grafana setup as code.

`gcx` works across all environments for Grafana OSS, Enterprise, and Cloud. **Use `gcx` to work with AI agents**.

## Explore

[gcx CLI (recommended)  
\
Overview of the Grafana CLI `gcx`, compatible with AI agents](./gcx)

[grafanactl CLI (deprecated)  
\
Learn how to install, set up and use the Grafana CLI `grafanactl`](./grafanactl)
