Getting startedQuickstartMenu

Getting started

Create an application, connect PostgreSQL, install the pages and run the whole product against a stub model — before you configure an AI provider.

Requirements

  • Node 22.14 or newer and pnpm 9
  • A PostgreSQL database — Neon works well; locally, any Postgres with the pgvector extension

Create the application

Terminal
pnpm dlx @intelligo-dev/cli create my-app

create asks which pages you want — the shell, sign-in, sign-up and the dashboard are ticked to start with — adds the pages they build on, and shows you the commands that install them: pnpm install (shadcn is one of the scaffold’s dev dependencies), then shadcn add for the design-system base and your pages, in the order they need. Nothing runs until you approve. --items chat,billing-settings or --all answers the question up front, --yes approves the commands, and --no-install stops after the scaffold.

create writes a Next.js 16 application with shadcn (base-nova), Tailwind 4 and next-intl already wired, plus the files that make it an Intelligo app:

File What it is
lib/intelligo.ts The composition root: plans, models, the request context and the execution boundary, bound once
lib/plans.ts Your plans and which features each grants
instrumentation.ts Runs the composition root once per server process
app/api/auth/[...all]/route.ts Better-Auth’s handlers, from @intelligo-dev/next/auth
app/api/webhooks/stripe/route.ts The Stripe webhook receiver
intelligo.manifest.json A hash of every generated file, so doctor and upgrade --check know what you changed

Every one of these is yours from the first commit. Intelligo never overwrites them.

Configure the environment

create wrote .env.local for you: a copy of .env.example with a BETTER_AUTH_SECRET generated for this app, and DATABASE_URL pointed at the database the scaffold’s docker-compose.yml starts. Start it:

Terminal
docker compose up -d

That is Postgres with the pgvector extension, listening on this machine only, on port 54329 so it does not collide with a Postgres you already run. To use a database of your own instead (Neon, Supabase, RDS, a local install), replace the one line:

.env.local
DATABASE_URL=postgres://…

An app created inside a pnpm workspace gets no file of its own, because it reads the workspace root’s .env.local. There, copy .env.example yourself and set both DATABASE_URL and BETTER_AUTH_SECRET (any long random string: openssl rand -base64 32).

NEXT_PUBLIC_APP_URL defaults to http://localhost:3000. Stripe keys, CRON_SECRET and PLATFORM_ADMIN_EMAILS can wait until you need billing, maintenance or the admin console.

Create the tables

Terminal
pnpm db:migrate

This runs intelligo migrate — the framework’s migration chain, selected by content hash and applied in one transaction — and then drizzle-kit migrate for tables you add yourself. Don’t provision with drizzle-kit push: a pushed database has the schema but no migration records, and the migrator refuses it rather than half-applying the chain.

Add pages later

Pages arrive through the registry as source you own. Anything you did not pick at create installs with the shadcn CLI, from the @intelligo registry the scaffold’s components.json already names:

Terminal
pnpm exec shadcn add @intelligo/billing-settings

Some blocks import files another block ships, so the order matters. Installing blocks has the full order, and /blocks shows every block live.

Run it

Terminal
pnpm dev

Open http://localhost:3000, sign up and start a chat. The chat streams against a built-in stub model, so sign-up, workspaces, team, billing, usage, chat and artifacts all work before you add an API key.

For real answers, one key is the whole change. Set it in .env.local and restart:

.env.local
GOOGLE_GENERATIVE_AI_API_KEY=…

Every turn then runs on Gemini through @ai-sdk/google, which the chat page installed, and is admitted, metered and billed under the registered id in lib/chat-model.ts. Models and pricing covers another provider, your own prices and a model picker.

Terminal
pnpm exec intelligo doctor

doctor reports what is still missing: environment, migrations, billing registration, the auth mount, unregistered models, and generated files you have customised.

Through a tunnel

To open the dev server from a phone or share it through a tunnel, three things change. Sign-in accepts only NEXT_PUBLIC_APP_URL, so add the tunnel’s origin to BETTER_AUTH_TRUSTED_ORIGINS (comma-separated, no spaces; .env.example has the line). Next’s dev server refuses its assets to another host, so add the host to allowedDevOrigins in next.config.mjs. A session belongs to the host it was made on, and an https app URL names the session cookie differently, so sign in again on each.

Next

  • The boundary — what Intelligo owns and what stays yours
  • Bring your agent — replace the stub with your model, prompt and tools
  • Config seams — change what the installed pages show without editing them