---
title: CLI reference
description: Commands, runtime, aliases, telemetry, adapter detection, and exit behavior for the email-sdk binary.
---

The `@opencoredev/email-sdk` package installs the `email-sdk` binary with a Node shebang. It supports Node.js 20+ and Bun 1.1+. Without a project install, run it as `npx --package @opencoredev/email-sdk email-sdk`; the unscoped `email-sdk` package on npm is unrelated.

## Commands

| Command    | Purpose                                                                                                                                |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `version`  | Print package name and version; `--json` returns JSON.                                                                                 |
| `adapters` | List bundled adapter names, required environment, and notes; `--json` returns JSON.                                                    |
| `doctor`   | Check whether required values are present for one adapter. `--live` authenticates without sending; `--json` returns structured checks. |
| `send`     | Build, validate, and optionally send one message.                                                                                      |

`providers` aliases `adapters`. `--provider` aliases `--adapter` in CLI input, but new examples use adapter vocabulary.

## Adapter selection

Pass `--adapter`. If omitted, `doctor` and `send` select the first bundled adapter whose required environment variables are all present. Explicit selection is clearer when more than one credential set exists.

## Failures

Usage and SDK errors print one message to stderr and exit with status 1. Unexpected errors are rethrown after telemetry flush.

## Telemetry

CLI runs use the same default telemetry and opt-outs as the SDK. `email-sdk telemetry disable` turns it off for the machine, `email-sdk telemetry status` shows the current state, and `email-sdk telemetry enable` turns it back on. Set `EMAIL_SDK_TELEMETRY=0` for repeatable smoke tests.

**[List adapters](/v3.0.1/docs/reference/cli/adapters)**

Inspect the bundled registry and credential names.

**[Check setup](/v3.0.1/docs/reference/cli/doctor)**

Verify required values are present.

**[Validate or send](/v3.0.1/docs/reference/cli/send)**

See every message and adapter flag.
