PulseDev for SvelteKit.Click it, fix the .svelte.
Click any element in your running SvelteKit app and say what’s wrong. Your agent opens the component or route behind it, proposes a diff, and Vite hot-reloads after you approve.

Routes are folders, styles are scoped.
SvelteKit maps URLs to folders: /pricing is src/routes/pricing/+page.svelte, wrapped by every +layout.svelte above it. That makes the page URL PulseDev sends with each note especially useful, because the agent can go straight from the URL to the route file and its layouts.
Svelte scopes component styles with generated svelte-xxxx classes. Those hashes don’t name the file, but the widget also sends the element’s own classes, its text and the rules that matched it, and that’s what the agent searches for.
One minute of setup.
None of it ships.
SvelteKit lists Vite but neither React nor Vue, so Set up project falls back to looking for an index.html. SvelteKit uses src/app.html instead, so the app shows you the tag to add by hand. Use the root layout snippet below. More in the widget docs.
- Add
Load it from the root layout.
dev from $app/environment is true only under vite dev. onMount runs in the browser, so nothing happens during server rendering, and a production build returns early.
src/routes/+layout.svelte <script> import { onMount } from 'svelte' import { dev } from '$app/environment' let { children } = $props() onMount(() => { if (!dev) return const s = document.createElement('script') s.src = 'http://localhost:3899/widget.js' s.dataset.token = 'YOUR_TOKEN' document.body.appendChild(s) }) </script> {@render children()} - Run
Start vite dev.
Run the dev script and open the page. The root layout mounts once for every route, so the PulseDev button stays put as you navigate.
terminal $npm run dev
Notes for
SvelteKit apps.
Why the snippet lives in a layout, and what to tell the agent.
- src/app.html
Why not app.html?
app.html is a static template with no dev check, so a tag there ships to production. The root layout lets you gate it.
Load functions
If the wrong data shows, the fix may be in +page.ts or +page.server.ts rather than the component. The URL tells the agent which route folder to open.
Unused CSS is removed
Svelte drops selectors it can’t match in the component. A rule that seems to do nothing may be one the compiler removed, which is worth telling the agent.
Approve, then HMR
After you approve the diff, PulseDev writes the file and Vite’s Svelte HMR updates the component in place.
SvelteKit questions.
- Does it work with Svelte 4?
- Yes. Only the snippet changes: drop the $props() line and render a plain <slot /> instead of {@render children()}.
- What about prerendered or SPA-mode routes?
- In dev every route is served by vite dev, so the layout runs either way.
- Can I use plain Svelte without SvelteKit?
- Yes. A Vite + Svelte app has an index.html. Put the plain tag there, or load it from src/main.ts behind import.meta.env.DEV as the Vue guide shows.
- Are component names sent with a click?
- No. Today each click carries the DOM element, selector, styles, a screenshot and the URL. The agent searches the source from there.
Your SvelteKit app is running.Go point at the bug.
Windows coming soon. Free to start.