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.
| From | Guide | Codemod | Recipes |
|---|---|---|---|
| Nuxt | Migrating from Nuxt | hamur migrate nuxt | Auth with sessions, OAuth login, A SQLite database, A custom data composable, A mostly static site, pinia |
| Next.js | Migrating from Next | hamur migrate next | Deploy to Vercel, TanStack Query, SWR, zustand, File uploads |
| React Router | Migrating from Remix and React Router | none | Auth with sessions, TanStack Query, SWR, zustand |
| TanStack Start | Migrating from TanStack Start | none | TanStack Query, A SQLite database, Deploy with Docker |
| SvelteKit | Migrating from SvelteKit | hamur migrate sveltekit | Auth with sessions, A SQLite database, File uploads, TanStack Query |
| SolidStart | Migrating from SolidStart | none | Auth with sessions, A SQLite database, TanStack Query |
| Fresh | Migrating from Fresh | none | Hydration, Deploy with Docker, Deploy to Cloudflare |
| Astro | Migrating from Astro | hamur migrate astro | A mostly static site, Hydration, Performance |
| Vike | Migrating from Vike | none | Hydration, A mostly static site, Debugging |
Coming from Laravel gates and policies or from CASL for authorization, not for a whole app: 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 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.
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 for the code in the message.