All apps/gcx

gcx

gcx

CLI for managing Grafana Cloud resources.

Runs as gcx|macOS, Linux, Windows|grafana.com

Command form

ai-draft · 2 tasks · 6 fields

Run PromQL or LogQL queries against Grafana Cloud. Login, resource pull/push, alerts and other gcx areas are not covered.

Opens the form; the finished command lands at your prompt, unrun
otty gui gcx

gcx metrics query

Query metrics (PromQL)
Query metrics (PromQL)Example values, fixed in this page — nothing here reaches a terminal
Basic
Query*
string
Time range
string
Output format
string
TasksEach one presets the form for one job
Run query
querysinceoutput
ParametersOnly these flags are editable in the form
Query
PromQL expression, for example rate(http_requests_total[5m]).
string · positional 0
Time range
Look back this far, for example 1h.
string
--since1h
Output format
string
-ograph

gcx logs query

Query logs (LogQL)
Query logs (LogQL)Example values, fixed in this page — nothing here reaches a terminal
Basic
Query*
string
Time range
string
Output format
string
TasksEach one presets the form for one job
Run query
querysinceoutput
ParametersOnly these flags are editable in the form
Query
LogQL expression, for example a stream selector plus a line filter.
string · positional 0
Time range
Look back this far, for example 1h.
string
--since1h
Output format
string
-ograph
SourcesEvery flag above is checked against these
readme
$ gcx metrics query 'sum by (handler)(rate(grafana_http_request_duration_seconds_count{}[5m]))' --since 1h -o graph gcx metrics query 'rate(http_requests_total[5m])' --since 1h gcx logs query '{app="nginx"} |= "error"' --since 1h
help2026-10-27

raw.githubusercontent.com

readme
$ gcx metrics query 'sum by (handler)(rate(grafana_http_request_duration_seconds_count{}[5m]))' --since 1h -o graph gcx metrics query 'rate(http_requests_total[5m])' --since 1h gcx logs query '{app="nginx"} |= "error"' --since 1h
help2026-10-27

raw.githubusercontent.com

Before it fills your prompt, Otty checks the installed gcx against its version. A form that does not match your version is not offered.