Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

InfluxDB CLI

$ influx Official Med Risk
InfluxData · Database & Data · MIT · macos / linux / windows

The InfluxDB v2 CLI (influx) manages buckets, orgs, tokens, backups, and Flux time-series queries against InfluxDB v2 OSS and Cloud. Resource commands support --json (or INFLUX_OUTPUT_JSON=true), while INFLUX_HOST, INFLUX_TOKEN, and INFLUX_ORG enable clean headless authentication.

FCRS-1.0 Score
83 /100
Good
Medium Confidence
Zero-Friction Install
brew install influxdb-cli
CLI vs MCP Decision CLI Preferred vs MCP

influx executes Flux queries, bulk line-protocol writes, and influx backup/restore streams directly from local files with minimal overhead.

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 21 / 25

Resource commands support --json and INFLUX_OUTPUT_JSON=true, and env vars eliminate prompts, though influx query returns annotated CSV rather than JSON.

  • --json on resource commands; influx query --raw outputs annotated CSV
Trust & Safety 20 / 25

Token-scoped permissions and INFLUX_TOKEN env var isolation protect credentials, though influx delete and bucket delete act without --dry-run.

  • Token-based RBAC and env var support; no global --dry-run
Setup & Portability 13 / 15

Compiled Go binary distributed via Homebrew and official tarballs across macOS, Linux, and Windows.

  • Available via brew install influxdb-cli and static release binaries
Utility & Efficiency 13 / 15

Covers queries, line-protocol ingestion, bucket lifecycle, and hot backups in one binary.

  • Unifies query, write, bucket, auth, and backup
Maintenance & Lineage 8 / 10

Official influxdata/influx-cli under MIT license, focused specifically on InfluxDB v2 APIs.

  • Official InfluxData repository under MIT license
Docs & Verifiability 8 / 10

Complete CLI subcommand reference on docs.influxdata.com with env var mappings.

  • Detailed CLI reference at docs.influxdata.com

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Stores named CLI configs in ~/.influxdbv2/configs or reads INFLUX_HOST, INFLUX_TOKEN, and INFLUX_ORG environment variables.

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

MIT open-source CLI; InfluxDB Cloud usage incurs vendor charges.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# InfluxDB CLI (influx) Agent Rules
- Configure `INFLUX_HOST`, `INFLUX_TOKEN`, and `INFLUX_ORG` via env vars; never pass `--token` inline if avoidable.
- Pass `--json` on `list` / `find` management commands for reliable parsing.
- Confirm org and bucket names before running `influx bucket delete` or `influx delete`.

Agent-Ready Command Recipes

Safe Read-Only Queries

List InfluxDB buckets as JSON
influx bucket list --json

Returns all accessible buckets, retention rules, and IDs in structured JSON.

Run a read-only Flux query
influx query 'from(bucket: "metrics") |> range(start: -15m) |> limit(n: 10)' --raw

Executes a Flux time-series query and prints raw annotated CSV output.

Controlled Writes & Previews

Write a line-protocol point to a bucket
influx write --bucket metrics --precision s "cpu_load,host=app01 value=0.42"

Appends a single timestamped line-protocol metric point to the target bucket.

Strengths for Agents

  • + --json and INFLUX_* environment variables work cleanly for resource inspection.
  • + Single static Go binary handles queries, writes, templates, and backups.

Caveats & Pitfalls

  • ! influx query emits Flux annotated CSV instead of JSON.
  • ! Targets InfluxDB v2 APIs; InfluxDB v3 uses separate SQL/Flight tooling.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI