create-send16
v0.1.0
Published
Bootstrap a Send16-powered email setup in any project. Run: npx create-send16
Maintainers
Readme
create-send16
Bootstrap a Send16-powered email setup in any project — zero pasted keys, no manual configuration.
npx create-send16That's it. The CLI will:
- Detect your framework (Next.js / Astro / Remix / SvelteKit / Nuxt / Hono / Express / Vite + React / plain Node).
- Open your browser to authorize (or sign you in if you don't have an account yet).
- Write
SEND16_API_KEYto.env.local. - Drop a typed
lib/send16module and a working example route in the right place for your stack.
You'll be sending email in under a minute.
What gets created
For Next.js (App Router):
lib/send16.ts # const send16 = new Send16()
app/api/send-example/route.ts # GET that sends one email and returns its id
.env.local # SEND16_API_KEY=sk_live_…(Equivalent idiomatic files for every other supported framework — Pages Router
gets pages/api/, Remix gets app/routes/api.send-example.ts, SvelteKit gets
src/routes/api/send-example/+server.ts, etc.)
Flags
| Flag | What it does |
|---|---|
| --no-scaffold | Auth + write .env.local only. No example files. |
Manual install
If npx isn't an option (corporate proxy, locked-down CI), you can install the
SDK directly:
npm install send16-mailThen create an API key at https://send16.com/dashboard/developers and set
SEND16_API_KEY in your environment. The starter file content from this CLI
is also documented at https://send16.com/docs/quickstart.
Security
create-send16 uses an OAuth-style device-authorization flow (RFC 8628, the
same pattern as gh auth login). Your laptop never sees your password; we
never see your existing API keys. We mint a fresh, scoped key labeled after
the device (create-send16 / your-laptop / darwin) — you can revoke it from
the dashboard at any time.
The minted key is returned to your terminal exactly once and never stored on Send16's servers in plaintext afterwards.
Licence
MIT
