Directory Compare FCRS-1.0 About /llms.txt

Grafana CLI (grafanactl)

$ grafanactl Official Med Risk
Grafana Labs · Workspace & SaaS · Apache-2.0 · macos / linux / windows · Reviewed:

grafanactl is Grafana Labs' official Apache-2.0 Go CLI for managing Grafana resources (dashboards, folders, alerts) as code. Modeled after kubectl, it supports -o json and YAML outputs, multi-context config inspection (grafanactl config view -o json), resources get/pull/push, and ships an official SKILL.md.

FCRS-1.0 Score
87 /100
Good
High Confidence
Zero-Friction Install
brew install grafana/tap/grafanactl
CLI vs MCP Decision Hybrid (CLI + MCP)

Use grafanactl with -o json and resources pull/push for dashboard/resource-as-code workflows; pair with Grafana MCP (mcp-grafana) for ad-hoc PromQL/LogQL exploration.

At a Glance

Command
$ grafanactl
FCRS-1.0 Score
87/100 (Good)
Evidence Tier
High Confidence
CLI vs MCP
Hybrid (CLI + MCP)
Reviewed Date

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
✓ Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Kubernetes-style resources get/pull/push verbs with consistent -o json / --output json support and bundled SKILL.md (official_skill).

  • Native -o json across config view and resources commands
  • Ships SKILL.md in grafana/grafanactl (official_skill)
Trust & Safety 20 / 25

Context isolation and GitOps pull/diff workflow reduce accidental dashboard overwrites, though a global --dry-run flag is still evolving.

  • Context-isolated ~/.config/grafanactl/config.yaml and GitOps pull workflow
Setup & Portability 14 / 15

Single Go binary installable via Homebrew tap (grafana/tap/grafanactl), go install, or GitHub releases across all three OSes.

  • Available via brew, go install, and cross-platform binaries
Utility & Efficiency 13 / 15

Cleanly unifies Grafana resource-as-code workflows (pull/push/edit/get) across folders and dashboards.

  • Unified resources abstraction for Grafana observability-as-code
Maintenance & Lineage 9 / 10

Official grafana/grafanactl repository actively developed by Grafana Labs under Apache-2.0.

  • Official grafana/grafanactl repo (Apache-2.0)
Docs & Verifiability 8 / 10

Clean GitHub Pages docs at grafana.github.io/grafanactl/ alongside SKILL.md and --help.

  • Official docs site and SKILL.md

Security, Auth & Guardrails

Auth Modes
Config File Env API Key Service Account
Credential Storage

Stores Grafana server contexts and service-account tokens in ~/.config/grafanactl/config.yaml (inspectable via grafanactl config view).

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

CLI is free (Apache-2.0); connects to self-hosted Grafana or Grafana Cloud workspaces.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# grafanactl Agent Rules
- Always run `grafanactl config view -o json` first to confirm the active Grafana context.
- Prefer `grafanactl resources pull` and git diff review before running `grafanactl resources push`.
- Require user confirmation before deleting or overwriting production dashboards.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect CLI contexts and endpoints in JSON
grafanactl config view -o json

Prints configured Grafana contexts and active target URLs as JSON.

Fetch Grafana dashboards as JSON
grafanactl resources get dashboards -o json

Lists dashboard resources from the active Grafana context in structured JSON.

Controlled Writes & Previews

Pull dashboards to a local directory for review
grafanactl resources pull dashboards -p ./resources -o json

Exports dashboards to ./resources as local JSON files without modifying remote Grafana state.

Strengths for Agents

  • + Consistent -o json output and familiar kubectl-style resource verbs (get, pull, push).
  • + Ships official SKILL.md for AI agent observability-as-code workflows.
  • + Fast Go binary installable via Homebrew tap, go install, or releases.

Caveats & Pitfalls

  • ! Designed for Grafana resource management rather than querying live Prometheus/Loki metrics.
  • ! Relatively young tool compared to legacy Grafana APIs, with subcommands still evolving.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI

Related CLIs in Workspace & SaaS

View category hub →
$ paddle

Official Paddle Billing CLI for subscriptions, products, prices, and raw API requests with `--environment` and JSON output.

$ resend

Official Resend CLI that auto-switches to JSON in non-TTY pipes for email, domain, and webhook workflows.

$ datocms

Official DatoCMS CLI for schema inspection, environment forks, and migrations with `--environment`, `--profile`, and `--json`.

$ wmill

Official Windmill CLI (`wmill`) with `--json`, `sync push --dry-run`, and `job logs` inspection.

$ pup

Official Datadog Labs CLI companion across 33+ Datadog products with `--output json`, `--no-envelope`, and automatic AI agent detection.

$ lark-cli

Official Lark/Feishu CLI built for humans and AI agents with 200+ commands, `--json` envelopes, and 20+ built-in Agent Skills.