fimo 0.9.0-experimental.1 → 0.9.0-staging.1

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 (204) hide show
  1. package/assets/skills/fimo/SKILL.md +17 -54
  2. package/assets/skills/fimo-cli/SKILL.md +15 -15
  3. package/assets/skills/fimo-cli/references/agent-setup.md +36 -53
  4. package/assets/skills/fimo-cli/references/agents.md +4 -4
  5. package/assets/skills/fimo-cli/references/content.md +2 -2
  6. package/assets/skills/fimo-cli/references/deploy.md +1 -1
  7. package/assets/skills/fimo-cli/references/forms.md +1 -1
  8. package/assets/skills/fimo-cli/references/init.md +16 -24
  9. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +14 -11
  10. package/assets/skills/fimo-cli/references/projects.md +1 -1
  11. package/assets/skills/fimo-cli/references/support.md +11 -9
  12. package/assets/skills/fimo-cli/references/webhooks.md +3 -1
  13. package/assets/skills/fimo-code/SKILL.md +67 -0
  14. package/assets/skills/fimo-migration/SKILL.md +2 -22
  15. package/assets/skills/fimo-migration/references/content.md +0 -24
  16. package/assets/skills/fimo-migration/references/manifest.md +0 -35
  17. package/assets/skills/fimo-migration/references/qa.md +2 -24
  18. package/assets/skills/fimo-migration/references/workflow.md +1 -12
  19. package/assets/skills/fimo-studio/references/visual-editing.md +3 -5
  20. package/assets/skills/fimo-studio/references/webhooks.md +1 -1
  21. package/dist/build/vite/plugins/translations.d.ts +8 -2
  22. package/dist/build/vite/plugins/translations.js +121 -3
  23. package/dist/cli/bundle.json +1 -1
  24. package/dist/cli/index.js +311 -1209
  25. package/dist/runtime/app/FimoProviders.d.ts +11 -1
  26. package/dist/runtime/app/FimoProviders.js +23 -2
  27. package/dist/runtime/content/client/createContentClient.js +2 -1
  28. package/dist/runtime/i18n/FimoLocaleContext.js +0 -1
  29. package/dist/runtime/primitives/lib/useFimoLiveValue.d.ts +3 -5
  30. package/dist/runtime/primitives/lib/useFimoLiveValue.js +4 -11
  31. package/dist/runtime/primitives/translations.d.ts +27 -1
  32. package/dist/runtime/primitives/translations.js +85 -7
  33. package/dist/runtime/shared/fimo-config.server.js +0 -1
  34. package/dist/runtime/shared/fimo-config.types.d.ts +0 -2
  35. package/dist/scripts/extract-translations.js +11 -16
  36. package/dist/scripts/lib/validation-report.d.ts +0 -1
  37. package/dist/scripts/lib/validation-report.js +0 -3
  38. package/dist/scripts/validate-route-metadata.js +0 -11
  39. package/package.json +4 -84
  40. package/scripts/postinstall.mjs +11 -65
  41. package/templates/react-router/AGENTS.md +44 -0
  42. package/templates/react-router/CLAUDE.md +5 -0
  43. package/templates/react-router/package.json +1 -1
  44. package/assets/agents-starter/AGENTS.md +0 -66
  45. package/assets/skills/fimo-migration/references/wrap.md +0 -617
  46. package/dist/runtime/astro/index.d.ts +0 -2
  47. package/dist/runtime/astro/index.js +0 -3
  48. package/dist/runtime/astro/server.d.ts +0 -3
  49. package/dist/runtime/astro/server.js +0 -6
  50. package/dist/runtime/next/FimoNextProviders.d.ts +0 -24
  51. package/dist/runtime/next/FimoNextProviders.js +0 -20
  52. package/dist/runtime/next/FimoNextScripts.d.ts +0 -10
  53. package/dist/runtime/next/FimoNextScripts.js +0 -19
  54. package/dist/runtime/next/index.d.ts +0 -14
  55. package/dist/runtime/next/index.js +0 -14
  56. package/dist/runtime/next/server.d.ts +0 -2
  57. package/dist/runtime/next/server.js +0 -4
  58. package/dist/runtime/nuxt/composables.d.ts +0 -9
  59. package/dist/runtime/nuxt/composables.js +0 -57
  60. package/dist/runtime/nuxt/index.d.ts +0 -3
  61. package/dist/runtime/nuxt/index.js +0 -6
  62. package/dist/runtime/nuxt/server.d.ts +0 -3
  63. package/dist/runtime/nuxt/server.js +0 -6
  64. package/dist/runtime/primitives/labels-hook.d.ts +0 -33
  65. package/dist/runtime/primitives/labels-hook.js +0 -41
  66. package/dist/runtime/primitives/labels-store.d.ts +0 -12
  67. package/dist/runtime/primitives/labels-store.js +0 -60
  68. package/dist/runtime/react/FimoSpaProviders.d.ts +0 -36
  69. package/dist/runtime/react/FimoSpaProviders.js +0 -63
  70. package/dist/runtime/react/index.d.ts +0 -33
  71. package/dist/runtime/react/index.js +0 -39
  72. package/dist/runtime/remix/FimoRemixProviders.d.ts +0 -16
  73. package/dist/runtime/remix/FimoRemixProviders.js +0 -12
  74. package/dist/runtime/remix/FimoRemixScripts.d.ts +0 -10
  75. package/dist/runtime/remix/FimoRemixScripts.js +0 -19
  76. package/dist/runtime/remix/index.d.ts +0 -12
  77. package/dist/runtime/remix/index.js +0 -11
  78. package/dist/runtime/remix/server.d.ts +0 -2
  79. package/dist/runtime/remix/server.js +0 -2
  80. package/dist/runtime/shared/display-routes.d.ts +0 -14
  81. package/dist/runtime/shared/display-routes.js +0 -25
  82. package/dist/runtime/shared/i18n-messages.d.ts +0 -29
  83. package/dist/runtime/shared/i18n-messages.js +0 -79
  84. package/dist/runtime/shared/labels-fetch.pure.d.ts +0 -17
  85. package/dist/runtime/shared/labels-fetch.pure.js +0 -71
  86. package/dist/runtime/shared/labels-fetch.server.d.ts +0 -7
  87. package/dist/runtime/shared/labels-fetch.server.js +0 -97
  88. package/dist/runtime/shared/labels-t.pure.d.ts +0 -2
  89. package/dist/runtime/shared/labels-t.pure.js +0 -10
  90. package/dist/runtime/strapi/client.d.ts +0 -30
  91. package/dist/runtime/strapi/client.js +0 -89
  92. package/dist/runtime/strapi/index.d.ts +0 -5
  93. package/dist/runtime/strapi/index.js +0 -6
  94. package/dist/runtime/strapi/reshape.d.ts +0 -46
  95. package/dist/runtime/strapi/reshape.js +0 -114
  96. package/dist/runtime/svelte/index.d.ts +0 -3
  97. package/dist/runtime/svelte/index.js +0 -7
  98. package/dist/runtime/svelte/server.d.ts +0 -3
  99. package/dist/runtime/svelte/server.js +0 -6
  100. package/dist/runtime/vue/index.d.ts +0 -3
  101. package/dist/runtime/vue/index.js +0 -5
  102. package/dist/runtime/vue/server.d.ts +0 -3
  103. package/dist/runtime/vue/server.js +0 -6
  104. package/dist/runtime/wrapped/FimoFileLink.d.ts +0 -17
  105. package/dist/runtime/wrapped/FimoFileLink.js +0 -19
  106. package/dist/runtime/wrapped/FimoMediaImage.d.ts +0 -14
  107. package/dist/runtime/wrapped/FimoMediaImage.js +0 -20
  108. package/dist/runtime/wrapped/FimoMediaVideo.d.ts +0 -14
  109. package/dist/runtime/wrapped/FimoMediaVideo.js +0 -20
  110. package/dist/runtime/wrapped/FimoRichTextBlock.d.ts +0 -23
  111. package/dist/runtime/wrapped/FimoRichTextBlock.js +0 -22
  112. package/dist/runtime/wrapped/FimoText.d.ts +0 -22
  113. package/dist/runtime/wrapped/FimoText.js +0 -20
  114. package/dist/runtime/wrapped/WrappedContentContext.d.ts +0 -28
  115. package/dist/runtime/wrapped/WrappedContentContext.js +0 -30
  116. package/dist/runtime/wrapped/WrappedProviders.d.ts +0 -33
  117. package/dist/runtime/wrapped/WrappedProviders.js +0 -101
  118. package/dist/runtime/wrapped/dom.d.ts +0 -4
  119. package/dist/runtime/wrapped/dom.js +0 -23
  120. package/dist/runtime/wrapped/server.d.ts +0 -77
  121. package/dist/runtime/wrapped/server.js +0 -237
  122. package/dist/scripts/apply-wrap-templates.d.ts +0 -61
  123. package/dist/scripts/apply-wrap-templates.js +0 -132
  124. package/dist/scripts/apply-wrap.d.ts +0 -46
  125. package/dist/scripts/apply-wrap.js +0 -278
  126. package/dist/scripts/cms/discover.d.ts +0 -2
  127. package/dist/scripts/cms/discover.js +0 -17
  128. package/dist/scripts/cms/example-content.d.ts +0 -33
  129. package/dist/scripts/cms/example-content.js +0 -162
  130. package/dist/scripts/cms/strapi/detect.d.ts +0 -2
  131. package/dist/scripts/cms/strapi/detect.js +0 -186
  132. package/dist/scripts/cms/strapi/index.d.ts +0 -3
  133. package/dist/scripts/cms/strapi/index.js +0 -25
  134. package/dist/scripts/cms/strapi/list-source.d.ts +0 -17
  135. package/dist/scripts/cms/strapi/list-source.js +0 -90
  136. package/dist/scripts/cms/strapi/schema-map.d.ts +0 -9
  137. package/dist/scripts/cms/strapi/schema-map.js +0 -277
  138. package/dist/scripts/cms/strapi/shapes.d.ts +0 -23
  139. package/dist/scripts/cms/strapi/shapes.js +0 -38
  140. package/dist/scripts/cms/strapi/touchpoints.d.ts +0 -31
  141. package/dist/scripts/cms/strapi/touchpoints.js +0 -145
  142. package/dist/scripts/cms/strapi/wire-client.d.ts +0 -15
  143. package/dist/scripts/cms/strapi/wire-client.js +0 -107
  144. package/dist/scripts/cms/strapi/wiring.d.ts +0 -17
  145. package/dist/scripts/cms/strapi/wiring.js +0 -46
  146. package/dist/scripts/cms/types.d.ts +0 -145
  147. package/dist/scripts/cms/types.js +0 -11
  148. package/dist/scripts/detect-framework.d.ts +0 -39
  149. package/dist/scripts/detect-framework.js +0 -133
  150. package/dist/scripts/draft-rows.d.ts +0 -19
  151. package/dist/scripts/draft-rows.js +0 -135
  152. package/dist/scripts/draft-schemas.d.ts +0 -27
  153. package/dist/scripts/draft-schemas.js +0 -188
  154. package/dist/scripts/frameworks/astro/routes.d.ts +0 -3
  155. package/dist/scripts/frameworks/astro/routes.js +0 -55
  156. package/dist/scripts/frameworks/astro/template-style.d.ts +0 -7
  157. package/dist/scripts/frameworks/astro/template-style.js +0 -19
  158. package/dist/scripts/frameworks/discover.d.ts +0 -70
  159. package/dist/scripts/frameworks/discover.js +0 -178
  160. package/dist/scripts/frameworks/next/rewire.d.ts +0 -30
  161. package/dist/scripts/frameworks/next/rewire.js +0 -258
  162. package/dist/scripts/frameworks/next/routes.d.ts +0 -17
  163. package/dist/scripts/frameworks/next/routes.js +0 -134
  164. package/dist/scripts/frameworks/next/wiring.d.ts +0 -33
  165. package/dist/scripts/frameworks/next/wiring.js +0 -186
  166. package/dist/scripts/frameworks/nuxt/routes.d.ts +0 -3
  167. package/dist/scripts/frameworks/nuxt/routes.js +0 -54
  168. package/dist/scripts/frameworks/nuxt/template-style.d.ts +0 -9
  169. package/dist/scripts/frameworks/nuxt/template-style.js +0 -27
  170. package/dist/scripts/frameworks/remix/routes.d.ts +0 -3
  171. package/dist/scripts/frameworks/remix/routes.js +0 -50
  172. package/dist/scripts/frameworks/support.d.ts +0 -75
  173. package/dist/scripts/frameworks/support.js +0 -165
  174. package/dist/scripts/frameworks/sveltekit/routes.d.ts +0 -3
  175. package/dist/scripts/frameworks/sveltekit/routes.js +0 -50
  176. package/dist/scripts/frameworks/sveltekit/template-style.d.ts +0 -9
  177. package/dist/scripts/frameworks/sveltekit/template-style.js +0 -54
  178. package/dist/scripts/frameworks/vite/routes.d.ts +0 -15
  179. package/dist/scripts/frameworks/vite/routes.js +0 -93
  180. package/dist/scripts/frameworks/vite/wiring.d.ts +0 -10
  181. package/dist/scripts/frameworks/vite/wiring.js +0 -99
  182. package/dist/scripts/i18n-namespace.d.ts +0 -27
  183. package/dist/scripts/i18n-namespace.js +0 -155
  184. package/dist/scripts/render-parity/capture.d.ts +0 -56
  185. package/dist/scripts/render-parity/capture.js +0 -366
  186. package/dist/scripts/render-parity/compare.d.ts +0 -59
  187. package/dist/scripts/render-parity/compare.js +0 -0
  188. package/dist/scripts/render-parity/normalize-html.d.ts +0 -13
  189. package/dist/scripts/render-parity/normalize-html.js +0 -223
  190. package/dist/scripts/render-parity/types.d.ts +0 -41
  191. package/dist/scripts/render-parity/types.js +0 -1
  192. package/dist/scripts/scan-wrappable.d.ts +0 -196
  193. package/dist/scripts/scan-wrappable.js +0 -1232
  194. /package/assets/skills/{fimo → fimo-code}/assets/react-router-locales/navigation.tsx +0 -0
  195. /package/assets/skills/{fimo → fimo-code}/assets/react-router-locales/routes.ts +0 -0
  196. /package/assets/skills/{fimo → fimo-code}/references/assets.md +0 -0
  197. /package/assets/skills/{fimo → fimo-code}/references/content.md +0 -0
  198. /package/assets/skills/{fimo → fimo-code}/references/design.md +0 -0
  199. /package/assets/skills/{fimo → fimo-code}/references/forms.md +0 -0
  200. /package/assets/skills/{fimo → fimo-code}/references/labels.md +0 -0
  201. /package/assets/skills/{fimo → fimo-code}/references/locales.md +0 -0
  202. /package/assets/skills/{fimo → fimo-code}/references/setup-plain-vite.md +0 -0
  203. /package/assets/skills/{fimo → fimo-code}/references/setup-react-router.md +0 -0
  204. /package/assets/skills/{fimo → fimo-code}/references/ui.md +0 -0
@@ -1,67 +1,30 @@
1
1
  ---
2
2
  name: fimo
3
3
  description: >-
4
- How to write code in a Fimo project — the npm package surface. Load when
5
- writing JSX that renders schema content, defining schemas or forms (JSON),
6
- using `t()` for labels, plugging media into `fimo/ui` components,
7
- or applying the project's code conventions. CLI commands and workflows
8
- (push, deploy, sync, etc.) live in the `fimo-cli` skill.
4
+ Working in or with a Fimo project (a content + media + forms + analytics
5
+ platform for React websites). Load the real, version-locked Fimo skills on
6
+ demand through the `fimo` CLI before doing Fimo work — writing schema-driven
7
+ code, running CLI/deploy workflows, using the dashboard, or migrating a site.
9
8
  ---
10
9
 
11
10
  # Fimo
12
11
 
13
- You are writing code in a Fimo project — a content + media + forms + analytics platform for React websites with a CMS dashboard. This skill describes the **`fimo` npm package surface** as installed in this specific project: what's exported from `fimo`, `fimo/ui`, `fimo/vite`; the JSON shapes you write; the generated React Query hooks and Zod schemas you import; and the code conventions for using them.
12
+ Fimo ships its skills through its CLI so they always match the installed `fimo` version. This file is
13
+ just a pointer — do not rely on cached instructions. Fetch the real skill from the CLI when you need it.
14
14
 
15
- This skill is version-locked to this project's installed `fimo` package — the shapes here match what your code can actually use.
15
+ When you are about to do Fimo work:
16
16
 
17
- For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo <command>` when the project declares a `fimo` dependency (it pins the version matching the project's backend); otherwise use `npx fimo@latest`. If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo skills install --mode=copy`.
17
+ 1. List what's available: `npx fimo@latest skills list`
18
+ 2. Load the relevant skill: `npx fimo@latest skills get <name>` (add `--ref <doc>` for a reference doc)
18
19
 
19
- ## Critical: NEVER hardcode user-facing things
20
+ Pick by task:
20
21
 
21
- This is the load-bearing rule for every code change. **Fimo's whole point is that content editors edit content in the dashboard, not in code.** Anything hardcoded breaks that.
22
+ - Writing code — schema-driven JSX, schemas/forms JSON, `t()` labels, `fimo/ui` media → `fimo-code`
23
+ - CLI commands and workflows — push, deploy, sync, labels, domains, analytics → `fimo-cli`
24
+ - The Fimo Studio dashboard / web app UI → `fimo-studio`
25
+ - Migrating an existing site into Fimo → `fimo-migration`
22
26
 
23
- - **Content** (posts, products, pages, lists, anything structured) → declare a schema, render collections with generated `useList()` or `useInfiniteList()` hooks + `fimo/ui` components. Use `useGet()` only for legacy fixed array queries. **Never** write `const posts = [...]` in JSX.
24
- - **Strings** (labels, CTAs, headings, descriptions, any visible text) → wrap in `t('key')` and create the default-locale value with `fimo labels set`. Use `--locale <locale>` only when intentionally writing a non-default locale. **Never** write `<h1>Welcome</h1>` directly — write `<Text value={t('home.title')} as="h1" />`.
25
- - **Media** (images, videos, files) → use `<Image>` / `<Video>` from `fimo/ui` for schema media, `<StaticImage>` for hard-coded URLs. **Never** use `<img src={...}>`.
26
- - **Forms** → use the generated Zod schema + `submitX` helper from `@/forms/<name>`. Never hand-roll fetch or validation.
27
+ If a confirmed Fimo platform failure or missing capability materially blocks the task, finish or safely preserve the main work first, then use the built-in `supportReport` tool. Load the `fimo-cli` support instructions for the reporting criteria.
27
28
 
28
- If you find yourself about to hardcode anything user-facing, **stop and use the appropriate Fimo primitive instead.** For pushing the schema/form/asset to the backend, that's CLI territory — see the `fimo-cli` skill.
29
-
30
- ## When starting code work, load these references up front
31
-
32
- These define the package surface for the load-bearing primitives. **Read all six before generating significant code:**
33
-
34
- - `references/content.md` — schema JSON shape, field types, Tiptap nodes, generated React Query hooks
35
- - `references/forms.md` — form JSON spec, generated Zod + `submitX` helper
36
- - `references/assets.md` — `FimoMedia` shape, how to render assets
37
- - `references/labels.md` — `t()` helper, `useLabels()`, wrap rules
38
- - `references/locales.md` — locale routing helpers, `FimoLink`, custom-framework contract
39
- - `references/ui.md` — `fimo/ui` components + JSX code conventions + app code rules
40
-
41
- Workflow / CLI-side concerns (pushing schemas, generating images, managing labels, deploying) live in the **`fimo-cli`** skill's matching references.
42
-
43
- ## Decision Tree (specific tasks)
44
-
45
- - **Setting up Fimo in a new project** — pick the framework:
46
- - React Router framework mode (new projects use React Router 8) → `references/setup-react-router.md`
47
- - Plain Vite + React (or upgrading a legacy v3 project) → `references/setup-plain-vite.md`
48
- - Writing schema JSON / picking field types / Tiptap richtext → `references/content.md`
49
- - Writing form JSON / generated form client / form code → `references/forms.md`
50
- - Plugging media into a component / `FimoMedia` shape → `references/assets.md`
51
- - ANY user-facing string in code → `references/labels.md`
52
- - Locale-aware routes, links, or framework adapters → `references/locales.md`
53
- - ANY JSX rendering schema content or `t()` output → `references/ui.md`
54
- - Major visual / redesign / hero section / brand → `references/design.md`
55
-
56
- ## Anti-Patterns
57
-
58
- - **Hardcoding content in JSX** — `<h1>My Blog</h1>` + an array of posts in code. Use schemas + entries + `t()`.
59
- - **Raw HTML for schema content** — `<img src={post.coverImage.url}>` instead of `<Image value={post.coverImage}>`. The `fimo/ui` components carry metadata for inline editing in the admin.
60
- - **Raw `<a href>` for internal navigation** — causes full page reloads. Use `<FimoLink>` for locale-aware internal links or React Router `<Link>` when intentionally bypassing locale helpers. Reserve `<a>` for external links.
61
- - **Pulling stock photos from external URLs** — editors can't manage them. Use a Fimo media task such as `fimo image generate`.
62
- - **Editing generated `.ts` files** under `src/schemas/` or `src/forms/` — regenerate them through `fimo validate` or the matching push command.
63
- - **Writing raw HTML in `richtext` fields** — must be Tiptap JSONContent.
64
- - **Calling `t()` with a dynamic first argument** — the key must be a string literal so the extractor finds it.
65
- - **Decorating the disposable starter** — `src/pages/Index.tsx` is throwaway scaffolding. On first real generation, replace it entirely.
66
- - **Skipping legal pages** — `Privacy.tsx` + `Terms.tsx` are required for public sites; the template ships them.
67
- - **Showing Fimo branding** in the generated site unless the user explicitly asks for it.
29
+ If the project has an `AGENTS.md` (or `CLAUDE.md`), read it too — it carries project-specific context.
30
+ Always fetch the skill fresh from the CLI rather than trusting a copy.
@@ -18,7 +18,7 @@ description: >-
18
18
 
19
19
  The `fimo` CLI is the workflow surface for Fimo. Fimo is a content + media + forms + analytics platform for React websites with a CMS dashboard. The CLI handles project creation, all content / forms / media / labels / locale workflows, deploys, collaboration, account management, AI credit inspection, and AI agent setup.
20
20
 
21
- This skill describes **what the CLI does and the workflows it drives**. For the package surface used IN code (component props, generated hooks, JSON shapes, code-side rules), see the `fimo` skill — its description triggers automatically when the agent is in a Fimo project.
21
+ This skill describes **what the CLI does and the workflows it drives**. For the package surface used IN code (component props, generated hooks, JSON shapes, code-side rules), load the `fimo-code` skill on demand with `npx fimo@latest skills get fimo-code`.
22
22
 
23
23
  Use `fimo <command> --help` for full flag details on any command.
24
24
 
@@ -28,7 +28,7 @@ Use `fimo <command> --help` for full flag details on any command.
28
28
 
29
29
  Run every command as **`npx fimo@latest <command>`**. It always fetches the latest CLI — no install, nothing to keep up to date, and it can't fall behind and get blocked. Do **not** install `fimo` globally.
30
30
 
31
- The examples in this skill and its references write `fimo <command>` for brevity — mentally prefix them with `npx fimo@latest`. (One exception, because npx has no stable package path to symlink into: install skills with `npx fimo@latest skills install --mode=copy`.)
31
+ The examples in this skill and its references write `fimo <command>` for brevity — mentally prefix them with `npx fimo@latest`.
32
32
 
33
33
  ## Output for agents: `--json` is the stable contract
34
34
 
@@ -55,11 +55,11 @@ A project can have multiple **envs** — each is a git branch _plus_ its own DB,
55
55
 
56
56
  ```bash
57
57
  npx fimo@latest login # authenticate via browser
58
- npx fimo@latest skills install --mode=copy # install Fimo skills for your AI tools (copy mode: required under npx)
58
+ npx fimo@latest skills install # install the global Fimo skill for your AI tools
59
59
  npx fimo@latest init my-site --org <id> # one-stop setup: sign in, create/link a project, install deps + skills. Use the org **id** from `fimo orgs list`, NOT the slug.
60
60
  npx fimo@latest init --project-id <id> my-site # link an EXISTING project instead of creating one
61
61
  npx fimo@latest clone # interactively choose an existing project to clone locally
62
- cd my-site # the `fimo` project skill auto-loads from here
62
+ cd my-site # then load skills on demand: npx fimo@latest skills get fimo-code
63
63
  pnpm dev # run the app locally (use the project's PM: pnpm/npm run/yarn/bun) — your iteration loop
64
64
  npx fimo@latest credits # inspect the owning org's AI credit balance (read-only)
65
65
  npx fimo@latest validate # run all checks + codegen; fails on missing DB labels
@@ -73,16 +73,16 @@ The working loop is local: run the app with the project's package-manager `dev`
73
73
 
74
74
  ## Decision Tree
75
75
 
76
- Load the matching reference when the user's request fires its trigger. Recipes that involve writing code also need the `fimo` skill's package references — they're called out where relevant.
76
+ Load the matching reference when the user's request fires its trigger. Recipes that involve writing code also need the `fimo-code` skill's package references — they're called out where relevant.
77
77
 
78
78
  - "Create a new Fimo project / scaffold a site / start a new website / link an existing project locally" → `references/init.md`
79
- - "Add a content type / blog / products / pages / CMS" → `references/content.md` (workflow) **+ load `fimo/references/content.md` for the JSON shape and React hooks**
80
- - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ load `fimo/references/forms.md` for the JSON spec and generated client**
79
+ - "Add a content type / blog / products / pages / CMS" → `references/content.md` (workflow) **+ load `fimo-code/references/content.md` for the JSON shape and React hooks**
80
+ - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ load `fimo-code/references/forms.md` for the JSON spec and generated client**
81
81
  - "View form submissions / who filled out the contact form / inspect what users sent / how many signups" → `references/forms.md` § Reading submissions
82
- - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ load `fimo/references/assets.md` for the `FimoMedia` shape and rendering**
83
- - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ load `fimo/references/assets.md` for the `FimoMedia` shape if you'll plug the result into UI**
84
- - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ load `fimo/references/labels.md` for the `t()` helper and wrap rules**
85
- - "Enable locales / configure default locale / route by locale prefix / fix locale route validation" → `references/locales.md` **+ load `fimo/references/locales.md` for code helpers**
82
+ - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ load `fimo-code/references/assets.md` for the `FimoMedia` shape and rendering**
83
+ - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ load `fimo-code/references/assets.md` for the `FimoMedia` shape if you'll plug the result into UI**
84
+ - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ load `fimo-code/references/labels.md` for the `t()` helper and wrap rules**
85
+ - "Enable locales / configure default locale / route by locale prefix / fix locale route validation" → `references/locales.md` **+ load `fimo-code/references/locales.md` for code helpers**
86
86
  - "What's in this project / show the project structure / describe the project / what schemas does it have / how many routes / project tree / show me what's here" → `references/describe.md`
87
87
  - "Deploy / publish / go live / push my changes" → `references/deploy.md`
88
88
  - "Get the preview URL / open the preview / what's the URL for this env / refresh the preview link / I just want to see the site / the preview URL stopped working" → `references/preview.md`
@@ -103,7 +103,7 @@ Load the matching reference when the user's request fires its trigger. Recipes t
103
103
  - "Create / scaffold / run / validate / activate / deactivate an agent / agent bundle / list agent templates / view agent runs, reports, or logs (`fimo agents *`)" → `references/agents.md`
104
104
  - "Install Fimo for my AI tool / fimo skills install / set up Claude Code or Cursor for Fimo / add an agent to this project" → `references/agent-setup.md`
105
105
  - "Refresh / update installed Fimo skills / fimo skills sync / agent missing the latest fimo conventions" → `references/agent-setup.md`
106
- - "Report a Fimo problem or feature request / contact Fimo support / a Fimo API or command keeps failing / a documented argument is rejected / a supported operation needs an undocumented workaround / a Fimo API is abnormally slow / a missing capability blocks work, forces a fragile or heavily manual workaround, or would materially accelerate a recurring workflow such as bulk create" → `references/support.md`
106
+ - "Report a Fimo problem or blocking feature request / contact Fimo support / a Fimo API or command keeps failing / a documented argument is rejected / a supported operation needs an undocumented workaround / a Fimo API is abnormally slow / a confirmed missing capability blocks completion or forces a fragile or heavily manual workaround" → `references/support.md`
107
107
  - "Regenerate rule files / I edited AGENTS.md / fimo rules sync" → `references/agent-setup.md`
108
108
  - "Show analytics / visitor stats / traffic / pageviews / how is my site performing / top pages / where do visitors come from" → `references/analytics.md` (7-day preview free for all; longer ranges require paid)
109
109
  - "Mark a date on the analytics chart / annotate the chart with a deploy / add a launch note" → `references/analytics.md` § Annotations
@@ -112,7 +112,7 @@ Load the matching reference when the user's request fires its trigger. Recipes t
112
112
 
113
113
  These fire at specific moments in the project lifecycle. **Surface them proactively** rather than waiting for the user to ask:
114
114
 
115
- - **Right after `fimo init`** → `cd` into the new directory, then `Read` the project's `AGENTS.md` (or `CLAUDE.md` for Claude Code) **and** `.claude/skills/fimo/SKILL.md` (or `.cursor/skills/fimo/SKILL.md` etc. for other agents) to load the project context before generating any code. The new files came into existence mid-session and may not be auto-loaded by the harness. See `references/init.md` § Load the project context.
115
+ - **Right after `fimo init`** → `cd` into the new directory, then `Read` the project's `AGENTS.md` (or `CLAUDE.md` for Claude Code) to load the project context, and run `npx fimo@latest skills get fimo-code` to load the code skill before generating any code. The `AGENTS.md`/`CLAUDE.md` came into existence mid-session and may not be auto-loaded by the harness. See `references/init.md` § Load the project context.
116
116
  - **Right after `fimo init`** → suggest `fimo rename "<Display Name>"` to set a human-readable name (the default post-init name is an auto-generated slug). Infer the name from what the user is building (e.g. "Acme Coffee" for a café, "Jane Doe Portfolio" for a personal site). See `references/init.md`.
117
117
  - **Right after `fimo init`** → start the app locally with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev`) in the background, then ask the developer what they want to build. This localhost server with live reload is your iteration loop — edit, show, repeat. No deploy is needed to see local changes.
118
118
  - **When a user-visible 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 — or immediately if they ask. Never deploy on your own. See `references/deploy.md`.
@@ -120,7 +120,7 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
120
120
  - **Iterative code-only deploys** → once you are deploying, `fimo deploy --no-restart` skips the sandbox dev-server restart on HMR-safe edits. See `references/deploy.md` § Skipping the dev-server restart for when it's safe.
121
121
  - **You need the current preview URL but haven't changed code** (opening it, screenshotting it, handing it to another tool, the previous URL expired) → `fimo preview url`, never a no-op `fimo deploy`. See `references/preview.md`.
122
122
  - **When the user wants to try something risky / explore a redesign without touching the live site** → suggest a feature env: `fimo checkout -b <name>` gives an isolated branch + DB + preview. Deploy previews there, then `fimo merge` it back and `fimo publish`. See `references/branches.md`.
123
- - **When a Fimo API or command still fails after one safe recovery attempt, rejects a documented or previously working argument, needs an undocumented workaround for a supported operation, is repeatedly abnormally slow, or lacks a capability that blocks work, forces a fragile or heavily manual workaround, or would materially accelerate a recurring workflow** → offer to prepare a support report. Show the exact report and wait for explicit approval before running `fimo support report --yes`. See `references/support.md`.
123
+ - **After completing or safely preserving the user's main work, when a confirmed Fimo platform failure still materially blocks the task after one safe recovery attempt, or a confirmed missing capability blocks completion or forces a fragile or heavily manual workaround** → use the built-in `supportReport` tool. Do not wait for the user to ask and do not stop after only describing the gap. See `references/support.md`.
124
124
  - **After the first successful `fimo deploy`** → suggest `fimo invite` if the project involves multiple people. Typical roles: `edit` for developers/content editors, `view` or `comment` for clients/stakeholders, `full` for project leads. See `references/invite.md`.
125
125
  - **When the user wants to modify the URL of their website** → walk through `references/domains.md`. The CLI surface covers renaming the Fimo-provided subdomain (`fimo domains rename-default`, free), attaching a domain they already own (`fimo domains add`, Premium), and buying a new domain through Fimo (`fimo domains buy`, Premium). The auto-generated default URL on every project is a fallback, not a final choice — proactively offer this after `fimo deploy --publish` if the user mentioned a real brand or domain.
126
126
 
@@ -132,7 +132,7 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
132
132
  - **Running `fimo deploy` just to get a fresh preview URL** — that's a commit + push + sandbox sync for what should be a sub-second read. Use `fimo preview url` instead. See `references/preview.md`.
133
133
  - **Using `fimo deploy --publish` casually** — `--publish` makes the site live to the public. Plain `fimo deploy` (preview) is the default. Use `--publish` only when the user says "ship it" / "go live" / "publish".
134
134
  - **Bare `fimo init` in a non-interactive shell** — will hang. Always pass `[dir]`, `--no-install` (or `--install`), `--no-skills` (or `--skills`), and `--org`/`--agents` as needed explicitly when scripted.
135
- - **Hardcoding content / strings / images in code** — that's what schemas, `t()`, and the media library are for. See the `fimo` skill's anti-patterns.
135
+ - **Hardcoding content / strings / images in code** — that's what schemas, `t()`, and the media library are for. See the `fimo-code` skill's anti-patterns.
136
136
  - **Adding another deploy tool (Vercel, Netlify, Cloudflare Pages)** — Fimo handles deploys; don't bolt another platform on.
137
137
  - **Committing secrets** — hidden values use `fimo secrets`; public browser-safe values use `fimo vars`. Local env files are ignored and must not become deploy inputs.
138
138
  - **Hardcoding tokens in flags** — use the credentials written by `fimo login` (one file per backend at `~/.config/fimo/credentials/<host>-<hash>.json`).
@@ -2,75 +2,59 @@
2
2
 
3
3
  > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
4
 
5
- Fimo wires up to AI coding tools in three layers:
5
+ Fimo wires up to AI coding tools in two layers:
6
6
 
7
- 1. **Global skills** — `fimo-cli`, `fimo-studio`, and `fimo-migration` skills installed once per user, machine-wide. They describe the CLI workflows, the Fimo Studio web app, and URL/source-backed migrations, and load in any compatible AI tool.
8
- 2. **Per-project rule files** — `AGENTS.md` (universal) plus per-agent variants (`CLAUDE.md`, `.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`, `.claude/settings.json`) generated for the AI tools each project supports.
9
- 3. **Project-scope `fimo` skill** — the code-side skill (npm package surface: schemas, forms, `t()`, `fimo/ui` components) installed under `.claude/skills/fimo/`, `.cursor/skills/fimo/`, etc., **version-locked to the project's installed `fimo` package**.
7
+ 1. **One global bootstrap skill** — a tiny, generic `fimo` skill installed once per user, machine-wide (symlinked into each agent's global skills dir). It doesn't contain workflow content itself; it tells the agent to load the real, version-locked skills on demand from the CLI. It never goes stale because it just points at `fimo skills get`.
8
+ 2. **Per-project rule files** — `AGENTS.md` (universal) and `CLAUDE.md` ship in the project template. `fimo rules sync` regenerates the other agents' variants (`.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`) from `AGENTS.md`.
10
9
 
11
- Two CLI namespaces manage all three:
10
+ The rich skills (`fimo-code`, `fimo-cli`, `fimo-studio`, `fimo-migration`) are **never installed as files**. They're served on demand straight from the CLI, so they always match the installed version and never land in the project:
12
11
 
13
- - `fimo skills install / sync / uninstall` — skill artifacts (layers 1 + 3)
14
- - `fimo rules sync` — rule files (layer 2)
12
+ ```bash
13
+ npx fimo@latest skills list # what's available
14
+ npx fimo@latest skills get fimo-code # writing code: schemas, forms, labels, fimo/ui
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
17
+ ```
15
18
 
16
- ## Set up skills (no install needed)
19
+ Two CLI namespaces manage the two layers:
17
20
 
18
- Run the CLI via `npx fimo@latest` — do not install `fimo` globally. To set up the Fimo skills for your AI tools, use **copy mode** (npx runs from an ephemeral cache with no stable package path to symlink into):
21
+ - `fimo skills install / sync / uninstall` — the single global bootstrap skill (layer 1)
22
+ - `fimo rules sync` — per-project rule files (layer 2)
19
23
 
20
- ```bash
21
- npx fimo@latest skills install --mode=copy
22
- ```
24
+ ## Set up the global skill (no install needed)
23
25
 
24
- This opens the agent picker and installs everything that applies (see below). Then connect your account when you are ready:
26
+ Run the CLI via `npx fimo@latest` — do not install `fimo` globally.
25
27
 
26
28
  ```bash
27
- npx fimo@latest login
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
28
31
  ```
29
32
 
30
33
  ## `fimo skills` — install + sync + uninstall
31
34
 
32
35
  ```bash
33
- fimo skills install # interactive: pick agents, install everything that applies
36
+ fimo skills install # interactive: pick agents, install the global bootstrap
34
37
  fimo skills install --agents=claude-code,cursor # explicit list
35
38
  fimo skills install -a claude-code -a cursor # repeatable form
36
- fimo skills install --agents=claude-code --yes # skip the install preview prompt (headless / scripts)
37
- fimo skills install --mode=copy # copy files instead of symlinking (required under npx)
38
- fimo skills sync # refresh installed skills (global + project, where applicable)
39
- fimo skills uninstall # remove the global skills
39
+ fimo skills sync # re-ensure the bootstrap + clean up stale old skills
40
+ fimo skills uninstall # remove the global bootstrap
40
41
  ```
41
42
 
42
- `fimo skills install` shows a one-screen preview of every path it will touch (`.agents/skills/...`, `.claude/skills/...`, `AGENTS.md`, per-agent rule files, …) before writing. Pass `-y` / `--yes` to skip the confirmation in scripts.
43
-
44
- **`fimo skills install` is context-aware**:
45
-
46
- - **Outside a Fimo project** — installs only the global `fimo-cli`, `fimo-studio`, and `fimo-migration` skills for the selected agents.
47
- - **Inside a Fimo project** (`.fimo.settings.json` found by walking up from cwd) — installs the global skills _and_ writes the project `fimo` skill _and_ generates the per-agent rule file (`CLAUDE.md` / `.cursor/rules/fimo.mdc` / `.windsurfrules` / `GEMINI.md`) for each selected agent. One command, full setup.
48
-
49
- The command prints exactly which files were written, so the context-aware behavior is never silent magic.
50
-
51
- **Adding an agent to an existing project** is the same command — `fimo skills install --agents=cursor` inside the project does global + project skill + rule file for cursor in one shot.
52
-
53
- **`fimo skills sync`** is the refresh / update path — no consent prompts, no new agents added. It re-copies whatever is already installed:
54
-
55
- - Global skills for whichever agents already have them
56
- - Project `fimo` skill for whichever agents have rule files (when run inside a Fimo project)
57
-
58
- You rarely have to invoke it by hand:
43
+ `fimo skills install` installs the single global `fimo` bootstrap skill for the selected agents (symlinked into each agent's global skills dir; it transparently falls back to a copy when a symlink can't be created, e.g. under `npx`). It writes **nothing** into your project — the working tree stays clean.
59
44
 
60
- - **Global skills auto-refresh** whenever a newer CLI runs — any `npx fimo@latest …` command detects a version change (marker at `~/.config/fimo/last-version`) and re-copies the latest skills.
61
- - **The project skill auto-refreshes during Fimo-controlled installs** when the `fimo` package version bumps — the package's postinstall hook re-syncs the skill from `node_modules/fimo/assets/skills/fimo/` (which is version-locked to the installed package). For pnpm, `fimo init --install`, sandbox `fimopm install`, and E2E helper installs pass a scoped allow-all-builds flag so the hook can run without persisting build-script approvals in the template. npm / yarn run lifecycle scripts by default and need no extra config.
45
+ Once installed, the agent discovers everything else through the bootstrap: it runs `fimo skills get <name>` to load the real skill for the task at hand.
62
46
 
63
- Invoke `fimo skills sync` explicitly when iterating on skill content locally, when you bumped the package via something other than a fresh install, or any time you want to force a refresh.
47
+ **`fimo skills sync`** re-ensures the global bootstrap for whichever agents already have it, and cleans up stale global skills that older CLI versions used to copy in (`fimo-cli`, `fimo-studio`, `fimo-migration`, and legacy migration skills). You rarely need it: the bootstrap is a symlink, so it always tracks the running CLI, and the real skills are fetched fresh via `fimo skills get`. Run it after upgrading from an old CLI to clear leftovers.
64
48
 
65
- **`fimo skills uninstall`** removes only the global skills. Project files are part of the project — delete the project (or `rm -rf .claude/skills/fimo .cursor/skills/fimo`) if you want them gone.
49
+ **`fimo skills uninstall`** removes the global bootstrap for the selected agents.
66
50
 
67
51
  ## `fimo rules sync` — rule files only
68
52
 
69
- `fimo init` writes `AGENTS.md` (the universal-spec file) and per-agent variants for the AI tools you selected. Variants and their generators:
53
+ `fimo init` scaffolds `AGENTS.md` (the universal-spec file) and `CLAUDE.md` from the template. Other agents' variants are generated on demand:
70
54
 
71
55
  | Agent | File(s) generated |
72
56
  | --------------------------------- | ------------------------------------- |
73
- | claude-code | `CLAUDE.md` + `.claude/settings.json` |
57
+ | claude-code | `CLAUDE.md` (ships in the template) |
74
58
  | cursor | `.cursor/rules/fimo.mdc` |
75
59
  | windsurf | `.windsurfrules` |
76
60
  | gemini-cli | `GEMINI.md` |
@@ -79,16 +63,16 @@ Invoke `fimo skills sync` explicitly when iterating on skill content locally, wh
79
63
  `fimo rules sync` regenerates these variants from the current `AGENTS.md`. Use it when:
80
64
 
81
65
  - You edited `AGENTS.md` and want variants refreshed (delete the variant first — see below).
82
- - You added an agent in a different way and need its rule file generated.
66
+ - You added an agent that needs its own rule file generated.
83
67
 
84
68
  ```bash
85
69
  fimo rules sync # interactive: pick agents
86
70
  fimo rules sync --agents=cursor # explicit
87
71
  ```
88
72
 
89
- `fimo rules sync` is **purely additive** — it creates missing variant files but never overwrites existing ones. Project-specific edits in `CLAUDE.md`, `.cursor/rules/fimo.mdc`, `.claude/settings.json`, etc. are preserved. To regenerate a stale variant, delete the variant file first and re-run.
73
+ `fimo rules sync` is **purely additive** — it creates missing variant files but never overwrites existing ones, so project-specific edits are preserved. To regenerate a stale variant, delete the variant file first and re-run.
90
74
 
91
- **`fimo rules sync` does NOT install skill files.** That's `fimo skills install / sync` territory. The split is deliberate — rules are generated config files, skills are reusable knowledge artifacts.
75
+ **`fimo rules sync` does NOT install skills.** That's `fimo skills` territory. The split is deliberate — rules are generated project config files (committed with the project); skills are fetched on demand and never committed.
92
76
 
93
77
  ## Selecting agents (interactive vs flags)
94
78
 
@@ -98,21 +82,20 @@ Every command that takes agents accepts the same selection inputs:
98
82
  - `-a claude-code -a cursor` — repeatable short form
99
83
  - No flag → interactive multi-select. The picker has two sections:
100
84
  - **Universal** — agents that read `AGENTS.md` natively (codex, opencode, aider, …). Always covered, not toggleable.
101
- - **Additional** — agents that need a per-agent rule file or skills dir. The 6 popular ones (`claude-code`, `cursor`, `codex`, `opencode`, `windsurf`, `gemini-cli`) appear at the top of an 8-item scrollable viewport; the full list of 50+ supported agents is below the fold. Each row shows the install path next to the name (e.g. `Claude Code (.claude/skills)`). Agents already present on the machine are pre-checked.
102
- - `--agents=none` (only `fimo init`) — skip per-agent variants entirely; write only `AGENTS.md`.
103
- - `--mode=symlink|copy` (only `fimo skills install` and `fimo init`) — pick the install method for the per-agent skills layer. Defaults to symlink so the canonical `.agents/skills/<name>/` is the single source of truth; pass `--mode=copy` to materialize the skill in each per-agent dir.
85
+ - **Additional** — agents that get the global bootstrap skill installed. The 6 popular ones (`claude-code`, `cursor`, `codex`, `opencode`, `windsurf`, `gemini-cli`) appear at the top of an 8-item scrollable viewport; the full list of 50+ supported agents is below the fold. Agents already set up on the machine are pre-checked.
86
+ - `--agents=none` (only `fimo init`) — skip the global skill entirely.
104
87
 
105
88
  In headless contexts (CI, AI-tool-spawned commands), pass the flag explicitly. Env-var detection (only Claude Code's `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT`) silently targets `claude-code` if the flag is omitted; every other agent must be named explicitly with `--agents` in a headless shell, or the command exits with "No agents detected and no --agents flag passed."
106
89
 
107
- ## Version stamping
90
+ ## Always current, never stale
108
91
 
109
- Every installed `SKILL.md` (global or project) is stamped with `fimoVersion: <cli-version>` in its YAML frontmatter at install time. That gives the CLI (and you) a way to detect stale installs — compare the stamped version to the currently-running CLI version.
92
+ Because the only installed artifact is a generic pointer, and the real skills are fetched with `fimo skills get`, the content an agent reads always matches the running CLI. There's no version stamp to check and no cached copy to refresh — re-run `fimo skills get <name>` any time to get the current instructions.
110
93
 
111
94
  ## When to use which
112
95
 
113
96
  - "I want this AI tool to know about Fimo" → `fimo skills install` (interactive)
114
- - "I want to add Cursor to this project" → `fimo skills install --agents=cursor` (from inside the project)
115
- - "The agent doesn't know about my project's latest fimo conventions" → `fimo skills sync`
97
+ - "Load the code / CLI / studio / migration skill now" → `fimo skills get fimo-code` / `fimo-cli` / `fimo-studio` / `fimo-migration`
98
+ - "Clean up skills left by an old CLI version" → `fimo skills sync`
116
99
  - "I edited `AGENTS.md` and want variants regenerated" → delete the stale variant + `fimo rules sync`
117
100
  - "I'm done with Fimo on this machine" → `fimo skills uninstall`
118
- - For a fresh project, `fimo init` wires up everything for the AI tools you select at scaffold time.
101
+ - For a fresh project, `fimo init` installs the global skill for the AI tools you select at scaffold time.
@@ -18,9 +18,9 @@ Typical flow:
18
18
  ```
19
19
  fimo agents create <name> # scaffold agents/<name>/ from a template (local)
20
20
  fimo agents secrets add <name> FIRECRAWL_API_KEY # request a project secret in config.yaml
21
- fimo secrets set FIRECRAWL_API_KEY --stdin # store the hidden value in Fimo
22
- fimo agents validate <name> # confirm it parses + passes policy (local)
23
- fimo validate # also checks that requested project secrets exist
21
+ fimo secrets add FIRECRAWL_API_KEY --stdin # store the hidden value in Fimo
22
+ fimo agents validate <name> # parse + policy + composition + requested secrets
23
+ fimo validate # project build and codegen checks
24
24
  fimo deploy # push the bundle to the env's git branch
25
25
  fimo agents activate <name> # wire its triggers on the env (DB row)
26
26
  fimo agents run <name> # trigger a manual run → sessionId
@@ -45,7 +45,7 @@ fimo agents secrets remove <name> <KEY> [-C <dir>]
45
45
  - **`create <name>`** — scaffold `agents/<name>/` from a template (default `_default`, a minimal valid bundle). `--description <text>` writes a one-line tagline into the scaffolded `config.yaml` (surfaces in the dashboard's agents list). When run **without** `-C`, it requires the cwd to be inside a real Fimo project (walks up for `.fimo.settings.json`) and errors out cleanly otherwise, so it never leaks `agents/<name>/` into a stray cwd. If the template declares capabilities, an install-consent flow runs after the copy (`--quiet` skips it; critical caps still abort).
46
46
  - **`list`** — list the agents declared under `<project>/agents/`, with each one's trigger types and capability count. Local — the bundle list is the source of truth even if the project isn't linked yet.
47
47
  - **`validate [name]`** — run the full validation pipeline: parse → capability vocabulary → composition (cycle / missing sub-agents / invalid grants) → semantic + `fimo.config.json` policy checks. Omit `name` to validate every bundle. `--json` emits a structured `ValidationReport` for CI; exit code is non-zero on any failure.
48
- - **`secrets add/remove/list`** — edit or inspect the agent's requested secret names in `agents/<name>/config.yaml`. These commands do not create, rotate, or reveal secret values. Store values with `fimo secrets set`; run `fimo validate` to check that required requested secrets exist in the project. See `references/project-vars-and-secrets.md`.
48
+ - **`secrets add/remove/list`** — edit or inspect the agent's requested secret names in `agents/<name>/config.yaml`. These commands do not create, rotate, or reveal secret values. Store values with `fimo secrets add`; run `fimo agents validate` to check that required requested secrets exist in the project. See `references/project-vars-and-secrets.md`.
49
49
  - **`integrations <name>`** — preview the agent's `integrations` allowlist from `agents/<name>/config.yaml` and, when linked, overlay project integration status. See `references/integrations.md`.
50
50
 
51
51
  Agent integration access is configured in `agents/<name>/config.yaml` with an allowlist. Omitted integrations and omitted tools are not available to the agent:
@@ -14,7 +14,7 @@ This file covers the **CLI workflow** for content. Use it when the user wants to
14
14
  4. Seed entries via `fimo entries create`. Generate cover images first with `fimo image generate` if needed (see `media.md` / `assets.md`).
15
15
  5. Write React pages that import from `@/schemas/{Uid}` and render with `fimo/ui` components.
16
16
 
17
- Steps 1, 3, and 5 reference the project skill (`fimo`) for shape and React API. Steps 2 and 4 are CLI commands documented here.
17
+ Steps 1, 3, and 5 reference the `fimo-code` skill (`npx fimo@latest skills get fimo-code`) for shape and React API. Steps 2 and 4 are CLI commands documented here.
18
18
 
19
19
  ## Schema CLI commands
20
20
 
@@ -96,7 +96,7 @@ cat query.sql | fimo entries query --stdin
96
96
 
97
97
  SQL exposes the raw internal representation. `document_id` is the stable ID used by `fimo entries`, content tools, references, and the API. `id` is the internal ID of one exact locale variant. When query results will feed another Fimo command or tool, select `document_id AS id`; use `locale` to select a variant.
98
98
 
99
- The available columns are `id`, `document_id`, `content_type`, `locale`, `slug`, `data`, `created_at`, and `updated_at`. Schema fields live inside the JSONB `data` column. If a safe read is blocked because a SQL function is unavailable, tell the user which function is missing and follow `references/support.md` to prepare a support report for approval. Do not bypass the restriction with a write.
99
+ The available columns are `id`, `document_id`, `content_type`, `locale`, `slug`, `data`, `created_at`, and `updated_at`. Schema fields live inside the JSONB `data` column. If a safe read is blocked because a SQL function is unavailable, tell the user which function is missing and use the built-in `supportReport` tool when the platform gap materially blocks the task. Do not bypass the restriction with a write.
100
100
 
101
101
  ### Bulk mutations
102
102
 
@@ -24,7 +24,7 @@ fimo deploy -m "<commit message>" --publish # also publish a new live version
24
24
  - **`-m`** is the commit message used when there are uncommitted local changes; required in non-interactive shells. Omit if the working tree is already clean.
25
25
  - **`--no-restart`** — tells the sandbox to skip the dev-server restart and let Vite HMR pick up the change. Shaves ~3s per deploy. See "Skipping the dev-server restart" below for when it's safe.
26
26
 
27
- Public project variables set with `fimo vars set` are injected into preview/build/deploy environments. Project secrets are not injected into app builds; agents request secrets separately through their own config. See `references/project-vars-and-secrets.md`.
27
+ Public project variables managed with `fimo vars add` and `fimo vars update` are injected into preview/build/deploy environments. Project secrets are not injected into app builds; agents request secrets separately through their own config. See `references/project-vars-and-secrets.md`.
28
28
 
29
29
  ## Warm the sandbox early in a session (optional)
30
30
 
@@ -13,7 +13,7 @@ This file covers the **CLI workflow** for forms. Use it when the user wants to a
13
13
  3. Pre-build generates `src/forms/{name}.ts` (Zod schema + `submitX` helper). See `fimo/references/forms.md` for the generated API.
14
14
  4. Write a React component that imports from `@/forms/{name}`.
15
15
 
16
- Steps 1, 3, and 4 reference the project skill. Step 2 is the CLI command.
16
+ Steps 1, 3, and 4 reference the `fimo-code` skill (`npx fimo@latest skills get fimo-code`). Step 2 is the CLI command.
17
17
 
18
18
  ## CLI commands
19
19
 
@@ -25,12 +25,11 @@ fimo init [dir] [options]
25
25
  | `--env <name>` | no | Env to check out when linking an existing project (defaults to `main`). |
26
26
  | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
27
27
  | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
28
- | `--skills` / `--no-skills` | yes in non-TTY | Set up Fimo skills (or skip it). |
29
- | `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to write only universal AGENTS.md. |
28
+ | `--skills` / `--no-skills` | yes in non-TTY | Install the global Fimo skill (or skip it). |
29
+ | `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to skip installing the global skill. |
30
30
  | `-a, --agent <id>` | alternative | Repeatable form: `-a claude-code -a cursor`. |
31
- | `--mode <symlink\|copy>` | no | Project skill install method. |
32
31
  | `--template-root <path>` | no | Override the bundled template (development only). |
33
- | `-y, --yes` | no | Skip the skills install preview confirmation. |
32
+ | `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
34
33
 
35
34
  In a non-TTY shell the create-new path requires `[dir]`, `--install` / `--no-install`, and `--skills` / `--no-skills` (and `--org` if you have no active org and belong to multiple orgs). Without them the command exits with `Cannot prompt in a non-interactive shell.`
36
35
 
@@ -40,7 +39,7 @@ For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for C
40
39
 
41
40
  ## Linking an existing project
42
41
 
43
- 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.settings.json` + agent files, 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.
42
+ 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.settings.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.
44
43
 
45
44
  ## What gets written (create-new)
46
45
 
@@ -49,19 +48,14 @@ Pass `--project-id <id>` to link an EXISTING project instead of creating one. Th
49
48
  - The project template (Vite + React 19 + TypeScript + Tailwind v4 + shadcn/ui + react-router)
50
49
  - `.fimo.settings.json` — links this directory to the remote project (read-only after creation)
51
50
  - `.env` — initial env vars (currently just `VITE_API_URL`)
52
- - `AGENTS.md` — project rules read by all agentskills.io-compatible AI tools (Codex, OpenCode, Aider, etc.)
53
- - Per-agent variants based on `--agents`:
54
- - `claude-code` → `CLAUDE.md` + `.claude/settings.json`
55
- - `cursor` → `.cursor/rules/fimo.mdc`
56
- - `windsurf` → `.windsurfrules`
57
- - `gemini-cli` → `GEMINI.md`
58
- - codex / opencode / aider / others → no extra file; AGENTS.md is read natively
59
- - The project-scope `fimo` skill (npm package surface: schemas, forms, `t()`, `fimo/ui` components) copied into each selected agent's skill dir (`.claude/skills/fimo/`, `.cursor/skills/fimo/`, etc.). Version-locked to the bundled `fimo` package — the installed `SKILL.md` is stamped with `fimoVersion`. Refresh later with `fimo skills sync`. See `references/agent-setup.md`.
60
- - A git repository with `fimo` as the remote, an initial commit, and an initial push
51
+ - `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.
52
+ - A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
61
53
 
62
- Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md without a per-agent variant.
54
+ Nothing is written into per-agent skill dirs: the rich skills are fetched on demand via `fimo skills get <name>`, never copied into the project. `fimo init` separately installs the small global `fimo` bootstrap skill for the agents you select (machine-wide, not in the project) unless you pass `--no-skills`. For other agents' rule-file variants (`.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`), run `fimo rules sync`. See `references/agent-setup.md`.
63
55
 
64
- `.env` is only the bootstrap app env so local `pnpm dev` works immediately. User-managed public variables are stored with `fimo vars set` and synced into a managed `.env.local` block; hidden values use `fimo secrets set`. See `references/project-vars-and-secrets.md`.
56
+ Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
57
+
58
+ `.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`.
65
59
 
66
60
  ## Right after scaffolding
67
61
 
@@ -84,17 +78,14 @@ When a unit of work looks done, **offer** to deploy (`fimo deploy` for a hosted
84
78
 
85
79
  ## Load the project context
86
80
 
87
- After `fimo init` completes, the project root has:
88
-
89
- - `AGENTS.md` (universal) plus the per-agent variant for the AI tool you're running in (e.g. `CLAUDE.md` for Claude Code, `.cursor/rules/fimo.mdc` for Cursor)
90
- - `.claude/skills/fimo/SKILL.md` (or the equivalent per-agent path) — the project-scope `fimo` skill, version-locked to the installed `fimo` package
81
+ After `fimo init` completes, the project root has `AGENTS.md` (universal) and `CLAUDE.md` (for Claude Code) from the template.
91
82
 
92
83
  **These files came into existence mid-session, so they may not be auto-loaded by the harness.** Explicitly:
93
84
 
94
85
  1. `cd <project-dir>` — switch into the new project.
95
86
  2. `Read` the project rules file: `AGENTS.md` (or `CLAUDE.md` if you're Claude Code).
96
- 3. `Read` the project skill: `.claude/skills/fimo/SKILL.md` (or `.cursor/skills/fimo/SKILL.md` for Cursor, etc.).
97
- 4. From the project skill's "load these references up front" section, batch-read `references/content.md`, `references/forms.md`, `references/assets.md`, `references/labels.md`, `references/locales.md`, `references/ui.md` before generating any significant code.
87
+ 3. Load the code skill on demand: `npx fimo@latest skills get fimo-code`.
88
+ 4. From the `fimo-code` skill's "load these references up front" section, batch-read the referenced docs (`npx fimo@latest skills get fimo-code --ref content`, `--ref forms`, `--ref assets`, `--ref labels`, `--ref locales`, `--ref ui`) before generating any significant code.
98
89
 
99
90
  Once those are in context, generation respects the project's conventions (schemas, `t()`, `fimo/ui` components, asset handling).
100
91
 
@@ -103,10 +94,11 @@ Once those are in context, generation respects the project's conventions (schema
103
94
  If a teammate joins on a different AI tool (e.g. Cursor) after the project was scaffolded for claude-code only:
104
95
 
105
96
  ```bash
106
- fimo skills install --agents=cursor # one command — global skill + project skill + rule file
97
+ fimo skills install --agents=cursor # install the global Fimo skill for cursor
98
+ fimo rules sync --agents=cursor # generate cursor's rule file (.cursor/rules/fimo.mdc)
107
99
  ```
108
100
 
109
- Run from inside the project. The command detects the project context and wires up everything for the new agent in a single shot. See `references/agent-setup.md`.
101
+ The first installs the global bootstrap skill for the new agent; the second generates its project rule file from `AGENTS.md`. See `references/agent-setup.md`.
110
102
 
111
103
  ## Multi-org accounts
112
104
 
@@ -9,12 +9,13 @@ There is no private-variable mode. If leaking the value would be a problem, use
9
9
  ## Public Variables
10
10
 
11
11
  ```bash
12
- fimo vars set VITE_PUBLIC_SITE_URL https://example.com
12
+ fimo vars add VITE_PUBLIC_SITE_URL https://example.com
13
+ fimo vars update VITE_PUBLIC_SITE_URL https://www.example.com
13
14
  fimo vars list
14
15
  fimo vars unset VITE_PUBLIC_SITE_URL
15
16
  ```
16
17
 
17
- `fimo vars set` stores the value in Fimo and refreshes the managed block in `.env.local` so local development can use it immediately. Fimo also injects public variables into preview, build, and deploy environments.
18
+ `fimo vars add` refuses to replace an existing variable. Use `fimo vars update` when the variable already exists. All variable writes refresh the managed block in `.env.local` so local development can use it immediately. Fimo also injects public variables into preview, build, and deploy environments.
18
19
 
19
20
  To refresh local values later:
20
21
 
@@ -30,13 +31,15 @@ Variables are public by design. They may use browser-safe prefixes such as `VITE
30
31
  ## Secrets
31
32
 
32
33
  ```bash
33
- fimo secrets set FIRECRAWL_API_KEY --stdin
34
- fimo secrets set SLACK_BOT_TOKEN --value "$SLACK_BOT_TOKEN"
34
+ fimo secrets add FIRECRAWL_API_KEY --stdin
35
+ fimo secrets update FIRECRAWL_API_KEY --stdin
36
+ fimo secrets add SLACK_BOT_TOKEN --value "$SLACK_BOT_TOKEN"
35
37
  fimo secrets list
36
38
  fimo secrets unset FIRECRAWL_API_KEY
37
39
  ```
38
40
 
39
41
  Secret values are hidden after write. Listing secrets shows the key and a masked value, never the plaintext.
42
+ `fimo secrets add` refuses to replace an existing value. Use `fimo secrets update` for an intentional rotation.
40
43
 
41
44
  Secrets are not written to `.env.local`, preview app env files, browser bundles, or generated project files. Secrets cannot use public prefixes such as `VITE_`, `PUBLIC_`, or `NEXT_PUBLIC_`; those prefixes are for public variables.
42
45
 
@@ -44,7 +47,7 @@ Secrets are not written to `.env.local`, preview app env files, browser bundles,
44
47
 
45
48
  `fimo init` writes `.env` for bootstrap app runtime values such as `VITE_API_URL`. This lets `pnpm dev` work without a Fimo wrapper.
46
49
 
47
- `fimo vars set` and `fimo vars pull` write public project variables to a managed block in `.env.local`.
50
+ `fimo vars add`, `fimo vars update`, and `fimo vars pull` write public project variables to a managed block in `.env.local`.
48
51
 
49
52
  Local env files are ignored by git in Fimo projects. They are for local development only; deployment reads project variables from Fimo and injects them into the remote build.
50
53
 
@@ -56,15 +59,15 @@ Agents receive only the secrets they request in their own config.
56
59
  fimo agents secrets add seo-publisher FIRECRAWL_API_KEY
57
60
  fimo agents secrets list seo-publisher
58
61
  fimo agents secrets remove seo-publisher FIRECRAWL_API_KEY
59
- fimo validate
62
+ fimo agents validate
60
63
  ```
61
64
 
62
- `fimo agents secrets add` edits `agents/<name>/config.yaml`. It does not create or rotate the secret value. Use `fimo secrets set` for that.
65
+ `fimo agents secrets add` edits `agents/<name>/config.yaml`. It does not create or rotate the secret value. Use `fimo secrets add` to create the value or `fimo secrets update` to rotate it.
63
66
 
64
- `fimo validate` checks that required agent secrets exist in the project. A running agent keeps the environment it started with; the next run reads the deployed agent config again.
67
+ `fimo agents validate` checks that required agent secrets exist in the project. A running agent keeps the environment it started with; the next run reads the deployed agent config again.
65
68
 
66
69
  ## Choosing Between Them
67
70
 
68
- - If the value can safely be visible in browser code or page source, use `fimo vars set`.
69
- - If leaking the value would be a problem, use `fimo secrets set`.
70
- - If an agent needs a secret, first store it with `fimo secrets set`, then request it in that agent config with `fimo agents secrets add`.
71
+ - If the value can safely be visible in browser code or page source, use `fimo vars add`.
72
+ - If leaking the value would be a problem, use `fimo secrets add`.
73
+ - If an agent needs a secret, first store it with `fimo secrets add`, then request it in that agent config with `fimo agents secrets add`.