# Migrating to Hamur

Hamur has a guide for each framework below. A guide maps the names of that framework to Hamur's, row by row, with a status for each: `same`, `different` or `none`. Pick your framework, read its guide, and run its codemod when it has one.

A codemod reads your app as text, without running it or installing anything, and writes `hamur-migration.md`, the guide's table filtered to what your app uses, with the `file:line` of each use. Add `--write` to let it rewrite the files it can; see [`hamur migrate` in the CLI](/cli#hamur-migrate).

| From           | Guide                                                                 | Codemod                   | Recipes                                                                                                                                                                                                                                                                           |
| -------------- | --------------------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Nuxt           | [Migrating from Nuxt](/migrating-from-nuxt)                           | `hamur migrate nuxt`      | [Auth with sessions](/recipes/auth-with-sessions), [OAuth login](/recipes/oauth-login), [A SQLite database](/recipes/database-sqlite), [A custom data composable](/recipes/custom-data-composable), [A mostly static site](/recipes/mostly-static-sites), [pinia](/recipes/pinia) |
| Next.js        | [Migrating from Next](/migrating-from-next)                           | `hamur migrate next`      | [Deploy to Vercel](/recipes/deploy-vercel), [TanStack Query](/recipes/tanstack-query), [SWR](/recipes/swr), [zustand](/recipes/zustand), [File uploads](/recipes/file-uploads)                                                                                                    |
| React Router   | [Migrating from Remix and React Router](/migrating-from-react-router) | none                      | [Auth with sessions](/recipes/auth-with-sessions), [TanStack Query](/recipes/tanstack-query), [SWR](/recipes/swr), [zustand](/recipes/zustand)                                                                                                                                    |
| TanStack Start | [Migrating from TanStack Start](/migrating-from-tanstack-start)       | none                      | [TanStack Query](/recipes/tanstack-query), [A SQLite database](/recipes/database-sqlite), [Deploy with Docker](/recipes/deploy-docker)                                                                                                                                            |
| SvelteKit      | [Migrating from SvelteKit](/migrating-from-sveltekit)                 | `hamur migrate sveltekit` | [Auth with sessions](/recipes/auth-with-sessions), [A SQLite database](/recipes/database-sqlite), [File uploads](/recipes/file-uploads), [TanStack Query](/recipes/tanstack-query)                                                                                                |
| SolidStart     | [Migrating from SolidStart](/migrating-from-solidstart)               | none                      | [Auth with sessions](/recipes/auth-with-sessions), [A SQLite database](/recipes/database-sqlite), [TanStack Query](/recipes/tanstack-query)                                                                                                                                       |
| Fresh          | [Migrating from Fresh](/migrating-from-fresh)                         | none                      | [Hydration](/recipes/hydration), [Deploy with Docker](/recipes/deploy-docker), [Deploy to Cloudflare](/recipes/deploy-cloudflare)                                                                                                                                                 |
| Astro          | [Migrating from Astro](/migrating-from-astro)                         | `hamur migrate astro`     | [A mostly static site](/recipes/mostly-static-sites), [Hydration](/recipes/hydration), [Performance](/recipes/performance)                                                                                                                                                        |
| Vike           | [Migrating from Vike](/migrating-from-vike)                           | none                      | [Hydration](/recipes/hydration), [A mostly static site](/recipes/mostly-static-sites), [Debugging](/recipes/debugging)                                                                                                                                                            |

Coming from Laravel gates and policies or from CASL for authorization, not for a whole app: [Migrating from Laravel and CASL](/migrating-from-laravel-and-casl).

`none` in the Codemod column means the move is by hand, with the guide's tables. Every recipe is on the [Recipes](/recipes) page.

## After the move

The guides map names; these two commands and the error pages keep the app current once it runs on Hamur.

### `hamur upgrade --fix`

`hamur upgrade` moves the versions of `hamur` and the `@hamur/*` packages. `hamur upgrade --fix` is a separate run that moves no version and makes no request: it rewrites the uses of deprecated APIs that have a fix; none is deprecated today, so it prints `No deprecated API in use`. Run it after `hamur upgrade`, and add `--dry-run` to see a diff first. It refuses a git work tree with uncommitted changes, as `hamur migrate --write` does. A use it cannot rewrite is printed with its file and line. See [`hamur upgrade` in the CLI](/cli#hamur-upgrade).

### The `/errors` pages

Every error and warning Hamur writes starts with a code, such as `HAMUR_E0001`, and ends with a link to `/errors/<code>`. The page gives the message, the cause and the fix. When a build or a migrated app fails, search the [error codes](/api-reference/error-codes) for the code in the message.
