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

# Instalar e atualizar o MigraFlow CLI

> Requisitos de Python, instalação via pip, atualização de versão e verificação do MigraFlow CLI em ambientes Linux, macOS e Windows passo a passo.

## Requisitos

* Python 3.9 ou superior
* Conexão com internet
* Chave de consultor (`mk_consultant_...`)

## Instalar

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

## Atualizar

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

## Verificar versão

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

## Configurar a chave via variável de ambiente

Em vez de passar `--api-key` em todo comando, configure uma vez:

<CodeGroup>
  ```bash Windows theme={null}
  set MIGRAFLOW_API_KEY=mk_consultant_xxx
  ```

  ```bash Linux / Mac theme={null}
  export MIGRAFLOW_API_KEY=mk_consultant_xxx
  ```
</CodeGroup>

Depois é só executar:

```bash theme={null}
migraflow schema.sql "contexto do projeto"
```

<Tip>
  Para tornar permanente no Windows, adicione a variável em **Painel de Controle > Sistema > Variáveis de Ambiente**.
</Tip>

## Desinstalar

```bash theme={null}
pip uninstall migraflow-cli
```
