Next.js · CLI scaffold
One command scaffolds the webhook route, blog pages, components, and SQL schema, wired for your project automatically.
vellumup-init is VellumUp's own open-source CLI. It inspects your Next.js project and writes the webhook receiver, blog pages, and supporting files directly into it, no manual copying, no AI assistant required.
npx vellumup-init
Running the command with no flags scaffolds a complete blog:
your-project/ ├── app/ │ ├── api/vellumup/route.ts # webhook receiver │ └── blog/ │ ├── page.tsx # paginated blog index │ └── [slug]/page.tsx # article page ├── components/ │ ├── BlogPostLayout.tsx │ ├── BlogSection.tsx │ ├── BlogCard.tsx │ ├── BlogKeyTakeaways.tsx │ └── PillTableOfContents.tsx ├── lib/blog-theme.ts # theming configuration ├── vellumup/articles.sql # PostgreSQL schema └── .env.local # environment variables
All flags are optional. Running the command with none of them starts an interactive setup.
| Flag | Effect |
|---|---|
| --yes | Non-interactive mode, accepts the defaults for every prompt |
| --route-only | Generates only the webhook route, SQL file, and secret, no blog pages or components |
| --lang <code> | Sets a language filter (e.g. en, fr) for the generated blog |
| --no-install | Writes the files but skips running your package manager |
| --help | Shows usage help, or --version for the installed version |
Once the files are generated, connect the webhook it created to your VellumUp account:
Copy your webhook secret
The CLI writes a placeholder secret to .env.local. Generate a real one from Integrations → Next.js in your VellumUp dashboard and paste it in.
Deploy your project
The webhook route needs a public HTTPS URL to receive events, deploy to Vercel or your usual host before registering the endpoint.
Register the endpoint
In VellumUp, go to Integrations → Next.js and register your deployed route's URL (yoursite.com/api/vellumup) to complete the connection.