@elchika-inc/todoke
v0.1.0
Published
TypeScript SDK for todoke Web Push SaaS
Maintainers
Readme
@elchika-inc/todoke
TypeScript SDK for todoke — the minimal Web Push notification SaaS with first-class AI (MCP) support.
Install
Note:
@elchika-inc/todokeis not yet published to npm. Until it is, build it from this repository:# after cloning the todoke monorepo bun install cd packages/sdk bun run build # emits dist/ (ESM + type declarations)
Once published, installation will be:
npm install @elchika-inc/todoke
# or: bun add @elchika-inc/todoke / pnpm add @elchika-inc/todokeQuick start
import { PushCF } from "@elchika-inc/todoke";
const client = new PushCF({
apiKey: "pk_your_key",
// baseUrl: "https://api.todoke.dev" // default
});
// Subscribe (browser — requires a service worker at /sw.js)
const registration = await navigator.serviceWorker.ready;
await client.subscribe({ registration });
// Send a notification to all active subscribers
await client.notify({
title: "お知らせ",
body: "新しいメッセージがあります",
url: "https://yourapp.com/messages",
});
// Stats
const stats = await client.getStats();API key scopes
todoke issues API keys with three scopes — use the narrowest one for each surface:
| Scope | Use for |
|---|---|
| subscribe_only | Safe to embed in frontend code (subscribe only) |
| notify | Server-side sending |
| full | Management operations |
Documentation
Full guides and API reference: https://docs.todoke.dev
License
MIT
