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 packagebun add @opencoredev/email-sdk
Run the installed CLIbun email-sdk ...
Run the CLI without installingbunx --yes @opencoredev/email-sdk ...

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

Install in your app

bun add @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";

Run the CLI once

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

bunx --yes @opencoredev/email-sdk adapters

Check a provider configuration:

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:

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.

On this page