# Installation

## Requirements

| Requirement | Version / Notes |
|  --- | --- |
| Operating system | Windows 10+, macOS 12+, Linux (any modern distro) |


For Node.js functions, you also need Node.js 20+. For C# functions, you need .NET 9 SDK or later.

## Install the Sinch CLI

```bash
npm install -g @sinch/cli
```

Install takes a few seconds. npm automatically selects the right native binary for your platform — no install scripts run, so `npm install --ignore-scripts` works fine.

Do **not** use `--omit=optional`. The CLI binary ships as an optional dependency; if it is skipped the CLI prints an actionable error telling you how to fix it.

If you don't already have Node.js, install [Node.js 20+](https://nodejs.org/) first — npm comes with it.

Verify:

```bash
sinch --version
```

## Authenticate

```bash
sinch auth login
```

Enter your Project ID, Key ID, and Key Secret from the [Sinch Dashboard](https://dashboard.sinch.com) under your project's Access Keys section.

Key secrets are stored in your OS keychain (Windows Credential Manager, macOS Keychain, or Linux Secret Service). Short-lived session tokens are stored in your local config (`~/.sinch/`).

For voice templates, you can optionally provide a Voice Application Key and Secret. The CLI will prompt for these when needed.

## Shell completions

The CLI silently refreshes `~/.sinch/completions.json` on startup. On first run it prints a one-time hint about enabling completions. To install completions into your shell profile:

```bash
sinch completion --install
```

To print the completion script to stdout (e.g. for custom setups):

```bash
sinch completion --shell bash    # Bash
sinch completion --shell zsh     # Zsh
sinch completion --shell powershell  # PowerShell
```

## Updating

```bash
npm update -g @sinch/cli
```

The Sinch CLI checks for new versions automatically and prints a notice when one is available.

## Uninstalling

```bash
npm uninstall -g @sinch/cli
sinch auth logout  # remove stored credentials
```