Scaffold Brinpage Quickstart into a Next.js App Router project
npm install @brinpage/quickstart@brinpage/quickstart is a small CLI that helps you bootstrap a direct integration with Brinpage Platform in a Next.js App Router project.
app/ or src/app/
bash
npm install @brinpage/quickstart
`
Usage
Run the initializer from the root of your Next.js project:
`bash
npx brinpage-quickstart init
`
This will scaffold the following files (if they don’t already exist):
`bash
lib/brinpage.ts
app/api/chat/route.ts (or src/app/api/chat/route.ts)
app/brinpage/page.tsx (or src/app/brinpage/page.tsx)
.env.local (only missing keys are added)
`
Existing files are never overwritten unless you use --force.
Environment Variables
After running the init command, open .env.local and set your license key:
`bash
BRINPAGE_LICENSE_KEY="bp_xxxx"
`
Optional settings:
`bash
BRINPAGE_API_BASE="https://platform.brinpage.com"
BRINPAGE_ASK_TIMEOUT_MS=30000
`
⚠️ Important:
Never expose BRINPAGE_LICENSE_KEY to the browser.
It must only be used in server routes or server actions.
Run the Demo
Start your dev server:
`bash
npm run dev
`
Open:
`bash
http://localhost:3000/brinpage
`
You should see a minimal chat UI connected to Brinpage Platform.
Flags
`bash
npx brinpage-quickstart init --force
``