id = "influxdb-cli"
name = "InfluxDB CLI"
homepage = "https://docs.influxdata.com/influxdb/v2/reference/cli/influx/"
description = "The command-line client for managing InfluxDB resources."
executables = ["influx"]
[dotfiles]
paths = []
secret = ["~/.influxdbv2/configs"]
side_effect = false
[commands]
format = 1
label = "Run a Flux query"
description = "Run a Flux query against InfluxDB 2.x, from a literal string or a file. The API token is left out; use a saved CLI config or INFLUX_TOKEN."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.subcommand]]
path = ["query"]
label = "Query InfluxDB"
[[commands.subcommand.source]]
id = "docs"
kind = "manual"
url = "https://docs.influxdata.com/influxdb/v2/reference/cli/influx/query/"
revision = "2026-10-27"
evidence = """
influx query [query literal] [flags]
| `-c` | `--active-config` | CLI configuration to use for command |
| `-f` | `--file` | Path to Flux script file |
| | `--host` | HTTP address of InfluxDB (default `http://localhost:8086`) |
| `-o` | `--org` | Organization name (mutually exclusive with `--org-id`) |
| `-p` | `--profilers` | Flux query profilers to enable (comma-separated) |
| `-r` | `--raw` | Output raw query results (annotated CSV) |
| | `--skip-verify` | Skip TLS certificate verification |
"""
[[commands.subcommand.field]]
id = "query"
label = "Flux query"
type = "string"
position = 0
sources = ["docs"]
[[commands.subcommand.field]]
id = "file"
label = "Flux script file"
type = "path"
path = { kind = "file", role = "input" }
option = ["--file", "-f"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "org"
label = "Organization"
type = "string"
option = ["--org", "-o"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "host"
label = "Host URL"
type = "url"
option = ["--host"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "active_config"
label = "CLI config name"
type = "string"
option = ["--active-config", "-c"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "raw"
label = "Raw annotated CSV"
type = "boolean"
option = ["--raw", "-r"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "profilers"
label = "Profilers"
description = "Comma-separated, for example operator,query."
type = "string"
option = ["--profilers", "-p"]
sources = ["docs"]
[[commands.subcommand.field]]
id = "skip_verify"
label = "Skip TLS verification"
type = "boolean"
option = ["--skip-verify"]
effect = "exec"
sources = ["docs"]
[[commands.subcommand.task]]
id = "inline"
label = "Run a query string"
fields = ["query", "org"]
required = ["query"]
[[commands.subcommand.task]]
id = "from_file"
label = "Run a query file"
fields = ["file", "org", "raw"]
required = ["file"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["query", "file", "org", "raw"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["host", "active_config", "profilers", "skip_verify"]