Skip to content

feat: Add CLI#208

Open
TheTrueAI wants to merge 2 commits intoInfluxCommunity:mainfrom
TheTrueAI:add-cli
Open

feat: Add CLI#208
TheTrueAI wants to merge 2 commits intoInfluxCommunity:mainfrom
TheTrueAI:add-cli

Conversation

@TheTrueAI
Copy link
Copy Markdown
Contributor

@TheTrueAI TheTrueAI commented Apr 20, 2026

Proposed Changes

Developers and AI tooling need a simple, scriptable query command for fast feedback during development. Existing community Python CLI seems unmaintained and not aligned with current behavior. So this PR introduces the following:

  • Adds a new influx3 query CLI path for read/query workflows.
  • Supports SQL and InfluxQL queries with JSON, JSONL, CSV, and pretty output formats.
  • Adds module entrypoint support so the CLI can also be run through python -m influxdb_client_3.
  • Fixes Windows-specific PEM newline handling for Flight query TLS root certificates.

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • Tests pass
  • Commit messages are conventional
  • Sign CLA (if not already signed)

Add a new query CLI to support quick read/debug workflows from terminal and AI agents.
- add influx3 query with json, jsonl, csv, and pretty output
- add module execution path via python -m influxdb_client_3
- wire console entry point in setup
- add CLI tests
@TheTrueAI TheTrueAI changed the title Add CLI feat: Add CLI Apr 20, 2026
Copy link
Copy Markdown
Member

@bednar bednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheTrueAI thanks for the PR. There is already an existing CLI tool: https://docs.influxdata.com/influxdb3/core/reference/cli/influxdb3/. What’s the reason for creating a new one in the Python v3 client?

@TheTrueAI
Copy link
Copy Markdown
Contributor Author

Good point — the official influxdb3 query CLI does cover the same query functionality. My motivation was zero-install in Python environments: pip install influxdb3-python gives you the CLI inside the venv with no separate binary needed. This is useful for Python-centric CI and AI agent workflows where adding system binaries is friction.

Happy to scope this down or close if you feel the overlap isn't justified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants