---
title: influx - InfluxDB command line interface
description: 'The influx command line interface (CLI) provides an interactive shell for the HTTP API associated with influxd. It includes commands for writing and querying data, and managing many aspects of InfluxDB, including databases, organizations, and users. Usage influx [flags]Flags Flag Description -version Display the version and exit -url-prefix Path to add to the URL after the host and port. Specifies a custom endpoint to connect to. -host HTTP address of InfluxDB (default: http://localhost:8086) -p'
url: https://docs.influxdata.com/enterprise_influxdb/v1/tools/influx-cli/
estimated_tokens: 1775
publisher: InfluxData
canonical: https://docs.influxdata.com/enterprise_influxdb/v1/tools/influx-cli/
date: '2026-09-24T13:34:53-05:00'
lastmod: '2026-09-24T13:34:53-05:00'
---

The `influx` command line interface (CLI) provides an interactive shell for the HTTP API associated with `influxd`.
It includes commands for writing and querying data, and managing many aspects of InfluxDB, including databases, organizations, and users.

## Usage

```
influx [flags]
```

## Flags

|            Flag            |                                                                   Description                                                                    |
|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
|         `-version`         |                                                           Display the version and exit                                                           |
|       `-url-prefix`        |                            Path to add to the URL after the host and port. Specifies a custom endpoint to connect to.                            |
|          `-host`           |                                           HTTP address of InfluxDB (default: `http://localhost:8086`)                                            |
|          `-port`           |                                                                Port to connect to                                                                |
|         `-socket`          |                                                            Unix socket to connect to                                                             |
|        `-database`         |                                                        Database to connect to the server                                                         |
|        `-password`         |                           Password to connect to the server. Leaving blank will prompt for password (`--password ''`).                           |
|        `-username`         |                                                        Username to connect to the server                                                         |
|           `-ssl`           |                                                              Use https for requests                                                              |
|        `-unsafessl`        |                                               Set this when connecting to the cluster using https                                                |
|         `-execute`         |                                                             Execute command and quit                                                             |
|         `-format`          |                                         Specify the format of the server responses: json, csv, or column                                         |
|        `-precision`        |                                        Specify the format of the timestamp: rfc3339, h, m, s, ms, u or ns                                        |
|       `-consistency`       |                                              Set write consistency level: any, one, quorum, or all                                               |
|         `-pretty`          |                                                      Turns on pretty print for JSON format                                                       |
|         `-import`          |                                                   Import a previous database export from file                                                    |
|           `-pps`           |                           Points per second the import will allow. The default is `0` and will not throttle importing.                           |
|          `-path`           |                                                              Path to file to import                                                              |
|       `-compressed`        |                                                   Set to true if the import file is compressed                                                   |
|          `-cert`           |              Path to the client certificate file (PEM) presented for mutual TLS (mTLS). Also settable via `INFLUX_CERT`. *v1.13.1+*              |
|           `-key`           |                   Path to the client private key file (PEM) for mutual TLS (mTLS). Also settable via `INFLUX_KEY`. *v1.13.1+*                    |
|         `-root-ca`         |                Path to the CA bundle (PEM) used to verify the server certificate. Also settable via `INFLUX_ROOT_CA`. *v1.13.1+*                 |
|  `-insecure-certificate`   |      Ignore file permission checks when loading the client certificate and key. Also settable via `INFLUX_INSECURE_CERTIFICATE`. *v1.13.1+*      |
|`-ignore-cert-sanity-checks`|Load the client certificate even if it fails client-authentication sanity checks. Also settable via `INFLUX_IGNORE_CERT_SANITY_CHECKS`. *v1.13.1+*|

### [Use influx - InfluxDB command line interface](/enterprise_influxdb/v1/tools/influx-cli/use-influx-cli/)

InfluxDB’s command line interface (`influx`) is an interactive shell for the HTTP API.
| Flag | Description |
| --- | --- |
| Flag | Description |
| -version | Display the version and exit |
| -url-prefix | Path to add to the URL after the host and port. Specifies a custom endpoint to connect to. |
| -host | HTTP address of InfluxDB (default:  http://localhost:8086 ) |
| -port | Port to connect to |
| -socket | Unix socket to connect to |
| -database | Database to connect to the server |
| -password | Password to connect to the server. Leaving blank will prompt for password ( --password '' ). |
| -username | Username to connect to the server |
| -ssl | Use https for requests |
| -unsafessl | Set this when connecting to the cluster using https |
| -execute | Execute command and quit |
| -format | Specify the format of the server responses: json, csv, or column |
| -precision | Specify the format of the timestamp: rfc3339, h, m, s, ms, u or ns |
| -consistency | Set write consistency level: any, one, quorum, or all |
| -pretty | Turns on pretty print for JSON format |
| -import | Import a previous database export from file |
| -pps | Points per second the import will allow. The default is  0  and will not throttle importing. |
| -path | Path to file to import |
| -compressed | Set to true if the import file is compressed |
| -cert | Path to the client certificate file (PEM) presented for mutual TLS (mTLS). Also settable via  INFLUX_CERT .  v1.13.1+ |
| -key | Path to the client private key file (PEM) for mutual TLS (mTLS). Also settable via  INFLUX_KEY .  v1.13.1+ |
| -root-ca | Path to the CA bundle (PEM) used to verify the server certificate. Also settable via  INFLUX_ROOT_CA .  v1.13.1+ |
| -insecure-certificate | Ignore file permission checks when loading the client certificate and key. Also settable via  INFLUX_INSECURE_CERTIFICATE .  v1.13.1+ |
| -ignore-cert-sanity-checks | Load the client certificate even if it fails client-authentication sanity checks. Also settable via  INFLUX_IGNORE_CERT_SANITY_CHECKS .  v1.13.1+ |
