Documentation

Install and use the influx CLI

Use the influx CLI to interact with and manage your InfluxDB Cloud instance. Write and query data, generate InfluxDB templates, export data, and more.

Install the influx CLI

We recommend running influx CLI commands in Powershell. Command Prompt is not fully compatible.

  1. Download the influx CLI package.

    influx CLI v2.7.5 (Windows)

  2. Expand the downloaded archive.

    Expand the downloaded archive into C:\Program Files\InfluxData\ and rename it if desired.

    > Expand-Archive .\influxdb2-client-2.7.5-windows-amd64.zip -DestinationPath 'C:\Program Files\InfluxData\'
    > mv 'C:\Program Files\InfluxData\influxdb2-client-2.7.5-windows-amd64' 'C:\Program Files\InfluxData\influx'
    
    • Copy
    • Fill window
  3. Grant network access to the influx CLI.

    When using the influx CLI for the first time, Windows Defender displays the following message:

    Windows Defender Firewall has blocked some features of this app.

    To grant the influx CLI the required access, do the following:

    1. Select Private networks, such as my home or work network.
    2. Click Allow access.

Set up the influx CLI

Provide required authentication credentials

To avoid having to pass your InfluxDB host, API token, and organization with each command, store them in an influx CLI configuration (config). influx commands that require these credentials automatically retrieve these credentials from the active config.

Use the influx config create command to create an influx CLI config and set it as active:

influx config create --config-name 
CONFIG_NAME
\
--host-url
https://cloud2.influxdata.com
\
--org
ORG
\
--token
API_TOKEN
\
--active
  • Copy
  • Fill window

Replace the following:

  • CONFIG_NAME: Connection configuration name.
  • ORG_NAME: your InfluxDB organization.
  • API_TOKEN: your API token.

For more information about managing CLI configurations, see the influx config documentation.

For instructions on how to create API tokens, see Create a token.

Enable shell completion (Optional)

To install influx shell completion scripts, see influx completion.

Use influx CLI commands

For information about influx CLI commands, see the influx CLI reference documentation.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

Now Generally Available

InfluxDB 3 Core and Enterprise

Start fast. Scale faster.

Get the Updates

InfluxDB 3 Core is an open source, high-speed, recent-data engine that collects and processes data in real-time and persists it to local disk or object storage. InfluxDB 3 Enterprise builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries and optimized storage. A free tier of InfluxDB 3 Enterprise is available for non-commercial at-home or hobbyist use.

For more information, check out:

InfluxDB Cloud powered by TSM