<VendoRoot> wiring.
The scaffolded <VendoRoot> imports the extracted .vendo/theme.json and
passes it as the theme prop, so shipped chrome adopts the host brand from the
first boot with no hand wiring. Every code change is permission-gated and shown
as a diff.
Critical-tool risk answers land in .vendo/overrides.json and remain
authoritative across future sync runs. Init also writes policy, product brief,
theme, and the PGlite ignore entry where applicable.
Init also proposes predev and prebuild hooks in package.json so
extraction runs alongside your dev and build:
vendo sync is prepended when a hook already
exists), preserves your existing formatting, and only writes if you approve
the diff.
Init also creates or appends VENDO_BASE_URL=http://localhost:3000 to
.env.example with a comment explaining that present-mode credential
forwarding is disabled without it. The write is idempotent — existing lines
are preserved — so it is safe to run vendo init again.
One of those questions is whether to open the MCP door.
Opening it is a host decision and needs a HostOAuthAdapter, so init never
invents auth wiring or flips mcp: true. On yes, init generates the Next.js
/.well-known sibling route and points you at the remaining wiring. The door
stays off unless you opt in.
Framework detection
Init readspackage.json and scaffolds only the files that apply. It detects two
frameworks by dependency:
- Next.js (a
nextdependency): proposesapp/api/vendo/[...vendo]/route.ts(undersrc/appwhen that directory exists) and wraps the root layout in<VendoRoot>. Opting into MCP also proposesapp/.well-known/[...vendo]/route.tsin the same app-router layout. - Express (an
expressdependency): proposes avendo/server.tsmodule (vendo/server.mjswithout atsconfig.json) holding thecreateVendo()composition and a Node HTTP-to-fetch adapter, plus a startervendo/ai.ts. Two manual steps remain: mount the adapter withapp.use("/api/vendo", mountVendo())and wrap the client entry in<VendoRoot>. Init prints both, andvendo doctorreports broken until they are done.
next and express, checking next first, so an app with
both dependencies gets the Next scaffold. A host with neither is treated as
Next. In other runtimes (Fastify, Hono, Bun), decline the proposed diffs and
mount vendo.handler yourself. See
Quickstart: Express and other JavaScript servers.
Agent mode
vendo doctor after setup. It checks wiring and makes one live /status
round trip.
Non-interactive setup
Pass an app directory as the positional argument; it defaults to the current directory. For CI, agents, or a reviewed scripted setup, use:--yesskips the four-question interview, still prints each proposed diff, and approves all code changes.--model-import <specifier>chooses the module that exports the host’s AI SDKmodel(default@/lib/aifor Next.js and./aifor Express).--brief <text>supplies the contents of.vendo/brief.md.--forceregenerates Vendo-owned.vendofiles while preserving existing host source files.