Docs
The Docs tab is your live reference for whatever file you're working on. Select a file in the navigator on the left, and the Docs tab shows you exactly what that file receives, what helpers it can call, which Variables and Infrastructure bindings are currently available to it, and a complete example tailored to that file.
It's dynamic: add a Variable in the Variables tab or a binding in the Infrastructure tab, and the Docs tab immediately lists it by name and shows how to use it in the file you're viewing. That way you never have to leave the UI to look up a param shape or guess a binding name.
What each file's reference contains
Every file (edge, browser, or API endpoint) has the same sections in the Docs tab:
When it runs — a one-sentence description of the trigger for this file (page init, every event, user identity change, cron, browser load, etc.) and what it's typically used for.
Input (params) — the full TypeScript shape of the
paramsobject this file receives. Includes every field, its type, and a short inline comment.Helpers — one block per helper available in this file, each with a usage signature and a one-line description. For edge files that's
requestHandler,userSave,providerSave,userGet,logger; foredge/scheduledit adds thereporting.*anduserKey.*helpers; for API handlers it's theResponsereturn shape.Variables — the list of Variables currently configured, each shown as
params.secrets.NAME. When nothing is configured you see a placeholder telling you to add Variables in the Variables tab.Infrastructure Bindings — the list of bindings currently configured, each shown as
params.infra.BINDING_NAME. When nothing is configured you see a placeholder pointing at the Infrastructure tab.Example — a complete, copy-pasteable example that uses the params, helpers, and any Variables/bindings you've configured to show a realistic usage for this file.
Dynamic sections
The Variables and Infrastructure Bindings sections reflect your current configuration in real time:
Add a Variable named
API_KEYin the Variables tab → the Docs panel for every edge file now showsparams.secrets.API_KEYunder Variables, and the Example updates to reference it.Add a D1 binding named
ORDERS_DBin the Infrastructure tab → the Docs panel now listsparams.infra.ORDERS_DBand the Example shows a query against it.Mark a Variable as client-side → it now also appears in the Docs for browser files, under the correct access path (
params.manifest.variables.NAMEforbrowser/init,params.manifestVariables.NAMEforbrowser/tagandbrowser/user).
This means you rarely need to guess: the name you see in Docs is the name you use in code.
Switching between files
The file navigator on the left lists every file in the Destination: the edge files (edge/init, edge/tag, edge/user, edge/scheduled), browser files (browser/init, browser/tag, browser/user), and any CDN or Server API endpoints you've added. Clicking a file updates the Docs tab to that file's reference.
Use Docs alongside the Code tab while you're writing — Code shows your code, Docs shows the contract. They're designed to be read side by side.
Last updated
Was this helpful?

