fimo 2.2.0-staging.1 → 2.2.0-staging.10

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 (63) hide show
  1. package/README.md +3 -2
  2. package/assets/agent-templates/_default/config.yaml +1 -0
  3. package/assets/agent-templates/broken-link-sweeper/config.yaml +1 -0
  4. package/assets/agent-templates/content-translator/config.yaml +1 -0
  5. package/assets/agent-templates/post-deploy-check/config.yaml +1 -0
  6. package/assets/agent-templates/seo-audit/config.yaml +1 -0
  7. package/assets/skills/fimo-cli/SKILL.md +4 -4
  8. package/assets/skills/fimo-cli/references/agents.md +2 -1
  9. package/assets/skills/fimo-cli/references/assets.md +4 -1
  10. package/assets/skills/fimo-cli/references/content.md +3 -3
  11. package/assets/skills/fimo-cli/references/deploy.md +2 -2
  12. package/assets/skills/fimo-cli/references/forms.md +3 -1
  13. package/assets/skills/fimo-cli/references/history.md +1 -0
  14. package/assets/skills/fimo-cli/references/init.md +30 -39
  15. package/assets/skills/fimo-cli/references/schedules.md +4 -2
  16. package/assets/skills/fimo-cli/references/webhooks.md +2 -0
  17. package/assets/skills/fimo-code/references/frameworks/next.md +4 -1
  18. package/assets/skills/fimo-code/references/frameworks/react-router.md +4 -3
  19. package/assets/skills/fimo-studio/references/preview-and-responsive.md +4 -1
  20. package/assets/skills/fimo-studio/references/visual-editing.md +9 -1
  21. package/dist/build/astro/config.js +2 -1
  22. package/dist/build/vite/plugins/preview-health.d.ts +4 -0
  23. package/dist/build/vite/plugins/preview-health.js +40 -0
  24. package/dist/cli/bundle.json +1 -1
  25. package/dist/cli/index.js +112 -113
  26. package/dist/runtime/content/client/collection-core.js +3 -2
  27. package/dist/runtime/content/client/core-types.d.ts +4 -3
  28. package/dist/runtime/content/client/internal.d.ts +2 -0
  29. package/dist/runtime/content/client/internal.js +54 -25
  30. package/dist/runtime/content/client/singleton-core.js +2 -1
  31. package/dist/runtime/content/index.d.ts +1 -1
  32. package/dist/runtime/content/index.js +1 -1
  33. package/dist/runtime/primitives/lib/index.d.ts +1 -1
  34. package/dist/runtime/primitives/lib/index.js +1 -1
  35. package/dist/runtime/primitives/lib/primitives.d.ts +24 -5
  36. package/dist/runtime/primitives/lib/primitives.js +69 -16
  37. package/dist/runtime/primitives/lib/template.js +2 -2
  38. package/dist/runtime/templates.d.ts +8 -2
  39. package/dist/runtime/templates.js +34 -8
  40. package/package.json +13 -9
  41. package/templates/astro/package.json +2 -2
  42. package/templates/nextjs/AGENTS.md +1 -1
  43. package/templates/nextjs/package.json +4 -4
  44. package/templates/react-router/.fimo/config.json +1 -2
  45. package/templates/react-router/AGENTS.md +1 -1
  46. package/templates/react-router/package.json +4 -4
  47. package/templates/sveltekit/package.json +2 -2
  48. package/templates/vite/package.json +4 -4
  49. package/assets/starters/fimo-site/manifest.json +0 -64
  50. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/GOAL.md +0 -8
  51. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
  52. package/assets/starters/fimo-site/template/.fimo/agents/content-guide/config.yaml +0 -9
  53. package/assets/starters/fimo-site/template/.fimo/agents/site-review/GOAL.md +0 -14
  54. package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -3
  55. package/assets/starters/fimo-site/template/.fimo/agents/site-review/config.yaml +0 -9
  56. package/assets/starters/fimo-site/template/src/forms/contact.json +0 -14
  57. package/assets/starters/fimo-site/template/src/forms/contact.ts +0 -46
  58. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +0 -193
  59. package/assets/starters/fimo-site/template/src/pages/Index.tsx +0 -27
  60. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +0 -191
  61. package/assets/starters/fimo-site/template/src/schemas/HomePage.json +0 -28
  62. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +0 -29
  63. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +0 -64
package/README.md CHANGED
@@ -27,9 +27,10 @@ Run the CLI with `npx` — no global install, always the latest:
27
27
 
28
28
  ```bash
29
29
  npx fimo@latest login
30
- npx fimo@latest init my-site # default React Router scaffold
30
+ # default Next.js App Router scaffold
31
+ npx fimo@latest init my-site
32
+ # or: npx fimo@latest init my-react-site --framework react-router
31
33
  # or: npx fimo@latest init my-astro-site --framework astro
32
- # or: npx fimo@latest init my-next-site --framework nextjs
33
34
  # or: npx fimo@latest init my-svelte-site --framework sveltekit
34
35
  cd my-site
35
36
  ```
@@ -2,5 +2,6 @@
2
2
  # See https://fimo.dev/docs/agents/bundle for the full reference.
3
3
  version: 1
4
4
  description: 'A new Fimo agent. Edit this tagline to describe what it does.'
5
+ model: openai/gpt-5.6-luna
5
6
  triggers:
6
7
  - type: manual
@@ -1,5 +1,6 @@
1
1
  version: 1
2
2
  description: 'Crawl the published site and flag broken outbound links in a weekly report.'
3
+ model: openai/gpt-5.6-luna
3
4
 
4
5
  runtime:
5
6
  cloud: true
@@ -1,5 +1,6 @@
1
1
  version: 1
2
2
  description: 'Translate CMS content into the project locales whenever an entry is published.'
3
+ model: openai/gpt-5.6-luna
3
4
  data_sources:
4
5
  - main
5
6
 
@@ -1,5 +1,6 @@
1
1
  version: 1
2
2
  description: 'Probe routes and inspect logs after a deploy; report any issues to email recipients.'
3
+ model: openai/gpt-5.6-luna
3
4
  data_sources:
4
5
  - prod
5
6
 
@@ -1,5 +1,6 @@
1
1
  version: 1
2
2
  description: "Audit the project's pages for SEO health and write a markdown report."
3
+ model: openai/gpt-5.6-luna
3
4
  # Read from main env. Switch to prod when running the audit against the
4
5
  # live site (M13 keeps data_sources here so M16's sandbox adapter can
5
6
  # bind the right Fimo API base URL).
@@ -52,7 +52,7 @@ A project can have multiple **Branches** — each is a git branch _plus_ its own
52
52
  fimo login # authenticate via browser
53
53
  fimo skills install # install the global Fimo skill for your AI tools
54
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
55
+ fimo init my-react-site --framework react-router --org <id> --yes --no-skills # canonical React Router template
56
56
  fimo init --project-id <id> my-site # set up a project by ID: scaffold a newly created project or clone existing code
57
57
  fimo clone # interactively choose an existing project to clone locally
58
58
  cd my-site # then load skills on demand: fimo skills get fimo-code
@@ -64,6 +64,8 @@ fimo deploy # ON-DEMAND: hosted project previ
64
64
  fimo deploy --publish # ON-DEMAND: publish live (only when the developer says "ship it")
65
65
  ```
66
66
 
67
+ New projects use the Next.js App Router template by default. Fimo's canonical React Router template is selected explicitly with `--framework react-router`; use `--framework vite` for a React SPA.
68
+
67
69
  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 project preview or to go live, and only on their signal (see `references/deploy.md`).
68
70
 
69
71
  `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.
@@ -76,7 +78,7 @@ Keep `fimo validate --json` at the front of the project's `build` script, which
76
78
 
77
79
  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.
78
80
 
79
- - "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`
81
+ - "Create a new Fimo project / scaffold a site / start a new website / link an existing project locally" → `references/init.md`
80
82
  - "Add a content type / blog / products / content schemas / CMS" → `references/content.md` (workflow) **+ run `fimo skills get fimo-code --ref content/schema` and load the detected framework reference**
81
83
  - "Declare Pages routes / configure Pages sources or route params / control what Studio shows for a route" → `references/pages.md`
82
84
  - "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**
@@ -140,8 +142,6 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
140
142
  - **Running `fimo deploy` just to get the current preview URL** — that's a commit + push + sandbox sync when only destination resolution is needed. Use `fimo preview url` instead. See `references/preview.md`.
141
143
  - **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".
142
144
  - **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.
143
- - **Using a starter on an existing project** — `--starter` is create-new only. Keep `--project-id` flows blank and use explicit content/form/label commands when changing an existing project.
144
- - **Treating a starter as a permanent demo tenant** — starters are opt-in seed data in the new project, not a global default. Keep starter agents manual-only; do not add schedules or webhooks unless the project owner explicitly asks for automation.
145
145
  - **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.
146
146
  - **Adding another deploy tool (Vercel, Netlify, Cloudflare Pages)** — Fimo handles deploys; don't bolt another platform on.
147
147
  - **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.
@@ -40,6 +40,7 @@ fimo agents secrets remove <name> <KEY> [-C <dir>]
40
40
 
41
41
  - **`list-templates`** — list the bundled starter templates with the first line of each template's `GOAL.md` as a summary. Ships with the CLI binary; no API call. The five bundled templates are `_default`, `seo-audit`, `content-translator`, `broken-link-sweeper`, `post-deploy-check`.
42
42
  - **`create <name>`** — scaffold `.fimo/agents/<name>/` from a template (default `_default`, a minimal valid bundle with a manual trigger). `--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/project.json` or legacy `.fimo.settings.json`) and errors out cleanly otherwise, so it never leaks an agent bundle into a stray cwd. If the template declares capabilities, an install-consent flow runs after the copy (`--quiet` skips it; critical caps still abort).
43
+ - Every generated `config.yaml` includes `model: openai/gpt-5.6-luna`. Change that top-level value to another supported Fimo text model when needed; bundles without `model` keep the Luna fallback. Deploy after changing it because cloud runs use the deployed bundle.
43
44
  - **`list`** — list the agents declared under `<project>/.fimo/agents/` (or legacy root `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.
44
45
  - **`validate [name]`** — run the full validation pipeline: parse → capability vocabulary → composition (cycle / missing sub-agents / invalid grants) → semantic + Fimo project config policy checks. Omit `name` to validate every bundle. `--json` emits a structured `ValidationReport` for CI; exit code is non-zero on any failure.
45
46
  - **`secrets add/remove/list`** — edit or inspect the agent's requested secret names in `.fimo/agents/<name>/config.yaml` (or legacy root). 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`.
@@ -241,7 +242,7 @@ Example for a content editor that can read and update entries but cannot change
241
242
 
242
243
  ```bash
243
244
  fimo agents run <name> [--branch <branch>] [--project <id>] [--skip-drift-check] [-C <dir>]
244
- fimo agents runs <name> [--limit <n>] [--branch <branch>] [--project <id>] [-C <dir>]
245
+ fimo agents runs <name> [--limit <n>] [--cursor <cursor>] [--all-pages] [--branch <branch>] [--project <id>] [-C <dir>]
245
246
  fimo agents report <name> [--session <id>] [--branch <branch>] [--project <id>] [-C <dir>]
246
247
  fimo agents logs <name> [--session <id>] [--project <id>] [-C <dir>]
247
248
  ```
@@ -96,9 +96,12 @@ fimo assets list --search "wolf"
96
96
  fimo assets list --search "hero" --image
97
97
  fimo assets list --search "logo" --type file --sort-by createdAt
98
98
 
99
- fimo assets list --limit 50 --offset 0 # paging
99
+ fimo assets list --limit 50 --cursor <next-cursor> # next page
100
+ fimo assets list --all-pages # every remaining page
100
101
  ```
101
102
 
103
+ The response includes `nextCursor` when another page exists. Keep the same filters when continuing. `--offset` remains a compatibility alias for existing scripts.
104
+
102
105
  The `--search` query matches:
103
106
 
104
107
  - `name` (file name)
@@ -69,7 +69,7 @@ Use singular commands for one entry. Bulk create and per-entry bulk update also
69
69
  ```bash
70
70
  fimo entries create <TypeName> --body '<json>'
71
71
  fimo entries create <TypeName> --locale es --document-id <documentId> --body '<json>'
72
- fimo entries list <TypeName> [--limit N] [--offset N] [--search Q] [--where JSON] [--sort F] [--fields FIELDS] [--populate FIELDS]
72
+ fimo entries list <TypeName> [--limit N] [--cursor CURSOR] [--all-pages] [--search Q] [--where JSON] [--sort F] [--fields FIELDS] [--populate FIELDS]
73
73
  fimo entries list <TypeName> --locale es
74
74
  fimo entries get <TypeName> <id> [--locale es]
75
75
  fimo entries update <TypeName> <id> [--locale es] --body '<json>'
@@ -90,12 +90,12 @@ fimo entries list BlogPost --where '{"featured":true}' --sort -publishedAt
90
90
  fimo entries list BlogPost --where '{"rank":{"$gte":3}}' --sort rank
91
91
  fimo entries list BlogPost --where '{"__fimo":{"contentType":{"$eq":"BlogPost"}}}'
92
92
  fimo entries list BlogPost --search "launch"
93
- fimo entries list BlogPost --limit 10 --offset 20 --sort title
93
+ fimo entries list BlogPost --limit 10 --cursor <next-cursor> --sort title
94
94
  fimo entries list BlogPost --fields slug,title,excerpt,coverImage --sort -publishedAt --limit 12
95
95
  fimo entries list BlogPost --fields slug,title,author --populate author
96
96
  ```
97
97
 
98
- Use the canonical read query flags: `--search`, `--sort`, `--where`, `--limit`, `--offset`, `--fields`, and `--populate`.
98
+ Use the canonical read query flags: `--search`, `--sort`, `--where`, `--limit`, `--cursor`, `--all-pages`, `--fields`, and `--populate`. `--offset` remains a compatibility alias for existing scripts.
99
99
  `--where` is a JSON object keyed by schema field name. Simple values mean equality and stay typed inside the JSON (`{"featured":true}`, `{"category":"react"}`, `{"rank":{"$gte":3}}`); operator objects support `$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$contains`, `$startsWith`, and `$null`, subject to the field type. Public Fimo-owned metadata lives under `__fimo`; currently `__fimo.contentType` is filterable.
100
100
 
101
101
  Reference filters take the target `id` string (`{"author":"750e..."}`). On a to-many field, `$eq` and `$contains` mean membership, `$in` means any listed target is present, `$ne` and `$nin` mean none are present, and `$null: true` means empty or missing. Reference fields cannot be sorted; use `--sort field` / `--sort -field` on scalar fields.
@@ -50,11 +50,11 @@ Public project variables managed with `fimo vars add` and `fimo vars update` are
50
50
 
51
51
  ## Diagnose a failed publication
52
52
 
53
- Use the publication ID returned by the failed command: run `fimo publish inspect <id> --json` for its durable status, then `fimo publish logs <id> --json` for a bounded build-log tail. Logs come from the hosting provider and may be unavailable after its deployment is reclaimed.
53
+ Use the publication ID returned by the failed command: run `fimo publish inspect <id> --json` for its durable status, then `fimo publish logs <id> --json` for a bounded build-log tail. Use `fimo publish list --cursor <cursor>` to continue through older attempts or `--all-pages` to fetch the complete retained history. `--before` remains a compatibility alias. Logs come from the hosting provider and may be unavailable after its deployment is reclaimed.
54
54
 
55
55
  ## Diagnose a failed preview deploy
56
56
 
57
- If the sandbox fails to install dependencies or start the app, run `fimo logs --json` before retrying. Read the newest install and dev-server events first; when the response is truncated, use its `previousCursor` as `fimo logs --before <cursor> --json` to fetch the preceding page. Do not recreate or replace the sandbox before collecting logs, because that can discard the failure evidence.
57
+ If the sandbox fails to install dependencies or start the app, run `fimo logs --json` before retrying. Read the newest install and dev-server events first; when the response is truncated, use its `previousCursor` as `fimo logs --cursor <cursor> --json` to fetch the preceding page, or use `--all-pages` to fetch every retained page. `--before` remains a compatibility alias. Do not recreate or replace the sandbox before collecting logs, because that can discard the failure evidence.
58
58
 
59
59
  When Preview reports blocked dependency build scripts, treat that as a project security-policy repair, not a transient sandbox failure. Review every named package before approving it, then use the package manager's narrow project-owned mechanism:
60
60
 
@@ -29,11 +29,13 @@ Notification recipients for form submissions are configured in the Fimo web UI,
29
29
  After a form is live and users have filled it out, inspect submissions from the terminal:
30
30
 
31
31
  ```bash
32
- fimo forms submissions list <formIdOrName> [--limit 50] [--offset 0] [--search "<q>"] [--sort asc|desc]
32
+ fimo forms submissions list <formIdOrName> [--limit 50] [--cursor CURSOR] [--all-pages] [--search "<q>"] [--sort asc|desc]
33
33
  fimo forms submissions get <formIdOrName> <submissionId>
34
34
  fimo forms submissions stats <formIdOrName>
35
35
  ```
36
36
 
37
+ The list response includes `nextCursor` when another page exists. `--offset` remains a compatibility alias for existing scripts.
38
+
37
39
  - `<formIdOrName>` accepts either the form's UUID or its `name` (the same name in the JSON file). Names that don't resolve to exactly one form return an error.
38
40
  - `list` returns `{ data: [...], total }`. Newest-first by default; pass `--sort asc` to reverse.
39
41
  - `search` matches against submission contents server-side.
@@ -28,6 +28,7 @@ there is no local `.fimo/project.json`.
28
28
 
29
29
  ```bash
30
30
  fimo history list --limit 20 --cursor <cursor>
31
+ fimo history list --all-pages
31
32
  ```
32
33
 
33
34
  The list also reports compressed snapshot usage and the current retention period. Restore points expire after 14 days on Free and pay-as-you-go plans, or 90 days on Premium. The expiry is fixed when each point is created.
@@ -11,40 +11,40 @@ fimo init [dir] [options]
11
11
  `fimo init` runs the full onboarding in one shot:
12
12
 
13
13
  1. **Signs in automatically** — if there's no session it opens the browser loopback login. In `--json` / non-TTY with no session it fails with `NOT_AUTHENTICATED` (run `fimo login` first).
14
- 2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use React Router by default; `--framework vite`, `--framework astro`, `--framework nextjs`, and `--framework sveltekit` select minimal framework-native shells. An optional `--starter fimo-site@1` adds a content-led starter only to a newly created project without `--project-id`.
14
+ 2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use the Next.js App Router by default; `--framework react-router`, `--framework vite`, `--framework astro`, and `--framework sveltekit` select the other minimal framework-native shells.
15
15
  3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
16
16
  4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
17
17
 
18
18
  Generated pnpm projects pin `pnpm@10.26.0` and carry project-owned `pnpm-workspace.yaml#strictDepBuilds: true` and `#allowBuilds` settings. Generated Bun projects trust the same required packages through `package.json#trustedDependencies`. Keep the selected package manager's policy committed. When adding a dependency with an install script, review it before extending that policy; never replace it with a blanket allow-all install.
19
19
 
20
- | Flag | Required | Purpose |
21
- | ---------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
23
- | `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
24
- | `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
25
- | `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`). |
26
- | `--env <name>` | no | Compatibility alias for `--branch <name>`. |
27
- | `--framework <framework>` | no | New-project scaffold: `react-router` (default), `vite` (React SPA), `astro`, `nextjs` (App Router), or `sveltekit`. Existing repositories are preserved. |
28
- | `--starter <id>` | no | Opt-in project starter for create-new (currently `fimo-site@1`). It seeds CMS content, labels, a contact form, and manual-only agents. Rejects `--project-id`. |
29
- | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
30
- | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
31
- | `--skills` / `--no-skills` | yes in non-TTY | Install the global Fimo skill (or skip it). |
32
- | `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to skip installing the global skill. |
33
- | `-a, --agent <id>` | alternative | Repeatable form: `-a claude-code -a cursor`. |
34
- | `--template-root <path>` | no | Override the bundled template (development only). |
35
- | `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
20
+ | Flag | Required | Purpose |
21
+ | ---------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
23
+ | `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
24
+ | `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
25
+ | `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`). |
26
+ | `--env <name>` | no | Compatibility alias for `--branch <name>`. |
27
+ | `--framework <framework>` | no | New-project scaffold: `nextjs` (App Router, default), `react-router`, `vite` (React SPA), `astro`, or `sveltekit`. Existing repositories are preserved. |
28
+ | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
29
+ | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
30
+ | `--skills` / `--no-skills` | yes in non-TTY | Install the global Fimo skill (or skip it). |
31
+ | `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to skip installing the global skill. |
32
+ | `-a, --agent <id>` | alternative | Repeatable form: `-a claude-code -a cursor`. |
33
+ | `--template-root <path>` | no | Override the bundled template (development only). |
34
+ | `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
36
35
 
37
36
  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.`
38
37
 
39
- ### Non-interactive starter setup
38
+ ### Non-interactive setup
40
39
 
41
40
  Use explicit flags when a script or agent owns the flow. `--json` gives the
42
41
  caller one stable result envelope; `--yes` is useful when running in a TTY but
43
- is not required in a pipe or CI shell. The starter is never selected by default.
42
+ is not required in a pipe or CI shell. The default scaffold is the Next.js App
43
+ Router template. Select the canonical React Router template explicitly with
44
+ `--framework react-router`.
44
45
 
45
46
  ```bash
46
47
  fimo --json init my-site \
47
- --starter fimo-site@1 \
48
48
  --org <organizationId> \
49
49
  --no-install \
50
50
  --no-skills \
@@ -52,22 +52,18 @@ fimo --json init my-site \
52
52
  --yes
53
53
  ```
54
54
 
55
- The command creates the project, copies the starter overlay, seeds its `HomePage`
56
- singleton, `contact` form, and labels in `main`, writes the form id into
57
- `src/forms/contact.json`, and commits the starter agents as manual-only bundles.
58
- `--starter` is create-new only; an existing-project command such as
59
- `fimo init --project-id <id> --starter fimo-site@1` fails before cloning or
60
- writing anything. If dependencies were skipped, install them and run
61
- `fimo validate` before starting the app so generated clients are present.
55
+ If dependencies were skipped, install them and run `fimo validate` before
56
+ starting the app so generated clients are present.
62
57
 
63
58
  > **Zero-install:** the selected `fimo init` invocation needs no global install. `fimo projects create` is also an alias of `fimo init` (create-new path).
64
59
 
65
60
  ### Choose the application framework
66
61
 
67
- Omit `--framework` for the existing React Router scaffold, or select a
68
- minimal framework-native shell explicitly:
62
+ Omit `--framework` for the default Next.js App Router shell, or select a
63
+ different framework explicitly:
69
64
 
70
65
  ```bash
66
+ fimo init my-react-site --framework react-router --org <organizationId>
71
67
  fimo init my-vite-site --framework vite --org <organizationId>
72
68
  fimo init my-astro-site --framework astro --org <organizationId>
73
69
  fimo init my-next-site --framework nextjs --org <organizationId>
@@ -80,6 +76,10 @@ boundary that keeps the default locale unprefixed. The Astro shell also includes
80
76
  content-backed example with static, on-demand, and dynamic routes; the other shells intentionally
81
77
  contain no schema, labels, or designed website.
82
78
 
79
+ The React Router shell is the canonical Fimo React template for framework mode;
80
+ select it with `--framework react-router` when a project should use React Router
81
+ instead of the default Next.js App Router shell.
82
+
83
83
  Set the primary locale from the request: when several are explicitly named, use the first as default;
84
84
  if none is requested, keep `en` and tell the user. Update `.fimo/config.json#i18n`, the framework-native
85
85
  locale boundary, matcher, and HTML language default. Do not keep `en` solely because the shell starts
@@ -89,7 +89,6 @@ After init, load the project rules and `fimo-code` to build the requested site.
89
89
  If you replace a shell's code with a site that uses another framework or none,
90
90
  fix `runtime.framework` in the same change
91
91
  (`fimo-code` → `references/frameworks/hosting.md`).
92
- The current `fimo-site@1` content starter supports React Router only.
93
92
 
94
93
  For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for Claude Code, `--agents=cursor` for Cursor, `--agents=codex` for Codex, etc. When the flag is omitted, env-var detection of the invoking harness (e.g. `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT` → claude-code) auto-targets that agent; other agents must be selected explicitly via `--agents`/`-a` or the interactive picker.
95
94
 
@@ -109,21 +108,13 @@ fimo link <projectId> --relink
109
108
 
110
109
  `fimo init` (create-new path) scaffolds:
111
110
 
112
- - The selected project shell: React Router by default, a native React SPA with `--framework vite`, Astro with `--framework astro`, Next.js App Router with `--framework nextjs`, or SvelteKit with `--framework sveltekit`
111
+ - The selected project shell: Next.js App Router by default, React Router with `--framework react-router`, a native React SPA with `--framework vite`, Astro with `--framework astro`, or SvelteKit with `--framework sveltekit`
113
112
  - `.fimo/project.json` — links this directory to the remote project (read-only after creation)
114
113
  - `.fimo/config.json` — project, optional Studio Pages route metadata, locale, SEO, and agent policy
115
114
  - `.fimo/agents/` — versioned agent bundles
116
115
  - `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.
117
116
  - A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
118
117
 
119
- When `--starter fimo-site@1` is supplied, the overlay also includes a
120
- content-backed homepage, `src/schemas/HomePage.json`, a `contact` form spec,
121
- nine English labels, and two read-only agent bundles (`site-review` and
122
- `content-guide`). The seed is opt-in and scoped to the new project; the default
123
- blank template and all existing-project flows remain unchanged. Starter agents
124
- declare only a manual trigger so copying them does not create schedules or
125
- webhooks.
126
-
127
118
  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`.
128
119
 
129
120
  Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
@@ -22,7 +22,7 @@ fimo schedules resume <schedule>
22
22
  fimo schedules run <schedule>
23
23
  fimo schedules run <schedule> --no-wait
24
24
  fimo schedules runs <schedule> --limit 25 --status failed
25
- fimo schedules runs <schedule> --all
25
+ fimo schedules runs <schedule> --all-pages
26
26
  fimo schedules runs show <run-id>
27
27
  fimo schedules delete <schedule>
28
28
  ```
@@ -59,9 +59,11 @@ Run history is cursor-paginated:
59
59
  fimo schedules runs nightly --limit 50
60
60
  fimo schedules runs nightly --cursor <cursor>
61
61
  fimo schedules runs nightly --status succeeded
62
- fimo schedules runs nightly --all
62
+ fimo schedules runs nightly --all-pages
63
63
  ```
64
64
 
65
+ `--all` remains a compatibility alias for existing scripts.
66
+
65
67
  Run detail includes status, timing, trigger, exit/error information, retained output, output retention metadata, and secret snapshot metadata. Output is capped and redacted before it is returned.
66
68
 
67
69
  ## JSON
@@ -121,6 +121,8 @@ fimo webhooks list
121
121
  fimo webhooks get <webhook-id>
122
122
  fimo webhooks test <webhook-id> --wait
123
123
  fimo webhooks deliveries <webhook-id> --limit 20
124
+ fimo webhooks deliveries <webhook-id> --cursor <next-cursor>
125
+ fimo webhooks deliveries <webhook-id> --all-pages
124
126
  fimo webhooks delivery <webhook-id> <delivery-id>
125
127
  ```
126
128
 
@@ -47,7 +47,10 @@ own tenant URL.
47
47
  ## Hosted preview config
48
48
 
49
49
  Wrap the existing Next config once so `next dev` accepts Fimo's hosted preview
50
- origins without exposing the active preview provider to the application:
50
+ origins without exposing the active preview provider to the application. If
51
+ the application does not set Next's `devIndicators`, the wrapper hides it in
52
+ hosted Preview while local `next dev` keeps Next's default. Any explicit
53
+ `devIndicators` setting is preserved:
51
54
 
52
55
  ```ts
53
56
  import type { NextConfig } from 'next';
@@ -1,8 +1,9 @@
1
1
  # React Router framework mode
2
2
 
3
- This is the canonical Fimo + React Router framework-mode setup used by
4
- `fimo init`. You can also apply it to an existing React Router project: preserve
5
- its routes, rendering choices, providers, and SEO.
3
+ This is the canonical Fimo React Router template and framework-mode setup used
4
+ by `fimo init --framework react-router`. You can also apply it to an existing
5
+ React Router project: preserve its routes, rendering choices, providers, and
6
+ SEO.
6
7
 
7
8
  ## Install and build
8
9
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Click the **Preview** tab (the cursor/pointer icon) to see a live version of your site right inside the editor. You can also press **Alt+1** to jump to the preview tab.
4
4
 
5
- - Use the **route selector** dropdown at the top to navigate between different pages.
5
+ - For Fimo-integrated sites, use the **route selector** dropdown at the top to navigate between different pages.
6
6
  - Click the **refresh** button to reload the preview.
7
7
  - Click the **external link** icon to open your site in a new browser tab for a full-screen view.
8
8
 
@@ -34,6 +34,9 @@ To go back to a full-width preview, toggle the responsive mode off.
34
34
  You may see different overlays depending on what is happening:
35
35
 
36
36
  - **"Working"** -- A loading overlay (heading "Working", subtext "Getting your preview in motion...") while the preview is being prepared.
37
+ - **"Connecting to Fimo…"** -- The site is already visible while Studio waits for visual editing and route controls to connect. You can dismiss this status without interrupting the preview.
38
+ - **"Recovering preview…"** -- The visible preview is reloading after a refresh or a recoverable development-server failure.
39
+ - **"Editing unavailable"** -- The site remains visible, but its Fimo integration did not connect in time. Visual editing and the route selector stay unavailable; preview and refresh still work.
37
40
  - **Error overlay** -- Something went wrong. The overlay shows details about the issue, and the AI can often auto-fix it for you.
38
41
  - **"Some installed packages need approval"** -- Choose **Fix with Fimo** to send the complete repair context to the coding agent, or **Copy details** to handle it elsewhere. Review every named package, commit only trusted package-specific approvals, and retry Preview. Never replace the project policy with a blanket allow-all setting.
39
42
  - **First generation progress** -- When your project is being built for the first time, a progress overlay shows the current status.
@@ -8,7 +8,15 @@ Once in edit mode, click on any element in the preview -- text, buttons, images,
8
8
 
9
9
  ### Editing Content
10
10
 
11
- For text elements, the side panel shows editable fields where you can change the text directly. This covers CMS-managed content, hardcoded text, and hardcoded images. Changes save automatically, and the preview updates as you type.
11
+ For text elements, the side panel opens the selected field immediately with its current value. This covers CMS-managed content, hardcoded text, and hardcoded images. Changes save automatically, and the preview updates as you type.
12
+
13
+ For CMS content, choose **All fields** to open the complete entry form. Studio keeps the content type's field order, scrolls to the field you selected, and focuses it in place. Loading appears only while Studio fetches this additional entry data or moves to another entry.
14
+
15
+ ### References and Components
16
+
17
+ Selecting a field rendered from a referenced entry edits that entry. For example, selecting an author's name opens the Author entry, not the Post relation that links to it. The header shows the relation path. Select the owning entry in that path to return to its complete form with the relation field focused; use that relation field to open, replace, or clear the linked entry.
18
+
19
+ Selecting a field inside a component focuses that nested field. Choose **All fields** to see it in the complete entry form without moving it out of schema order. The shared CMS form provides the existing add, duplicate, remove, and reorder controls for repeatable components and blocks.
12
20
 
13
21
  ### Editing Styles
14
22
 
@@ -1,6 +1,7 @@
1
1
  import { fileURLToPath } from 'node:url';
2
2
  import { getConfigPreviewRoutes } from '../../runtime/preview/routes.js';
3
3
  import { getConfigServer } from '../../runtime/shared/fimo-config.server.js';
4
+ import previewHealthPlugin from '../vite/plugins/preview-health.js';
4
5
  import runtimeEnvPlugin from '../vite/plugins/runtime-env.js';
5
6
  function serializeForModule(value) {
6
7
  return (JSON.stringify(value) ?? 'undefined')
@@ -32,7 +33,7 @@ export function fimo(options = {}) {
32
33
  // `as never` sidesteps a TS "excessive stack depth" on Astro's
33
34
  // DeepPartial<AstroConfig> vs Vite's Plugin type; the shape is the
34
35
  // documented `updateConfig({ vite: { plugins } })`.
35
- updateConfig({ vite: { plugins: [runtimeEnvPlugin()] } });
36
+ updateConfig({ vite: { plugins: [runtimeEnvPlugin(), previewHealthPlugin()] } });
36
37
  const fimoConfig = getConfigServer(fileURLToPath(config.root));
37
38
  const routes = getConfigPreviewRoutes(fimoConfig);
38
39
  injectScript('page', [
@@ -0,0 +1,4 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare const PREVIEW_HEALTH_PATH = "/__fimo/preview-health";
3
+ export default function previewHealthPlugin(): Plugin;
4
+ //# sourceMappingURL=preview-health.d.ts.map
@@ -0,0 +1,40 @@
1
+ export const PREVIEW_HEALTH_PATH = '/__fimo/preview-health';
2
+ const OPTIMIZED_DEP_PATH = '/node_modules/.vite/deps/';
3
+ export default function previewHealthPlugin() {
4
+ let failure = null;
5
+ return {
6
+ name: 'fimo:preview-health',
7
+ apply: 'serve',
8
+ configureServer(server) {
9
+ // FIMO-1589: the sandbox watcher needs a durable signal because Vite's
10
+ // one-shot HMR reload can fire before the hosted preview socket connects.
11
+ if (!process.env.FIMO_PREVIEW_ALLOWED_ORIGINS) {
12
+ return;
13
+ }
14
+ server.middlewares.use((req, res, next) => {
15
+ const url = new URL(req.url ?? '/', 'http://127.0.0.1');
16
+ if (url.pathname === PREVIEW_HEALTH_PATH) {
17
+ res.statusCode = 200;
18
+ res.setHeader('content-type', 'application/json');
19
+ res.end(JSON.stringify({
20
+ failureGeneration: failure?.generation ?? 0,
21
+ lastFailure: failure,
22
+ }));
23
+ return;
24
+ }
25
+ if (url.pathname.includes(OPTIMIZED_DEP_PATH) && url.searchParams.has('v')) {
26
+ res.once('finish', () => {
27
+ if (res.statusCode >= 500) {
28
+ failure = {
29
+ generation: (failure?.generation ?? 0) + 1,
30
+ status: res.statusCode,
31
+ at: Date.now(),
32
+ };
33
+ }
34
+ });
35
+ }
36
+ next();
37
+ });
38
+ },
39
+ };
40
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-08-26T13:08:32.124Z",
4
+ "bundledAt": "2026-08-28T09:18:13.313Z",
5
5
  "cliVersion": "2.1.0",
6
6
  "external": [
7
7
  "oxc-parser",