fimo 2.11.0-staging.1 → 2.11.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 (28) hide show
  1. package/assets/skills/fimo-cli/references/content.md +1 -0
  2. package/assets/skills/fimo-cli/references/domains.md +10 -5
  3. package/assets/skills/fimo-cli/references/media.md +9 -1
  4. package/assets/skills/fimo-code/references/best-practices/next.md +1 -1
  5. package/assets/skills/fimo-code/references/content/schema.md +5 -1
  6. package/assets/skills/fimo-code/references/forms.md +2 -3
  7. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +4 -1
  8. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +2 -0
  9. package/assets/skills/fimo-code/references/frameworks/next/seo.md +2 -2
  10. package/assets/skills/fimo-code/references/frameworks/next.md +3 -1
  11. package/assets/skills/fimo-code/references/frameworks/react-router.md +1 -1
  12. package/assets/skills/fimo-code/references/frameworks/seo-head.md +1 -0
  13. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +3 -1
  14. package/assets/skills/fimo-code/references/frameworks/vite-react.md +1 -1
  15. package/assets/skills/fimo-studio/references/custom-domains.md +5 -4
  16. package/dist/cli/bundle.json +1 -1
  17. package/dist/cli/index.js +288 -303
  18. package/dist/scripts/sync-schemas.js +1 -0
  19. package/dist/scripts/validate-schemas.js +8 -1
  20. package/package.json +16 -16
  21. package/templates/astro/package.json +3 -3
  22. package/templates/nextjs/package.json +4 -4
  23. package/templates/nextjs/src/app/globals.css +1 -7
  24. package/templates/react-router/package.json +5 -5
  25. package/templates/react-router/src/index.css +1 -8
  26. package/templates/sveltekit/package.json +3 -3
  27. package/templates/vite/package.json +5 -5
  28. package/templates/vite/src/index.css +1 -7
@@ -30,6 +30,7 @@ fimo singles get <Type> [--locale es]
30
30
  fimo singles update <Type> [--locale es] (--body '<json>' | --file <path> | --stdin)
31
31
  ```
32
32
 
33
+ - Before you write content of a type, read `fimo schemas get <Type>`. The `description` of the schema and of each field are the rules for that content: make what you write meet them.
33
34
  - `--body` is always a `{"data":{...}}` envelope, also for `singles update`. Put `slug` inside `data`.
34
35
  - `entries create` and `entries update` require exactly one of `--body '<json>'`, `--file <path>`, or `--stdin`. Files and stdin use the same `{"data":{...}}` envelope.
35
36
  - Before you write a body, load fimo-code `content/richtext`. Rich text is Tiptap JSON (`{"type":"doc","content":[...]}`), a reference is `{"id":"<id>"}`, and media has its own shape.
@@ -2,11 +2,11 @@
2
2
 
3
3
  `fimo domains` manages every site address. There are three kinds. Find out which one the user wants before you run a command:
4
4
 
5
- | User says | Kind | Commands | Plan |
6
- | ------------------------------------------ | ----------------------------------------- | ----------------------------------- | ------------------------------------------------------------- |
7
- | "Keep the free address, but make it nicer" | default URL `<slug>.fimo.site` (one each) | `rename-default`, `suggest-default` | every plan, no DNS |
8
- | "I own example.com" | custom domain, attached through DNS | `add`, `refresh`, `remove` | Starter or higher |
9
- | "I want to buy a domain" | registered domain, bought through Fimo | `search`, `pricing`, `buy`, `owned` | purchase must be enabled; `buy` and `owned` need an org admin |
5
+ | User says | Kind | Commands | Plan |
6
+ | ------------------------------------------ | ----------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------- |
7
+ | "Keep the free address, but make it nicer" | default URL `<slug>.fimo.site` (one each) | `rename-default`, `suggest-default` | every plan, no DNS |
8
+ | "I own example.com" | custom domain, attached through DNS | `add`, `refresh`, `primary`, `redirect`, `serve`, `remove` | Starter or higher |
9
+ | "I want to buy a domain" | registered domain, bought through Fimo | `search`, `pricing`, `buy`, `owned` | purchase must be enabled; `buy` and `owned` need an org admin |
10
10
 
11
11
  If the user is not sure, start with `fimo domains suggest-default`: it is free and takes one step. `fimo domains list --json` shows the default URL and every custom domain. Run `fimo domains <command> --help` for flags.
12
12
 
@@ -38,6 +38,8 @@ Choosing the slug does not publish the site. The URL resolves after the first su
38
38
  fimo domains add <hostname> [--redirect-www] [--wait [10m]] --json # --redirect-www: the apex redirects to www; bare --wait = 5 min (Ns or Nm)
39
39
  fimo domains refresh <hostname> # check DNS and SSL again; it polls by default
40
40
  fimo domains primary <hostname> --json # the address search engines see; list marks it (primary)
41
+ fimo domains redirect <hostname> <target> [--status 308] --json # send this domain's visitors to another domain of the site
42
+ fimo domains serve <hostname> --json # stop redirecting; the domain serves the site again
41
43
  fimo domains remove <hostname> --yes
42
44
  ```
43
45
 
@@ -45,6 +47,9 @@ fimo domains remove <hostname> --yes
45
47
  - After the user sets DNS, run `refresh` once; it polls until SSL is active or the wait ends (`--no-wait` prints one status). Read the returned status: the end of a wait does not prove the domain works. Do not run `refresh` in a loop. DNS can take from minutes to 48 hours.
46
48
  - In an interactive setup, omit `--wait` on `add` so the user gets the records at once. In CI, `--wait` polls until the domain is verified or the wait ends.
47
49
  - The primary domain is the canonical host of the published site. Fimo picks the oldest serving domain until the user chooses one with `primary`; the domain must be active with its certificate issued, else `DOMAIN_NOT_SERVING`. The canonical links change only on the next publish, so tell the user to publish again.
50
+ - Each custom domain serves the site or redirects to another domain of the same site. `redirect` defaults to 307 (temporary); use 308 or 301 only when the user says the move is permanent. `list` shows each destination (`-> 308 www.acme.com` or `serves`). The target must serve and have its certificate issued, and redirects never chain: a refusal comes back with its code (`REDIRECT_TARGET_REDIRECTS`, `REDIRECT_SOURCE_IS_TARGET`, `REDIRECT_TARGET_NOT_ACTIVE`, `REDIRECT_TARGET_NOT_IN_PROJECT`, `INVALID_REDIRECT_STATUS`), and `add --redirect-www` gets `REDIRECT_TARGET_REDIRECTS` when the site's `www` already redirects elsewhere. Tell the user what it says; never point other domains elsewhere on your own.
51
+ - `remove` also removes every domain that redirects to the one removed. Run it once without `--yes`: in a run without prompts it refuses with `NON_INTERACTIVE_REFUSAL`, and its hint names those domains. Show that list to the user, and pass `--yes` only after they agree to remove them all.
52
+ - A redirect on the primary domain, `serve` on a domain that becomes primary, or removing the primary domain moves the primary domain; the result's hint says so. Tell the user to publish again so canonical links use it.
48
53
  - A Free plan gets a `PAYWALL` 403 with the billing URL: give that URL to the user.
49
54
  - `remove` and `buy` ask for confirmation: pass `--yes` in a run without prompts, after the user agreed.
50
55
 
@@ -69,7 +69,15 @@ fimo image edit \
69
69
  --aspect-ratio 16:9
70
70
  ```
71
71
 
72
- Repeat `--images` to provide up to five references.
72
+ Repeat `--images` to provide up to five references. To make a new image that matches the ones a content field already holds, pass two or three of them and say what to draw:
73
+
74
+ ```bash
75
+ fimo image edit \
76
+ --prompt "a new cover in exactly the style of these images: a lighthouse at night" \
77
+ --images <asset-id-or-url> \
78
+ --images <asset-id-or-url> \
79
+ --aspect-ratio 16:9
80
+ ```
73
81
 
74
82
  ### Remove a background
75
83
 
@@ -12,8 +12,8 @@ Load `references/frameworks/next.md` and the matching router reference first. In
12
12
  ## Instant Navigations
13
13
 
14
14
  ```ts
15
- import type { NextConfig } from 'next';
16
15
  import { withFimo } from 'fimo-next/config';
16
+ import type { NextConfig } from 'next';
17
17
 
18
18
  const nextConfig: NextConfig = {
19
19
  cacheComponents: true,
@@ -36,6 +36,10 @@ Design schemas around what content editors need to see and change in Fimo Studio
36
36
 
37
37
  Keep routing, layout, computed values, and external system data in code. Load `fimo-cli/references/content.md` for the Single and collection write workflows.
38
38
 
39
+ ## Rules for this content
40
+
41
+ Use `description`, at the root for the whole type or on a field, to say what good content looks like. Fimo agents follow it when they write or generate that content, and Studio shows it to editors. A site-wide rule belongs in the project knowledge.
42
+
39
43
  ## Group fields in Studio
40
44
 
41
45
  Use optional top-level `groups` when an entry has meaningful editing areas, such as Overview, Tickets, SEO, or Scheduling. They work best for longer forms where editors regularly work on one area at a time. Usually skip groups for short forms, one-field groups, or vague buckets such as General and Other. Prefer two to five groups organized around editor tasks. This is guidance, not a schema limit.
@@ -155,7 +159,7 @@ Use `targets: ["Post", "Video"]` instead of `target` only for genuinely polymorp
155
159
 
156
160
  After writing or changing `src/schemas/<Uid>.json`, run `fimo schemas push <Uid>` before building against that schema. The push validates the JSON, generates its public clients, and updates the linked environment.
157
161
 
158
- - Optional additions and label changes preserve entries.
162
+ - Optional additions and label or `description` changes preserve entries.
159
163
  - Required additions need a valid default when existing objects require backfill.
160
164
  - Removing a field or block variant removes only that value.
161
165
  - String/text changes and safe primitive conversions preserve values.
@@ -47,9 +47,7 @@ After `fimo forms push` and the next validation/build, `src/forms/{name}.ts` exi
47
47
 
48
48
  ```ts
49
49
  export const FORM_ID = '<uuid>';
50
- export const ContactUsSchema = z.object({
51
- /* fields */
52
- });
50
+ export const ContactUsSchema = z.object({/* fields */});
53
51
  export type ContactUsData = z.infer<typeof ContactUsSchema>;
54
52
  export function parseContactUsFormData(formData: FormData): ContactUsData;
55
53
  export function submitContactUs(
@@ -72,6 +70,7 @@ Always import the generated module. Keep the native form and pending/error state
72
70
 
73
71
  ```tsx
74
72
  import { useState } from 'react';
73
+
75
74
  import { ContactUsSchema, parseContactUsFormData, submitContactUs } from '@/forms/contact-us';
76
75
  import type { ContactUsData } from '@/forms/contact-us';
77
76
 
@@ -31,6 +31,7 @@ Server Components may read generated clients directly. Omit `locale` to use the
31
31
 
32
32
  ```tsx
33
33
  import { createFimo, RichText, Text } from 'fimo-next';
34
+
34
35
  import { content } from '@/schemas';
35
36
 
36
37
  export const revalidate = 60;
@@ -57,8 +58,9 @@ Static builds read Fimo through the same server connection (linked project + bra
57
58
  Use normal Next request APIs and pass the resulting locale/query values to Fimo:
58
59
 
59
60
  ```tsx
60
- import { headers } from 'next/headers';
61
61
  import { createFimo, Text } from 'fimo-next';
62
+ import { headers } from 'next/headers';
63
+
62
64
  import { content } from '@/schemas';
63
65
 
64
66
  export const dynamic = 'force-dynamic';
@@ -87,6 +89,7 @@ Client Components use the generated `.client` module and `fimo-next/client`:
87
89
  'use client';
88
90
 
89
91
  import { Text, useLabels } from 'fimo-next/client';
92
+
90
93
  import * as Article from '@/schemas/Article.client';
91
94
 
92
95
  export function FeaturedArticles() {
@@ -63,6 +63,7 @@ export default function Page({ article: serialized }: InferGetStaticPropsType<ty
63
63
  ```tsx
64
64
  import { getLabels } from 'fimo-next';
65
65
  import type { GetServerSideProps, InferGetServerSidePropsType } from 'next';
66
+
66
67
  import * as Article from '@/schemas/Article';
67
68
  import * as ArticleClient from '@/schemas/Article.client';
68
69
 
@@ -87,6 +88,7 @@ Interactive components import hooks and primitives from the client surfaces:
87
88
 
88
89
  ```tsx
89
90
  import { Text, useLabels } from 'fimo-next/client';
91
+
90
92
  import * as Article from '@/schemas/Article.client';
91
93
 
92
94
  export function SearchResults() {
@@ -6,8 +6,8 @@ rendering mode. Fimo supplies editable values, not a router or a merge policy.
6
6
  ## Read, resolve, convert
7
7
 
8
8
  ```ts
9
- import { getFimoSeo } from 'fimo/seo/server';
10
9
  import { toNextMetadata, toNextViewport } from 'fimo-next/seo';
10
+ import { getFimoSeo } from 'fimo/seo/server';
11
11
 
12
12
  // Root layout: global defaults, never implicitly Home.
13
13
  export const generateMetadata = () => toNextMetadata(getFimoSeo());
@@ -60,8 +60,8 @@ For bundled data or Edge, supply config yourself to the pure resolver instead
60
60
  of importing the Node reader:
61
61
 
62
62
  ```ts
63
- import { resolveSeoForPath } from 'fimo/seo';
64
63
  import { toNextMetadata } from 'fimo-next/seo';
64
+ import { resolveSeoForPath } from 'fimo/seo';
65
65
 
66
66
  const seo = resolveSeoForPath(pathname, publicSeoConfig, { article });
67
67
  const metadata = toNextMetadata(seo);
@@ -50,8 +50,8 @@ Keep the generated `FimoProvider` and `withFimo` integration to render Fimo
50
50
  Preview in Fimo Studio and enable Edit Mode. Wrap the existing Next config once:
51
51
 
52
52
  ```ts
53
- import type { NextConfig } from 'next';
54
53
  import { withFimo } from 'fimo-next/config';
54
+ import type { NextConfig } from 'next';
55
55
 
56
56
  const nextConfig: NextConfig = {};
57
57
  export default withFimo(nextConfig);
@@ -124,6 +124,7 @@ Server Components, route handlers, `getStaticProps`, and `getServerSideProps` im
124
124
 
125
125
  ```ts
126
126
  import { createFimo, getLabels, Text } from 'fimo-next';
127
+
127
128
  import { content } from '@/schemas';
128
129
 
129
130
  const fimo = createFimo({ content, locale });
@@ -139,6 +140,7 @@ Client Components import from `fimo-next/client` and generated `.client` modules
139
140
  'use client';
140
141
 
141
142
  import { Text, useLabels } from 'fimo-next/client';
143
+
142
144
  import * as Article from '@/schemas/Article.client';
143
145
 
144
146
  export function ArticleList() {
@@ -21,8 +21,8 @@ Keep the project's React Router Vite plugin explicit:
21
21
 
22
22
  ```ts
23
23
  import { reactRouter } from '@react-router/dev/vite';
24
- import { defineConfig } from 'vite';
25
24
  import { fimo } from 'fimo-react-router/vite';
25
+ import { defineConfig } from 'vite';
26
26
 
27
27
  export default defineConfig({
28
28
  plugins: [reactRouter(), fimo({ sitemap: true })],
@@ -6,6 +6,7 @@ sets framework caching. Use the installed package's exports.
6
6
 
7
7
  ```ts
8
8
  import { resolveSeoForPath, toSeoHead, type FimoSEO } from 'fimo/seo';
9
+
9
10
  import config from '../../.fimo/config.json'; // adjust to the actual file
10
11
 
11
12
  const resolved = resolveSeoForPath(pathname, config, { article });
@@ -59,6 +59,7 @@ SvelteKit's request-aware `fetch`:
59
59
  ```ts
60
60
  // src/routes/articles/+page.server.ts
61
61
  import { createFimo } from 'fimo-sveltekit';
62
+
62
63
  import { content } from '../../../schemas';
63
64
 
64
65
  export async function load(event) {
@@ -122,6 +123,7 @@ overrides, and returns its complete `seoHead` using `toSeoHead`.
122
123
  ```ts
123
124
  // src/routes/+layout.server.ts, or a content page's +page.server.ts
124
125
  import { resolveSeoForPath, toSeoHead } from 'fimo/seo';
126
+
125
127
  import config from '../../.fimo/config.json';
126
128
 
127
129
  export function load({ url }) {
@@ -176,8 +178,8 @@ Use a `+page.server` action so SvelteKit owns the request and redirect. Pass its
176
178
  event to `createFimoFormClient` and use the generated parser/helper:
177
179
 
178
180
  ```ts
179
- import { createFimoFormClient } from 'fimo-sveltekit';
180
181
  import { parseContactUsFormData, submitContactUs } from '$lib/forms/contact-us';
182
+ import { createFimoFormClient } from 'fimo-sveltekit';
181
183
 
182
184
  export const actions = {
183
185
  default: async (event) => {
@@ -13,8 +13,8 @@ Add Fimo's Vite plugins without replacing the application's existing plugins:
13
13
 
14
14
  ```ts
15
15
  import react from '@vitejs/plugin-react';
16
- import { defineConfig } from 'vite';
17
16
  import { fimo } from 'fimo-react-router/vite';
17
+ import { defineConfig } from 'vite';
18
18
 
19
19
  export default defineConfig({
20
20
  plugins: [react(), ...fimo({ seo: true })],
@@ -1,6 +1,6 @@
1
1
  ## Also available via CLI
2
2
 
3
- If you're driving Fimo from the terminal, the equivalent commands are `fimo domains add`, `fimo domains refresh`, `fimo domains primary`, and `fimo domains remove`. The default URL (the `<slug>.fimo.site` subdomain) is managed with `fimo domains rename-default` and `fimo domains suggest-default` — both free on every plan. See the `fimo-cli` skill's `references/domains.md`. Full docs: https://fimo.ai/docs/deploy/custom-domains.
3
+ If you're driving Fimo from the terminal, the equivalent commands are `fimo domains add`, `fimo domains refresh`, `fimo domains primary`, `fimo domains redirect`, `fimo domains serve`, and `fimo domains remove`. The default URL (the `<slug>.fimo.site` subdomain) is managed with `fimo domains rename-default` and `fimo domains suggest-default` — both free on every plan. See the `fimo-cli` skill's `references/domains.md`. Full docs: https://fimo.ai/docs/deploy/custom-domains.
4
4
 
5
5
  ## Before You Start
6
6
 
@@ -14,7 +14,7 @@ If you're driving Fimo from the terminal, the equivalent commands are `fimo doma
14
14
  1. Open **Settings**.
15
15
  2. Select **Domains** (globe icon).
16
16
  3. Click the **Add domain** button (+ icon) in the top-right of the panel. (When domain purchase is enabled, a **Buy domain** button with a shopping-cart icon sits next to it.)
17
- 4. A drawer opens. Type or select a domain — you can enter a subdomain or an apex domain. Domains your organization already owns appear in an autocomplete dropdown, and Fimo checks availability live as you type. For an apex domain, a checkbox lets you also redirect it to the `www` subdomain (on by default). Confirm to add it.
17
+ 4. A drawer opens. Type or select a domain — you can enter a subdomain or an apex domain. Domains your organization already owns appear in an autocomplete dropdown, and Fimo checks availability live as you type. For an apex domain, a checkbox lets you also redirect it to the `www` subdomain (on by default), unless the site's `www` already redirects elsewhere; for a free `www` domain whose apex is free, the checkbox adds the apex too and redirects it to the `www`. When the site already has a primary domain, the drawer asks where the new domain goes: **Redirect to another domain** (preselected: the primary domain, with 307) or **Serve the site**. With the apex and `www` pair, **Serve the site** keeps the apex redirecting to the `www`, and a redirect sends both straight to the chosen domain. Confirm to add it.
18
18
  5. A DNS table appears showing the record(s) you need to add. For a **subdomain** it's a single CNAME record:
19
19
  - **Type**: CNAME
20
20
  - **Name**: The subdomain part (e.g., "blog") — has a copy button
@@ -42,8 +42,9 @@ Each domain shows a small status icon with a tooltip on hover (there is no inlin
42
42
 
43
43
  - **Open your domain**: Click the three-dot menu on a domain and select "Open URL" to visit it in a new tab.
44
44
  - **See the primary domain**: The domain search engines see carries a **Primary** badge. Until you choose one, it is the first domain you added that is active with its certificate issued.
45
- - **Change the primary domain**: Click the three-dot menu on another domain and select **Make primary**. On the redirecting half of an apex and `www` pair, confirm the new direction: Fimo keeps both domains connected and permanently redirects the other hostname while preserving its path and query string. On any other domain, confirm the choice: your other domains keep serving the site. The hostname must be active with its certificate issued first; otherwise the action is disabled or Studio asks you to retry once the certificate is ready. Publish again so canonical links use the new primary domain.
46
- - **Remove a domain**: Click the three-dot menu and select "Remove". A confirmation dialog appears before deleting.
45
+ - **Change the primary domain**: Click the three-dot menu on another domain and select **Make primary**. On the redirecting half of an apex and `www` pair, confirm the new direction: Fimo keeps both domains connected and permanently redirects the other hostname while preserving its path and query string. On any other domain, confirm the choice: your other domains keep serving the site. The hostname must be active with its certificate issued first; until then the menu does not offer **Make primary**, or Studio asks you to retry once the certificate is ready. Publish again so canonical links use the new primary domain.
46
+ - **Redirect a domain or make it serve again**: Click the three-dot menu and select **Edit**. Choose **Serve the site**, or **Redirect to another domain** with a target (only domains of this site that serve the site, primary first) and a status: 308 or 301 (permanent), 307 or 302 (temporary). Each row shows its destination, for example `308 www.acme.com`, or "Serves the site". A domain other domains redirect to cannot redirect itself; the editor says which domains to point elsewhere first.
47
+ - **Remove a domain**: Click the three-dot menu and select "Remove". A confirmation dialog appears before deleting. When other domains redirect to it, the dialog lists them and the button reads **Remove N domains**: they are removed too.
47
48
  - **Refresh status**: Click the refresh button (circular arrow) to re-check DNS propagation.
48
49
 
49
50
  ## Troubleshooting
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-11-04T12:44:55.412Z",
4
+ "bundledAt": "2026-11-05T07:39:40.282Z",
5
5
  "cliVersion": "2.10.3",
6
6
  "external": [
7
7
  "oxc-parser",