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 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
bun add @opencoredev/email-sdkThen 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 adaptersCheck a provider configuration:
RESEND_API_KEY="re_..." bunx --yes @opencoredev/email-sdk doctor --adapter resendRun the CLI from an installed project
After bun add @opencoredev/email-sdk, Bun can run the installed binary:
bun email-sdk adaptersThe 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.
