init writes a folder that already answers: an app config, one tool, and the widget that displays what the tool returned. It installs, and the dev server is one command away. Running it inside an existing repo merges into that repo’s package.json and .gitignore instead of replacing them.
What init asks
In a terminal it asks three questions, arrow keys and Enter:
Where the app lands follows the argument.
init oney creates oney/, init . uses the current folder, and a bare init asks for a name and reads the answer as both: a name of its own creates ./<name>/, while the offered default, your current folder’s name, scaffolds in place.
The same app, by hand
The rest of this page is what those files hold, written out. examples/oney is the same app finished, if you would rather read it than type it.1
Install
"type": "module" and the scripts:package.json
@waniwani/sdk 0.20 or later, React 19 and Zod 4 as peers.2
Name the app and tell the model how to behave
waniwani.config.ts
overview reaches the host LLM once, in the initialize handshake. It says what the app is and which tool to reach for when. How a single tool behaves goes in that tool’s own description, which travels with every tools/list. The full option list is on App config.3
Write a tool
The filename becomes the tool name.
tools/check-eligibility.ts
input and output are Zod shapes, written as plain objects rather than z.object({ … }). hints becomes MCP annotations, with the runtime filling in the title that Claude’s Connectors Directory requires. More on Tools.4
Write a widget
The folder name becomes the tool name, and the widget takes two files.
widgets/select-plan/widget.ts
widgets/select-plan/ui.tsx
widget.ts is imported by the server and by the browser bundle, so it stays free of React and CSS. Why the split exists is on Widgets.5
Run it
dev watches the folder, mirrors changes into .waniwani/, and leaves nodemon and Vite HMR to do the rest. An edit to tools/check-eligibility.ts reaches the MCP endpoint in about a second. Point a client at /mcp, or open the dev server’s root in a browser to call the tools without a chat client.Next
Folder convention
Every folder the kit reads, and what each one becomes.
Flows
Drop a compiled SDK flow into
flows/ and it registers as a tool.Commands
check, dev, build, start and the four stages they share.Deploy
What
git push needs on Vercel, Docker and Alpic.