---
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+.

## 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.                          |
| `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 environment opt-outs as the SDK. Set `EMAIL_SDK_TELEMETRY=0` for repeatable smoke tests.

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

Inspect the bundled registry and credential names.

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

Verify required values are present.

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

See every message and adapter flag.
