[Response 
StatusCode Body
 Ctx Request Headers Trace   
   Request 
URL Headers Host Ctx Depth Method Body ResponseCharacterEncoding ID ProxyURL   
   Userinfo   Header      A	HTTPTrace ConnectDuration FirstByteDuration    C`sv migrate` migrates Svelte(Kit) codebases. It delegates to the [`svelte-migrate`](https://www.npmjs.com/package/svelte-migrate) package.

Some migrations may annotate your codebase with tasks for completion that you can find by searching for `@migration`.

## Usage

```sh
npx sv migrate
```

You can also specify a migration directly via the CLI:
```sh
npx sv migrate [migration]
```

## Migrations

### `app-state`

Migrates `$app/stores` usage to `$app/state` in `.svelte` files. See the [migration guide](/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated) for more details.

### `svelte-5`

Upgrades a Svelte 4 app to use Svelte 5, and updates individual components to use [runes](../svelte/what-are-runes) and other Svelte 5 syntax ([see migration guide](../svelte/v5-migration-guide)).

### `self-closing-tags`

Replaces all the self-closing non-void elements in your `.svelte` files. See the [pull request](https://github.com/sveltejs/kit/pull/12128) for more details.

### `svelte-4`

Upgrades a Svelte 3 app to use Svelte 4 ([see migration guide](../svelte/v4-migration-guide)).

### `sveltekit-2`

Upgrades a SvelteKit 1 app to SvelteKit 2 ([see migration guide](../kit/migrating-to-sveltekit-2)).

### `package`

Upgrades a library using `@sveltejs/package` version 1 to version 2. See the [pull request](https://github.com/sveltejs/kit/pull/8922) for more details.

### `routes`

Upgrades a pre-release SvelteKit app to use the filesystem routing conventions in SvelteKit 1. See the [pull request](https://github.com/sveltejs/kit/discussions/5774) for more details.Last-ModifiedMon, 23 Feb 2026 10:50:09 GMTEtag$W/"1d057c811242f050e5c010ca2d4a3672"ServerVercelStrict-Transport-Securitymax-age=63072000X-Vercel-CacheHITX-Vercel-Id&fra1::gzxfx-1771843809145-02e87f3c10d3Access-Control-Allow-Origin*Age0Cache-Control"public, max-age=0, must-revalidateContent-Dispositioninline; filename="llms.txt"Content-Typetext/plain; charset=utf-8DateMon, 23 Feb 2026 10:50:09 GMT 