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

# Quickstart

> Install HEVN CLI, authenticate, and run your first account and balance commands.

## Prerequisites

Before you begin, you need:

* An active HEVN account.
* `pipx` (Python 3.11+) or Homebrew for an isolated end-user install.

## Install

### pipx (recommended)

`pipx` installs the CLI from PyPI into its own isolated environment:

```bash theme={null}
pipx install hevn-cli
hevn --help
```

Upgrade to the latest published release:

```bash theme={null}
pipx upgrade hevn-cli
```

### Homebrew

On macOS and Linux you can install from the HEVN tap:

```bash theme={null}
brew install hevn-inc/tap/hevn-cli
hevn --help
```

The tap is the formula source, so the first command both taps and installs. Upgrade with:

```bash theme={null}
brew upgrade hevn-cli
```

## Authenticate

Run the browser login flow:

```bash theme={null}
hevn login
```

The CLI opens HEVN, waits for a local callback, saves your app API key, and prints the config path. If you are on a remote machine or do not want the browser to open automatically, use:

```bash theme={null}
hevn login --no-open
```

For automation or remote environments, save an API key directly without opening a browser:

```bash theme={null}
hevn login --api-key hvn_...
```

The same `hvn_...` key is used for all authenticated CLI calls, including transfers.

## Confirm your account

Check the active account:

```bash theme={null}
hevn account get
```

Introspect the active API key, owning app, scopes, balance, and spend limit:

```bash theme={null}
hevn whoami
hevn whoami --yaml
```

List accounts in machine-readable form:

```bash theme={null}
hevn account list --yaml
```

Check transfer balance and allowance:

```bash theme={null}
hevn balance
```

## First useful workflow

Create an email contact and transfer USDC:

```bash theme={null}
hevn contacts new --type email --name "Vendor" --email vendor@example.com
hevn contacts list --yaml
hevn transfer contact --contact-id <contact-id> --amount 25 --memo "Thanks"
```

Pay an invoice by id:

```bash theme={null}
hevn transfer --invoice-id <invoice-id> --memo "Invoice payment"
```

## Log out

Clear saved local credentials:

```bash theme={null}
hevn logout
```

<Warning>
  `hevn logout` removes saved HEVN CLI credential fields from the local config file. It does not delete your HEVN account or revoke unrelated credentials.
</Warning>
