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

# Install the Fintoc CLI

> Install the Fintoc CLI on macOS, Linux, or Windows to test webhooks, trigger events, and interact with the Fintoc API from your terminal.

Install the Fintoc CLI to make API requests and listen to webhooks from the command line. You can use the CLI to:

* Create, retrieve, update, or delete any of your Fintoc resources in `test` mode.
* Receive webhooks at `localhost` without a public tunnel and without creating new webhook endpoints.

## Choose an installation method

### npm

Fintoc publishes the CLI to npm for macOS, Linux, and Windows. The CLI requires Node.js 22 or later. On Windows, install with npm because Homebrew is not available. To install with npm, run:

```bash theme={null}
npm install -g @fintoc/cli
fintoc --version
```

`npm install -g @fintoc/cli` works in PowerShell and Command Prompt on Windows.

### Homebrew

Homebrew is available on macOS and Linux. To install with Homebrew, run:

```bash theme={null}
brew install fintoc-com/tap/fintoc
fintoc --version
```

To update, run:

```bash theme={null}
brew update && brew upgrade fintoc
```

<br />

## Log in to the CLI

Authenticate the CLI with a Fintoc API key.

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

This command opens an interactive flow. To skip the browser flow, pass the API key inline with the `--api-key` flag:

```bash theme={null}
fintoc login --api-key sk_test_xxx
```

By default, `fintoc login` authenticates in `test` mode. Pass `--mode live` to log in to `live` mode instead.

To avoid storing the API key, export the `FINTOC_API_KEY` environment variable. The CLI reads this variable automatically. See [Fintoc CLI keys](/guides/resources/cli/fintoc-cli-keys-and-permissions) for the full precedence order.

## Verify your setup

`fintoc doctor` verifies your CLI setup. The command checks the resolved API key, the Node.js version, the config file path, and connectivity to `api.fintoc.com`. Use `fintoc doctor` to debug authentication or connectivity errors.

```bash theme={null}
fintoc doctor
```
