---
title: Install
description: Install the SDK package and run the email-sdk CLI.
sidebar:
  icon: "package"
---

Email SDK is published on npm as `@opencoredev/email-sdk`.

The command-line binary is named `email-sdk`. That means the package name and the command name are different on purpose:

| What you want                  | Use this                                |
| ------------------------------ | --------------------------------------- |
| Install the package            | `bun add @opencoredev/email-sdk`        |
| Run the installed CLI          | `bun email-sdk ...`                     |
| Run the CLI without installing | `bunx --yes @opencoredev/email-sdk ...` |

Do not install the unscoped `email-sdk` package from npm. It is a different package.

## Install in your app

```bash
bun add @opencoredev/email-sdk
```

Then import the client and adapters from the scoped package:

```ts
import { createEmailClient } from "@opencoredev/email-sdk";
import { resend } from "@opencoredev/email-sdk/resend";
```

## Run the CLI once

Use `bunx` when you want a quick adapter check without adding the package to a project.

```bash
bunx --yes @opencoredev/email-sdk adapters
```

Check a provider configuration:

```bash
RESEND_API_KEY="re_..." bunx --yes @opencoredev/email-sdk doctor --adapter resend
```

## Run the CLI from an installed project

After `bun add @opencoredev/email-sdk`, Bun can run the installed binary:

```bash
bun email-sdk adapters
```

The command is still `email-sdk`; the package you installed is still `@opencoredev/email-sdk`. Avoid `bunx email-sdk` outside an installed project because the unscoped npm package is unrelated.

## Prerequisites

- Bun is required for the CLI because the binary runs with `#!/usr/bin/env bun`.
- Node 20 or newer is supported for SDK usage.
- Provider credentials must be set in environment variables or passed with CLI flags.
