roll over changes for #1364, upd links/format

pull/1364/head^2
Kelly 2020-09-01 13:39:19 -07:00
parent 2969d085ee
commit 6c62df2b52
1 changed files with 18 additions and 15 deletions

View File

@ -18,33 +18,34 @@ The `influx` command line interface (CLI) includes commands to manage many aspec
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](/influxdb/v2.0/security/tokens/)
with each `influx` command, use one of the following methods to store your token:
#### Set your credentials
1. Set the `INFLUX_TOKEN` environment variable using your token.
1. To avoid having to pass your InfluxDB [authentication token](/influxdb/v2.0/security/tokens/view-tokens/) with each `influx` command, set up a configuration profile if you haven't already.
2. To see if you have a configuration profile, run `influx config`. If nothing is displayed, you don't have a configuration profile.
3. To configure a profile, in a terminal, run the following command:
```bash
export INFLUX_TOKEN=oOooYourAuthTokenOoooOoOO==
```
```sh
# Set up a configuration profile
influx config create -n default \
-u http://localhost:9999 \
-o example-org \
-t mySuP3rS3cr3tT0keN \
-a
```
2. Store your token in `~/.influxdbv2/credentials`.
_The content of the `credentials` file should be only your token._
If you [set up InfluxDB using the CLI](/influxdb/v2.0/reference/cli/influx/setup),
InfluxDB stores your token in the credentials files automatically.
_See [View tokens](/influxdb/v2.0/security/tokens/view-tokens/) for information about
retrieving authentication tokens._
This configures a new profile named `default` and makes the profile active so commands run against this instance.
For more detail, see [influx config](/influxdb/v2.0/reference/cli/influx/config/).
{{% /note %}}
## Commands
| Command | Description |
|:------- |:----------- |
| [apply](/influxdb/v2.0/reference/cli/influx/apply) | Apply an InfluxDB template |
@ -71,11 +72,13 @@ retrieving authentication tokens._
| [write](/influxdb/v2.0/reference/cli/influx/write) | Write points to InfluxDB |
## Mapped environment variables
Some `influx` CLI flags are mapped to environment variables.
Mapped flags get the value of the environment variable.
To override environment variables, set the flag explicitly in your command.
## Flags
| Flag | | Description |
|:---- |:--- |:----------- |
| `-h` | `--help` | Help for the `influx` command |