Introduction
@powersync/nuxt is a Nuxt module that wraps @powersync/vue and provides everything you need to build offline-first Nuxt applications. It re-exports all @powersync/vue composables so this is the only PowerSync dependency you need, and it adds a Nuxt Devtools integration with a PowerSync diagnostics panel for inspecting sync status, local data, config, and logs.
npm: @powersync/nuxt
PowerSync is tailored for client-side applications — there isn’t much benefit to using SSR with PowerSync. Nuxt evaluates plugins server-side unless you use the
.client.ts suffix. The PowerSync Web SDK requires browser APIs that are not available in Node.js; it performs no-ops in a Node.js runtime rather than throwing errors, but you should not expect any data from PowerSync during server-side rendering. Always create your PowerSync plugin as plugins/powersync.client.ts to ensure it runs only in the browser.Setup
Install PowerSync Dependencies
With npm (v7+), peer dependencies are installed automatically. With pnpm, you must install peer dependencies explicitly, as shown above.
Add the Module
Add@powersync/nuxt to the modules array in nuxt.config.ts and include the required Vite configuration:
nuxt.config.ts
Configure PowerSync in your Project
Define your Schema
Create a file atpowersync/AppSchema.ts and define your local SQLite schema. PowerSync will hydrate these tables once the SDK connects to your PowerSync instance.
powersync/AppSchema.ts
Create your Connector
Create a file atpowersync/PowerSyncConnector.ts. The connector handles authentication and uploading local changes to your backend.
powersync/PowerSyncConnector.ts
Create the Plugin
Create a Nuxt plugin atplugins/powersync.client.ts. The .client.ts suffix ensures this only runs in the browser.
plugins/powersync.client.ts
Using PowerSync
The module automatically exposes all@powersync/vue composables. You can import and use them directly in any component or composable.
Reading Data
components/TodoList.vue
Writing Data
Useexecute to write to the local SQLite database. Changes are queued and uploaded to your backend via uploadData in the connector.
Kysely ORM (Optional)
The module optionally exposes ausePowerSyncKysely() composable for type-safe query building. You must install the driver and opt in via config.
Install the driver:
nuxt.config.ts:
nuxt.config.ts
usePowerSyncKysely with your schema’s Database type for full type safety:
Diagnostics & Inspector
The@powersync/nuxt module includes a PowerSync diagnostics panel (Inspector) that you can open from the Nuxt Devtools PowerSync tab or at /__powersync-inspector. It shows sync status, local data, config, and logs. Diagnostics must be explicitly enabled (see below).
Enabling Diagnostics
Addpowersync: { useDiagnostics: true } to your nuxt.config.ts:
nuxt.config.ts
useDiagnostics: true is set, NuxtPowerSyncDatabase automatically:
- Extends your schema with the diagnostics schema
- Sets up diagnostics recording and logging
- Stores the connector internally so the inspector can access it
Accessing the Inspector

- Nuxt Devtools: open Devtools in your browser and look for the PowerSync tab
- Direct URL: navigate to
http://localhost:3000/__powersync-inspector
- Sync Status — real-time connection status, sync progress, upload queue statistics, and error monitoring
- Data Inspector — browse and search your local SQLite tables
- Bucket Inspector - browse your buckets and their data
- Config Inspector — view your PowerSync configuration, connection options, and schema
- Logs — real-time log output with syntax highlighting and search
Known Issues
PowerSync Inspector usesunocss as a transitive dependency, which can conflict with Tailwind CSS. If you use Tailwind, add the following to your nuxt.config.ts:
nuxt.config.ts