# Configuration

How the Sinch CLI stores its settings, switches between projects, and exposes global flags and debug output. For the `sinch config` command itself, see the [config command reference](/docs/functions/cli/commands/config).

## Config file

Configuration is stored in `~/.sinch/config.json`. Use `sinch config set` or `sinch auth login` to update values.

| Field | Description |
|  --- | --- |
| `projectId` | Your Sinch project ID |
| `apiUrl` | SinchFunctions API URL (defaults to production) |
| `keyId` | Public key identifier (non-secret) |
| `defaultApplicationKey` | Voice application key (non-secret) |


Key secrets are never written here — they live in your OS keychain. Only non-secret identifiers are stored in `config.json`.

## Environment variable override

For CI/CD pipelines, bypass the keychain with environment variables:


```sh
SINCH_PROJECT_ID=...
SINCH_KEY_ID=...
SINCH_KEY_SECRET=...
```

When these are set, the CLI uses them instead of the stored profile — no `sinch auth login` required.

## Config profiles

Profiles let you switch between multiple Sinch projects without re-authenticating.


```sh
sinch config profile create staging    # create a new profile
sinch config profile use staging       # switch to it
sinch config profile list              # show all profiles
sinch config profile delete staging    # remove a profile
```

Use `--profile <name>` on any command to override the active profile for that invocation.

## Global flags

| Flag | Description |
|  --- | --- |
| `-h, --help` | Show help for the current command |
| `-V, --version` | Print CLI version |
| `--profile <name>` | Use a specific credential profile |


## Debug environment variables

| Variable | Effect |
|  --- | --- |
| `DEBUG=1` | Enable verbose debug logging |
| `DEBUG_HTTP=1` | Log HTTP requests and responses |
| `SINCH_DEBUG=1` | Print stack traces on uncaught errors |