fimo 0.21.0-staging.5 → 0.21.0-staging.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/assets/skills/fimo-cli/references/assets.md +25 -1
  2. package/assets/skills/fimo-cli/references/branches.md +4 -1
  3. package/assets/skills/fimo-cli/references/forms.md +1 -1
  4. package/assets/skills/fimo-cli/references/init.md +17 -5
  5. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +3 -1
  6. package/assets/skills/fimo-cli/references/projects.md +2 -2
  7. package/assets/skills/fimo-code/assets/react-router-locales/navigation.tsx +1 -1
  8. package/assets/skills/fimo-code/references/assets.md +2 -2
  9. package/assets/skills/fimo-code/references/best-practices/next.md +1 -1
  10. package/assets/skills/fimo-code/references/forms.md +1 -1
  11. package/assets/skills/fimo-code/references/frameworks/astro.md +8 -2
  12. package/assets/skills/fimo-code/references/frameworks/compatibility.md +9 -9
  13. package/assets/skills/fimo-code/references/frameworks/hosting.md +17 -13
  14. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +8 -9
  15. package/assets/skills/fimo-code/references/frameworks/next/locales.md +1 -1
  16. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +5 -5
  17. package/assets/skills/fimo-code/references/frameworks/next.md +41 -32
  18. package/assets/skills/fimo-code/references/frameworks/react-router.md +8 -6
  19. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +19 -10
  20. package/assets/skills/fimo-code/references/frameworks/vite-react.md +7 -5
  21. package/assets/skills/fimo-code/references/labels.md +4 -4
  22. package/assets/skills/fimo-code/references/ui.md +4 -4
  23. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +12 -15
  24. package/assets/skills/fimo-migration/references/media.md +4 -2
  25. package/assets/skills/fimo-migration/references/qa.md +10 -8
  26. package/assets/skills/fimo-migration/references/workers/content-planner.md +20 -10
  27. package/assets/skills/fimo-migration/references/workflow.md +8 -6
  28. package/assets/skills/fimo-migration/scripts/retrieval/strapi/public-content.mjs +243 -0
  29. package/assets/skills/fimo-migration/scripts/retrieval/strapi/source-schema.mjs +148 -0
  30. package/assets/skills/fimo-studio/references/command-palette.md +8 -3
  31. package/assets/skills/fimo-studio/references/webhooks.md +1 -1
  32. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +1 -1
  33. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +1 -1
  34. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +3 -3
  35. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +1 -1
  36. package/dist/build/astro/config.d.ts +13 -2
  37. package/dist/build/astro/config.js +9 -24
  38. package/dist/build/next/moved.d.ts +2 -0
  39. package/dist/build/next/moved.js +2 -0
  40. package/dist/build/react/router-moved.d.ts +2 -0
  41. package/dist/build/react/router-moved.js +2 -0
  42. package/dist/build/react/router-preset-moved.d.ts +2 -0
  43. package/dist/build/react/router-preset-moved.js +2 -0
  44. package/dist/build/react/router-routes-moved.d.ts +2 -0
  45. package/dist/build/react/router-routes-moved.js +2 -0
  46. package/dist/build/react/ui-moved.d.ts +2 -0
  47. package/dist/build/react/ui-moved.js +2 -0
  48. package/dist/build/react/vite-moved.d.ts +2 -0
  49. package/dist/build/react/vite-moved.js +2 -0
  50. package/dist/build/sveltekit/config.d.ts +5 -4
  51. package/dist/build/sveltekit/config.js +6 -15
  52. package/dist/build/sveltekit/moved.d.ts +13 -0
  53. package/dist/build/sveltekit/moved.js +3 -0
  54. package/dist/build/vite/data-id.d.ts +11 -0
  55. package/dist/build/vite/data-id.js +20 -0
  56. package/dist/build/vite/plugins/runtime-env.d.ts +1 -1
  57. package/dist/build/vite/plugins/runtime-env.js +6 -2
  58. package/dist/build/vite/runtime-env.d.ts +2 -0
  59. package/dist/build/vite/runtime-env.js +1 -0
  60. package/dist/cli/bundle.json +1 -1
  61. package/dist/cli/index.js +25 -23
  62. package/dist/runtime/content/client/internal.js +1 -1
  63. package/dist/runtime/content/index.d.ts +6 -1
  64. package/dist/runtime/content/index.js +6 -0
  65. package/dist/runtime/i18n/index.d.ts +2 -0
  66. package/dist/runtime/i18n/index.js +1 -0
  67. package/dist/runtime/labels/index.d.ts +3 -0
  68. package/dist/runtime/labels/index.js +2 -0
  69. package/dist/runtime/preview/index.d.ts +5 -0
  70. package/dist/runtime/preview/index.js +4 -0
  71. package/dist/runtime/primitives/lib/index.d.ts +2 -0
  72. package/dist/runtime/primitives/lib/index.js +2 -0
  73. package/dist/runtime/seo/index.d.ts +0 -8
  74. package/dist/runtime/seo/index.js +0 -8
  75. package/dist/runtime/shared/config.d.ts +6 -0
  76. package/dist/runtime/shared/config.js +4 -0
  77. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  78. package/dist/runtime/shared/local-runtime-env.js +7 -5
  79. package/dist/runtime/templates.d.ts +21 -5
  80. package/dist/runtime/templates.js +61 -19
  81. package/dist/scripts/extract-translations.js +8 -3
  82. package/dist/scripts/index.d.ts +3 -0
  83. package/dist/scripts/index.js +2 -0
  84. package/dist/scripts/sync-forms.js +21 -9
  85. package/dist/scripts/sync-schemas.js +45 -21
  86. package/package.json +76 -80
  87. package/templates/astro/astro.config.mjs +1 -1
  88. package/templates/astro/package.json +2 -1
  89. package/templates/nextjs/AGENTS.md +1 -1
  90. package/templates/nextjs/next.config.ts +1 -1
  91. package/templates/nextjs/package.json +2 -1
  92. package/templates/nextjs/src/app/layout.tsx +1 -1
  93. package/templates/react-router/package.json +3 -1
  94. package/templates/react-router/react-router.config.ts +1 -1
  95. package/templates/react-router/src/pages/LocaleLayout.tsx +1 -1
  96. package/templates/react-router/src/pages/legal/LegalPage.tsx +1 -1
  97. package/templates/react-router/src/root.tsx +1 -1
  98. package/templates/react-router/vite.config.ts +1 -1
  99. package/templates/sveltekit/package.json +2 -1
  100. package/templates/sveltekit/src/error.html +51 -0
  101. package/templates/sveltekit/src/routes/+error.svelte +50 -0
  102. package/templates/sveltekit/src/routes/+layout.server.ts +1 -1
  103. package/templates/sveltekit/src/routes/+layout.svelte +1 -1
  104. package/templates/sveltekit/svelte.config.js +1 -1
  105. package/templates/sveltekit/vite.config.ts +1 -1
  106. package/templates/vite/.fimo/config.json +28 -0
  107. package/templates/vite/AGENTS.md +43 -0
  108. package/templates/vite/CLAUDE.md +5 -0
  109. package/templates/vite/_gitignore +13 -0
  110. package/templates/vite/index.html +12 -0
  111. package/templates/vite/package.json +32 -0
  112. package/templates/vite/pnpm-workspace.yaml +8 -0
  113. package/templates/vite/src/App.tsx +14 -0
  114. package/templates/vite/src/LocaleLayout.tsx +12 -0
  115. package/templates/vite/src/index.css +61 -0
  116. package/templates/vite/src/main.tsx +20 -0
  117. package/templates/vite/src/vite-env.d.ts +1 -0
  118. package/templates/vite/tsconfig.json +17 -0
  119. package/templates/vite/vite.config.ts +7 -0
  120. package/assets/sveltekit/components/Boolean.svelte +0 -19
  121. package/assets/sveltekit/components/Date.svelte +0 -33
  122. package/assets/sveltekit/components/DateTime.svelte +0 -35
  123. package/assets/sveltekit/components/FimoProvider.svelte +0 -35
  124. package/assets/sveltekit/components/Image.svelte +0 -80
  125. package/assets/sveltekit/components/Json.svelte +0 -18
  126. package/assets/sveltekit/components/Label.svelte +0 -16
  127. package/assets/sveltekit/components/Number.svelte +0 -21
  128. package/assets/sveltekit/components/RichText.svelte +0 -19
  129. package/assets/sveltekit/components/Text.svelte +0 -30
  130. package/assets/sveltekit/components/Video.svelte +0 -37
  131. package/assets/sveltekit/components/index.d.ts +0 -11
  132. package/assets/sveltekit/components/index.js +0 -11
  133. package/dist/build/next/config.d.ts +0 -17
  134. package/dist/build/next/config.js +0 -66
  135. package/dist/build/sveltekit/data-id.d.ts +0 -3
  136. package/dist/build/sveltekit/data-id.js +0 -171
  137. package/dist/build/sveltekit/files/edge.js +0 -68
  138. package/dist/build/sveltekit/files/serverless.js +0 -42
  139. package/dist/build/sveltekit/vite.d.ts +0 -12
  140. package/dist/build/sveltekit/vite.js +0 -14
  141. package/dist/build/vite/index.d.ts +0 -42
  142. package/dist/build/vite/index.js +0 -160
  143. package/dist/build/vite/plugins/content-sync.d.ts +0 -11
  144. package/dist/build/vite/plugins/content-sync.js +0 -41
  145. package/dist/build/vite/plugins/data-id.d.ts +0 -12
  146. package/dist/build/vite/plugins/data-id.js +0 -109
  147. package/dist/build/vite/plugins/fimo-config.d.ts +0 -12
  148. package/dist/build/vite/plugins/fimo-config.js +0 -68
  149. package/dist/build/vite/plugins/overlay.d.ts +0 -3
  150. package/dist/build/vite/plugins/overlay.js +0 -154
  151. package/dist/build/vite/plugins/robots.d.ts +0 -10
  152. package/dist/build/vite/plugins/robots.js +0 -56
  153. package/dist/build/vite/plugins/seo.d.ts +0 -3
  154. package/dist/build/vite/plugins/seo.js +0 -112
  155. package/dist/build/vite/plugins/server-config.d.ts +0 -3
  156. package/dist/build/vite/plugins/server-config.js +0 -36
  157. package/dist/build/vite/plugins/sitemap.d.ts +0 -3
  158. package/dist/build/vite/plugins/sitemap.js +0 -73
  159. package/dist/build/vite/plugins/translations.d.ts +0 -11
  160. package/dist/build/vite/plugins/translations.js +0 -601
  161. package/dist/runtime/app/FimoProviders.d.ts +0 -30
  162. package/dist/runtime/app/FimoProviders.js +0 -193
  163. package/dist/runtime/app/FimoScripts.d.ts +0 -13
  164. package/dist/runtime/app/FimoScripts.js +0 -45
  165. package/dist/runtime/app/index.d.ts +0 -8
  166. package/dist/runtime/app/index.js +0 -4
  167. package/dist/runtime/app/prefetch.d.ts +0 -9
  168. package/dist/runtime/app/prefetch.js +0 -39
  169. package/dist/runtime/content/DataSourcesProvider.d.ts +0 -4
  170. package/dist/runtime/content/DataSourcesProvider.js +0 -63
  171. package/dist/runtime/content/RefreshContentProvider.d.ts +0 -19
  172. package/dist/runtime/content/RefreshContentProvider.js +0 -71
  173. package/dist/runtime/content/client/createContentClient.d.ts +0 -7
  174. package/dist/runtime/content/client/createContentClient.js +0 -7
  175. package/dist/runtime/content/client/createSingletonClient.d.ts +0 -5
  176. package/dist/runtime/content/client/createSingletonClient.js +0 -6
  177. package/dist/runtime/content/client/react-content-client.d.ts +0 -10
  178. package/dist/runtime/content/client/react-content-client.js +0 -165
  179. package/dist/runtime/content/client/react-singleton-client.d.ts +0 -7
  180. package/dist/runtime/content/client/react-singleton-client.js +0 -38
  181. package/dist/runtime/content/client/types.d.ts +0 -42
  182. package/dist/runtime/content/client/types.js +0 -1
  183. package/dist/runtime/content/client/useQueryLocale.d.ts +0 -2
  184. package/dist/runtime/content/client/useQueryLocale.js +0 -5
  185. package/dist/runtime/content/client/vite-runtime.d.ts +0 -3
  186. package/dist/runtime/content/client/vite-runtime.js +0 -23
  187. package/dist/runtime/content/utils/retrieve-data-sources.d.ts +0 -29
  188. package/dist/runtime/content/utils/retrieve-data-sources.js +0 -107
  189. package/dist/runtime/core/AppErrorBoundary.d.ts +0 -10
  190. package/dist/runtime/core/AppErrorBoundary.js +0 -27
  191. package/dist/runtime/core/ViteLifecycles.d.ts +0 -5
  192. package/dist/runtime/core/ViteLifecycles.js +0 -35
  193. package/dist/runtime/i18n/FimoLocaleContext.d.ts +0 -9
  194. package/dist/runtime/i18n/FimoLocaleContext.js +0 -17
  195. package/dist/runtime/iframe/ConsoleErrorProvider.d.ts +0 -3
  196. package/dist/runtime/iframe/ConsoleErrorProvider.js +0 -103
  197. package/dist/runtime/iframe/ScreenshotProvider.d.ts +0 -3
  198. package/dist/runtime/iframe/ScreenshotProvider.js +0 -60
  199. package/dist/runtime/iframe/runtime/overlay-hmr.d.ts +0 -2
  200. package/dist/runtime/iframe/runtime/overlay-hmr.js +0 -27
  201. package/dist/runtime/iframe/runtime/overlay-runtime.d.ts +0 -2
  202. package/dist/runtime/iframe/runtime/overlay-runtime.js +0 -103
  203. package/dist/runtime/index.d.ts +0 -22
  204. package/dist/runtime/index.js +0 -23
  205. package/dist/runtime/next/client-runtime.d.ts +0 -3
  206. package/dist/runtime/next/client-runtime.js +0 -24
  207. package/dist/runtime/next/client.d.ts +0 -28
  208. package/dist/runtime/next/client.js +0 -25
  209. package/dist/runtime/next/facade.d.ts +0 -8
  210. package/dist/runtime/next/facade.js +0 -34
  211. package/dist/runtime/next/labels.d.ts +0 -7
  212. package/dist/runtime/next/labels.js +0 -9
  213. package/dist/runtime/next/preview.d.ts +0 -13
  214. package/dist/runtime/next/preview.js +0 -34
  215. package/dist/runtime/next/primitives/Text.d.ts +0 -10
  216. package/dist/runtime/next/primitives/Text.js +0 -18
  217. package/dist/runtime/next/primitives/server.d.ts +0 -11
  218. package/dist/runtime/next/primitives/server.js +0 -54
  219. package/dist/runtime/next/provider.d.ts +0 -13
  220. package/dist/runtime/next/provider.js +0 -54
  221. package/dist/runtime/next/server-runtime.d.ts +0 -3
  222. package/dist/runtime/next/server-runtime.js +0 -23
  223. package/dist/runtime/next/server.d.ts +0 -21
  224. package/dist/runtime/next/server.js +0 -16
  225. package/dist/runtime/primitives/index.d.ts +0 -16
  226. package/dist/runtime/primitives/index.js +0 -17
  227. package/dist/runtime/react/primitives/contracts.d.ts +0 -100
  228. package/dist/runtime/react/primitives/contracts.js +0 -1
  229. package/dist/runtime/react/primitives/editable/Boolean.d.ts +0 -5
  230. package/dist/runtime/react/primitives/editable/Boolean.js +0 -11
  231. package/dist/runtime/react/primitives/editable/Date.d.ts +0 -4
  232. package/dist/runtime/react/primitives/editable/Date.js +0 -12
  233. package/dist/runtime/react/primitives/editable/DateTime.d.ts +0 -4
  234. package/dist/runtime/react/primitives/editable/DateTime.js +0 -13
  235. package/dist/runtime/react/primitives/editable/Image.d.ts +0 -4
  236. package/dist/runtime/react/primitives/editable/Image.js +0 -10
  237. package/dist/runtime/react/primitives/editable/Json.d.ts +0 -5
  238. package/dist/runtime/react/primitives/editable/Json.js +0 -11
  239. package/dist/runtime/react/primitives/editable/RichText.d.ts +0 -4
  240. package/dist/runtime/react/primitives/editable/RichText.js +0 -11
  241. package/dist/runtime/react/primitives/editable/Text.d.ts +0 -20
  242. package/dist/runtime/react/primitives/editable/Text.js +0 -36
  243. package/dist/runtime/react/primitives/editable/Video.d.ts +0 -4
  244. package/dist/runtime/react/primitives/editable/Video.js +0 -10
  245. package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +0 -17
  246. package/dist/runtime/react/primitives/renderers/DateRenderer.js +0 -17
  247. package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +0 -8
  248. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +0 -31
  249. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +0 -12
  250. package/dist/runtime/react/primitives/renderers/RichTextRenderer.js +0 -135
  251. package/dist/runtime/react/primitives/renderers/StaticImage.d.ts +0 -35
  252. package/dist/runtime/react/primitives/renderers/StaticImage.js +0 -58
  253. package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +0 -8
  254. package/dist/runtime/react/primitives/renderers/VideoRenderer.js +0 -10
  255. package/dist/runtime/react/useFimoLiveValue.d.ts +0 -20
  256. package/dist/runtime/react/useFimoLiveValue.js +0 -43
  257. package/dist/runtime/react-router/active-routes.d.ts +0 -12
  258. package/dist/runtime/react-router/active-routes.js +0 -60
  259. package/dist/runtime/react-router/index.d.ts +0 -16
  260. package/dist/runtime/react-router/index.js +0 -20
  261. package/dist/runtime/react-router/legacy/routes.d.ts +0 -35
  262. package/dist/runtime/react-router/legacy/routes.js +0 -86
  263. package/dist/runtime/react-router/navigation-utils.d.ts +0 -8
  264. package/dist/runtime/react-router/navigation-utils.js +0 -36
  265. package/dist/runtime/react-router/navigation.d.ts +0 -12
  266. package/dist/runtime/react-router/navigation.js +0 -28
  267. package/dist/runtime/react-router/preset.d.ts +0 -30
  268. package/dist/runtime/react-router/preset.js +0 -33
  269. package/dist/runtime/routing/AppResetScrollOnNavigate.d.ts +0 -2
  270. package/dist/runtime/routing/AppResetScrollOnNavigate.js +0 -12
  271. package/dist/runtime/routing/AppRoutesProvider.d.ts +0 -25
  272. package/dist/runtime/routing/AppRoutesProvider.js +0 -112
  273. package/dist/runtime/seo/buildSeoForPath.d.ts +0 -74
  274. package/dist/runtime/seo/buildSeoForPath.js +0 -55
  275. package/dist/runtime/seo/htmlProps.d.ts +0 -13
  276. package/dist/runtime/seo/htmlProps.js +0 -15
  277. package/dist/runtime/sveltekit/content.d.ts +0 -25
  278. package/dist/runtime/sveltekit/content.js +0 -33
  279. package/dist/runtime/sveltekit/context-contract.d.ts +0 -5
  280. package/dist/runtime/sveltekit/context-contract.js +0 -2
  281. package/dist/runtime/sveltekit/context.d.ts +0 -8
  282. package/dist/runtime/sveltekit/context.js +0 -25
  283. package/dist/runtime/sveltekit/forms.d.ts +0 -15
  284. package/dist/runtime/sveltekit/forms.js +0 -15
  285. package/dist/runtime/sveltekit/index.d.ts +0 -9
  286. package/dist/runtime/sveltekit/index.js +0 -5
  287. package/dist/runtime/sveltekit/internal.d.ts +0 -6
  288. package/dist/runtime/sveltekit/internal.js +0 -12
  289. package/dist/runtime/sveltekit/labels.d.ts +0 -20
  290. package/dist/runtime/sveltekit/labels.js +0 -13
  291. package/dist/runtime/sveltekit/preview.d.ts +0 -27
  292. package/dist/runtime/sveltekit/preview.js +0 -69
  293. package/dist/runtime/sveltekit/runtime.d.ts +0 -9
  294. package/dist/runtime/sveltekit/runtime.js +0 -26
  295. package/dist/runtime/t/OptionalTracking.d.ts +0 -13
  296. package/dist/runtime/t/OptionalTracking.js +0 -28
  297. package/dist/runtime/t/Pageview.d.ts +0 -9
  298. package/dist/runtime/t/Pageview.js +0 -118
  299. package/dist/runtime/vite/Label.d.ts +0 -13
  300. package/dist/runtime/vite/Label.js +0 -16
  301. package/dist/runtime/vite/primitives/Images.d.ts +0 -4
  302. package/dist/runtime/vite/primitives/Images.js +0 -12
  303. package/dist/runtime/vite/translations.d.ts +0 -28
  304. package/dist/runtime/vite/translations.js +0 -103
@@ -35,6 +35,30 @@ Read it as `.data.url` / `.data.id` (e.g. `… | jq -r '.data.url'`). Keep the `
35
35
 
36
36
  Use `--folder-path` when an agent needs a non-interactive upload target and does not already know folder IDs. Missing folders are created automatically. Dot-prefixed root folders such as `.agents` are reserved for internal/agent media and are hidden from the normal media-library UI.
37
37
 
38
+ ## Upload a manifest
39
+
40
+ Use one structured manifest for migration batches. Paths resolve from the
41
+ project directory; `sourceId` must be unique so every result can be reconciled.
42
+
43
+ ```json
44
+ [
45
+ {
46
+ "sourceId": "strapi:upload:42",
47
+ "path": ".fimo/migration/media/Hero image.jpg",
48
+ "name": "Homepage hero",
49
+ "folderPath": "Imported"
50
+ }
51
+ ]
52
+ ```
53
+
54
+ ```bash
55
+ fimo assets bulk-upload --file .fimo/migration/media.json
56
+ ```
57
+
58
+ The result preserves manifest order and reports each `sourceId` as `uploaded`
59
+ or `failed`, plus final counts. Partial failure exits non-zero. Use
60
+ `--concurrency <1-16>` to change the default concurrency of four.
61
+
38
62
  ## Generate AI media
39
63
 
40
64
  Moved to **`references/media.md`**. Choose the task that describes the outcome:
@@ -125,6 +149,6 @@ fimo assets delete <asset-id>
125
149
 
126
150
  ## End-to-end workflow
127
151
 
128
- 1. Upload with `fimo assets upload` or generate with a task command such as `fimo image generate`.
152
+ 1. Upload with `fimo assets upload`, use `fimo assets bulk-upload` for a batch, or generate with a task command such as `fimo image generate`.
129
153
  2. Keep the returned `url` (for direct use) or `id` (to attach to a `media` content-type field).
130
154
  3. To use in application code, run `fimo skills get fimo-code --ref ui` and load the detected framework reference: schema media → `<Image>` / `<Video>`, deliberate non-schema URLs → `<StaticImage>`. Never use raw `<img src={asset.url}>` for tracked media.
@@ -105,7 +105,10 @@ Use `fimo publish` when `main` is already synced; use `fimo deploy --publish` wh
105
105
  ## Anti-patterns
106
106
 
107
107
  - **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the Branch's DB / sandbox / preview. Always use `fimo` for Branch operations so resources are provisioned atomically. (Running `fimo branch <name>` after the fact provisions them.) The running app itself follows the git branch either way.
108
- - **Hardcoding the tenant API URL** — the app derives it from the git branch and `.fimo/project.json`. Set `VITE_API_URL` / `NEXT_PUBLIC_FIMO_API_URL` yourself only as a deliberate override (e.g. a local API); it then wins over derivation on every branch.
108
+ - **Hardcoding the tenant API URL** — the framework runtime derives it from the
109
+ git branch and `.fimo/project.json`. Use an explicit host variable only as a
110
+ deliberate override, such as a local API; it then wins over derivation on
111
+ every branch.
109
112
  - **Trying to push to or delete `prod` / `release/*`** — these are read-only/protected. Publish to update prod; never push.
110
113
  - **`fimo merge` straight onto `main` as a habit** — it's gated for a reason. Merge on a branch, then publish.
111
114
  - **Confusing `fimo switch` (Branch) with `fimo orgs switch` (org).**
@@ -54,7 +54,7 @@ Use this when the user asks "who filled out the contact form?", "how many signup
54
54
 
55
55
  ## When to run sync manually
56
56
 
57
- The `fimo/vite` plugin regenerates legacy Vite `src/forms/*.ts` after form JSON changes during development. Framework-aware generation runs during validation. Before a production build, regenerate explicitly with:
57
+ The `fimo-vite` plugin regenerates legacy Vite `src/forms/*.ts` after form JSON changes during development. Framework-aware generation runs during validation. Before a production build, regenerate explicitly with:
58
58
 
59
59
  ```bash
60
60
  fimo validate # runs all phases: codegen, lint, route validation, label checks
@@ -11,7 +11,7 @@ fimo init [dir] [options]
11
11
  `fimo init` runs the full onboarding in one shot:
12
12
 
13
13
  1. **Signs in automatically** — if there's no session it opens the browser loopback login. In `--json` / non-TTY with no session it fails with `NOT_AUTHENTICATED` (run `fimo login` first).
14
- 2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use React Router by default; `--framework astro`, `--framework nextjs`, and `--framework sveltekit` select minimal framework-native shells. An optional `--starter fimo-site@1` adds a content-led starter only to a newly created project without `--project-id`.
14
+ 2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use React Router by default; `--framework vite`, `--framework astro`, `--framework nextjs`, and `--framework sveltekit` select minimal framework-native shells. An optional `--starter fimo-site@1` adds a content-led starter only to a newly created project without `--project-id`.
15
15
  3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
16
16
  4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
17
17
 
@@ -24,7 +24,7 @@ Generated pnpm projects pin `pnpm@10.26.0` and carry project-owned `pnpm-workspa
24
24
  | `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
25
25
  | `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`). |
26
26
  | `--env <name>` | no | Compatibility alias for `--branch <name>`. |
27
- | `--framework <framework>` | no | New-project scaffold: `react-router` (default), `astro`, `nextjs` (App Router), or `sveltekit`. Existing repositories are preserved. |
27
+ | `--framework <framework>` | no | New-project scaffold: `react-router` (default), `vite` (React SPA), `astro`, `nextjs` (App Router), or `sveltekit`. Existing repositories are preserved. |
28
28
  | `--starter <id>` | no | Opt-in project starter for create-new (currently `fimo-site@1`). It seeds CMS content, labels, a contact form, and manual-only agents. Rejects `--project-id`. |
29
29
  | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
30
30
  | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
@@ -68,6 +68,7 @@ Omit `--framework` for the existing React Router scaffold, or select a
68
68
  minimal framework-native shell explicitly:
69
69
 
70
70
  ```bash
71
+ fimo init my-vite-site --framework vite --org <organizationId>
71
72
  fimo init my-astro-site --framework astro --org <organizationId>
72
73
  fimo init my-next-site --framework nextjs --org <organizationId>
73
74
  fimo init my-svelte-site --framework sveltekit --org <organizationId>
@@ -96,15 +97,22 @@ For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for C
96
97
 
97
98
  Pass `--project-id <id>` to set up a known Fimo project. If the project has no code yet — for example, one just created in Fimo Studio — `init` scaffolds a fresh site into it and pushes the initial commit: the same create-new path, linked to the existing ID. If the project already has code, `init` clones it into `[dir]`, like `fimo clone`. Use `--branch <name>` to check out a specific Branch (defaults to `main`); `--env <name>` remains a compatibility alias. Without `--project-id`, `fimo init` creates a new project.
98
99
 
100
+ ## Linking an existing local application
101
+
102
+ Use `fimo link <projectId>` to adopt the application in the current folder without replacing its code or comparing its Git history. Running it again with the same project id repairs missing Fimo metadata, dependencies, or the `fimo` remote. If the folder is linked to a different project, the command stops before changing the remote or local files. Pass `--relink` only when the project replacement is intentional:
103
+
104
+ ```bash
105
+ fimo link <projectId> --relink
106
+ ```
107
+
99
108
  ## What gets written (create-new path)
100
109
 
101
110
  `fimo init` (create-new path) scaffolds:
102
111
 
103
- - The selected project shell: React Router by default, Astro with `--framework astro`, Next.js App Router with `--framework nextjs`, or SvelteKit with `--framework sveltekit`
112
+ - The selected project shell: React Router by default, a native React SPA with `--framework vite`, Astro with `--framework astro`, Next.js App Router with `--framework nextjs`, or SvelteKit with `--framework sveltekit`
104
113
  - `.fimo/project.json` — links this directory to the remote project (read-only after creation)
105
114
  - `.fimo/config.json` — project, optional Studio Pages route metadata, locale, SEO, and agent policy
106
115
  - `.fimo/agents/` — versioned agent bundles
107
- - `.env` — framework-specific tenant content API URLs for local development
108
116
  - `AGENTS.md` + `CLAUDE.md` — project rules (from the template) read by AGENTS.md-compatible tools and Claude Code. Both point the agent at `fimo skills get` to load the real skills on demand.
109
117
  - A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
110
118
 
@@ -120,7 +128,11 @@ Nothing is written into per-agent skill dirs: the rich skills are fetched on dem
120
128
 
121
129
  Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
122
130
 
123
- `.env` is only the bootstrap app env so local `pnpm dev` works immediately. Fimo writes the tenant API aliases used by its supported frameworks; users should not discover or set those URLs manually. User-managed public variables are stored with `fimo vars add` and synced into a managed `.env.local` block; hidden values use `fimo secrets add`. See `references/project-vars-and-secrets.md`.
131
+ Supported framework runtimes derive the Fimo connection from
132
+ `.fimo/project.json` and the active git branch, so local development needs no
133
+ Fimo env file. User-managed public variables are stored with `fimo vars add`
134
+ and synced into a managed `.env.local` block; hidden values use
135
+ `fimo secrets add`. See `references/project-vars-and-secrets.md`.
124
136
 
125
137
  ## Right after scaffolding
126
138
 
@@ -47,7 +47,9 @@ variables.
47
47
 
48
48
  ## Local Env Files
49
49
 
50
- `fimo init` and `fimo clone` write `.env` with the framework-specific tenant content API URLs needed for local development. These are Fimo-managed connection values, not project variables; users should not discover or set them manually.
50
+ `fimo init`, `fimo clone`, and `fimo link` do not write the Fimo connection to
51
+ an env file. Supported framework runtimes derive it from `.fimo/project.json`
52
+ and the active git branch; hosted preview and production inject it directly.
51
53
 
52
54
  `fimo vars add`, `fimo vars update`, and `fimo vars pull` write public project variables to a managed block in `.env.local`.
53
55
 
@@ -19,7 +19,7 @@ fimo projects rename <name> [projectId] [-C <dir>] # set seo.siteName in the l
19
19
  - **`clone`** — clone a remote Fimo project's git repo to your machine and write the local `.fimo/project.json` and agent files. Use `fimo clone <projectId>` when scripting or when the ID is known. In an interactive terminal, bare `fimo clone` opens a project picker for the active org; JSON mode and non-TTY shells require an explicit project ID and fail fast instead of prompting. By default it clones `main`; pass `--branch <name>` to clone a specific Branch. The legacy `--env <name>` spelling remains a compatibility alias. The target directory defaults to the project display name/name, or pass `[dir]` explicitly.
20
20
  - **`delete`** — destructive; prompts unless `-y`. Removes the remote project.
21
21
  - **`publish` / `unpublish`** — toggle the project's public visibility. `publish` flips the current `main` state live (the same "go live" as `fimo deploy --publish`, minus the git push).
22
- - **`rename`** — edits only the linked local project immediately. It requires a project marker in the cwd, and if you pass a `[projectId]` that doesn't match the linked project it errors and exits 1 (so you can't rename a different project). It writes `seo.siteName` into the current or legacy project config; commit and run `fimo deploy` to reconcile the remote `displayName` and deploy the new site name.
22
+ - **`rename`** — edits only the linked local project's `seo.siteName`. It does not commit or deploy. It requires a project marker in the cwd, and if you pass a `[projectId]` that doesn't match the linked project it errors and exits 1 (so you can't rename a different project). Later remote config commands may require reconciliation while the local config is dirty. Finish your local edits, then explicitly run `fimo deploy --no-wait` when ready for a quick sync.
23
23
 
24
24
  ## Top-level clone shortcut
25
25
 
@@ -39,7 +39,7 @@ fimo unpublish [-C <dir>] # unpublish the current project
39
39
  fimo rename "<Site Name>" # local edit: set seo.siteName in the project config
40
40
  ```
41
41
 
42
- `fimo rename` sets the **site name** (`seo.siteName`) in the local project config — it is a local edit, not an immediate remote update, so it requires a follow-up commit + `fimo deploy` to take effect. Deploy reconciles the project's remote `displayName` with the committed site name while pushing the config. See `references/init.md` and `references/deploy.md`.
42
+ `fimo rename` sets the **site name** (`seo.siteName`) in the local project config. It does not commit or deploy. Later remote config commands may require reconciliation while that local config is dirty. Finish your local edits, then explicitly run `fimo deploy --no-wait` when ready for a quick sync. Deploy reconciles the project's remote `displayName` while pushing the config. See `references/init.md` and `references/deploy.md`.
43
43
 
44
44
  ## Publish commands
45
45
 
@@ -1,4 +1,4 @@
1
- import { FimoLink } from 'fimo/react-router';
1
+ import { FimoLink } from 'fimo-react-router';
2
2
 
3
3
  export function Navigation() {
4
4
  return (
@@ -24,7 +24,7 @@ Generated content reads wrap this stored value in `FimoMedia`, which exposes `ur
24
24
 
25
25
  ## Rendering in application code
26
26
 
27
- Import the primitives from the active framework adapter: `fimo/next` on the Next server, `fimo/next/client` in Next Client Components, `fimo/ui` in React Router/Vite, or `fimo/astro/components` in Astro pages.
27
+ Import the primitives from the active framework adapter: `fimo-next` on the Next server, `fimo-next/client` in Next Client Components, `fimo-react` in React Router/Vite, or `fimo/astro/components` in Astro pages.
28
28
 
29
29
  | Asset source | Component | Pass via |
30
30
  | --------------------------------------------------- | --------------------- | ------------------------- |
@@ -32,7 +32,7 @@ Import the primitives from the active framework adapter: `fimo/next` on the Next
32
32
  | Hard-coded URL or generated asset referenced inline | `<StaticImage>` | `src="https://..."` |
33
33
 
34
34
  ```tsx
35
- import { Image, StaticImage, Video } from 'fimo/next';
35
+ import { Image, StaticImage, Video } from 'fimo-next';
36
36
 
37
37
  // from a schema entry:
38
38
  <Image value={post.coverImage} width={1200} height={630} fit="cover" />
@@ -13,7 +13,7 @@ Load `references/frameworks/next.md` and the matching router reference first. In
13
13
 
14
14
  ```ts
15
15
  import type { NextConfig } from 'next';
16
- import { withFimo } from 'fimo/next/config';
16
+ import { withFimo } from 'fimo-next/config';
17
17
 
18
18
  const nextConfig: NextConfig = {
19
19
  cacheComponents: true,
@@ -106,7 +106,7 @@ export function ContactForm() {
106
106
 
107
107
  ## Framework bindings
108
108
 
109
- - **Vite/React:** `submitX(data)` keeps using the existing `fimo/ui` runtime and preserves the current generated API.
109
+ - **Vite/React:** `submitX(data)` keeps using the existing `fimo-react` runtime and preserves the current generated API.
110
110
  - **Next.js:** server modules import `@/forms/name`; client components import `@/forms/name.client`. Both expose the same `submitX(data)` shape.
111
111
  - **Astro:** import the generated server module and call `submitX(data)` in an Astro action or endpoint. Astro keeps the HTML form and redirect.
112
112
  - **SvelteKit:** use `createFimoFormClient({ event })` in a server action and pass it as the second argument: `submitX(data, client)`.
@@ -14,17 +14,23 @@ Declare the production framework in `.fimo/config.json`:
14
14
 
15
15
  Astro owns its static or server output, routes, and 404 behavior. Do not add a catch-all hosting rewrite, a hosting-provider adapter, a preview URL, or a script tag for Fimo.
16
16
 
17
- Add the integration beside the adapters and integrations the project already uses:
17
+ Install `fimo-astro` at the same version as `fimo` and add the integration
18
+ beside the adapters and integrations the project already uses:
18
19
 
19
20
  ```js
20
21
  import { defineConfig } from 'astro/config';
21
- import { fimo } from 'fimo/astro/config';
22
+ import { fimo } from 'fimo-astro/config';
22
23
 
23
24
  export default defineConfig({
24
25
  integrations: [fimo()],
25
26
  });
26
27
  ```
27
28
 
29
+ `fimo-astro/config` supplies Fimo hosting for `output: 'server'`. A static
30
+ Astro site that hosts elsewhere can import `fimo` from `fimo/astro/config`
31
+ instead for the preview connector and branch env alone; the runtime
32
+ (`fimo/astro`, `fimo/astro/components`) always comes from `fimo`.
33
+
28
34
  Compatibility: the Fimo peer range covers Astro 5–7. Static output is supported
29
35
  across that range. Fimo's automatic server adapter path is currently validated
30
36
  with the Astro 7-compatible adapter; Astro 5/6 server apps should keep their
@@ -4,15 +4,15 @@
4
4
  peer ranges and the executable acceptance fixtures define compatibility; the
5
5
  profile does not promise support for every version of the framework.
6
6
 
7
- | Profile | Application dependency specifier | Fimo surface |
8
- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
9
- | `nextjs` | Next 16 is the current acceptance baseline; Fimo's React peer is `^18.2.0 \|\| ^19.0.0` and Next imposes its own React range | `fimo/next`, `fimo/next/client` |
10
- | `react-router` | React `^18.2.0 \|\| ^19.0.0`, React Router `^7.0.0 \|\| ^8.0.0`, Vite `^7.0.0 \|\| ^8.0.0` | `fimo/react-router`, `fimo/ui` |
11
- | `vite` | React `^18.2.0 \|\| ^19.0.0`, Vite `^7.0.0 \|\| ^8.0.0` | `fimo/ui`, `fimo/vite` |
12
- | `astro` | Astro `^5.0.0 \|\| ^6.0.0 \|\| ^7.0.0` | `fimo/astro`, `fimo/astro/components` |
13
- | `sveltekit` | SvelteKit `^2.0.0`, Svelte `^5.0.0`, Vite `^7.0.0 \|\| ^8.0.0` | `fimo/sveltekit`, `fimo/sveltekit/components`, `fimo/sveltekit/config`, `fimo/sveltekit/vite` |
14
- | `nuxtjs`, `remix`, `vue` | Hosting detection only; no Fimo content/runtime adapter yet | `fimo` hosting profile only |
15
- | _(unset)_ | Anything else: a static generator, plain HTML, a custom build script. Declare `runtime.commands.build` and `runtime.outputDirectory` instead | Static output only; no adapter |
7
+ | Profile | Application dependency specifier | Fimo surface |
8
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
9
+ | `nextjs` | Next 16 is the current acceptance baseline; Fimo's React peer is `^18.2.0 \|\| ^19.0.0` and Next imposes its own React range | `fimo-next`, `fimo-next/client` |
10
+ | `react-router` | React `^18.2.0 \|\| ^19.0.0`, React Router `^7.0.0 \|\| ^8.0.0`, Vite `^7.0.0 \|\| ^8.0.0` | `fimo-react-router`, `fimo-react-router/routes`, `fimo-react-router/preset`, `fimo-react-router/vite`, `fimo-react` |
11
+ | `vite` | Vite `^7.0.0 \|\| ^8.0.0`; React `^18.2.0 \|\| ^19.0.0` only when the app uses React | `fimo-react`, `fimo-react-router/vite` (React SPA) or `fimo-vite` (no React) |
12
+ | `astro` | Astro `^5.0.0 \|\| ^6.0.0 \|\| ^7.0.0`; Fimo hosting (`fimo-astro`) needs Astro `^7.0.0` | `fimo/astro`, `fimo/astro/components`, `fimo-astro/config` |
13
+ | `sveltekit` | SvelteKit `^2.0.0`, Svelte `^5.0.0`, Vite `^7.0.0 \|\| ^8.0.0` | `fimo-sveltekit`, `fimo-sveltekit/components`, `fimo-sveltekit/vite`, `fimo-sveltekit/config` |
14
+ | `nuxtjs`, `remix`, `vue` | Hosting detection only; no Fimo content/runtime adapter yet | `fimo` hosting profile only |
15
+ | _(unset)_ | Anything else: a static generator, plain HTML, a custom build script. Declare `runtime.commands.build` and `runtime.outputDirectory` instead | Static output only; no adapter |
16
16
 
17
17
  `runtime.framework` must match a dependency in `package.json`; a profile the
18
18
  code does not use fails the production build. Shape and rules: `hosting.md`
@@ -39,27 +39,31 @@ Hosted preview and production inject the tenant API through these aliases:
39
39
 
40
40
  | Application | Server | Public/build |
41
41
  | ----------------------- | ---------------------- | -------------------------- |
42
- | Next.js | `FIMO_CONTENT_API_URL` | `NEXT_PUBLIC_FIMO_API_URL` |
42
+ | Next.js | `FIMO_CONTENT_API_URL` | Provider-owned |
43
43
  | Nuxt | `FIMO_CONTENT_API_URL` | `NUXT_PUBLIC_FIMO_API_URL` |
44
44
  | Astro, Remix, SvelteKit | `FIMO_CONTENT_API_URL` | `PUBLIC_FIMO_API_URL` |
45
45
  | React Router, Vite, Vue | `FIMO_CONTENT_API_URL` | `VITE_API_URL` |
46
46
 
47
- Locally, the app derives its env from the **git branch**: `fimo/vite`,
48
- `withFimo`, the Astro integration and the SvelteKit plugin compute the tenant
49
- API URL from `.fimo/project.json`
47
+ Locally, the app derives its env from the **git branch**: `fimo-vite` (or
48
+ `fimo-react-router/vite` for React Router projects), the Astro integration and
49
+ the SvelteKit plugin compute the tenant API URL from `.fimo/project.json`
50
50
  (`projectId` + `tenantApiBaseUrl`, recorded once at `init`/`clone`/`link`) and
51
- expose the Vite, Next and public (`PUBLIC_*`) aliases plus `FIMO_ENV` /
52
- `NEXT_PUBLIC_FIMO_ENV` at startup. The Vite connectors derive them during both
53
- dev and production builds, and `withFimo` derives them in `next dev`, `next
54
- build`, and `next start`, so a linked project builds and serves locally without
55
- exporting them by hand. No env file is written on a switch, so a plain `git checkout` is a
56
- complete env switch. Never hardcode a tenant URL in application source. One
57
- rule, per variable: a non-empty value the user set explicitly (`.env`, shell, their own
58
- `define`) is left alone, and Fimo fills the variables they did not set.
51
+ expose the Vite and public (`PUBLIC_*`) aliases plus `FIMO_ENV` at startup,
52
+ during both dev and production builds. Next.js needs no browser alias: the root
53
+ `FimoProvider` and the `fimo-next` server runtime resolve the same connection
54
+ at render time and pass only the public part to the browser. No env file is
55
+ written on a switch, so a plain `git checkout` is a complete env switch. Never
56
+ hardcode a tenant URL in application source. One rule, per variable: a
57
+ non-empty value the user set explicitly (`.env`, shell, their own `define`) is
58
+ left alone, and Fimo fills the variables they did not set.
59
59
 
60
60
  For a framework whose alias is not in that list yet, preserve or add its normal
61
61
  local environment alias by hand.
62
62
 
63
+ `NEXT_PUBLIC_FIMO_*` remains a compatibility override for existing Next.js
64
+ projects. Do not add it to new code, env files, setup instructions, or migration
65
+ plans.
66
+
63
67
  ## React Router framework mode
64
68
 
65
69
  For the supported client-rendered setup, keep `ssr: false` and add Fimo's
@@ -67,7 +71,7 @@ hosting preset. It hides the active hosting provider from application code:
67
71
 
68
72
  ```ts
69
73
  import type { Config } from '@react-router/dev/config';
70
- import { fimoPreset } from 'fimo/react-router/preset';
74
+ import { fimoPreset } from 'fimo-react-router/preset';
71
75
 
72
76
  export default {
73
77
  ssr: false,
@@ -4,11 +4,10 @@ Preserve the project's existing App Router structure. Fimo does not require a ro
4
4
 
5
5
  ## Root provider
6
6
 
7
- Resolve the locale using the application's existing strategy, fetch labels on the server, and pass the snapshot into the client provider:
7
+ Render the Server Component `FimoProvider` from `fimo-next` once in the root layout. Resolve the locale using the application's existing strategy, fetch labels on the server, and pass the snapshot:
8
8
 
9
9
  ```tsx
10
- import { getLabels } from 'fimo/next';
11
- import { FimoProvider } from 'fimo/next/client';
10
+ import { FimoProvider, getLabels } from 'fimo-next';
12
11
 
13
12
  export default async function RootLayout({ children }: { children: React.ReactNode }) {
14
13
  const locale = 'en'; // replace with the app's own resolver
@@ -24,14 +23,14 @@ export default async function RootLayout({ children }: { children: React.ReactNo
24
23
  }
25
24
  ```
26
25
 
27
- Do not hardcode a locale when the app already resolves one from route params, a cookie, headers/domain, middleware, or an i18n library. Load `references/frameworks/next/locales.md` for those cases.
26
+ The provider resolves the Fimo connection on the server and passes only public connection data to the client tree; no page or component receives a runtime prop and no `<script>` for the preview needs adding. Do not hardcode a locale when the app already resolves one from route params, a cookie, headers/domain, middleware, or an i18n library. Load `references/frameworks/next/locales.md` for those cases.
28
27
 
29
28
  ## Static generation and ISR
30
29
 
31
30
  Server Components may read generated clients directly. Omit `locale` to use the configured default or bind the application-resolved locale once with `createFimo`:
32
31
 
33
32
  ```tsx
34
- import { createFimo, RichText, Text } from 'fimo/next';
33
+ import { createFimo, RichText, Text } from 'fimo-next';
35
34
  import { content } from '@/schemas';
36
35
 
37
36
  export const revalidate = 60;
@@ -51,7 +50,7 @@ export default async function ArticlesPage() {
51
50
 
52
51
  `createFimo({ content, locale })` is a typed locale-bound facade over the generated registry. It does not own routing and does not force SSG.
53
52
 
54
- Static builds that read Fimo must receive the real build-time `FIMO_CONTENT_API_URL` and default locale environment. Do not switch a route to dynamic rendering merely to hide a missing build environment; choose SSG, ISR, or request-time rendering from the application's intended behavior.
53
+ Static builds read Fimo through the same server connection (linked project + branch locally, platform env when hosted). Do not switch a route to dynamic rendering merely to hide a missing connection; choose SSG, ISR, or request-time rendering from the application's intended behavior.
55
54
 
56
55
  ## Request-time rendering
57
56
 
@@ -59,7 +58,7 @@ Use normal Next request APIs and pass the resulting locale/query values to Fimo:
59
58
 
60
59
  ```tsx
61
60
  import { headers } from 'next/headers';
62
- import { createFimo, Text } from 'fimo/next';
61
+ import { createFimo, Text } from 'fimo-next';
63
62
  import { content } from '@/schemas';
64
63
 
65
64
  export const dynamic = 'force-dynamic';
@@ -82,12 +81,12 @@ hydrate with the matching generated `.client` module. Do not pass a raw Fimo
82
81
  value merely because its enumerable fields look JSON-safe. No conversion is
83
82
  needed while the value stays inside server rendering.
84
83
 
85
- Client Components use the generated `.client` module and `fimo/next/client`:
84
+ Client Components use the generated `.client` module and `fimo-next/client`:
86
85
 
87
86
  ```tsx
88
87
  'use client';
89
88
 
90
- import { Text, useLabels } from 'fimo/next/client';
89
+ import { Text, useLabels } from 'fimo-next/client';
91
90
  import * as Article from '@/schemas/Article.client';
92
91
 
93
92
  export function FeaturedArticles() {
@@ -15,7 +15,7 @@ If omitted, both use the configured default locale. Avoid request-global locale
15
15
 
16
16
  ## Client context
17
17
 
18
- Pass the same locale through `FimoProvider`. A matching label snapshot supplies it automatically:
18
+ Pass the same locale through the root `FimoProvider` (`fimo-next` in the App Router layout, `fimo-next/client` in `_app`). A matching label snapshot supplies it automatically:
19
19
 
20
20
  ```tsx
21
21
  const labels = await getLabels({ locale });
@@ -4,10 +4,10 @@ Preserve `pages/` or `src/pages/`. Pages Router sends props through JSON seriali
4
4
 
5
5
  ## Provider in `_app`
6
6
 
7
- Pass each page's label snapshot to one provider:
7
+ Pages Router has no Server Component above `_app`, so `FimoProvider` from `fimo-next/client` is the root integration: it resolves the connection while the server renders `_app`, writes the public connection into the document for the browser, and loads the Studio preview script. Pass each page's label snapshot to it:
8
8
 
9
9
  ```tsx
10
- import { FimoProvider, type LabelsSnapshot } from 'fimo/next/client';
10
+ import { FimoProvider, type LabelsSnapshot } from 'fimo-next/client';
11
11
  import type { AppProps } from 'next/app';
12
12
 
13
13
  type FimoPageProps = { fimoLabels: LabelsSnapshot };
@@ -26,7 +26,7 @@ If the application already has providers, compose Fimo with them; do not replace
26
26
  ## Static generation and ISR
27
27
 
28
28
  ```tsx
29
- import { createFimo, getLabels } from 'fimo/next';
29
+ import { createFimo, getLabels } from 'fimo-next';
30
30
  import type { GetStaticProps, InferGetStaticPropsType } from 'next';
31
31
 
32
32
  import { ArticleView } from '@/components/ArticleView';
@@ -61,7 +61,7 @@ export default function Page({ article: serialized }: InferGetStaticPropsType<ty
61
61
  ## Request-time rendering
62
62
 
63
63
  ```tsx
64
- import { getLabels } from 'fimo/next';
64
+ import { getLabels } from 'fimo-next';
65
65
  import type { GetServerSideProps, InferGetServerSidePropsType } from 'next';
66
66
  import * as Article from '@/schemas/Article';
67
67
  import * as ArticleClient from '@/schemas/Article.client';
@@ -86,7 +86,7 @@ Use the locale/router values Pages Router already supplies. Do not introduce App
86
86
  Interactive components import hooks and primitives from the client surfaces:
87
87
 
88
88
  ```tsx
89
- import { Text, useLabels } from 'fimo/next/client';
89
+ import { Text, useLabels } from 'fimo-next/client';
90
90
  import * as Article from '@/schemas/Article.client';
91
91
 
92
92
  export function SearchResults() {
@@ -21,14 +21,37 @@ hosted publish. Run `fimo validate`; load
21
21
  `references/frameworks/hosting.md` for the shared profile contract and command
22
22
  override rules.
23
23
 
24
+ ## Connection
25
+
26
+ Render `FimoProvider` once at the application root and nothing else: App Router
27
+ imports it from `fimo-next` in the root layout; Pages Router imports it from
28
+ `fimo-next/client` in `pages/_app.tsx`. It resolves the connection on the
29
+ server — explicit platform env first, else the linked project
30
+ (`.fimo/project.json`) plus the active git branch — and passes only the public
31
+ connection to the browser, where generated `.client` hooks, `useLabels`, form
32
+ submission, and the Studio preview script use it. Never add, read, or document
33
+ `FIMO_CONTENT_API_URL` / `NEXT_PUBLIC_FIMO_API_URL` in application code; the
34
+ platform and the provider own them. `FIMO_CONTENT_API_URL` set by a developer is
35
+ a deliberate host override and wins over derivation.
36
+
37
+ ### Edge routes
38
+
39
+ Fimo hosting injects the server connection for Edge routes. No application
40
+ configuration is needed. For a local or custom-hosted Edge route only, run
41
+ `fimo --json link` in the linked checkout and use its exact `tenant_api_url` as
42
+ `FIMO_CONTENT_API_URL` in the dev command or host configuration. Never construct
43
+ the URL, write it to a project env file, or add a `NEXT_PUBLIC_FIMO_*` variable.
44
+ Rerun the command after switching Git branches because each Fimo Branch has its
45
+ own tenant URL.
46
+
24
47
  ## Hosted preview config
25
48
 
26
- Wrap the existing Next config once so Fimo can connect its hosted development
27
- preview without exposing the active preview provider to the application:
49
+ Wrap the existing Next config once so `next dev` accepts Fimo's hosted preview
50
+ origins without exposing the active preview provider to the application:
28
51
 
29
52
  ```ts
30
53
  import type { NextConfig } from 'next';
31
- import { withFimo } from 'fimo/next/config';
54
+ import { withFimo } from 'fimo-next/config';
32
55
 
33
56
  const nextConfig: NextConfig = {};
34
57
  export default withFimo(nextConfig);
@@ -36,29 +59,15 @@ export default withFimo(nextConfig);
36
59
 
37
60
  Preserve all existing config fields or config-function logic. Do not hardcode a
38
61
  preview domain in `allowedDevOrigins`; Fimo supplies it to the development
39
- sandbox. The wrapper does not change production builds.
62
+ sandbox. The wrapper changes nothing outside `next dev` and is not the
63
+ application's Fimo connection.
40
64
 
41
65
  ## Client dependency
42
66
 
43
- Server-only Fimo reads need no client data library. If the app uses `FimoProvider`,
44
- `useLabels`, or generated `.client` hooks, add `@tanstack/react-query` using the
45
- project's package manager. It is an optional `fimo` peer so server-only projects
46
- do not install it automatically.
47
-
48
- ## Runtime URL
49
-
50
- Linked projects need the tenant content API in both Next runtimes:
51
-
52
- ```dotenv
53
- FIMO_CONTENT_API_URL=https://<tenant-api>
54
- NEXT_PUBLIC_FIMO_API_URL=https://<tenant-api>
55
- ```
56
-
57
- Current `fimo init` and `fimo clone` write these alongside `VITE_API_URL` while
58
- preserving user-owned values. `FIMO_API_URL` remains reserved for CLI/control API
59
- overrides. Keep the
60
- server variable private; only the public variable is compiled into Client
61
- Components.
67
+ `fimo-next` requires `@tanstack/react-query` as a peer; add it with the project's
68
+ package manager when it is missing. Generated `.client` hooks and `useLabels`
69
+ run on the React Query client `FimoProvider` supplies (or an application-owned
70
+ one already in context).
62
71
 
63
72
  ## Generate the content surface
64
73
 
@@ -114,10 +123,10 @@ export function ContactForm() {
114
123
  }
115
124
  ```
116
125
 
117
- Server Components, route handlers, `getStaticProps`, and `getServerSideProps` import from `fimo/next` and generated server modules:
126
+ Server Components, route handlers, `getStaticProps`, and `getServerSideProps` import from `fimo-next` and generated server modules:
118
127
 
119
128
  ```ts
120
- import { createFimo, getLabels, Text } from 'fimo/next';
129
+ import { createFimo, getLabels, Text } from 'fimo-next';
121
130
  import { content } from '@/schemas';
122
131
 
123
132
  const fimo = createFimo({ content, locale });
@@ -127,12 +136,12 @@ const [articles, labels] = await Promise.all([
127
136
  ]);
128
137
  ```
129
138
 
130
- Client Components import from `fimo/next/client` and generated `.client` modules:
139
+ Client Components import from `fimo-next/client` and generated `.client` modules:
131
140
 
132
141
  ```tsx
133
142
  'use client';
134
143
 
135
- import { Text, useLabels } from 'fimo/next/client';
144
+ import { Text, useLabels } from 'fimo-next/client';
136
145
  import * as Article from '@/schemas/Article.client';
137
146
 
138
147
  export function ArticleList() {
@@ -142,21 +151,21 @@ export function ArticleList() {
142
151
  }
143
152
  ```
144
153
 
145
- Do not import `fimo/next/client` into server-only modules. Do not import React Query hooks from `<Uid>.ts`.
154
+ Do not import `fimo-next/client` into server-only modules. Do not import React Query hooks from `<Uid>.ts`.
146
155
 
147
156
  ## Provider boundary
148
157
 
149
- Client hooks need one `FimoProvider` near the application root. The server may fetch a label snapshot and pass it across that boundary:
158
+ Client hooks need the one root `FimoProvider`. The server may fetch a label
159
+ snapshot and pass it across that boundary:
150
160
 
151
161
  ```tsx
152
- import { getLabels } from 'fimo/next';
153
- import { FimoProvider } from 'fimo/next/client';
162
+ import { FimoProvider, getLabels } from 'fimo-next';
154
163
 
155
164
  const labels = await getLabels({ locale });
156
165
  return <FimoProvider labels={labels.snapshot}>{children}</FimoProvider>;
157
166
  ```
158
167
 
159
- Passing `locale` without `labels` is valid when only content hooks need context. Passing a matching snapshot supplies both locale and labels. Never teach the unreleased `FimoNextProvider` name; the public component is `FimoProvider`.
168
+ Passing `locale` without `labels` is valid when only content hooks need context. Passing a matching snapshot supplies both locale and labels. A nested `FimoProvider` only narrows labels/locale for its subtree. Never teach the unreleased `FimoNextProvider` name; the public component is `FimoProvider`.
160
169
 
161
170
  ## Rendering modes
162
171
 
@@ -9,16 +9,18 @@ its routes, rendering choices, providers, and SEO.
9
9
  Install the peers the application uses:
10
10
 
11
11
  ```bash
12
- pnpm add fimo react react-dom react-router @tanstack/react-query
12
+ pnpm add fimo fimo-react fimo-react-router react react-dom react-router @tanstack/react-query
13
13
  pnpm add -D @react-router/dev @react-router/node vite
14
14
  ```
15
15
 
16
+ `fimo-react-router` carries `fimo-vite`; do not install it separately.
17
+
16
18
  Keep the project's React Router Vite plugin explicit:
17
19
 
18
20
  ```ts
19
21
  import { reactRouter } from '@react-router/dev/vite';
20
22
  import { defineConfig } from 'vite';
21
- import { fimo } from 'fimo/vite';
23
+ import { fimo } from 'fimo-react-router/vite';
22
24
 
23
25
  export default defineConfig({
24
26
  plugins: [reactRouter(), fimo({ sitemap: true })],
@@ -31,7 +33,7 @@ For the supported client-rendered setup, connect React Router's native build to
31
33
 
32
34
  ```ts
33
35
  import type { Config } from '@react-router/dev/config';
34
- import { fimoPreset } from 'fimo/react-router/preset';
36
+ import { fimoPreset } from 'fimo-react-router/preset';
35
37
 
36
38
  export default {
37
39
  appDirectory: 'src',
@@ -48,7 +50,7 @@ Do not change an existing SSR project to `ssr: false` merely to add Fimo. The cu
48
50
 
49
51
  ```tsx
50
52
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
51
- import { FimoProviders, FimoScripts } from 'fimo/react-router';
53
+ import { FimoProviders, FimoScripts } from 'fimo-react-router';
52
54
  import { Links, Meta, Outlet, Scripts, ScrollRestoration } from 'react-router';
53
55
 
54
56
  const queryClient = new QueryClient();
@@ -106,10 +108,10 @@ If an existing project imports `fimo/react-router/routes`, load `references/migr
106
108
 
107
109
  ## Content and labels
108
110
 
109
- Render tracked values with `fimo/ui`:
111
+ Render tracked values with `fimo-react`:
110
112
 
111
113
  ```tsx
112
- import { Image, Label, RichText, Text } from 'fimo/ui';
114
+ import { Image, Label, RichText, Text } from 'fimo-react';
113
115
 
114
116
  return <Label value="home.hero.title" as="h1" />;
115
117
  ```