> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migraflow.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Instalar a CLI

> Instalação, autenticação e verificação do adaptador de coleta e exportação.

Requer Python 3.9 ou superior, Git e acesso autorizado ao repositório privado.

## Instalação em ambiente isolado

<Tabs>
  <Tab title="Windows (PowerShell)">
    ```powershell theme={null}
    git clone https://github.com/Migraflow/cli.git
    cd cli
    py -m venv .venv
    .\.venv\Scripts\Activate.ps1
    python -m pip install --upgrade pip
    python -m pip install .
    ```
  </Tab>

  <Tab title="macOS/Linux">
    ```bash theme={null}
    git clone https://github.com/Migraflow/cli.git
    cd cli
    python3 -m venv .venv
    source .venv/bin/activate
    python -m pip install --upgrade pip
    python -m pip install .
    ```
  </Tab>
</Tabs>

Quando a distribuição pelo índice de pacotes estiver habilitada, o canal aprovado poderá usar:

```bash theme={null}
pip install --upgrade migraflow-cli
```

## Verificar a instalação

```bash theme={null}
migraflow --version
migraflow --help
```

Configure a chave sem incluí-la em scripts versionados:

```bash theme={null}
export MIGRAFLOW_API_KEY="<consultant-key>"
```

No PowerShell:

```powershell theme={null}
$env:MIGRAFLOW_API_KEY = "<consultant-key>"
```

A CLI é o adaptador reproduzível para coleta e exportação. O significado do assessment pertence ao contrato da API.

<Warning>
  Prefira `MIGRAFLOW_API_KEY` ao argumento `--api-key`: argumentos podem aparecer no histórico do terminal e na lista de processos.
</Warning>
