---
title: Install
description: Install Email SDK for Node.js or Bun using ESM imports or CommonJS require.
---

1. ### Install the package



    ```bash
    npm install @opencoredev/email-sdk
    bun add @opencoredev/email-sdk
    pnpm add @opencoredev/email-sdk
    yarn add @opencoredev/email-sdk
    ```



    The public package is `@opencoredev/email-sdk`. The unscoped `email-sdk` package is unrelated.

2. ### Confirm your runtime

    Use Node.js 20+ or Bun 1.1+. Every public entry point ships as both ESM and CommonJS, so `import` and `require()` work across the supported Node.js range.

    ```js title="email.cjs"
    const { createEmailClient } = require("@opencoredev/email-sdk");
    const { resend } = require("@opencoredev/email-sdk/resend");
    ```

    For typed CommonJS, use `module: nodenext`. Use a `.cts` file with typed imports rather than an untyped bare `require()`:

    ```ts title="email.cts"
    import sdk = require("@opencoredev/email-sdk");
    import { resend } from "@opencoredev/email-sdk/resend";

    const email = sdk.createEmailClient({
      adapters: [resend({ apiKey: process.env.RESEND_API_KEY! })],
    });
    ```

3. ### Import one adapter

    Adapters use separate package entry points, so your application imports only the integrations it uses.

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

4. ### Verify the CLI

    A project install exposes the `email-sdk` binary. The built CLI uses a Node shebang and also runs under Bun.

    ```bash
    npx --package @opencoredev/email-sdk email-sdk version
    npx --package @opencoredev/email-sdk email-sdk adapters
    ```

    For a global Homebrew install, use `brew install opencoredev/tap/email-sdk` after the formula points at a published release.

**[Quickstart](/v3.0.1/docs/getting-started/quickstart)**

Create a client and send a validated message.

**[Provider credentials](/v3.0.1/docs/getting-started/credentials)**

Set the environment variables required by your adapter.
