Skip to Content

TanStack Start

Add conciv to a TanStack Start app, which runs on Vite.

TanStack Start runs on Vite. conciv joins it as the same conciv() Vite plugin, beside tanstackStart().

Prefer to let your agent do it?

Copy this prompt into your coding agent. It runs conciv's init command, which makes the same changes as below.

Set up conciv in this project. conciv is a dev-only AI agent widget for my running app.

1. In my app folder, the one with package.json, run `npx @conciv/cli@latest init --yes`, with pnpm dlx, yarn dlx or bunx instead of npx if the project uses that package manager. Do any step it prints as a snippet yourself. If it stops on uncommitted changes or the install fails, stop and ask me; do not pass --force or change a release age policy yourself.
2. Check that init added conciv() to the plugins of my Vite config.
3. Check that the claude CLI is installed, logged in and on the PATH of the shell that starts the dev server. conciv does not install it or log in; if it is missing, tell me.
4. Start the dev server with my dev script and open the app. A conciv button shows in the corner. Log me in: run `npx @conciv/cli@latest auth link <the app URL>` in the app folder and give me the link it prints, or tell me to click the conciv button and type the 6-digit code the dev server prints.

Add conciv to TanStack Start

Install @conciv/it as a dev dependency:

npm install -D @conciv/it
pnpm add -D @conciv/it
yarn add --dev @conciv/it
bun add --dev @conciv/it

Add conciv() to the plugins of your vite.config.ts:

vite.config.ts
import {} from 'vite'
import {} from '@tanstack/react-start/plugin/vite'
import  from '@vitejs/plugin-react'
import  from '@conciv/it/plugin/vite'

export default ({
  : [
    (),
    (),
    (), 
  ],
})

Start your dev server with npm run dev, open your app, and click the conciv button. Type the 6-digit code your dev server prints. Learn more in Logging in.

What works

Everything that works on Vite:

  • The widget on every page, server-rendered ones included, and the engine that starts with vite dev.
  • The dev server tools: the agent reads your config, URLs and module graph.
  • vite build leaves conciv out.

Add the TanStack plugin

The TanStack plugin gives the agent your build errors, your route list and recent server function calls:

vite.config.ts
import {} from 'vite'
import {} from '@tanstack/react-start/plugin/vite'
import  from '@vitejs/plugin-react'
import  from '@conciv/it/plugin/vite'

export default ({
  : [
    (),
    (),
    ({
      : ['@conciv/plugin-tanstack'], 
    }),
  ],
})

Restart your dev server to load it. Learn more in TanStack.

Next steps

  • Use conciv: what the agent can do in your app.
  • Examples: a TanStack Start app with conciv and its plugins set up.

On this page