Build CLI[01]
Build CLI
onto-next runs after next build and turns each prerendered page into Markdown — so a request costs a file read, not an extraction.
What it does
[02]your build · onto-next
next build && onto-next
Every prerendered page in
.next/server/app. Pages rendered per request aren't there, so they get no.md.With
@ontosdk/core, the cleaner the Read API uses — once per build.One
.mdper page inpublic/.onto/, andllms.txtfrom your config.The list goes to Onto with your site key — skipped without one.
public/.onto/*.md, public/llms.txt, and your dashboard's route list
Read its output
[03]Pick your setup and see what the build prints:
Sample run · sizes vary by page · click a line
Pick a line with a dot to see what it means.
What's in each file
[04]public/.onto/pricing.md
# Pricing
> Plans and what each includes.
**Source:** /pricing
**Extracted:** 2026-09-23T10:41:07.512Z
---
## Plans
…
## Structured Data (JSON-LD)
```json
{ "@type": "Product", … }
```What happens
Which partThe first
<main>; failing that the first <article>; failing that the whole <body>RemovedScripts, styles, noscript, iframes, SVG, nav, header, footer, meta and link tags
HeadingsYour page title becomes the
#, and every heading in the body moves down one levelKeptTables, links, lists — and your JSON-LD, appended at the end as a block
HeaderTitle, description,
Source and Extracted — the timestamp changes every buildContent outside <main> doesn't make it in — if agents are missing something, that's the first place to look.
Commands
[05]CommandDoes
onto-nextThe build step. Reads .env.local for ONTO_API_KEY; a real environment variable wins.onto-next initWrites onto.config.ts, middleware.ts and .env.local — skipping any that exist.