Skip to content

Quick start

This walks you from nothing to a composed instance. Deploying it to Cloudflare is covered separately in Deploy.

Terminal window
npm create notewright@latest -- my-notes
cd my-notes && bun install

Use --template workspace if you plan to add local providers inside a monorepo workspace alongside the generated app:

Terminal window
npm create notewright@latest -- my-notes --template workspace

The generated src/index.ts contains non-compiling holes where you compose your providers. The entry does not compile until you install your chosen provider packages and wire them into defineApp. This is by design: the scaffolder cannot pick providers on your behalf.

Terminal window
bun add @notewright/granola-notes-provider @notewright/linear-follow-up-provider
import { defineApp } from "@notewright/core";
import { granola } from "@notewright/granola-notes-provider";
import { linear } from "@notewright/linear-follow-up-provider";
const app = defineApp({ notes: granola, followUp: linear });
export default app;
// Re-export each Durable Object class by its exact class_name in wrangler.jsonc:
export const { FollowUpAgent, SpeakerContextAgent } = app.durableObjects;
export { GranolaSyncAgent } from "@notewright/granola-notes-provider";

defineApp returns a plain object: fetch (the Worker handler), durableObjects (the DO classes to re-export), and extensions (the composed providers, read by notewright doctor). The composition is fully type-checked, so a mismatched provider shape is a compile error, not a runtime surprise.