
## How the Statsig CLI works

The Statsig CLI is a command-line interface that helps with management of Feature Gates, Experiments, and Dynamic Configs within the Statsig platform. This tool lets you create, manage, and delete configs from the command line, and you can also use it within scripts.

## Why use the Statsig CLI

### Efficiency

The Statsig CLI provides a fast way to interact with Statsig, reducing the need for manual actions through the Console interface. It allows quick execution of tasks with simple commands.

### Automation

You can integrate the CLI into CI/CD pipelines to automate the management of Feature Gates and Experiments.

### Consistency

Using the CLI enables scriptable and repeatable actions, promoting best practices and reducing the risk of human error.

## Installation

### Prerequisites

* Node.js (version 14 or higher)
* npm (Node Package Manager)

### Install and configure

1. Install the Statsig CLI using npm:

```bash
$ npm install -g @statsig/siggy
```

2. Check install

```bash
$ siggy --version
```

{% callout type="info" %}
If you get a `command not found` error, add your node global bin folder to your path.

Run `export PATH=$PATH:$(npm get prefix -g)/bin` to do this.

If that doesn't work, run the CLI by prefixing `npx` in the command line:

```bash
$ npx siggy --version
```
{% /callout %}

3. Configure the API keys by running:

```bash
$ siggy config -c <console-api-key>
$ siggy config -k <client-api-key>
```

{% callout type="info" %}
Retrieve these keys from your Statsig project. Log in to Statsig Console at https://console.statsig.com and go to the Settings page (https://console.statsig.com/settings). Select the **Keys & Environments** panel within *Project Settings*, then copy both the Console API Key and Client API Key, and paste them in the Settings dialog.

![Statsig Console API keys configuration screen](/images/guides/sidecar-experiments/setup/754cc245-1821-4f75-a87d-08b536422587.png)
{% /callout %}

### Next steps: [Commands in CLI](/statsigcli/commands)
