docs-v2/content/v2.0/reference/cli/influx/_index.md

3.2 KiB

title seotitle description menu weight v2.0/tags
influx - InfluxDB command line interface influx - InfluxDB command line interface The influx CLI includes commands to manage many aspects of InfluxDB, including buckets, organizations, users, tasks, etc.
v2_0_ref
name parent
influx Command line tools
101
cli

The influx command line interface (CLI) includes commands to manage many aspects of InfluxDB, including buckets, organizations, users, tasks, etc.

Usage

influx [flags]
influx [command]

{{% note %}}

Store your InfluxDB authentication token

To avoid having to pass your InfluxDB authentication token with each influx command, use one of the following methods to store your token:

  1. Set the INFLUX_TOKEN environment variable using your token.

    export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO==
    
  2. Store your token in ~/.influxdbv2/credentials. The content of the credentials file should be only your token.

    Note: If you set up InfluxDB using the CLI, InfluxDB stores your token in the credentials files automatically.

See View tokens for information about retrieving authentication tokens. {{% /note %}}

Commands

Command Description
auth Authorization management commands
bucket Bucket management commands
help Help about any command
org Organization management commands
ping Check the InfluxDB /health endpoint
query Execute a Flux query
repl Interactive REPL (read-eval-print-loop)
setup Create default username, password, org, bucket, etc.
task Task management commands
user User management commands
write Write points to InfluxDB

Flags

Flag Description Input type
-h, --help Help for the influx command
--host HTTP address of InfluxDB (default http://localhost:9999) string
--local Run commands locally against the filesystem
-t, --token API token to be used throughout client calls string