Introduction
Manage Grafana instances, dashboards, datasources, alerting, access, and more from your terminal.
Grafana CLI is a command-line interface for managing Grafana instances over the HTTP API. Search and move dashboards, query datasources, configure unified alerting, and administer organizations, users, teams, and service accounts.
It is designed for human operators, scripts, and coding agents. The global
-o/--output flag supports table, json, and yaml, while --read-only and
--no-input make automated exploration safer.
The exhaustive command reference for agents and LLMs is available at projects.piyushgambhir.com/grafana-cli/llms.txt.
Features
- Dashboards: list, inspect, create, update, delete, import, export, restore, and manage dashboard or folder permissions.
- Datasources: manage datasource definitions and query Loki or Prometheus through Grafana's datasource proxy.
- Unified alerting: rules, contact points, notification policies, mute timings, notification templates, and silences.
- Access management: organizations, users, teams, service accounts, and service account tokens.
- More Grafana resources: annotations, snapshots, playlists, library elements, correlations, preferences, and server administration.
- Automation controls: named profiles, environment configuration,
-o json|yaml,--read-only,--no-input, and--quiet.
Next steps
Installation
Install the prebuilt binary or build from source.
Authentication
Connect with a token or basic auth and manage named profiles.
Quick start
Connect and inspect your first Grafana resources.
Agents
Structured output, safety flags, and non-interactive operation.
Independent project. Not affiliated with, endorsed by, or sponsored by Grafana Labs. All product names, logos, and trademarks are the property of their respective owners and are used for identification purposes only.