Email SDK
Getting started

Install

Install the SDK package and run the email-sdk CLI.

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 wantUse this
Install the packagenpm install @opencoredev/email-sdk or your package manager's install command
Run the installed CLInpx email-sdk ...
Run the CLI without installingbunx --bun --package @opencoredev/email-sdk email-sdk ...

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

Install in your app

Choose the package manager your app already uses.

npm install @opencoredev/email-sdk

Then import the client and adapters from the scoped package:

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

The SDK and CLI run in server-side Node 20+ and Bun runtimes.

Run the CLI once

Use the scoped package name when you want a quick adapter check without adding the package to a project.

bunx --bun --package @opencoredev/email-sdk email-sdk adapters

Check a provider configuration:

RESEND_API_KEY="re_..." bunx --bun --package @opencoredev/email-sdk email-sdk doctor --adapter resend

If you are using npm without Bun, install @opencoredev/email-sdk in the project first, then run the installed email-sdk binary with npx.

Run the CLI from an installed project

After installing @opencoredev/email-sdk, run the installed binary:

npx email-sdk adapters

The command is still email-sdk; the package you installed is still @opencoredev/email-sdk. Avoid npx email-sdk outside an installed project because the unscoped npm package is unrelated. For no-install checks, use the bunx --bun --package @opencoredev/email-sdk email-sdk ... form shown above.

Prerequisites

  • Node 20 or newer is supported for SDK and CLI usage.
  • Bun 1.1 or newer is also supported.
  • Do not expose provider API keys in browser or client-side code.
  • Provider credentials must be set in environment variables or passed with CLI flags.

Verify the install

Check the installed package and CLI version:

npx email-sdk version

List supported adapters:

npx email-sdk adapters

On this page