grafana-cli
Manage Grafana plugins
TLDR
Install, update, or remove specific plugins
List all installed plugins
SYNOPSIS
grafana-cli [--homepath PATH] [--config PATH] [--pluginsDir PATH] [--verbose] {admin | plugins} [args]
PARAMETERS
--homepath
Path to Grafana installation (default: "/usr/share/grafana")
--config
Path to Grafana config file
--pluginsDir
Path to plugins directory (uses grafana.ini if unset)
--verbose
Enable verbose console logging
-h, --help
Show help
DESCRIPTION
grafana-cli is the official command-line interface for administering Grafana, a popular open-source platform for monitoring and observability. It allows users to manage plugins and perform essential administrative tasks directly from the terminal, bypassing the web UI.
Primary use cases include plugin lifecycle management—installing, listing, updating, and removing plugins—and resetting the admin password for access recovery. Plugins can be sourced from IDs, remote repositories, or direct URLs, with options for version pinning and force updates. The tool integrates seamlessly with Grafana's configuration, supporting overrides for installation paths, config files, and plugin directories.
Ideal for automation in DevOps workflows, Docker containers, Kubernetes deployments, or offline environments. It requires the Grafana server binary context and often runs as the grafana user on Linux distributions. Verbose mode aids debugging, and output is script-friendly.
While powerful, some operations (like plugin installs) interact with a running Grafana instance via HTTP API, necessitating correct API keys or homepath settings. Available on major Linux package managers post-Grafana installation.
CAVEATS
Requires Grafana installation and proper user permissions (e.g., grafana user); some commands need running server and API access; plugin ops may fail in unsigned/mixed-content modes.
ADMIN SUBCOMMANDS
reset-admin-password <password>: Reset admin user password.
Requires server running.
PLUGINS SUBCOMMANDS
install <plugin-id> [url] [version]: Install plugin.
install-remote <url>: From URL.
ls [type] [search]: List local plugins.
list-remote [search]: List remote.
update [-all] [-f]: Update plugins.
remove <plugin-id>: Uninstall.
HISTORY
Introduced in Grafana ~v2.1 (2015) for plugin management; expanded with admin features in v3+; actively maintained in Grafana OSS/Enterprise (v10+ supports Forge plugins).
SEE ALSO
systemctl(1)


