Start a product with create-omazy-app
create-omazy-app writes a new AI product on the kits: a
Cloudflare Worker whose MCP door Claude, ChatGPT, Cursor and Claude Code can call, with every call
through the guard. It is wired and tested before you change a line.
npm create omazy-app@latest my-productbun create omazy-app my-product and pnpm create omazy-app my-product do the same. In a
terminal it asks for the kits and your Cloudflare account; or pass flags:
npm create omazy-app@latest my-product -- --preset full --account <account id>| Flag | What it does |
|---|---|
--preset minimal |
Capabilities, guard and mcp. The default |
--preset full |
Every kit below |
--kits ai,flow |
Kits on top of the base: ai, actor, flow, copilot, oauth. actor, flow and copilot bring ai |
--account <id> |
Your Cloudflare account id (wrangler whoami), written into wrangler.jsonc |
--sdk <path or url> |
Install @omazyai/sdk from a local build or another tarball |
--yes |
Ask nothing; take the defaults |
What it writes
Section titled “What it writes”Every product has:
- Two capabilities in
src/capabilities.ts:note_get, an R0 read, andnote_add, an R2 write with a preview, on anotestable in D1. Replace them with your own. - The guard in
src/guard.ts, on D1: the confirm tokens, the request log and the kill switches. Yourcan()is insrc/access.ts. The guard refuses an argument that names another tenant’s record. - Approval codes. The guard proves whoever decides an approval with its
codeStepUp.sendCodeinsrc/index.tsdelivers the code: locally,STEP_UP_LOG=1in.dev.varsprints it to thewrangler devconsole; deployed, it refuses until you wire your mail or SMS sender there. The tests catch codes inh.codes. - An MCP door at
/mcpfor theappaudience, with personal keys: one person’s seat in one tenant, at most R2 and 90 days, stored only as a hash in KV. - A door switch that is off in production.
DOOR_DEFAULTisoffinwrangler.jsoncandonin.dev.vars, so a fresh deploy answers 503 until you turn the door on. - Tests on the testing kit: parity, the tier snapshot, the approval invariant, tenant isolation, the door end to end and the injection suite, on memory stores and the fake Core API.
Each kit you add brings its part:
| Kit | Adds |
|---|---|
ai |
The note_title task unit, saved through note_add, with 30 cases in evals/note-title.jsonl and a threshold of 0.9, and its eval test |
actor |
The note_intake actor, served on the door as actor_start, actor_reply, actor_status and actor_confirm |
flow |
The note_followup workflow on Cloudflare Workflows, started through the R2 capability note_followup_start |
copilot |
The copilot on a Durable Object, and its page at / from the ui kit: the panel, standing grants and approvals inbox (with CodeStepUpForm, so an owner approves in the page), signed in with a personal key |
oauth |
The oauth kit for clients that sign in. Off (OAUTH is off) until you turn it on; read its page first |
wrangler.jsonc binds what the kits need: D1 and KV always, Durable Objects for the copilot and
the OAuth refresh lock, the Workflow, assets for the page and rate limits for OAuth. The kits’ D1
migrations are collected, after your own, in migrations/.
From install to a deployed door
Section titled “From install to a deployed door”cd my-productnpm installnpm run migrate # local D1npm run key -- --person you --tenant demo # prints a personal key oncenpm run devCall the door with the key as a bearer token:
curl -s localhost:8787/mcp -H "authorization: Bearer $KEY" -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' -H 'mcp-protocol-version: 2025-06-18' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'A first note_add answers with its preview and a token, under the guard’s names (outcome,
token, expiresAt, preview). The same call with "confirm_token": "<token>" adds the note:
the guard’s confirm for an R2 write.
To deploy:
npx wrangler loginnpm run setup # page, D1, KV, migrations, deploy, GUARD_SECRETnpm run key -- --person you --tenant demo --remotenpm run door -- on --remotesetup builds the page when the product has one, creates the D1 database and the KV namespace,
writes their ids into wrangler.jsonc, applies the migrations, deploys and sets the guard’s
secret. The door then answers at
https://my-product.<your subdomain>.workers.dev/mcp. Connect Claude Code with:
claude mcp add --transport http my-product https://my-product.<your subdomain>.workers.dev/mcp --header "Authorization: Bearer $KEY"npm run door -- off --remote stops every request within a few seconds. With the ai kit, set
the Core API token too: npx wrangler secret put OMAZY_TOKEN.
Scripts
Section titled “Scripts”| Script | Does |
|---|---|
dev |
wrangler dev, after building the page when there is one |
test, check |
The tests; check typechecks first |
migrate, migrate:remote |
Applies migrations/ to local or remote D1 |
key |
Mints a personal key: --person, --tenant, --days, --name, --remote |
door |
Turns the MCP door on or off, with --reason and --remote |
setup |
Puts the product on your Cloudflare account, once |
deploy |
wrangler deploy |
The SDK version
Section titled “The SDK version”The product pins @omazyai/sdk to the release tarball of the version create-omazy-app came
with, so the two always match. To try it against a build of your own:
(cd sdk/typescript && npm run build && npm pack --pack-destination /tmp/sdk)node sdk/create-omazy-app/bin/create-omazy-app.mjs my-product --sdk /tmp/sdk/omazyai-sdk-<version>.tgzBuild an AI product in a day takes a full product from here to a deployed booking desk: your own capabilities, an AI task with evals, an actor, the copilot page and a workflow with an approval.
Omazy CX documentation. One voice. Every channel. Always on.
Founded by Mosthofa Imran · imran@omazy.ai
© 2026 Omazy CX