# Control the pi agent with the pi command

The *aitm pi* command allows you to control the [pi](https://pi.dev "https://pi.dev") agent.

## How to start pi?

To use [pi](https://pi.dev "https://pi.dev"), you need to configure a provider authentication. You can do it via:

* a [variable environment](#with-an-env "#with-an-env")
* a [call to the login command](#with-the-login-command "#with-the-login-command")

For more information, all details are available in the [pi providers documentation page](https://pi.dev/docs/latest/providers "https://pi.dev/docs/latest/providers").

### With an env

* with an [env](https://pi.dev/docs/latest/providers#use-an-api-key-from-the-environment "https://pi.dev/docs/latest/providers#use-an-api-key-from-the-environment"):

```bash
OPENROUTER_API_KEY=xxx aitm pi
# with [pass](https://www.passwordstore.org/)
OPENROUTER_API_KEY=$(pass "my/open/router-key") aitm pi
```

### With the login command

```bash
aitm pi
# then /login [provider]
```
