Vite
Add conciv to a Vite app, or to a framework built on Vite such as Astro.
conciv runs inside the Vite dev server, through the conciv() plugin from @conciv/it.
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 Vite
Install @conciv/it as a dev dependency:
npm install -D @conciv/itpnpm add -D @conciv/ityarn add --dev @conciv/itbun add --dev @conciv/itAdd conciv() to the plugins of your Vite config:
import {} from 'vite'
import from '@vitejs/plugin-react'
import from '@conciv/it/plugin/vite'
export default ({
: [
(),
(),
],
})Options go in the one argument of conciv(). Learn more in Configuration.
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
Every feature works on Vite:
- The widget on every page the dev server serves, and the engine that starts with
vite dev. - The dev server tools: the agent reads your config, URLs and module graph.
vite buildleaves conciv out.
Astro
Astro takes Vite plugins under its vite key:
import {defineConfig} from 'astro/config'
import conciv from '@conciv/it/plugin/vite'
export default defineConfig({
vite: {
plugins: [conciv()],
},
})Next steps
- Use conciv: what the agent can do in your app.
- Configuration: the options
conciv()takes.