@omnixdp/create-app
v0.3.5
Published
Create a Next.js starter application wired to Omni xDP SDKs.
Downloads
2,347
Readme
@omnixdp/create-app
Create a Next.js App Router starter application wired to Omni xDP SDKs, generated response types, environment templates, and agent-aware project guidance.
Usage
npm create @omnixdp/app@latest my-sitenpm create @omnixdp/app@latest is npm's initializer alias for installing and running @omnixdp/create-app@latest.
Or run the binary directly:
npx @omnixdp/create-app@latest my-site --sdk delivery --sdk business-objectsIf npm reports @omnixdp/create-app as missing, confirm the package is visible from your registry:
npm view @omnixdp/create-app versionOptions
create-omnixdp-app <directory> [options]
--template nextjs
--sdk delivery|management|business-objects|ratings-and-reviews|impex|all
--package-manager npm|pnpm|yarn|bun
--install / --no-install
--typegen / --no-typegen
--llms-txt / --no-llms-txt
--cursor-rules / --no-cursor-rules
--forceThe default template is nextjs, the default SDK selection is delivery, next-llms-txt support is enabled by default, and type generation is enabled automatically for SDKs with schema-backed response maps.
Generated App
The generated project includes:
- Next.js App Router with TypeScript.
- Server-only Omni xDP client modules in
src/lib/omnixdp. .env.examplefor selected SDK credentials.- Optional
omnixdp.typegen.config.jsand placeholder generated types. omnixdp.agent.config.js,AGENTS.md,CLAUDE.md,.github/copilot-instructions.md, and optional Cursor rules that explain safe SDK usage to coding agents.omnixdp:syncandomnixdp:sync:checkscripts powered by@omnixdp/agent-instructions.next-llms-txtpowered/llms.txtand*.html.mdendpoints for SEO/AEO/GEO discovery by AI agents.src/components/omnixdp/rte-to-react.tsx, a dependency-freeRteToReacthelper for rendering CMS Rich Text Editor JSON and legacy HTML values as React.
Delivery starters include both private OMNIXDP_* and public NEXT_PUBLIC_OMNIXDP_* environment variables for API URL, delivery token, CMS space, and CMS environment. The generated Delivery client prefers the public value when both variants are set. Use NEXT_PUBLIC_OMNIXDP_* only when the Delivery token and content are intentionally public; otherwise keep private Delivery variables in server code.
OAuth client_credentials SDKs are intentionally scaffolded as server-only modules so secrets stay out of browser bundles.
Set NEXT_PUBLIC_SITE_URL to the public origin of your deployed app so next-llms-txt can emit absolute URLs. Use page-level llmstxt exports or standard Next.js metadata for pages that should appear in /llms.txt, and treat any *.html.md content as public.
Upgrade Existing Apps
Existing generated apps can be checked or upgraded with @omnixdp/upgrade-app:
npx @omnixdp/upgrade-app@latest --check
npx @omnixdp/upgrade-app@latestThe upgrader prints a plan before applying changes and asks for confirmation before changes that may alter existing proxy behavior.
