Sprig is an AI-generated mindmap tool. It turns a prompt into an interactive mindmap, supports AI-assisted branch editing, and stores mindmaps in Convex.
- Node.js 24 or newer (Node.js 24 is selected by
.nvmrc) - pnpm
- A Convex deployment
- A Clerk
convexJWT template for authenticated Convex reads; seedocs/ENV.md. Keyless Clerk instances cannot create this template until they have been claimed. - A Claude Code or Codex subscription login for AI generation and editing
- Copy
.env.exampleto.env.local. - Set
SPRIG_AI_PROVIDER=claude(the default) orSPRIG_AI_PROVIDER=codex. - For Claude, run
claude setup-tokenand set its output asCLAUDE_CODE_OAUTH_TOKEN. For Codex, runcodex loginon the app server. - Set
CONVEX_DEPLOYMENTandNEXT_PUBLIC_CONVEX_URL. - Install the existing dependencies with
pnpm install. - Start the development server with
pnpm dev.
The application is then available at http://localhost:3000.
| Command | Purpose |
|---|---|
pnpm dev |
Start the Turbopack development server. |
pnpm build |
Create a production build with Turbopack. |
pnpm start |
Run the production server from a completed build. |
pnpm typecheck |
Check TypeScript types without emitting files. |
pnpm test |
Run the Vitest suite once. |
pnpm test:watch |
Run Vitest in watch mode. |
pnpm test:coverage |
Run the Vitest suite and generate text and HTML coverage reports. |
pnpm lint |
Check JavaScript and TypeScript files with ESLint. |
pnpm lint:fix |
Fix ESLint issues that can be corrected automatically. |
pnpm format |
Format the repository with Prettier. |
pnpm format:check |
Check repository formatting without changing files. |
pnpm fix:all |
Apply ESLint fixes, then format the repository. |
See docs/ENV.md for the variables used by Sprig and their
deployment behavior.
The proxy runs on the Node.js runtime because Next.js 16 requires it. Session refreshes therefore run in a single region rather than on the global Edge network; the associated latency, cold-start, and billing implications are an accepted consequence of the upgrade.
Authenticated POST /api/chat responses expose the active conversation id in
the x-sprig-thread-id response header. The client should retain that value and
send it as threadId on later turns; omitting it starts a new thread.