Grafana CLI is a small executable that is bundled with Grafana server and is supposed to be executed on the same machine Grafana server is running on.
Grafana CLI has `plugins` and `admin` commands, as well as global options.
Grafana CLI is a small executable that is bundled with Grafana server. It can be executed on the same machine Grafana server is running on. Grafana CLI has `plugins` and `admin` commands, as well as global options.
To list all commands and options:
```
grafana-cli -h
```
## Invoking Grafana CLI
**Linux users**
Some commands, such as installing or removing plugins, require `sudo` in order to run.
**Windows users**
Some commands, such as installing or removing plugins, require you to run Windows PowerShell as Administrator.
To invoke Grafana CLI, add the path to the grafana binaries in your `PATH` environment variable. Alternately, if your current directory is the `bin` directory, use `./grafana-cli`. Otherwise, you can specify full path to the CLI. For example, on Linux `/usr/share/grafana/bin/grafana-cli` and on Windows `C:\Program Files\GrafanaLabs\grafana\bin\grafana-cli.exe`.
Before you enter commands, `cd` into the Grafana bin directory. The default path is:
```
cd "C:\Program Files\GrafanaLabs\grafana\bin"
```
>**Note:** Some commands, such as installing or removing plugins, require `sudo` on Linux. If you are on Windows, run Windows PowerShell as Administrator.
## Grafana CLI command syntax
...
...
@@ -122,7 +114,7 @@ Sets the path for the Grafana install/home path, defaults to working directory.
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.