influx - InfluxDB command line interface
influx command line interface (CLI) includes commands to manage many aspects of InfluxDB,
including buckets, organizations, users, tasks, etc.
Download and install 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.
influx config create command
to create an
influx CLI config and set it as active:
influx config create --config-name <config-name> \ --host-url http://localhost:8086 \ --org <your-org> \ --token <your-auth-token> \ --active
For more information about managing CLI configurations, see the
influx config documentation.
influx [flags] influx [command]
|apply||Apply an InfluxDB template|
|auth||API token management commands|
|backup||Back up data (InfluxDB OSS only)|
|bucket||Bucket management commands|
|bucket-schema||Manage InfluxDB bucket schemas (InfluxDB Cloud only)|
|completion||Generate completion scripts|
|config||Configuration management commands|
|delete||Delete points from InfluxDB|
|export||Export resources as a template|
|help||Help about any command|
|org||Organization management commands|
|ping||Check the InfluxDB
|query||Execute a Flux query|
|restore||Restore backup data (InfluxDB OSS only)|
|setup||Create default username, password, org, bucket, etc. (InfluxDB OSS only)|
|stacks||Manage InfluxDB stacks|
|task||Task management commands|
|telegrafs||Telegraf configuration management commands|
|template||Summarize and validate an InfluxDB template|
|user||User management commands|
|v1||Work with the v1 compatibility API|
|version||Print the influx CLI version|
|write||Write points to InfluxDB|
||Help for the
Flag patterns and conventions
influx CLI uses the following patterns and conventions:
Mapped environment variables
influx CLI flags mapped to environment variables are listed in the Mapped to column.
Mapped flags inherit the value of the environment variable.
To override environment variables, set the flag explicitly in your command.
Shorthand and longhand flags
influx CLI flags support both shorthand and longhand forms.
- shorthand: a shorthand flag begins with a single hyphen followed by a single letter (for example:
- longhand: a longhand flag starts with two hyphens followed by a multi-letter,
hyphen-spaced flag name (for example:
Commands can use both shorthand and longhand flags in a single execution.
Flag input types
influx CLI flag input types are listed in each the table of flags for each command.
Flags support the following input types:
Text string, but the flag can be used only once per command execution.
Single text string, but the flag can be used multiple times per command execution.
Sequence of digits representing an integer value.
Length of time represented by an integer and a duration unit
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, the following resources are available:
InfluxDB Cloud and InfluxDB Enterprise customers can contact InfluxData Support.