fimo 0.15.0-staging.1 → 0.15.0-staging.3

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 (105) hide show
  1. package/README.md +1 -0
  2. package/assets/content-templates/forms/framework.eta +90 -0
  3. package/assets/content-templates/forms/react.eta +42 -21
  4. package/assets/skills/fimo/SKILL.md +11 -4
  5. package/assets/skills/fimo-cli/SKILL.md +28 -27
  6. package/assets/skills/fimo-cli/references/account.md +0 -2
  7. package/assets/skills/fimo-cli/references/agent-setup.md +7 -9
  8. package/assets/skills/fimo-cli/references/agents.md +0 -2
  9. package/assets/skills/fimo-cli/references/analytics.md +0 -2
  10. package/assets/skills/fimo-cli/references/assets.md +2 -4
  11. package/assets/skills/fimo-cli/references/branches.md +0 -2
  12. package/assets/skills/fimo-cli/references/content.md +9 -11
  13. package/assets/skills/fimo-cli/references/credits.md +0 -2
  14. package/assets/skills/fimo-cli/references/deploy.md +2 -4
  15. package/assets/skills/fimo-cli/references/describe.md +0 -2
  16. package/assets/skills/fimo-cli/references/domains.md +0 -2
  17. package/assets/skills/fimo-cli/references/forms.md +7 -9
  18. package/assets/skills/fimo-cli/references/history.md +0 -2
  19. package/assets/skills/fimo-cli/references/init.md +35 -25
  20. package/assets/skills/fimo-cli/references/integrations/firecrawl.md +0 -2
  21. package/assets/skills/fimo-cli/references/integrations.md +0 -2
  22. package/assets/skills/fimo-cli/references/invite.md +0 -2
  23. package/assets/skills/fimo-cli/references/labels.md +3 -5
  24. package/assets/skills/fimo-cli/references/locales.md +2 -4
  25. package/assets/skills/fimo-cli/references/mcp.md +2 -4
  26. package/assets/skills/fimo-cli/references/media.md +0 -2
  27. package/assets/skills/fimo-cli/references/preview.md +0 -2
  28. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +0 -2
  29. package/assets/skills/fimo-cli/references/projects.md +2 -4
  30. package/assets/skills/fimo-cli/references/schedules.md +0 -2
  31. package/assets/skills/fimo-cli/references/support.md +0 -2
  32. package/assets/skills/fimo-cli/references/webhooks.md +0 -2
  33. package/assets/skills/fimo-code/references/forms.md +24 -10
  34. package/assets/skills/fimo-code/references/frameworks/astro.md +9 -0
  35. package/assets/skills/fimo-code/references/frameworks/next.md +25 -0
  36. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +33 -5
  37. package/assets/skills/fimo-code/references/labels.md +1 -1
  38. package/assets/skills/fimo-migration/SKILL.md +99 -146
  39. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +26 -0
  40. package/assets/skills/fimo-migration/references/inventory/coordinator.md +40 -0
  41. package/assets/skills/fimo-migration/references/inventory/locales/next-intl.md +39 -0
  42. package/assets/skills/fimo-migration/references/inventory/locales.md +41 -0
  43. package/assets/skills/fimo-migration/references/workflow.md +3 -2
  44. package/assets/skills/fimo-migration/scripts/inventory/locales/next-intl.mjs +459 -0
  45. package/assets/skills/fimo-studio/SKILL.md +1 -1
  46. package/assets/skills/fimo-studio/references/project-creation.md +10 -18
  47. package/dist/build/astro/config.js +20 -1
  48. package/dist/build/sveltekit/config.d.ts +2 -1
  49. package/dist/build/sveltekit/config.js +15 -5
  50. package/dist/build/sveltekit/files/edge.js +68 -0
  51. package/dist/build/sveltekit/files/serverless.js +42 -0
  52. package/dist/cli/bundle.json +1 -1
  53. package/dist/cli/index.js +78 -72
  54. package/dist/runtime/astro/server.d.ts +2 -0
  55. package/dist/runtime/astro/server.js +2 -0
  56. package/dist/runtime/forms/client.d.ts +13 -0
  57. package/dist/runtime/forms/client.js +83 -0
  58. package/dist/runtime/forms/index.d.ts +2 -0
  59. package/dist/runtime/forms/index.js +1 -0
  60. package/dist/runtime/index.d.ts +2 -0
  61. package/dist/runtime/index.js +4 -0
  62. package/dist/runtime/next/client.d.ts +2 -0
  63. package/dist/runtime/next/client.js +2 -0
  64. package/dist/runtime/next/server.d.ts +2 -0
  65. package/dist/runtime/next/server.js +2 -0
  66. package/dist/runtime/react-router/index.d.ts +1 -0
  67. package/dist/runtime/react-router/index.js +1 -0
  68. package/dist/runtime/sveltekit/forms.d.ts +15 -0
  69. package/dist/runtime/sveltekit/forms.js +15 -0
  70. package/dist/runtime/sveltekit/index.d.ts +2 -0
  71. package/dist/runtime/sveltekit/index.js +1 -0
  72. package/dist/runtime/sveltekit/labels.d.ts +7 -3
  73. package/dist/runtime/sveltekit/labels.js +1 -1
  74. package/dist/runtime/sveltekit/runtime.d.ts +2 -1
  75. package/dist/runtime/sveltekit/runtime.js +8 -2
  76. package/dist/runtime/templates.d.ts +1 -1
  77. package/dist/runtime/templates.js +1 -1
  78. package/dist/scripts/sync-forms.d.ts +1 -0
  79. package/dist/scripts/sync-forms.js +78 -26
  80. package/package.json +10 -4
  81. package/templates/astro/.fimo/config.json +21 -0
  82. package/templates/astro/AGENTS.md +37 -0
  83. package/templates/astro/CLAUDE.md +5 -0
  84. package/templates/astro/_gitignore +15 -0
  85. package/templates/astro/astro.config.mjs +7 -0
  86. package/templates/astro/package.json +22 -0
  87. package/templates/astro/pnpm-workspace.yaml +7 -0
  88. package/templates/astro/src/components/ProjectOverview.astro +42 -0
  89. package/templates/astro/src/env.d.ts +1 -0
  90. package/templates/astro/src/layouts/Base.astro +81 -0
  91. package/templates/astro/src/pages/index.astro +10 -0
  92. package/templates/astro/src/pages/projects/[slug].astro +26 -0
  93. package/templates/astro/src/pages/projects/index.astro +10 -0
  94. package/templates/astro/src/schemas/Project.json +9 -0
  95. package/templates/astro/src/schemas/Project.ts +29 -0
  96. package/templates/astro/src/schemas/Project.types.ts +70 -0
  97. package/templates/astro/src/schemas/SiteSettings.json +10 -0
  98. package/templates/astro/src/schemas/SiteSettings.ts +31 -0
  99. package/templates/astro/src/schemas/SiteSettings.types.ts +69 -0
  100. package/templates/astro/tsconfig.json +5 -0
  101. package/templates/nextjs/AGENTS.md +10 -5
  102. package/templates/react-router/AGENTS.md +4 -3
  103. package/templates/react-router/package.json +1 -1
  104. package/templates/sveltekit/AGENTS.md +24 -4
  105. package/templates/sveltekit/src/routes/+layout.server.ts +1 -2
package/README.md CHANGED
@@ -28,6 +28,7 @@ Run the CLI with `npx` — no global install, always the latest:
28
28
  ```bash
29
29
  npx fimo@latest login
30
30
  npx fimo@latest init my-site # default React Router scaffold
31
+ # or: npx fimo@latest init my-astro-site --framework astro
31
32
  # or: npx fimo@latest init my-next-site --framework nextjs
32
33
  # or: npx fimo@latest init my-svelte-site --framework sveltekit
33
34
  cd my-site
@@ -0,0 +1,90 @@
1
+ <%
2
+ const quote = (value) => JSON.stringify(value);
3
+ const localName = (key, index) => `field_${index}_${key.replace(/[^a-zA-Z0-9_$]/g, '_')}`;
4
+
5
+ function zodForField(field) {
6
+ if (field.type === 'hidden') {
7
+ return 'z.string().optional()';
8
+ }
9
+
10
+ if (field.type === 'file') {
11
+ let schema = `z.custom<File>((value) => typeof File !== "undefined" && value instanceof File, ${quote('Expected a file')})`;
12
+ if (!field.required) schema += '.optional()';
13
+ return schema;
14
+ }
15
+
16
+ if (field.type === 'checkbox') {
17
+ let schema = `z.boolean({ message: ${quote('Must be true or false')} })`;
18
+ if (field.required) schema += `.refine((value) => value, ${quote(`${field.label} is required`)})`;
19
+ return schema;
20
+ }
21
+
22
+ if (field.type === 'number') {
23
+ let schema = 'z.coerce.number()';
24
+ if (field.validation?.min !== undefined) schema += `.min(${field.validation.min})`;
25
+ if (field.validation?.max !== undefined) schema += `.max(${field.validation.max})`;
26
+ if (!field.required) schema += '.optional()';
27
+ return schema;
28
+ }
29
+
30
+ if (field.type === 'select' && field.options?.length) {
31
+ let schema = `z.enum(${JSON.stringify(field.options)} as [string, ...string[]])`;
32
+ if (!field.required) schema += '.optional()';
33
+ return schema;
34
+ }
35
+
36
+ let schema = 'z.string()';
37
+ if (field.required) schema += `.min(1, ${quote(`${field.label} is required`)})`;
38
+ if (field.type === 'email') schema += `.email(${quote('Invalid email address')})`;
39
+ if (field.type === 'url') schema += `.url(${quote('Invalid URL')})`;
40
+ if (field.validation?.minLength !== undefined) schema += `.min(${field.validation.minLength})`;
41
+ if (field.validation?.maxLength !== undefined) schema += `.max(${field.validation.maxLength})`;
42
+ if (field.validation?.pattern) schema += `.regex(new RegExp(${quote(field.validation.pattern)}))`;
43
+ if (!field.required) schema += '.optional()';
44
+ return schema;
45
+ }
46
+ -%>
47
+ <% if (form.clientDirective) { %><%= form.clientDirective %>
48
+ <% } %>// AUTO-GENERATED by `fimo` from src/forms/<%= form.name %>.json - DO NOT EDIT.
49
+
50
+ import { z } from "zod";
51
+ import { formClient as defaultFormClient } from "<%= form.runtimeImport %>";
52
+ import type { FormClient } from "fimo/forms";
53
+
54
+ export const FORM_ID = <%= quote(form.id ?? 'undefined') %>;
55
+
56
+ export const <%= form.pascal %>Schema = z.object({
57
+ <% Object.entries(form.fields).forEach(([key, field]) => { -%>
58
+ <%= JSON.stringify(key) %>: <%= zodForField(field) %>,
59
+ <% }); -%>
60
+ });
61
+
62
+ export type <%= form.pascal %>Data = z.infer<typeof <%= form.pascal %>Schema>;
63
+
64
+ /** Convert a browser form submission into the typed shape expected by Fimo. */
65
+ export function parse<%= form.pascal %>FormData(formData: FormData): <%= form.pascal %>Data {
66
+ const data: Record<string, unknown> = {};
67
+ <% Object.entries(form.fields).forEach(([key, field], index) => { -%>
68
+ <% if (field.type === 'checkbox') { -%>
69
+ data[<%= JSON.stringify(key) %>] = ['on', 'true', '1'].includes(formData.get(<%= JSON.stringify(key) %>) as string);
70
+ <% } else if (field.type === 'number') { -%>
71
+ const <%= localName(key, index) %> = formData.get(<%= JSON.stringify(key) %>);
72
+ if (<%= localName(key, index) %> !== null && <%= localName(key, index) %> !== '') {
73
+ data[<%= JSON.stringify(key) %>] = Number(<%= localName(key, index) %>);
74
+ }
75
+ <% } else { -%>
76
+ const <%= localName(key, index) %> = formData.get(<%= JSON.stringify(key) %>);
77
+ if (<%= localName(key, index) %> !== null) {
78
+ data[<%= JSON.stringify(key) %>] = <%= localName(key, index) %>;
79
+ }
80
+ <% } -%>
81
+ <% }); -%>
82
+ return <%= form.pascal %>Schema.parse(data);
83
+ }
84
+
85
+ export function submit<%= form.pascal %>(
86
+ data: <%= form.pascal %>Data,
87
+ client: FormClient = defaultFormClient
88
+ ) {
89
+ return client.submit(FORM_ID, data);
90
+ }
@@ -10,24 +10,24 @@
10
10
  */
11
11
 
12
12
  const hasFileFields = Object.values(form.fields).some(f => f.type === 'file');
13
+ const quote = (value) => JSON.stringify(value);
14
+ const localName = (key, index) => `field_${index}_${key.replace(/[^a-zA-Z0-9_$]/g, '_')}`;
13
15
 
14
- function zodForField(key, field) {
15
- const lines = [];
16
-
16
+ function zodForField(field) {
17
17
  if (field.type === 'hidden') {
18
18
  return 'z.string().optional()';
19
19
  }
20
20
 
21
21
  if (field.type === 'file') {
22
- let s = 'z.instanceof(File)';
23
- if (!field.required) s = 'z.instanceof(File).optional()';
22
+ let s = `z.custom<File>((value) => typeof File !== "undefined" && value instanceof File, ${quote('Expected a file')})`;
23
+ if (!field.required) s += '.optional()';
24
24
  return s;
25
25
  }
26
26
 
27
27
  if (field.type === 'checkbox') {
28
- let s = 'z.boolean()';
28
+ let s = `z.boolean({ message: ${quote('Must be true or false')} })`;
29
29
  if (field.required) {
30
- s += `.refine(v => v, "${field.label} is required")`;
30
+ s += `.refine(v => v, ${quote(`${field.label} is required`)})`;
31
31
  }
32
32
  return s;
33
33
  }
@@ -41,8 +41,7 @@ function zodForField(key, field) {
41
41
  }
42
42
 
43
43
  if (field.type === 'select' && field.options?.length) {
44
- const opts = field.options.map(o => `"${o}"`).join(', ');
45
- let s = `z.enum([${opts}])`;
44
+ let s = `z.enum(${JSON.stringify(field.options)} as [string, ...string[]])`;
46
45
  if (!field.required) s += '.optional()';
47
46
  return s;
48
47
  }
@@ -51,7 +50,7 @@ function zodForField(key, field) {
51
50
  let s = 'z.string()';
52
51
 
53
52
  if (field.required) {
54
- s += `.min(1, "${field.label} is required")`;
53
+ s += `.min(1, ${quote(`${field.label} is required`)})`;
55
54
  }
56
55
 
57
56
  if (field.type === 'email') {
@@ -62,7 +61,7 @@ function zodForField(key, field) {
62
61
 
63
62
  if (field.validation?.minLength) s += `.min(${field.validation.minLength})`;
64
63
  if (field.validation?.maxLength) s += `.max(${field.validation.maxLength})`;
65
- if (field.validation?.pattern) s += `.regex(new RegExp("${field.validation.pattern}"))`;
64
+ if (field.validation?.pattern) s += `.regex(new RegExp(${quote(field.validation.pattern)}))`;
66
65
 
67
66
  if (!field.required) s += '.optional()';
68
67
 
@@ -79,16 +78,33 @@ const fileFieldKeys = Object.entries(form.fields)
79
78
 
80
79
  import { z } from "zod";
81
80
 
82
- export const FORM_ID = "<%= form.id %>";
81
+ export const FORM_ID = <%= quote(form.id ?? 'undefined') %>;
83
82
 
84
83
  export const <%= form.pascal %>Schema = z.object({
85
84
  <% Object.entries(form.fields).forEach(([key, field]) => { -%>
86
- <%= key %>: <%= zodForField(key, field) %>,
85
+ <%= JSON.stringify(key) %>: <%= zodForField(field) %>,
87
86
  <% }); -%>
88
87
  });
89
88
 
90
89
  export type <%= form.pascal %>Data = z.infer<typeof <%= form.pascal %>Schema>;
91
90
 
91
+ /** Convert a browser form submission into the typed shape expected by Fimo. */
92
+ export function parse<%= form.pascal %>FormData(formData: FormData): <%= form.pascal %>Data {
93
+ const data: Record<string, unknown> = {};
94
+ <% Object.entries(form.fields).forEach(([key, field], index) => { -%>
95
+ <% if (field.type === 'checkbox') { -%>
96
+ data[<%= JSON.stringify(key) %>] = ['on', 'true', '1'].includes(formData.get(<%= JSON.stringify(key) %>) as string);
97
+ <% } else if (field.type === 'number') { -%>
98
+ const <%= localName(key, index) %> = formData.get(<%= JSON.stringify(key) %>);
99
+ if (<%= localName(key, index) %> !== null && <%= localName(key, index) %> !== '') data[<%= JSON.stringify(key) %>] = Number(<%= localName(key, index) %>);
100
+ <% } else { -%>
101
+ const <%= localName(key, index) %> = formData.get(<%= JSON.stringify(key) %>);
102
+ if (<%= localName(key, index) %> !== null) data[<%= JSON.stringify(key) %>] = <%= localName(key, index) %>;
103
+ <% } -%>
104
+ <% }); -%>
105
+ return <%= form.pascal %>Schema.parse(data);
106
+ }
107
+
92
108
  // @ts-ignore - meta.env is a vite feature
93
109
  const base = import.meta.env.VITE_API_URL;
94
110
  <% if (hasFileFields) { %>
@@ -135,8 +151,13 @@ async function uploadFile(file: File): Promise<string> {
135
151
  <% } %>
136
152
  export async function submit<%= form.pascal %>(data: <%= form.pascal %>Data): Promise<{
137
153
  success: boolean;
154
+ status: number;
138
155
  errors?: Record<string, string>;
139
156
  }> {
157
+ if (!FORM_ID || FORM_ID === "undefined") {
158
+ throw new Error(`Form "${FORM_ID || "unknown"}" has not been pushed. Run fimo forms push first.`);
159
+ }
160
+
140
161
  <% if (hasFileFields) { -%>
141
162
  const payload: Record<string, unknown> = { ...data };
142
163
 
@@ -144,9 +165,9 @@ export async function submit<%= form.pascal %>(data: <%= form.pascal %>Data): Pr
144
165
  await Promise.all([
145
166
  <% fileFieldKeys.forEach((key) => { -%>
146
167
  (async () => {
147
- const file = data.<%= key %>;
148
- if (file instanceof File) {
149
- payload.<%= key %> = await uploadFile(file);
168
+ const file = data[<%= JSON.stringify(key) %>];
169
+ if (typeof File !== "undefined" && file instanceof File) {
170
+ payload[<%= JSON.stringify(key) %>] = await uploadFile(file);
150
171
  }
151
172
  })(),
152
173
  <% }); -%>
@@ -160,7 +181,7 @@ export async function submit<%= form.pascal %>(data: <%= form.pascal %>Data): Pr
160
181
  body: JSON.stringify(payload),
161
182
  });
162
183
  } catch {
163
- return { success: false };
184
+ return { success: false, status: 0 };
164
185
  }
165
186
  <% } else { -%>
166
187
  let res: Response;
@@ -171,18 +192,18 @@ export async function submit<%= form.pascal %>(data: <%= form.pascal %>Data): Pr
171
192
  body: JSON.stringify(data),
172
193
  });
173
194
  } catch {
174
- return { success: false };
195
+ return { success: false, status: 0 };
175
196
  }
176
197
  <% } -%>
177
198
 
178
199
  if (res.ok) {
179
- return { success: true };
200
+ return { success: true, status: res.status };
180
201
  }
181
202
 
182
203
  if (res.status === 422) {
183
204
  const json = await res.json();
184
- return { success: false, errors: json.errors };
205
+ return { success: false, status: res.status, errors: json.errors };
185
206
  }
186
207
 
187
- return { success: false };
208
+ return { success: false, status: res.status };
188
209
  }
@@ -12,27 +12,34 @@ description: >-
12
12
  Fimo ships its skills through its CLI. `fimo-code` resolves from the project's installed `fimo` package;
13
13
  workflow skills resolve from the CLI you run. This file is only a pointer — fetch the real skill when needed.
14
14
 
15
+ If the initiating prompt supplies an exact Fimo CLI invocation prefix, preserve it for every Fimo command in
16
+ that flow. Replace `<fimo-cli>` below with that prefix; otherwise use `npx fimo@latest`. The detailed selector
17
+ rule and shorthand for the fetched workflow docs live in `fimo-cli`.
18
+
15
19
  When you are about to do Fimo work:
16
20
 
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)
21
+ 1. List what's available: `<fimo-cli> skills list`
22
+ 2. Load the relevant skill: `<fimo-cli> skills get <name>` (add `--ref <doc>` for a reference doc)
19
23
 
20
24
  Streamed output opens with the fimo version that produced it. An older project runtime is normal, so never "fix" it. Quote that line when reporting bad guidance.
21
25
 
22
26
  Reference paths mentioned in streamed skill output, such as `references/media.md`, are identifiers,
23
27
  not files in the project. Load them through the CLI, for example
24
- `npx fimo@latest skills get fimo-cli --ref media`. Do not use a filesystem read tool for them.
28
+ `<fimo-cli> skills get fimo-cli --ref media`. Do not use a filesystem read tool for them.
25
29
 
26
30
  Pick by task:
27
31
 
28
32
  - Writing code — schemas/forms, generated clients, labels, framework adapters, rendering primitives → `fimo-code`
29
- - CLI commands and workflows — push, deploy, sync, labels, domains, analytics → `fimo-cli`
33
+ - Project creation, local setup, cloning, and CLI workflows — init, push, deploy, sync, labels, domains, analytics → `fimo-cli`
30
34
  - Fimo agents — create, configure, validate, deploy, run, or inspect them → `fimo-cli` (`references/agents.md`)
31
35
  - AI agent setup — connect Claude Code, Codex, Cursor, or another agent → `fimo-cli` (`references/agent-setup.md`)
32
36
  - Project MCP setup — configure `fimo mcp` for a local agent → `fimo-cli` (`references/mcp.md`)
33
37
  - The Fimo Studio dashboard / web app UI → `fimo-studio`
34
38
  - Migrating an existing site into Fimo → `fimo-migration`
35
39
 
40
+ For project setup, load `fimo-cli` first. Its `references/init.md` decision tree distinguishes a new or empty
41
+ project, an existing Fimo project, and an external migration; load `fimo-migration` for the last path.
42
+
36
43
  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.
37
44
 
38
45
  If the project has an `AGENTS.md` (or `CLAUDE.md`), read it too — it carries project-specific context.
@@ -11,17 +11,17 @@ description: >-
11
11
 
12
12
  The `fimo` CLI is the workflow surface for Fimo. Fimo connects content, media, forms, analytics, editing, and hosting to web applications. The CLI handles project creation, content / forms / media / labels / locale workflows, deploys, collaboration, account management, Fimo agents, AI credit inspection, and AI agent setup.
13
13
 
14
- 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`.
14
+ 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 `fimo skills get fimo-code`, using the invocation prefix below.
15
15
 
16
16
  Use `fimo <command> --help` for full flag details on any command.
17
17
 
18
18
  > **Webhooks are beta.** Verify a destination with `fimo webhooks test <id> --wait` and inspect its delivery history before depending on it in production.
19
19
 
20
- ## Running the CLI: always `npx fimo@latest`
20
+ ## Running the CLI
21
21
 
22
- 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.
22
+ Use **`npx fimo@latest`** by default. If the initiating prompt supplies another Fimo CLI selector, such as `npx fimo@staging` or `npx fimo@0.14.0`, preserve that selector for every Fimo command in the same flow. Do **not** install `fimo` globally.
23
23
 
24
- The examples in this skill and its references write `fimo <command>` for brevity — mentally prefix them with `npx fimo@latest`.
24
+ The examples in this skill and its references use `fimo <command>` as shorthand. Execute them with the selected invocation above.
25
25
 
26
26
  ## Output for agents: `--json` is the stable contract
27
27
 
@@ -49,22 +49,22 @@ A project can have multiple **envs** — each is a git branch _plus_ its own DB,
49
49
  ## Quick Start
50
50
 
51
51
  ```bash
52
- npx fimo@latest login # authenticate via browser
53
- npx fimo@latest skills install # install the global Fimo skill for your AI tools
54
- 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.
55
- npx fimo@latest init my-site --starter fimo-site@1 --org <id> --yes --no-skills # opt-in content-led starter for a new project
56
- npx fimo@latest init --project-id <id> my-site # link an EXISTING project instead of creating one
57
- npx fimo@latest clone # interactively choose an existing project to clone locally
58
- cd my-site # then load skills on demand: npx fimo@latest skills get fimo-code
52
+ fimo login # authenticate via browser
53
+ fimo skills install # install the global Fimo skill for your AI tools
54
+ fimo 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.
55
+ fimo init my-site --starter fimo-site@1 --org <id> --yes --no-skills # opt-in content-led starter for a new project
56
+ fimo init --project-id <id> my-site # set up a project by ID: scaffold a newly created project or clone existing code
57
+ fimo clone # interactively choose an existing project to clone locally
58
+ cd my-site # then load skills on demand: fimo skills get fimo-code
59
59
  pnpm dev # run the app locally (use the project's PM: pnpm/npm run/yarn/bun) — your iteration loop
60
- npx fimo@latest credits # inspect the owning org's AI credit balance (read-only)
61
- npx fimo@latest history list # inspect this environment's restore points
62
- npx fimo@latest validate # run all checks + codegen; fails on missing DB labels
63
- npx fimo@latest deploy # ON-DEMAND: hosted preview / shareable link (runs validate internally)
64
- npx fimo@latest deploy --publish # ON-DEMAND: publish live (only when the developer says "ship it")
60
+ fimo credits # inspect the owning org's AI credit balance (read-only)
61
+ fimo history list # inspect this environment's restore points
62
+ fimo validate # run all checks + codegen; fails on missing DB labels
63
+ fimo deploy # ON-DEMAND: hosted preview / shareable link (runs validate internally)
64
+ fimo deploy --publish # ON-DEMAND: publish live (only when the developer says "ship it")
65
65
  ```
66
66
 
67
- The working 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), ask the developer what they want, edit, and iterate against the live localhost server. `fimo deploy` is **not** a required final step — reach for it only when the developer wants a hosted preview, a shareable link, or to go live, and only on their signal (see `references/deploy.md`).
67
+ The working 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), ask the developer what they want, edit, and iterate against the live localhost server. Outside the first-time onboarding rule below, `fimo deploy` is **not** a required final step — reach for it only when the developer wants a hosted preview, a shareable link, or to go live, and only on their signal (see `references/deploy.md`).
68
68
 
69
69
  `fimo validate` is the single entrypoint for "prove this project is ready" — it covers schema/form codegen, route metadata checks, lint, and missing label checks for `i18n.defaultLocale` from `.fimo/config.json` (fallback: `en`). Use `fimo labels set` / `set-many` to create or update label values in the DB. The underlying phases are also available individually under the hidden `fimo scripts` namespace for advanced/debug use.
70
70
 
@@ -73,13 +73,13 @@ The working loop is local: run the app with the project's package-manager `dev`
73
73
  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.
74
74
 
75
75
  - "Create a new Fimo project / scaffold a site / start a new website / add the opt-in content starter / link an existing project locally" → `references/init.md`
76
- - "Add a content type / blog / products / pages / CMS" → `references/content.md` (workflow) **+ run `npx fimo@latest skills get fimo-code --ref content/schema` and load the detected framework reference**
77
- - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ run `npx fimo@latest skills get fimo-code --ref forms` for the JSON spec and generated client**
76
+ - "Add a content type / blog / products / pages / CMS" → `references/content.md` (workflow) **+ run `fimo skills get fimo-code --ref content/schema` and load the detected framework reference**
77
+ - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ run `fimo skills get fimo-code --ref forms` for the JSON spec and generated client**
78
78
  - "View form submissions / who filled out the contact form / inspect what users sent / how many signups" → `references/forms.md` § Reading submissions
79
- - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ run `npx fimo@latest skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
80
- - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ run `npx fimo@latest skills get fimo-code --ref assets` for the `FimoMedia` shape if you'll plug the result into UI**
81
- - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ run `npx fimo@latest skills get fimo-code --ref labels` and load the detected framework reference**
82
- - "Enable locales / configure default locale / integrate an existing locale system" → `references/locales.md` **+ run `npx fimo@latest skills get fimo-code --ref locales` and load the detected framework locale reference**
79
+ - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
80
+ - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape if you'll plug the result into UI**
81
+ - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ run `fimo skills get fimo-code --ref labels` and load the detected framework reference**
82
+ - "Enable locales / configure default locale / integrate an existing locale system" → `references/locales.md` **+ run `fimo skills get fimo-code --ref locales` and load the detected framework locale reference**
83
83
  - "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`
84
84
  - "Deploy / publish / go live / push my changes" → `references/deploy.md`
85
85
  - "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`
@@ -112,10 +112,11 @@ Load the matching reference when the user's request fires its trigger. Recipes t
112
112
  These fire at specific moments in the project lifecycle. **Surface them proactively** rather than waiting for the user to ask:
113
113
 
114
114
  - **Right after `fimo init`** → `cd` into the new directory, read the project's `AGENTS.md` (or `CLAUDE.md` for Claude Code), run `fimo describe --json`, then load `fimo-code` and only the task/framework references it routes to. The rules file came into existence mid-session and may not be auto-loaded by the harness. See `references/init.md` § Load the project context.
115
+ - **When `fimo init` created or scaffolded a new project (create-new path, including a Studio-supplied `--project-id`)** → after init and context loading succeed, run the single first-preview deploy and return the preview and dashboard links — see `references/init.md` § Create the first hosted preview. That deploy is also the sandbox warm-up; never run a separate warm-up deploy. Skip it only if the user explicitly said not to deploy. Linking a project with existing code and migrations keep their own approval rules.
115
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`.
116
- - **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.
117
- - **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`.
118
- - **Optional, if you already know a deploy is coming** → warm the sandbox early with `fimo deploy -m "chore: init" &` in the background so the one-time ~15-30s provision + dep install happens while you work and the real deploy lands warm (~4-10s). This is a perf optimization, not a requirement. See `references/deploy.md` § Warm the sandbox early in a session.
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. This localhost server with live reload is your iteration loop — edit, show, repeat. No deploy is needed to see local changes. If the initiating request did not say what to build, ask the developer — after the first preview on the create-new path, never as a blocker before initializing.
118
+ - **When a user-visible unit of work looks done outside first-time onboarding** → **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 ordinary edits on your own. See `references/deploy.md`.
119
+ - **Optional, outside new-project onboarding (its first preview already warms the sandbox), if you already know a deploy is coming** → warm the sandbox early with `fimo deploy -m "chore: init" &` in the background so the one-time ~15-30s provision + dep install happens while you work and the real deploy lands warm (~4-10s). This is a perf optimization, not a requirement. See `references/deploy.md` § Warm the sandbox early in a session.
119
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.
120
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`.
121
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`.
@@ -127,7 +128,7 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
127
128
 
128
129
  - **Editing `.fimo/project.json`** — read-only; it's the link between local and remote project. Treat as a generated file.
129
130
  - **Treating `fimo deploy` as the working loop or a required final step** — the loop is local (`pnpm dev` etc.). Deploy commits + pushes + round-trips the sandbox; it's for hosted previews / going live, on-demand. Iterate locally and deploy at logical breakpoints. See `references/deploy.md`.
130
- - **Deploying without the developer asking or confirming** — offer, then wait for their yes. Don't auto-deploy after finishing an edit.
131
+ - **Deploying without the developer asking or confirming** — new-project onboarding authorizes exactly one automatic first preview deploy (unless the user said not to deploy); every other deploy is offer-then-confirm. Don't auto-deploy after finishing an ordinary edit.
131
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`.
132
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".
133
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.
@@ -1,7 +1,5 @@
1
1
  # Account, authentication, and organizations
2
2
 
3
- > **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
4
-
5
3
  The `fimo` CLI authenticates against the Fimo platform via a browser-based flow. Credentials are stored **per backend** at `~/.config/fimo/credentials/<host>-<hash>.json` (so a localhost dev backend and production don't clobber each other) and used by every CLI command that talks to the Fimo API.
6
4
 
7
5
  ## Sign in
@@ -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.
@@ -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
 
@@ -61,7 +59,7 @@ SPAs; Astro's `fimo()` integration lives in `references/frameworks/astro.md`.
61
59
 
62
60
  ## Warm the sandbox early in a session (optional)
63
61
 
64
- 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.
65
63
 
66
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).
67
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.