fimo 0.14.0 → 0.15.0-staging.2

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 (199) hide show
  1. package/README.md +1 -0
  2. package/assets/astro/components/Boolean.astro +14 -0
  3. package/assets/astro/components/Date.astro +23 -0
  4. package/assets/astro/components/Image.astro +79 -0
  5. package/assets/astro/components/Json.astro +14 -0
  6. package/assets/astro/components/RichText.astro +17 -0
  7. package/assets/astro/components/StaticImage.astro +66 -0
  8. package/assets/astro/components/Text.astro +23 -0
  9. package/assets/astro/components/Video.astro +47 -0
  10. package/assets/astro/components/index.d.ts +8 -0
  11. package/assets/astro/components/index.js +8 -0
  12. package/assets/content-templates/shared/server.eta +56 -0
  13. package/assets/content-templates/sveltekit/content.eta +86 -0
  14. package/assets/skills/fimo/SKILL.md +13 -4
  15. package/assets/skills/fimo-cli/SKILL.md +28 -28
  16. package/assets/skills/fimo-cli/references/account.md +0 -2
  17. package/assets/skills/fimo-cli/references/agent-setup.md +7 -9
  18. package/assets/skills/fimo-cli/references/agents.md +0 -2
  19. package/assets/skills/fimo-cli/references/analytics.md +0 -2
  20. package/assets/skills/fimo-cli/references/assets.md +2 -4
  21. package/assets/skills/fimo-cli/references/branches.md +14 -15
  22. package/assets/skills/fimo-cli/references/content.md +9 -11
  23. package/assets/skills/fimo-cli/references/credits.md +0 -2
  24. package/assets/skills/fimo-cli/references/deploy.md +6 -7
  25. package/assets/skills/fimo-cli/references/describe.md +1 -3
  26. package/assets/skills/fimo-cli/references/domains.md +0 -2
  27. package/assets/skills/fimo-cli/references/forms.md +5 -7
  28. package/assets/skills/fimo-cli/references/history.md +0 -2
  29. package/assets/skills/fimo-cli/references/init.md +34 -26
  30. package/assets/skills/fimo-cli/references/integrations/firecrawl.md +0 -2
  31. package/assets/skills/fimo-cli/references/integrations.md +0 -2
  32. package/assets/skills/fimo-cli/references/invite.md +0 -2
  33. package/assets/skills/fimo-cli/references/labels.md +5 -7
  34. package/assets/skills/fimo-cli/references/locales.md +2 -4
  35. package/assets/skills/fimo-cli/references/mcp.md +2 -4
  36. package/assets/skills/fimo-cli/references/media.md +0 -2
  37. package/assets/skills/fimo-cli/references/preview.md +0 -2
  38. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -3
  39. package/assets/skills/fimo-cli/references/projects.md +1 -3
  40. package/assets/skills/fimo-cli/references/schedules.md +0 -2
  41. package/assets/skills/fimo-cli/references/support.md +0 -2
  42. package/assets/skills/fimo-cli/references/webhooks.md +0 -2
  43. package/assets/skills/fimo-code/SKILL.md +11 -3
  44. package/assets/skills/fimo-code/references/assets.md +2 -2
  45. package/assets/skills/fimo-code/references/content/clients.md +5 -1
  46. package/assets/skills/fimo-code/references/content.md +3 -1
  47. package/assets/skills/fimo-code/references/frameworks/astro.md +127 -0
  48. package/assets/skills/fimo-code/references/frameworks/compatibility.md +19 -0
  49. package/assets/skills/fimo-code/references/frameworks/hosting.md +15 -3
  50. package/assets/skills/fimo-code/references/frameworks/react-router.md +37 -209
  51. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +110 -0
  52. package/assets/skills/fimo-code/references/frameworks/vite-react.md +35 -166
  53. package/assets/skills/fimo-code/references/labels.md +16 -6
  54. package/assets/skills/fimo-code/references/locales.md +3 -1
  55. package/assets/skills/fimo-code/references/ui.md +19 -15
  56. package/assets/skills/fimo-migration/SKILL.md +99 -146
  57. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +26 -0
  58. package/assets/skills/fimo-migration/references/inventory/coordinator.md +40 -0
  59. package/assets/skills/fimo-migration/references/inventory/locales/next-intl.md +39 -0
  60. package/assets/skills/fimo-migration/references/inventory/locales.md +41 -0
  61. package/assets/skills/fimo-migration/references/workflow.md +3 -2
  62. package/assets/skills/fimo-migration/scripts/inventory/locales/next-intl.mjs +459 -0
  63. package/assets/skills/fimo-studio/SKILL.md +1 -1
  64. package/assets/skills/fimo-studio/references/project-creation.md +10 -18
  65. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
  66. package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -1
  67. package/assets/sveltekit/components/Boolean.svelte +19 -0
  68. package/assets/sveltekit/components/Date.svelte +33 -0
  69. package/assets/sveltekit/components/FimoProvider.svelte +35 -0
  70. package/assets/sveltekit/components/Image.svelte +80 -0
  71. package/assets/sveltekit/components/Json.svelte +18 -0
  72. package/assets/sveltekit/components/Label.svelte +16 -0
  73. package/assets/sveltekit/components/Number.svelte +21 -0
  74. package/assets/sveltekit/components/RichText.svelte +19 -0
  75. package/assets/sveltekit/components/Text.svelte +30 -0
  76. package/assets/sveltekit/components/Video.svelte +37 -0
  77. package/assets/sveltekit/components/index.d.ts +10 -0
  78. package/assets/sveltekit/components/index.js +10 -0
  79. package/dist/build/astro/config.d.ts +4 -0
  80. package/dist/build/astro/config.js +64 -0
  81. package/dist/build/next/config.js +16 -0
  82. package/dist/build/sveltekit/config.d.ts +6 -0
  83. package/dist/build/sveltekit/config.js +8 -0
  84. package/dist/build/sveltekit/data-id.d.ts +3 -0
  85. package/dist/build/sveltekit/data-id.js +171 -0
  86. package/dist/build/sveltekit/vite.d.ts +13 -0
  87. package/dist/build/sveltekit/vite.js +15 -0
  88. package/dist/build/vite/index.js +2 -0
  89. package/dist/build/vite/plugins/data-id.d.ts +9 -0
  90. package/dist/build/vite/plugins/data-id.js +6 -1
  91. package/dist/build/vite/plugins/runtime-env.d.ts +21 -0
  92. package/dist/build/vite/plugins/runtime-env.js +68 -0
  93. package/dist/cli/bundle.json +1 -1
  94. package/dist/cli/index.js +108 -101
  95. package/dist/runtime/app/FimoProviders.d.ts +1 -1
  96. package/dist/runtime/app/FimoProviders.js +11 -5
  97. package/dist/runtime/astro/internal.d.ts +6 -0
  98. package/dist/runtime/astro/internal.js +16 -0
  99. package/dist/runtime/astro/preview.d.ts +14 -0
  100. package/dist/runtime/astro/preview.js +103 -0
  101. package/dist/runtime/astro/render-rich-text.d.ts +2 -0
  102. package/dist/runtime/astro/render-rich-text.js +1 -0
  103. package/dist/runtime/astro/server-runtime.d.ts +3 -0
  104. package/dist/runtime/astro/server-runtime.js +20 -0
  105. package/dist/runtime/astro/server.d.ts +15 -0
  106. package/dist/runtime/astro/server.js +14 -0
  107. package/dist/runtime/content/client/collection-core.d.ts +2 -17
  108. package/dist/runtime/content/client/collection-core.js +15 -8
  109. package/dist/runtime/content/client/core-types.d.ts +96 -0
  110. package/dist/runtime/content/client/core-types.js +1 -0
  111. package/dist/runtime/content/client/internal.d.ts +4 -4
  112. package/dist/runtime/content/client/internal.js +4 -3
  113. package/dist/runtime/content/client/runtime.d.ts +1 -1
  114. package/dist/runtime/content/client/server-content-client.d.ts +3 -3
  115. package/dist/runtime/content/client/server-content-client.js +2 -29
  116. package/dist/runtime/content/client/singleton-core.d.ts +2 -9
  117. package/dist/runtime/content/client/singleton-core.js +9 -4
  118. package/dist/runtime/content/client/types.d.ts +5 -115
  119. package/dist/runtime/content/index.d.ts +3 -3
  120. package/dist/runtime/labels/fetch.js +5 -3
  121. package/dist/runtime/next/client.d.ts +2 -1
  122. package/dist/runtime/next/facade.d.ts +1 -1
  123. package/dist/runtime/next/provider.js +1 -1
  124. package/dist/runtime/next/server-runtime.js +1 -1
  125. package/dist/runtime/next/server.d.ts +5 -4
  126. package/dist/runtime/paths/get-fimo-paths.js +8 -3
  127. package/dist/runtime/preview/bridge.d.ts +8 -0
  128. package/dist/runtime/preview/bridge.js +20 -0
  129. package/dist/runtime/preview/location.d.ts +23 -0
  130. package/dist/runtime/preview/location.js +93 -0
  131. package/dist/runtime/preview/routes.d.ts +10 -0
  132. package/dist/runtime/preview/routes.js +29 -0
  133. package/dist/runtime/primitives/index.d.ts +4 -1
  134. package/dist/runtime/primitives/index.js +1 -0
  135. package/dist/runtime/primitives/lib/image-optimization.d.ts +27 -2
  136. package/dist/runtime/primitives/lib/image-optimization.js +40 -0
  137. package/dist/runtime/primitives/lib/index.d.ts +1 -1
  138. package/dist/runtime/primitives/lib/primitives.d.ts +0 -54
  139. package/dist/runtime/primitives/lib/primitives.js +6 -0
  140. package/dist/runtime/primitives/lib/render-rich-text.d.ts +3 -0
  141. package/dist/runtime/primitives/lib/render-rich-text.js +112 -0
  142. package/dist/runtime/react/primitives/contracts.d.ts +40 -2
  143. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +15 -34
  144. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +2 -1
  145. package/dist/runtime/react/primitives/renderers/StaticImage.js +13 -30
  146. package/dist/runtime/routing/AppRoutesProvider.js +20 -8
  147. package/dist/runtime/shared/env-identity.d.ts +43 -0
  148. package/dist/runtime/shared/env-identity.js +88 -0
  149. package/dist/runtime/shared/local-runtime-env.d.ts +65 -0
  150. package/dist/runtime/shared/local-runtime-env.js +169 -0
  151. package/dist/runtime/{react-router → shared}/preview-location.d.ts +7 -13
  152. package/dist/runtime/{react-router → shared}/preview-location.js +26 -27
  153. package/dist/runtime/sveltekit/content.d.ts +25 -0
  154. package/dist/runtime/sveltekit/content.js +33 -0
  155. package/dist/runtime/sveltekit/context-contract.d.ts +5 -0
  156. package/dist/runtime/sveltekit/context-contract.js +2 -0
  157. package/dist/runtime/sveltekit/context.d.ts +8 -0
  158. package/dist/runtime/sveltekit/context.js +25 -0
  159. package/dist/runtime/sveltekit/index.d.ts +7 -0
  160. package/dist/runtime/sveltekit/index.js +4 -0
  161. package/dist/runtime/sveltekit/internal.d.ts +6 -0
  162. package/dist/runtime/sveltekit/internal.js +12 -0
  163. package/dist/runtime/sveltekit/labels.d.ts +16 -0
  164. package/dist/runtime/sveltekit/labels.js +13 -0
  165. package/dist/runtime/sveltekit/preview.d.ts +19 -0
  166. package/dist/runtime/sveltekit/preview.js +77 -0
  167. package/dist/runtime/sveltekit/runtime.d.ts +8 -0
  168. package/dist/runtime/sveltekit/runtime.js +17 -0
  169. package/dist/runtime/templates.d.ts +1 -1
  170. package/dist/runtime/templates.js +1 -1
  171. package/dist/runtime/vite/Label.d.ts +13 -0
  172. package/dist/runtime/vite/Label.js +16 -0
  173. package/dist/scripts/extract-translations.js +103 -43
  174. package/dist/scripts/sync-forms.js +1 -1
  175. package/dist/scripts/sync-schemas.js +83 -16
  176. package/package.json +57 -2
  177. package/release.json +2 -2
  178. package/templates/nextjs/AGENTS.md +10 -5
  179. package/templates/nextjs/_gitignore +1 -0
  180. package/templates/react-router/AGENTS.md +4 -3
  181. package/templates/react-router/package.json +1 -1
  182. package/templates/sveltekit/.fimo/config.json +15 -0
  183. package/templates/sveltekit/AGENTS.md +36 -0
  184. package/templates/sveltekit/CLAUDE.md +5 -0
  185. package/templates/sveltekit/_gitignore +16 -0
  186. package/templates/sveltekit/package.json +28 -0
  187. package/templates/sveltekit/pnpm-workspace.yaml +4 -0
  188. package/templates/sveltekit/src/app.html +11 -0
  189. package/templates/sveltekit/src/routes/+layout.server.ts +8 -0
  190. package/templates/sveltekit/src/routes/+layout.svelte +12 -0
  191. package/templates/sveltekit/src/routes/+page.svelte +48 -0
  192. package/templates/sveltekit/svelte.config.js +5 -0
  193. package/templates/sveltekit/tsconfig.json +14 -0
  194. package/templates/sveltekit/vite.config.ts +5 -0
  195. /package/assets/content-templates/{form-template.eta → forms/react.eta} +0 -0
  196. /package/assets/content-templates/{next-client-template.eta → next/client.eta} +0 -0
  197. /package/assets/content-templates/{next-server-template.eta → next/server.eta} +0 -0
  198. /package/assets/content-templates/{hooks-template.eta → react/client.eta} +0 -0
  199. /package/assets/content-templates/{types-template.eta → shared/types.eta} +0 -0
@@ -1,7 +1,5 @@
1
1
  # AI agent setup
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  Fimo connects agents in two layers:
6
4
 
7
5
  1. **One global bootstrap skill** — a tiny, generic `fimo` skill installed once per user, machine-wide (symlinked into each agent's global skills directory). It contains no workflow content; it routes the agent to skills fetched through `fimo skills get`.
@@ -10,10 +8,10 @@ Fimo connects agents in two layers:
10
8
  The rich skills (`fimo-code`, `fimo-cli`, `fimo-studio`, `fimo-migration`) are **never installed as files**. They are served on demand and never land in the project. `fimo-code` resolves from the project's installed package; the others resolve from the CLI being run:
11
9
 
12
10
  ```bash
13
- npx fimo@latest skills list # what's available
14
- npx fimo@latest skills get fimo-code # writing code: schemas, generated clients, labels, framework adapters
15
- npx fimo@latest skills get fimo-cli # CLI + workflows (this skill)
16
- npx fimo@latest skills get fimo-cli --ref deploy # a reference doc
11
+ fimo skills list # what's available
12
+ fimo skills get fimo-code # writing code: schemas, generated clients, labels, framework adapters
13
+ fimo skills get fimo-cli # CLI + workflows (this skill)
14
+ fimo skills get fimo-cli --ref deploy # a reference doc
17
15
  ```
18
16
 
19
17
  Two CLI namespaces manage the two layers:
@@ -23,11 +21,11 @@ Two CLI namespaces manage the two layers:
23
21
 
24
22
  ## Set up the global skill (no install needed)
25
23
 
26
- Run the CLI via `npx fimo@latest` — do not install `fimo` globally.
24
+ Do not install `fimo` globally; use the selected CLI invocation from the main `fimo-cli` skill.
27
25
 
28
26
  ```bash
29
- npx fimo@latest skills install # opens the agent picker, installs the global fimo bootstrap
30
- npx fimo@latest login # connect your account when ready
27
+ fimo skills install # opens the agent picker, installs the global fimo bootstrap
28
+ fimo login # connect your account when ready
31
29
  ```
32
30
 
33
31
  ## `fimo skills` — install + sync + uninstall
@@ -1,7 +1,5 @@
1
1
  # Agents workflow (`fimo agents *`)
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  The `fimo agents` namespace authors and operates **agent bundles** — multi-file definitions under `<project>/.fimo/agents/<name>/` (a `config.yaml`, a `GOAL.md`, optional `capabilities.yaml`, etc.). Legacy projects keep using root `agents/<name>/`.
6
4
 
7
5
  ## Mental model
@@ -1,7 +1,5 @@
1
1
  # Analytics workflow
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  Pageview aggregates for the **published** site are stored in Fimo's analytics pipeline. Preview traffic is not recorded.
6
4
 
7
5
  Analytics has a **retained preview for every org** — free included. The free default is a 7-day retention window, so short ranges (`today`, `yesterday`, `this_week`, `last_week`, `last_7_days`) work for everyone. **Extended date ranges and longer retention are paid** — `last_30_days`, `last_90_days`, `this_month`, `last_month`, `last_quarter`, `last_year`, and `custom` require the `canUseExtendedDateRanges` privilege, which only paid orgs have. Asking for an extended range as a free user returns a 403 with an upgrade hint.
@@ -1,8 +1,6 @@
1
1
  # Assets workflow (media library)
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- > Package contract: run `npx fimo@latest skills get fimo-code --ref assets` for `FimoMedia`, `--ref ui` for rendering primitives, and load the detected framework reference for framework-specific integration.
3
+ > Package contract: run `fimo skills get fimo-code --ref assets` for `FimoMedia`, `--ref ui` for rendering primitives, and load the detected framework reference for framework-specific integration.
6
4
  > For **generating** new images / videos with AI, see **`references/media.md`** for the task commands and recipes.
7
5
 
8
6
  This file covers the **CLI workflow** for media that already exists: uploading files, browsing the library, opening an asset to inspect it, moving / deleting items.
@@ -129,4 +127,4 @@ fimo assets delete <asset-id>
129
127
 
130
128
  1. Upload with `fimo assets upload` or generate with a task command such as `fimo image generate`.
131
129
  2. Keep the returned `url` (for direct use) or `id` (to attach to a `media` content-type field).
132
- 3. To use in application code, run `npx fimo@latest 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.
130
+ 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.
@@ -1,7 +1,5 @@
1
1
  # Envs &amp; branches (git-shaped workflow)
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  > **Beta:** Branch environments are still in beta. The CLI surface is available for early workflows, but not every command or cross-surface merge path is guaranteed to work reliably yet.
6
4
 
7
5
  A Fimo **env** is a multi-surface clone of the project: a git branch **plus** its own Neon DB branch, sandbox, preview URL, and R2 asset prefix. The CLI mirrors `git` command shapes so the workflow transfers directly — same verbs, multi-surface semantics.
@@ -25,18 +23,18 @@ fimo --env <name> <command> # peek at another env for one command (does not
25
23
 
26
24
  ## Commands
27
25
 
28
- | Command | git analogue | What it does |
29
- | ----------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
30
- | `fimo branch` | `git branch` | List envs (current marked `*`). `-v` adds preview URLs + deleted envs. |
31
- | `fimo branch <name>` | `git branch <name>` | Create an env off the current one. `--from <env>` forks from a different parent. Provisions DB + sandbox + preview + R2 prefix. |
32
- | `fimo branch -d <name>` | `git branch -d` | Delete an env — tears down its sandbox, Neon branch, and R2 prefix. Refuses `main` and `prod`. |
33
- | `fimo checkout <name>` | `git checkout` | Switch to an env (checks out the matching git branch too). `-b` creates + switches; `--from <env>` sets the parent (with `-b`). |
34
- | `fimo switch <name>` | `git switch` | Switch to an existing env. Takes only `<name>` (no `-b`/`--from`) — use `fimo checkout -b` to create + switch. |
35
- | `fimo pull` | `git pull` | Sync the current env's data plane (DB/assets) down from its parent. `--from <env>` syncs from an explicit ancestor. |
36
- | `fimo diff [from] [to]` | `git diff` | Two-env diff across all surfaces. Defaults `from` = current env, `to` = `main`. `--surface <name>` limits to one; `--json`; `--no-color`. |
37
- | `fimo status` | `git status` | Multi-surface status for the current env vs its parent. See below. |
38
- | `fimo merge <from>` | `git merge` | Merge another env into the current one (multi-surface, atomic, interactive conflict resolver). See below. |
39
- | `fimo publish` | — | Tag `main@HEAD` as `release/<version>` and trigger the prod swap. See "Publishing" below. |
26
+ | Command | git analogue | What it does |
27
+ | ----------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `fimo branch` | `git branch` | List envs (current marked `*`). `-v` adds preview URLs + deleted envs. |
29
+ | `fimo branch <name>` | `git branch <name>` | Create an env off the current one. `--from <env>` forks from a different parent. Provisions DB + sandbox + preview + R2 prefix. |
30
+ | `fimo branch -d <name>` | `git branch -d` | Delete an env — tears down its sandbox, Neon branch, and R2 prefix. Refuses `main` and `prod`. |
31
+ | `fimo checkout <name>` | `git checkout` | Switch to an env (checks out the matching git branch; the app derives its env from that branch at startup). `-b` creates + switches; `--from <env>` sets the parent (with `-b`). |
32
+ | `fimo switch <name>` | `git switch` | Switch to an existing env. Takes only `<name>` (no `-b`/`--from`) — use `fimo checkout -b` to create + switch. |
33
+ | `fimo pull` | `git pull` | Sync the current env's data plane (DB/assets) down from its parent. `--from <env>` syncs from an explicit ancestor. |
34
+ | `fimo diff [from] [to]` | `git diff` | Two-env diff across all surfaces. Defaults `from` = current env, `to` = `main`. `--surface <name>` limits to one; `--json`; `--no-color`. |
35
+ | `fimo status` | `git status` | Multi-surface status for the current env vs its parent. See below. |
36
+ | `fimo merge <from>` | `git merge` | Merge another env into the current one (multi-surface, atomic, interactive conflict resolver). See below. |
37
+ | `fimo publish` | — | Tag `main@HEAD` as `release/<version>` and trigger the prod swap. See "Publishing" below. |
40
38
 
41
39
  All of these accept the global `--env` override. `diff`, `status`, `merge`, and `publish` additionally accept `-C, --cwd <dir>` to point at a project directory.
42
40
 
@@ -105,7 +103,8 @@ Use `fimo publish` for versioned prod releases; use `fimo deploy --publish` for
105
103
 
106
104
  ## Anti-patterns
107
105
 
108
- - **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the env's DB / sandbox / preview. Always use `fimo` for branch operations so resources are provisioned atomically. (Running `fimo branch <name>` after the fact provisions them.)
106
+ - **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the env'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.
107
+ - **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.
109
108
  - **Trying to push to or delete `prod` / `release/*`** — these are read-only/protected. Publish to update prod; never push.
110
109
  - **`fimo merge` straight onto `main` as a habit** — it's gated for a reason. Merge on a branch, then publish.
111
110
  - **Confusing `fimo switch` (env) with `fimo orgs switch` (org).**
@@ -1,8 +1,6 @@
1
1
  # Content workflow (schemas + Singles + entries)
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- > Package contract: load the version-locked `fimo-code` skill with `npx fimo@latest skills get fimo-code`, then fetch its nested content and detected-framework references for schema JSON, entry values, generated clients, and imports.
3
+ > Package contract: load the version-locked `fimo-code` skill with `fimo skills get fimo-code`, then fetch its nested content and detected-framework references for schema JSON, entry values, generated clients, and imports.
6
4
 
7
5
  This file covers the **CLI workflow** for content. Use it when the user wants to add a content type (blog, products, pages) or manage Singles and entries.
8
6
 
@@ -15,7 +13,7 @@ Never remove `isSingleton: true` merely because `fimo entries create` rejects th
15
13
 
16
14
  ## Flow
17
15
 
18
- 1. Write `src/schemas/{Uid}.json` — PascalCase filename (e.g. `BlogPost.json`). Run `npx fimo@latest skills get fimo-code --ref content/schema` for the JSON contract.
16
+ 1. Write `src/schemas/{Uid}.json` — PascalCase filename (e.g. `BlogPost.json`). Run `fimo skills get fimo-code --ref content/schema` for the JSON contract.
19
17
  2. Run `fimo schemas push {Uid}`. It registers the schema and generates the framework-specific public modules. It does not run whole-project validation.
20
18
  3. App code imports generated public modules, never `.types.ts` directly. Load the detected framework reference before choosing server modules, client modules, hooks, or a registry.
21
19
  4. Seed collections via `fimo entries create`, or update one-off content via `fimo singles update`. Generate cover images first with `fimo image generate` if needed (see `media.md` / `assets.md`).
@@ -41,7 +39,7 @@ The command is `fimo schemas` (plural). There is no singular `fimo schema` alias
41
39
 
42
40
  All commands accept `-C, --cwd <dir>` to point at a different project directory.
43
41
 
44
- Blocks schemas support at most 7 nested `blocks` levels, 40 variants in one `schema.oneOf`, and `min` or `max` values up to 200 items per blocks field. Run `npx fimo@latest skills get fimo-code --ref content/schema` for the complete blocks JSON shape.
42
+ Blocks schemas support at most 7 nested `blocks` levels, 40 variants in one `schema.oneOf`, and `min` or `max` values up to 200 items per blocks field. Run `fimo skills get fimo-code --ref content/schema` for the complete blocks JSON shape.
45
43
 
46
44
  Schema transitions are automatic. Adding optional fields and changing labels preserve content. A new required field backfills its `default` only where existing values need it; the push fails safely when no default can satisfy existing content. Removing a nested field or block variant removes only those values. `string` and `text` preserve values in both directions. Other primitive changes convert safe values and reject unsafe ones without changing the schema or entries. Lowering block `max` trims from the end; raising `min` fills from the blocks `default` templates. A reference target change clears its connections. Use repeatable `--rename old.path=new.path` arguments when a field moved by name so the one-time migration preserves its values; the operation is not stored in schema JSON. Collection-to-Single removes that type's entries and cleans inbound references; Single-to-collection preserves its entry.
47
45
 
@@ -83,7 +81,7 @@ fimo entries bulk-update <TypeName> (--file <path> | --stdin)
83
81
  fimo entries bulk-delete <TypeName> (--ids <id1>,<id2> | --where '<json>') [--locale es]
84
82
  ```
85
83
 
86
- `--body` is a **required** option on `create` and `update`. Run `npx fimo@latest skills get fimo-code --ref content/richtext` before constructing an entry payload: slug belongs inside `data`, media has a specific shape, and richtext must be Tiptap JSONContent.
84
+ `--body` is a **required** option on `create` and `update`. Run `fimo skills get fimo-code --ref content/richtext` before constructing an entry payload: slug belongs inside `data`, media has a specific shape, and richtext must be Tiptap JSONContent.
87
85
 
88
86
  `entries list` accepts the same read query surface as generated hooks:
89
87
 
@@ -107,7 +105,7 @@ Reference filters take the target `id` string (`{"author":"750e..."}`). On a to-
107
105
 
108
106
  Polymorphic references declare `targets: ["Post", "Product"]` instead of `target` (never both) and their values carry both parts: `{ "contentType": "Post", "id": "..." }`. Populate returns mixed full entries, and generated hooks expose `$type` on each populated value to branch on. `--where` on polymorphic fields is not supported yet and fails with a clear error.
109
107
 
110
- In generated application code, the equivalent is `populate: ['author', 'contributors'] as const` in query params. Let the generated client infer the result when possible; if a named TypeScript shape is needed, use `BlogPostResult<TFields, TPopulate>` as documented by `npx fimo@latest skills get fimo-code --ref content/clients`. Writes use `BlogPostInput`.
108
+ In generated application code, the equivalent is `populate: ['author', 'contributors'] as const` in query params. Let the generated client infer the result when possible; if a named TypeScript shape is needed, use `BlogPostResult<TFields, TPopulate>` as documented by `fimo skills get fimo-code --ref content/clients`. Writes use `BlogPostInput`.
111
109
 
112
110
  ### Read-only SQL
113
111
 
@@ -198,7 +196,7 @@ fimo entries bulk-delete BlogPost --where '{"archived":true}'
198
196
 
199
197
  Each bulk request handles at most 1,000 entries. Missing requested IDs do not fail valid work: the CLI prints a warning, and `--json` includes both a top-level `warnings` array and the exact IDs in `data.meta.missing`. Bulk writes use the same validation, locale, reference, and content-change paths as singular entry writes. They apply entries one at a time. Recoverable create and update errors report how many earlier entries were already changed.
200
198
 
201
- For reference schema JSON and entry value shape, run `npx fimo@latest skills get fimo-code --ref content/schema`. The short version:
199
+ For reference schema JSON and entry value shape, run `fimo skills get fimo-code --ref content/schema`. The short version:
202
200
 
203
201
  ```json
204
202
  {
@@ -264,13 +262,13 @@ Use `"isSingleton": true` for a Single with exactly one set of content. Generate
264
262
 
265
263
  ## "Add a blog" recipe
266
264
 
267
- 1. Run `npx fimo@latest skills get fimo-code --ref content/schema` for the JSON shape and field types.
265
+ 1. Run `fimo skills get fimo-code --ref content/schema` for the JSON shape and field types.
268
266
  2. Write `src/schemas/BlogPost.json` with fields `title`, `body` (richtext), `coverImage` (media), etc. Do NOT declare a `slug` field — `slug` (and `id`, `entryId`, `documentId`, `locale`, `createdAt`, `updatedAt`, `__fimo`) is reserved entry metadata and will be rejected; every entry gets a `slug` for free.
269
267
  3. Run `fimo schemas push BlogPost`.
270
268
  4. Generate cover images: `fimo image generate --prompt "..." --aspect-ratio 16:9` (see `media.md`).
271
269
  5. Seed entries: `fimo entries create BlogPost --body '{"data": {"slug": "first-post", "title": "...", "coverImage": {...}}}'`.
272
- 6. Run `npx fimo@latest skills get fimo-code --ref ui` and load the detected framework reference for rendering primitives.
273
- 7. Run `npx fimo@latest skills get fimo-code --ref labels` and load the detected framework reference for labels.
270
+ 6. Run `fimo skills get fimo-code --ref ui` and load the detected framework reference for rendering primitives.
271
+ 7. Run `fimo skills get fimo-code --ref labels` and load the detected framework reference for labels.
274
272
  8. Load the detected framework reference, then build the page with its generated server or client surface.
275
273
 
276
274
  ## Non-interactive use
@@ -1,7 +1,5 @@
1
1
  # Credits
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  `fimo credits` is a read-only command for checking the AI credit balance of the organization that owns a Fimo project. It resolves the project from `.fimo/project.json` unless `--project <project-id>` is provided.
6
4
 
7
5
  ```bash
@@ -1,8 +1,6 @@
1
1
  # Deploy pipeline
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- **`fimo deploy` is on-demand, not the working loop and not a required final step.** The loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), iterate with the developer, and let live reload show changes. Reach for `fimo deploy` only when the developer wants a **hosted preview**, a **shareable link**, or to **go live** — and only on their signal. It commits everything, pushes to the current env's branch, and round-trips that env's sandbox (install + restart); it's a milestone command, not a save step. Batch related edits into one deploy; never deploy after every change.
3
+ **`fimo deploy` is on-demand, not the working loop and not a required final step.** The loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), iterate with the developer, and let live reload show changes. Reach for `fimo deploy` only when the developer wants a **hosted preview**, a **shareable link**, or to **go live** — and only on their signal. New-project onboarding counts as the signal for its single automatic first preview deploy (see `references/init.md` § Create the first hosted preview). It commits everything, pushes to the current env's branch, and round-trips that env's sandbox (install + restart); it's a milestone command, not a save step. Batch related edits into one deploy; never deploy after every change.
6
4
 
7
5
  > **Local vs hosted.** The local dev server is localhost only. The Fimo **dashboard preview** and the **shareable preview URL** are served by the deployed sandbox — so if the developer wants to see the site in the dashboard or send someone a link, that requires a `fimo deploy`.
8
6
 
@@ -54,13 +52,14 @@ framework default. Production uses `.fimo/config.json#runtime.framework` and
54
52
  the same bounded build/install overrides. Existing applications keep their
55
53
  router and hosting behavior: do not replace the router or derive
56
54
  deployment rewrites from `.fimo/config.json#routes`. When setup changes are
57
- needed, load the `fimo-code` skill's `references/frameworks/hosting.md` recipe;
58
- it covers the React Router `fimoPreset()` connector and the explicit catch-all
59
- used only by plain Vite `BrowserRouter` SPAs.
55
+ needed, load the `fimo-code` skill's framework reference:
56
+ `references/frameworks/hosting.md` covers the React Router `fimoPreset()`
57
+ connector and the explicit catch-all used only by plain Vite `BrowserRouter`
58
+ SPAs; Astro's `fimo()` integration lives in `references/frameworks/astro.md`.
60
59
 
61
60
  ## Warm the sandbox early in a session (optional)
62
61
 
63
- This is a **performance optimization, only worth doing when you already know a deploy is coming** (the developer asked to publish, or you're confident they'll want a hosted preview soon). If you're just iterating locally, skip it — don't deploy pre-emptively.
62
+ This is a **performance optimization, only worth doing when you already know a deploy is coming** (the developer asked to publish, or you're confident they'll want a hosted preview soon). If you're just iterating locally, skip it — don't deploy pre-emptively. New-project onboarding never needs it: its automatic first preview deploy is the warm-up.
64
63
 
65
64
  The first deploy of a project's life pays a one-time cost: the sandbox has to provision (create the VM, install the user's deps if they differ from the template's baked ones, start the dev server) — about 15-30s. Every deploy after that lands on a warm sandbox (~10s, or ~4s when you also use `--no-restart` and the lockfile hasn't changed).
66
65
 
@@ -1,7 +1,5 @@
1
1
  # Describe — read-only snapshot of the current project
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  `fimo describe` prints a structured snapshot of the Fimo project in the current working directory: project name + config version, detected framework, fimo package version, package manager, route / schema / locale counts, and a file tree.
6
4
 
7
5
  It is **read-only**. Never writes, never hits the network. Safe to run any time.
@@ -77,5 +75,5 @@ The scoped view still emits the project-level metadata header (name, framework,
77
75
  ## Notes for AI tools
78
76
 
79
77
  - The JSON shape is stable; parse it rather than scraping the human output when you need a specific field.
80
- - The `framework` field uses Fimo's shared Vercel filesystem detector, which considers package dependencies, configuration files, and framework-specific file layout. For unusual or deliberately mixed projects it may be `null`; inspect `package.json` and the application tree before choosing a framework reference.
78
+ - `framework` is normally auto-detected. If it is `null`, inspect the project before choosing framework-specific guidance.
81
79
  - The command runs in any directory that contains `.fimo/project.json` or one of its ancestors. If you're not in a Fimo project, `describe` will run against whatever directory you point it at (it doesn't require Fimo credentials).
@@ -1,7 +1,5 @@
1
1
  # Domains
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  `fimo domains` is the surface for everything URL-related on a project. Three resources live here, and they're easy to confuse — keep them straight:
6
4
 
7
5
  | Resource | What it is | Plan | Per project | Source of truth |
@@ -1,19 +1,17 @@
1
1
  # Forms workflow
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- > Package contract: run `npx fimo@latest skills get fimo-code --ref forms` for the JSON spec, generated Zod schema, submit helper, and application usage.
3
+ > Package contract: run `fimo skills get fimo-code --ref forms` for the JSON spec, generated Zod schema, submit helper, and application usage.
6
4
 
7
5
  This file covers the **CLI workflow** for forms. Use it when the user wants to add a contact form, signup, feedback form, etc.
8
6
 
9
7
  ## Flow
10
8
 
11
- 1. Write `src/forms/{name}.json` — kebab-case filename (e.g. `contact-us.json`). For the JSON spec and field types, run `npx fimo@latest skills get fimo-code --ref forms`.
9
+ 1. Write `src/forms/{name}.json` — kebab-case filename (e.g. `contact-us.json`). For the JSON spec and field types, run `fimo skills get fimo-code --ref forms`.
12
10
  2. Register with `fimo forms push {name}` — creates the form, obtains its `id`, patches it back into the JSON file.
13
11
  3. Pre-build generates `src/forms/{name}.ts` (Zod schema + `submitX` helper). Use the same `fimo-code` reference for the generated API.
14
12
  4. Write the application form using the generated `@/forms/{name}` module and the existing framework conventions.
15
13
 
16
- Steps 1, 3, and 4 reference the `fimo-code` skill (`npx fimo@latest skills get fimo-code`). Step 2 is the CLI command.
14
+ Steps 1, 3, and 4 reference the `fimo-code` skill (`fimo skills get fimo-code`). Step 2 is the CLI command.
17
15
 
18
16
  ## CLI commands
19
17
 
@@ -45,11 +43,11 @@ Use this when the user asks "who filled out the contact form?", "how many signup
45
43
 
46
44
  ## "Add a contact form" recipe
47
45
 
48
- 1. Run `npx fimo@latest skills get fimo-code --ref forms` for the JSON spec.
46
+ 1. Run `fimo skills get fimo-code --ref forms` for the JSON spec.
49
47
  2. Write `src/forms/contact-us.json` with the required fields.
50
48
  3. Run `fimo forms push contact-us` — the `id` is patched back into the JSON automatically.
51
49
  4. Use the same `fimo-code` forms reference for the generated `submitContactUs` + `ContactUsSchema` API.
52
- 5. Run `npx fimo@latest skills get fimo-code --ref labels` and load the detected framework reference for form labels.
50
+ 5. Run `fimo skills get fimo-code --ref labels` and load the detected framework reference for form labels.
53
51
  6. Write the application form using the generated `@/forms/contact-us` module.
54
52
 
55
53
  **Register BEFORE writing app code that depends on the form** — otherwise the generated `.ts` doesn't exist and the runtime fetch 404s.
@@ -1,7 +1,5 @@
1
1
  # Project History
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  History is scoped to the selected project environment. A restore point records the environment's CMS content and the matching Git commit so code and content can be recovered together.
6
4
 
7
5
  Fimo also creates restore points automatically after a successful deploy, on the destination of a completed environment merge, and after direct content editing has been quiet for 30 seconds. Rapid Studio auto-saves are grouped into one content point.
@@ -1,7 +1,5 @@
1
1
  # `fimo init`
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  One-stop project setup: sign in, create a new Fimo project (or link an existing one), install dependencies, and optionally set up Fimo skills for your AI tools.
6
4
 
7
5
  ## Command
@@ -13,17 +11,17 @@ fimo init [dir] [options]
13
11
  `fimo init` runs the full onboarding in one shot:
14
12
 
15
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).
16
- 2. **Resolves the project** — with `--project-id <id>` it links an EXISTING project (clones it); without it, it 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 nextjs` selects the minimal Next.js App Router scaffold. An optional `--starter fimo-site@1` adds a React-Router content starter only to a newly created project.
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 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`.
17
15
  3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
18
16
  4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
19
17
 
20
18
  | Flag | Required | Purpose |
21
19
  | ---------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
20
  | `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
23
- | `--project-id <id>` | no | Link an EXISTING project instead of creating one (clones it). |
21
+ | `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
24
22
  | `--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
23
  | `--env <name>` | no | Env to check out when linking an existing project (defaults to `main`). |
26
- | `--framework <framework>` | no | New-project scaffold: `react-router` (default) or `nextjs` (App Router). Existing repositories are preserved. |
24
+ | `--framework <framework>` | no | New-project scaffold: `react-router` (default), `nextjs` (App Router), or `sveltekit`. Existing repositories are preserved. |
27
25
  | `--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`. |
28
26
  | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
29
27
  | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
@@ -42,7 +40,7 @@ caller one stable result envelope; `--yes` is useful when running in a TTY but
42
40
  is not required in a pipe or CI shell. The starter is never selected by default.
43
41
 
44
42
  ```bash
45
- npx fimo@latest --json init my-site \
43
+ fimo --json init my-site \
46
44
  --starter fimo-site@1 \
47
45
  --org <organizationId> \
48
46
  --no-install \
@@ -59,38 +57,39 @@ singleton, `contact` form, and labels in `main`, writes the form id into
59
57
  writing anything. If dependencies were skipped, install them and run
60
58
  `fimo validate` before starting the app so generated clients are present.
61
59
 
62
- > **Zero-install:** run `npx fimo@latest init` — no global install needed. `fimo projects create` is also an alias of `fimo init` (create-new path).
60
+ > **Zero-install:** the selected `fimo init` invocation needs no global install. `fimo projects create` is also an alias of `fimo init` (create-new path).
63
61
 
64
62
  ### Choose the application framework
65
63
 
66
- Omit `--framework` for the existing React Router scaffold, or select the
67
- minimal Next.js App Router shell explicitly:
64
+ Omit `--framework` for the existing React Router scaffold, or select a
65
+ minimal framework-native shell explicitly:
68
66
 
69
67
  ```bash
70
- npx fimo@latest init my-next-site --framework nextjs --org <organizationId>
68
+ fimo init my-next-site --framework nextjs --org <organizationId>
69
+ fimo init my-svelte-site --framework sveltekit --org <organizationId>
71
70
  ```
72
71
 
73
- The Next scaffold includes `src/app`, `FimoProvider`, the hosted-preview config,
74
- and `.fimo/config.json#runtime.framework`. It intentionally contains no schema,
72
+ Both shells include their framework adapter, hosted-preview connector, and
73
+ `.fimo/config.json#runtime.framework`. They intentionally contain no schema,
75
74
  labels, or designed website. After init, load the project rules and `fimo-code`
76
75
  to build the requested site. The current `fimo-site@1` content starter supports
77
76
  React Router only.
78
77
 
79
78
  For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for Claude Code, `--agents=cursor` for Cursor, `--agents=codex` for Codex, etc. When the flag is omitted, env-var detection of the invoking harness (e.g. `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT` → claude-code) auto-targets that agent; other agents must be selected explicitly via `--agents`/`-a` or the interactive picker.
80
79
 
81
- ## Linking an existing project
80
+ ## Setting up a project by ID
82
81
 
83
- Pass `--project-id <id>` to link an EXISTING project instead of creating one. This clones the project's git repo into `[dir]` and writes the local `.fimo/project.json`, the same as `fimo clone` (init's `--project-id` path reuses it). Use `--env <name>` to check out a specific env (defaults to `main`). Without `--project-id`, `fimo init` creates a new project.
82
+ 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 `--env <name>` to check out a specific env (defaults to `main`). Without `--project-id`, `fimo init` creates a new project.
84
83
 
85
- ## What gets written (create-new)
84
+ ## What gets written (create-new path)
86
85
 
87
86
  `fimo init` (create-new path) scaffolds:
88
87
 
89
- - The selected project shell: React Router by default, or Next.js App Router with `--framework nextjs`
88
+ - The selected project shell: React Router by default, Next.js App Router with `--framework nextjs`, or SvelteKit with `--framework sveltekit`
90
89
  - `.fimo/project.json` — links this directory to the remote project (read-only after creation)
91
90
  - `.fimo/config.json` — project, route, locale, SEO, and agent policy
92
91
  - `.fimo/agents/` — versioned agent bundles
93
- - `.env` — tenant content API URLs for Vite and Next runtimes
92
+ - `.env` — framework-specific tenant content API URLs for local development
94
93
  - `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.
95
94
  - A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
96
95
 
@@ -106,7 +105,7 @@ Nothing is written into per-agent skill dirs: the rich skills are fetched on dem
106
105
 
107
106
  Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
108
107
 
109
- `.env` is only the bootstrap app env so local `pnpm dev` works immediately. 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`.
108
+ `.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`.
110
109
 
111
110
  ## Right after scaffolding
112
111
 
@@ -117,15 +116,13 @@ cd my-site
117
116
  fimo rename "Acme Coffee"
118
117
  ```
119
118
 
120
- **Then start the local dev loop and ask the developer what they want to build.** Run the app with the project's package-manager `dev` script — `pnpm dev`, `npm run dev`, `yarn dev`, or `bun dev` (match the lockfile) — in the background; it serves the site on localhost with live reload. Edit, show, iterate. You do not need to deploy to see local changes.
119
+ **Then start the local dev loop.** Run the app with the project's package-manager `dev` script — `pnpm dev`, `npm run dev`, `yarn dev`, or `bun dev` (match the lockfile) — in the background; it serves the site on localhost with live reload. Edit, show, iterate. You do not need to deploy to see local changes. If the initiating request did not say what to build, ask the developer — after the first preview below, never as a blocker before initializing.
121
120
 
122
121
  ```bash
123
122
  pnpm dev & # or npm run dev / yarn dev / bun dev — the project's package manager
124
123
  ```
125
124
 
126
- When a unit of work looks done, **offer** to deploy (`fimo deploy` for a hosted preview / shareable link, `fimo deploy --publish` to go live) and run it only after the developer confirms.
127
-
128
- **Optional — warm the sandbox early:** only if you already know a deploy is coming, kick off a background `fimo deploy -m "chore: init" &` so the one-time ~15-30s sandbox provision + dep install happens while you work. This is a perf optimization, not a required step — skip it while you're just iterating locally. See `references/deploy.md` § Warm the sandbox early in a session.
125
+ Outside the first-preview path below, when a unit of work looks done, **offer** to deploy (`fimo deploy` for a hosted preview / shareable link, `fimo deploy --publish` to go live) and run it only after the developer confirms.
129
126
 
130
127
  ## Load the project context
131
128
 
@@ -135,12 +132,24 @@ After `fimo init` completes, the project root has `AGENTS.md` (universal) and `C
135
132
 
136
133
  1. `cd <project-dir>` — switch into the new project.
137
134
  2. `Read` the project rules file: `AGENTS.md` (or `CLAUDE.md` if you're Claude Code).
138
- 3. Run `npx fimo@latest describe --json` and read the detected framework, schemas, locales, and tree.
139
- 4. Load the code skill on demand: `npx fimo@latest skills get fimo-code`.
140
- 5. Follow its decision tree and load only the task reference plus the detected framework reference. For Next.js, start with `npx fimo@latest skills get fimo-code --ref frameworks/next`, then load App Router, Pages Router, or locales only when the project shape requires it.
135
+ 3. Run `fimo describe --json` with the current invocation prefix and read the detected framework, schemas, locales, and tree.
136
+ 4. Load the code skill on demand with the same prefix: `fimo skills get fimo-code`.
137
+ 5. Follow its decision tree and load only the task reference plus the detected framework reference. For Next.js, start with `fimo skills get fimo-code --ref frameworks/next`, then load App Router, Pages Router, or locales only when the project shape requires it. For SvelteKit, start with `fimo skills get fimo-code --ref frameworks/sveltekit`. For Astro, `fimo skills get fimo-code --ref frameworks/astro` is the single framework reference.
141
138
 
142
139
  Do not batch-load every reference. Progressive disclosure keeps unrelated framework and product guidance out of the coding context.
143
140
 
141
+ ### Create the first hosted preview (create-new path)
142
+
143
+ Whenever `fimo init` created or scaffolded a new project — including a Studio-supplied `--project-id`, since Studio creates the project before any code exists — finish onboarding with exactly one plain preview deploy after init and context loading succeed, unless the user explicitly said not to deploy:
144
+
145
+ ```bash
146
+ fimo deploy -m "chore: first preview" --json
147
+ ```
148
+
149
+ `-m` is required because you run non-interactively; the deploy validates, commits pending changes, pushes, and syncs the hosted preview. It is also the sandbox warm-up — never run a separate warm-up deploy on this path. Read `data.preview_url` and `data.dashboard_url` from the envelope and return both links. If the initiating request described a concrete site, build a minimal meaningful first screen before this single deploy; otherwise deploy the scaffolded site as-is and then ask what to build.
150
+
151
+ This first deploy creates a preview only — never add `--publish`, and treat every later deploy as offer-then-confirm. The rule does not apply when `init` cloned a project with existing code or when the work is a migration; those paths keep their normal deployment approval rules.
152
+
144
153
  ## Adding another AI tool to an existing project later
145
154
 
146
155
  If a teammate joins on a different AI tool (e.g. Cursor) after the project was scaffolded for claude-code only:
@@ -155,4 +164,3 @@ The first installs the global bootstrap skill for the new agent; the second gene
155
164
  ## Multi-org accounts
156
165
 
157
166
  If you belong to a single organization, `fimo init` defaults to it. If you belong to multiple and don't pass `--org`, the CLI shows an interactive picker. For `fimo init`, pass the org **id** (from the `ID` column of `fimo orgs list`) — not the slug. Use `fimo orgs switch --org <id-or-slug>` to set a default for future `fimo init` invocations. See `references/account.md`.
158
- </content>
@@ -1,7 +1,5 @@
1
1
  # Firecrawl Integration
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  Use Firecrawl when an agent needs to research or inspect public websites: direct web answers, landing-page research, competitor structure analysis, migration prep, link extraction, and factual page snapshots. Do not use Firecrawl for private URLs, logged-in websites, or content the user has not asked you to fetch.
6
4
 
7
5
  Current execution support is `search`, `scrape`, `map`, `crawl`, and `monitor.*`.
@@ -1,7 +1,5 @@
1
1
  # Integrations
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  Use integrations to enable external services for a Fimo project. API keys are stored by Fimo and never printed back to the CLI. Teammates and agents receive access to the integration, not the underlying token.
6
4
 
7
5
  ## Inspect
@@ -1,7 +1,5 @@
1
1
  # Invite users
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  Invite collaborators to your Fimo organization or project. After deploying a website for the first time, suggest inviting team members so they can contribute.
6
4
 
7
5
  ## When to suggest inviting users
@@ -1,15 +1,13 @@
1
1
  # Labels workflow
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- > Package contract: run `npx fimo@latest skills get fimo-code --ref labels` for the `t()` contract and key rules, then load the detected framework reference for its label readers.
3
+ > Package contract: run `fimo skills get fimo-code --ref labels` for the `t()` contract and key rules, then load the detected framework reference for its label readers.
6
4
  > For locale configuration and route-prefix validation, see **`references/locales.md`**.
7
5
 
8
6
  This file covers the **CLI workflow** for labels: static UI copy such as nav items, buttons, headings, placeholders, alt text, and SEO strings.
9
7
 
10
8
  ## What validate does
11
9
 
12
- `fimo validate` scans `src/**/*.{ts,tsx,js,jsx}` for literal `t('key')` calls, including server readers such as `labels.t('key')` (skipping `src/ui` and `node_modules`), and verifies every key has a value in the tenant DB for the default locale.
10
+ `fimo validate` scans `src/**/*.{ts,tsx,js,jsx,svelte}` for literal `t('key')` calls and framework-supported `<Label value="key">` elements (skipping `src/ui` and `node_modules`), then verifies every key has a value in the tenant DB for the default locale.
13
11
 
14
12
  The database is the source of truth for visible label values. Code declares keys; it does not create visible copy.
15
13
 
@@ -55,15 +53,15 @@ Prefer `fimo validate` — this primitive is for narrow debugging/test use.
55
53
 
56
54
  ## When to run validate
57
55
 
58
- - After adding or changing any `t()` keys in code, run `fimo validate`.
56
+ - After adding or changing any `t()` or `<Label>` keys in code, run `fimo validate`.
59
57
  - If validate reports `labels/missing`, add values with `fimo labels set` or `fimo labels set-many`, then run validate again.
60
58
  - After renaming/removing keys, clean old DB labels intentionally with `fimo labels delete` when they are no longer used.
61
59
 
62
60
  ## Workflow
63
61
 
64
- 1. Write code with literal `t('key')` calls. Run `npx fimo@latest skills get fimo-code --ref labels` and load the detected framework reference.
62
+ 1. Declare literal label keys using the API documented for the detected framework. Run `fimo skills get fimo-code --ref labels` before writing them.
65
63
  2. Run `fimo validate`.
66
64
  3. Add missing values with `fimo labels set` or `fimo labels set-many`.
67
65
  4. Editors can now change copy in the Fimo admin without code changes.
68
66
 
69
- For helper signatures and code patterns, run `npx fimo@latest skills get fimo-code --ref labels` before writing code that uses `t()`.
67
+ For helper signatures and code patterns, run `fimo skills get fimo-code --ref labels` before writing code that uses `t()`.
@@ -1,8 +1,6 @@
1
1
  # Locales Workflow
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
- This file covers CLI-side locale configuration and validation. For code integration, run `npx fimo@latest skills get fimo-code --ref locales` plus the detected framework's locale reference.
3
+ This file covers CLI-side locale configuration and validation. For code integration, run `fimo skills get fimo-code --ref locales` plus the detected framework's locale reference.
6
4
 
7
5
  ## Configure Locales
8
6
 
@@ -88,7 +86,7 @@ For every framework, the application owns its URL scheme and passes the resolved
88
86
 
89
87
  Inspect the existing locale provider, route table, switcher, redirects, and public URLs before editing configuration. Preserve working URL behavior during the migration.
90
88
 
91
- Preserve the existing locale provider, router, switcher, redirects, and public URLs. Use framework helpers only when they fit that architecture. Next.js projects run `npx fimo@latest skills get fimo-code --ref frameworks/next/locales`; React Router projects load the React Router setup reference.
89
+ Preserve the existing locale provider, router, switcher, redirects, and public URLs. Use framework helpers only when they fit that architecture. Next.js projects run `fimo skills get fimo-code --ref frameworks/next/locales`; React Router projects load the React Router setup reference; Astro projects run `fimo skills get fimo-code --ref frameworks/astro` and pass the page-resolved locale into server reads and `getLabels`.
92
90
 
93
91
  ## Labels And Content
94
92
 
@@ -1,7 +1,5 @@
1
1
  # Project MCP
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  The **Project MCP** lets an AI coding client use Fimo's project workflows through the Model Context Protocol. It is
6
4
  the same Fimo tool surface exposed in two ways:
7
5
 
@@ -17,13 +15,13 @@ The local and remote Project MCP modes share the same catalog. The public Docs M
17
15
  Authenticate the CLI first:
18
16
 
19
17
  ```bash
20
- npx fimo@latest login
18
+ fimo login
21
19
  ```
22
20
 
23
21
  Then configure the MCP client to launch:
24
22
 
25
23
  ```text
26
- npx fimo@latest mcp
24
+ fimo mcp
27
25
  ```
28
26
 
29
27
  For clients that accept a JSON command configuration, the equivalent entry is:
@@ -1,7 +1,5 @@
1
1
  # AI media tasks
2
2
 
3
- > **Run via `npx fimo@latest <command>`** so the task catalog and CLI stay aligned.
4
-
5
3
  Use task commands for AI media. The command describes the outcome; Fimo chooses and can change the underlying generation route without changing agent instructions.
6
4
 
7
5
  ```bash
@@ -1,7 +1,5 @@
1
1
  # Preview URL (without deploying)
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  **Use `fimo preview url` whenever you need the current preview link — to open it, screenshot it, hand it to another tool, or verify a change you've already deployed. Never trigger a `fimo deploy` just to refresh a URL.**
6
4
 
7
5
  `fimo deploy` is a milestone command: it commits, pushes, syncs the sandbox, and only then prints the preview URL. `fimo preview url` skips all of that. It calls the API directly, gets a fresh 15-min token, and prints the URL. No commit, no push, no restart. Sub-second on a warm sandbox.