fimo 0.14.0 → 0.15.0-staging.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/assets/astro/components/Boolean.astro +14 -0
- package/assets/astro/components/Date.astro +23 -0
- package/assets/astro/components/Image.astro +79 -0
- package/assets/astro/components/Json.astro +14 -0
- package/assets/astro/components/RichText.astro +17 -0
- package/assets/astro/components/StaticImage.astro +66 -0
- package/assets/astro/components/Text.astro +23 -0
- package/assets/astro/components/Video.astro +47 -0
- package/assets/astro/components/index.d.ts +8 -0
- package/assets/astro/components/index.js +8 -0
- package/assets/content-templates/shared/server.eta +56 -0
- package/assets/content-templates/sveltekit/content.eta +86 -0
- package/assets/skills/fimo/SKILL.md +13 -4
- package/assets/skills/fimo-cli/SKILL.md +28 -28
- package/assets/skills/fimo-cli/references/account.md +0 -2
- package/assets/skills/fimo-cli/references/agent-setup.md +7 -9
- package/assets/skills/fimo-cli/references/agents.md +0 -2
- package/assets/skills/fimo-cli/references/analytics.md +0 -2
- package/assets/skills/fimo-cli/references/assets.md +2 -4
- package/assets/skills/fimo-cli/references/branches.md +14 -15
- package/assets/skills/fimo-cli/references/content.md +9 -11
- package/assets/skills/fimo-cli/references/credits.md +0 -2
- package/assets/skills/fimo-cli/references/deploy.md +6 -7
- package/assets/skills/fimo-cli/references/describe.md +1 -3
- package/assets/skills/fimo-cli/references/domains.md +0 -2
- package/assets/skills/fimo-cli/references/forms.md +5 -7
- package/assets/skills/fimo-cli/references/history.md +0 -2
- package/assets/skills/fimo-cli/references/init.md +34 -26
- package/assets/skills/fimo-cli/references/integrations/firecrawl.md +0 -2
- package/assets/skills/fimo-cli/references/integrations.md +0 -2
- package/assets/skills/fimo-cli/references/invite.md +0 -2
- package/assets/skills/fimo-cli/references/labels.md +5 -7
- package/assets/skills/fimo-cli/references/locales.md +2 -4
- package/assets/skills/fimo-cli/references/mcp.md +2 -4
- package/assets/skills/fimo-cli/references/media.md +0 -2
- package/assets/skills/fimo-cli/references/preview.md +0 -2
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +1 -3
- package/assets/skills/fimo-cli/references/projects.md +1 -3
- package/assets/skills/fimo-cli/references/schedules.md +0 -2
- package/assets/skills/fimo-cli/references/support.md +0 -2
- package/assets/skills/fimo-cli/references/webhooks.md +0 -2
- package/assets/skills/fimo-code/SKILL.md +11 -3
- package/assets/skills/fimo-code/references/assets.md +2 -2
- package/assets/skills/fimo-code/references/content/clients.md +5 -1
- package/assets/skills/fimo-code/references/content.md +3 -1
- package/assets/skills/fimo-code/references/frameworks/astro.md +127 -0
- package/assets/skills/fimo-code/references/frameworks/compatibility.md +19 -0
- package/assets/skills/fimo-code/references/frameworks/hosting.md +15 -3
- package/assets/skills/fimo-code/references/frameworks/react-router.md +37 -209
- package/assets/skills/fimo-code/references/frameworks/sveltekit.md +110 -0
- package/assets/skills/fimo-code/references/frameworks/vite-react.md +35 -166
- package/assets/skills/fimo-code/references/labels.md +16 -6
- package/assets/skills/fimo-code/references/locales.md +3 -1
- package/assets/skills/fimo-code/references/ui.md +19 -15
- package/assets/skills/fimo-migration/SKILL.md +99 -146
- package/assets/skills/fimo-migration/references/frameworks/nextjs.md +26 -0
- package/assets/skills/fimo-migration/references/inventory/coordinator.md +40 -0
- package/assets/skills/fimo-migration/references/inventory/locales/next-intl.md +39 -0
- package/assets/skills/fimo-migration/references/inventory/locales.md +41 -0
- package/assets/skills/fimo-migration/references/workflow.md +3 -2
- package/assets/skills/fimo-migration/scripts/inventory/locales/next-intl.mjs +459 -0
- package/assets/skills/fimo-studio/SKILL.md +1 -1
- package/assets/skills/fimo-studio/references/project-creation.md +10 -18
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -1
- package/assets/sveltekit/components/Boolean.svelte +19 -0
- package/assets/sveltekit/components/Date.svelte +33 -0
- package/assets/sveltekit/components/FimoProvider.svelte +35 -0
- package/assets/sveltekit/components/Image.svelte +80 -0
- package/assets/sveltekit/components/Json.svelte +18 -0
- package/assets/sveltekit/components/Label.svelte +16 -0
- package/assets/sveltekit/components/Number.svelte +21 -0
- package/assets/sveltekit/components/RichText.svelte +19 -0
- package/assets/sveltekit/components/Text.svelte +30 -0
- package/assets/sveltekit/components/Video.svelte +37 -0
- package/assets/sveltekit/components/index.d.ts +10 -0
- package/assets/sveltekit/components/index.js +10 -0
- package/dist/build/astro/config.d.ts +4 -0
- package/dist/build/astro/config.js +64 -0
- package/dist/build/next/config.js +16 -0
- package/dist/build/sveltekit/config.d.ts +6 -0
- package/dist/build/sveltekit/config.js +8 -0
- package/dist/build/sveltekit/data-id.d.ts +3 -0
- package/dist/build/sveltekit/data-id.js +171 -0
- package/dist/build/sveltekit/vite.d.ts +13 -0
- package/dist/build/sveltekit/vite.js +15 -0
- package/dist/build/vite/index.js +2 -0
- package/dist/build/vite/plugins/data-id.d.ts +9 -0
- package/dist/build/vite/plugins/data-id.js +6 -1
- package/dist/build/vite/plugins/runtime-env.d.ts +21 -0
- package/dist/build/vite/plugins/runtime-env.js +68 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +108 -101
- package/dist/runtime/app/FimoProviders.d.ts +1 -1
- package/dist/runtime/app/FimoProviders.js +11 -5
- package/dist/runtime/astro/internal.d.ts +6 -0
- package/dist/runtime/astro/internal.js +16 -0
- package/dist/runtime/astro/preview.d.ts +14 -0
- package/dist/runtime/astro/preview.js +103 -0
- package/dist/runtime/astro/render-rich-text.d.ts +2 -0
- package/dist/runtime/astro/render-rich-text.js +1 -0
- package/dist/runtime/astro/server-runtime.d.ts +3 -0
- package/dist/runtime/astro/server-runtime.js +20 -0
- package/dist/runtime/astro/server.d.ts +15 -0
- package/dist/runtime/astro/server.js +14 -0
- package/dist/runtime/content/client/collection-core.d.ts +2 -17
- package/dist/runtime/content/client/collection-core.js +15 -8
- package/dist/runtime/content/client/core-types.d.ts +96 -0
- package/dist/runtime/content/client/core-types.js +1 -0
- package/dist/runtime/content/client/internal.d.ts +4 -4
- package/dist/runtime/content/client/internal.js +4 -3
- package/dist/runtime/content/client/runtime.d.ts +1 -1
- package/dist/runtime/content/client/server-content-client.d.ts +3 -3
- package/dist/runtime/content/client/server-content-client.js +2 -29
- package/dist/runtime/content/client/singleton-core.d.ts +2 -9
- package/dist/runtime/content/client/singleton-core.js +9 -4
- package/dist/runtime/content/client/types.d.ts +5 -115
- package/dist/runtime/content/index.d.ts +3 -3
- package/dist/runtime/labels/fetch.js +5 -3
- package/dist/runtime/next/client.d.ts +2 -1
- package/dist/runtime/next/facade.d.ts +1 -1
- package/dist/runtime/next/provider.js +1 -1
- package/dist/runtime/next/server-runtime.js +1 -1
- package/dist/runtime/next/server.d.ts +5 -4
- package/dist/runtime/paths/get-fimo-paths.js +8 -3
- package/dist/runtime/preview/bridge.d.ts +8 -0
- package/dist/runtime/preview/bridge.js +20 -0
- package/dist/runtime/preview/location.d.ts +23 -0
- package/dist/runtime/preview/location.js +93 -0
- package/dist/runtime/preview/routes.d.ts +10 -0
- package/dist/runtime/preview/routes.js +29 -0
- package/dist/runtime/primitives/index.d.ts +4 -1
- package/dist/runtime/primitives/index.js +1 -0
- package/dist/runtime/primitives/lib/image-optimization.d.ts +27 -2
- package/dist/runtime/primitives/lib/image-optimization.js +40 -0
- package/dist/runtime/primitives/lib/index.d.ts +1 -1
- package/dist/runtime/primitives/lib/primitives.d.ts +0 -54
- package/dist/runtime/primitives/lib/primitives.js +6 -0
- package/dist/runtime/primitives/lib/render-rich-text.d.ts +3 -0
- package/dist/runtime/primitives/lib/render-rich-text.js +112 -0
- package/dist/runtime/react/primitives/contracts.d.ts +40 -2
- package/dist/runtime/react/primitives/renderers/ImageRenderer.js +15 -34
- package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +2 -1
- package/dist/runtime/react/primitives/renderers/StaticImage.js +13 -30
- package/dist/runtime/routing/AppRoutesProvider.js +20 -8
- package/dist/runtime/shared/env-identity.d.ts +43 -0
- package/dist/runtime/shared/env-identity.js +88 -0
- package/dist/runtime/shared/local-runtime-env.d.ts +65 -0
- package/dist/runtime/shared/local-runtime-env.js +169 -0
- package/dist/runtime/{react-router → shared}/preview-location.d.ts +7 -13
- package/dist/runtime/{react-router → shared}/preview-location.js +26 -27
- package/dist/runtime/sveltekit/content.d.ts +25 -0
- package/dist/runtime/sveltekit/content.js +33 -0
- package/dist/runtime/sveltekit/context-contract.d.ts +5 -0
- package/dist/runtime/sveltekit/context-contract.js +2 -0
- package/dist/runtime/sveltekit/context.d.ts +8 -0
- package/dist/runtime/sveltekit/context.js +25 -0
- package/dist/runtime/sveltekit/index.d.ts +7 -0
- package/dist/runtime/sveltekit/index.js +4 -0
- package/dist/runtime/sveltekit/internal.d.ts +6 -0
- package/dist/runtime/sveltekit/internal.js +12 -0
- package/dist/runtime/sveltekit/labels.d.ts +16 -0
- package/dist/runtime/sveltekit/labels.js +13 -0
- package/dist/runtime/sveltekit/preview.d.ts +19 -0
- package/dist/runtime/sveltekit/preview.js +77 -0
- package/dist/runtime/sveltekit/runtime.d.ts +8 -0
- package/dist/runtime/sveltekit/runtime.js +17 -0
- package/dist/runtime/templates.d.ts +1 -1
- package/dist/runtime/templates.js +1 -1
- package/dist/runtime/vite/Label.d.ts +13 -0
- package/dist/runtime/vite/Label.js +16 -0
- package/dist/scripts/extract-translations.js +103 -43
- package/dist/scripts/sync-forms.js +1 -1
- package/dist/scripts/sync-schemas.js +83 -16
- package/package.json +57 -2
- package/release.json +2 -2
- package/templates/nextjs/AGENTS.md +10 -5
- package/templates/nextjs/_gitignore +1 -0
- package/templates/react-router/AGENTS.md +4 -3
- package/templates/react-router/package.json +1 -1
- package/templates/sveltekit/.fimo/config.json +15 -0
- package/templates/sveltekit/AGENTS.md +36 -0
- package/templates/sveltekit/CLAUDE.md +5 -0
- package/templates/sveltekit/_gitignore +16 -0
- package/templates/sveltekit/package.json +28 -0
- package/templates/sveltekit/pnpm-workspace.yaml +4 -0
- package/templates/sveltekit/src/app.html +11 -0
- package/templates/sveltekit/src/routes/+layout.server.ts +8 -0
- package/templates/sveltekit/src/routes/+layout.svelte +12 -0
- package/templates/sveltekit/src/routes/+page.svelte +48 -0
- package/templates/sveltekit/svelte.config.js +5 -0
- package/templates/sveltekit/tsconfig.json +14 -0
- package/templates/sveltekit/vite.config.ts +5 -0
- /package/assets/content-templates/{form-template.eta → forms/react.eta} +0 -0
- /package/assets/content-templates/{next-client-template.eta → next/client.eta} +0 -0
- /package/assets/content-templates/{next-server-template.eta → next/server.eta} +0 -0
- /package/assets/content-templates/{hooks-template.eta → react/client.eta} +0 -0
- /package/assets/content-templates/{types-template.eta → shared/types.eta} +0 -0
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# AI agent setup
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
Fimo connects agents in two layers:
|
|
6
4
|
|
|
7
5
|
1. **One global bootstrap skill** — a tiny, generic `fimo` skill installed once per user, machine-wide (symlinked into each agent's global skills directory). It contains no workflow content; it routes the agent to skills fetched through `fimo skills get`.
|
|
@@ -10,10 +8,10 @@ Fimo connects agents in two layers:
|
|
|
10
8
|
The rich skills (`fimo-code`, `fimo-cli`, `fimo-studio`, `fimo-migration`) are **never installed as files**. They are served on demand and never land in the project. `fimo-code` resolves from the project's installed package; the others resolve from the CLI being run:
|
|
11
9
|
|
|
12
10
|
```bash
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
24
|
+
Do not install `fimo` globally; use the selected CLI invocation from the main `fimo-cli` skill.
|
|
27
25
|
|
|
28
26
|
```bash
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
>
|
|
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 `
|
|
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 & branches (git-shaped workflow)
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
> **Beta:** Branch environments are still in beta. The CLI surface is available for early workflows, but not every command or cross-surface merge path is guaranteed to work reliably yet.
|
|
6
4
|
|
|
7
5
|
A Fimo **env** is a multi-surface clone of the project: a git branch **plus** its own Neon DB branch, sandbox, preview URL, and R2 asset prefix. The CLI mirrors `git` command shapes so the workflow transfers directly — same verbs, multi-surface semantics.
|
|
@@ -25,18 +23,18 @@ fimo --env <name> <command> # peek at another env for one command (does not
|
|
|
25
23
|
|
|
26
24
|
## Commands
|
|
27
25
|
|
|
28
|
-
| Command | git analogue | What it does
|
|
29
|
-
| ----------------------- | ------------------- |
|
|
30
|
-
| `fimo branch` | `git branch` | List envs (current marked `*`). `-v` adds preview URLs + deleted envs.
|
|
31
|
-
| `fimo branch <name>` | `git branch <name>` | Create an env off the current one. `--from <env>` forks from a different parent. Provisions DB + sandbox + preview + R2 prefix.
|
|
32
|
-
| `fimo branch -d <name>` | `git branch -d` | Delete an env — tears down its sandbox, Neon branch, and R2 prefix. Refuses `main` and `prod`.
|
|
33
|
-
| `fimo checkout <name>` | `git checkout` | Switch to an env (checks out the matching git branch
|
|
34
|
-
| `fimo switch <name>` | `git switch` | Switch to an existing env. Takes only `<name>` (no `-b`/`--from`) — use `fimo checkout -b` to create + switch.
|
|
35
|
-
| `fimo pull` | `git pull` | Sync the current env's data plane (DB/assets) down from its parent. `--from <env>` syncs from an explicit ancestor.
|
|
36
|
-
| `fimo diff [from] [to]` | `git diff` | Two-env diff across all surfaces. Defaults `from` = current env, `to` = `main`. `--surface <name>` limits to one; `--json`; `--no-color`.
|
|
37
|
-
| `fimo status` | `git status` | Multi-surface status for the current env vs its parent. See below.
|
|
38
|
-
| `fimo merge <from>` | `git merge` | Merge another env into the current one (multi-surface, atomic, interactive conflict resolver). See below.
|
|
39
|
-
| `fimo publish` | — | Tag `main@HEAD` as `release/<version>` and trigger the prod swap. See "Publishing" below.
|
|
26
|
+
| Command | git analogue | What it does |
|
|
27
|
+
| ----------------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `fimo branch` | `git branch` | List envs (current marked `*`). `-v` adds preview URLs + deleted envs. |
|
|
29
|
+
| `fimo branch <name>` | `git branch <name>` | Create an env off the current one. `--from <env>` forks from a different parent. Provisions DB + sandbox + preview + R2 prefix. |
|
|
30
|
+
| `fimo branch -d <name>` | `git branch -d` | Delete an env — tears down its sandbox, Neon branch, and R2 prefix. Refuses `main` and `prod`. |
|
|
31
|
+
| `fimo checkout <name>` | `git checkout` | Switch to an env (checks out the matching git branch; the app derives its env from that branch at startup). `-b` creates + switches; `--from <env>` sets the parent (with `-b`). |
|
|
32
|
+
| `fimo switch <name>` | `git switch` | Switch to an existing env. Takes only `<name>` (no `-b`/`--from`) — use `fimo checkout -b` to create + switch. |
|
|
33
|
+
| `fimo pull` | `git pull` | Sync the current env's data plane (DB/assets) down from its parent. `--from <env>` syncs from an explicit ancestor. |
|
|
34
|
+
| `fimo diff [from] [to]` | `git diff` | Two-env diff across all surfaces. Defaults `from` = current env, `to` = `main`. `--surface <name>` limits to one; `--json`; `--no-color`. |
|
|
35
|
+
| `fimo status` | `git status` | Multi-surface status for the current env vs its parent. See below. |
|
|
36
|
+
| `fimo merge <from>` | `git merge` | Merge another env into the current one (multi-surface, atomic, interactive conflict resolver). See below. |
|
|
37
|
+
| `fimo publish` | — | Tag `main@HEAD` as `release/<version>` and trigger the prod swap. See "Publishing" below. |
|
|
40
38
|
|
|
41
39
|
All of these accept the global `--env` override. `diff`, `status`, `merge`, and `publish` additionally accept `-C, --cwd <dir>` to point at a project directory.
|
|
42
40
|
|
|
@@ -105,7 +103,8 @@ Use `fimo publish` for versioned prod releases; use `fimo deploy --publish` for
|
|
|
105
103
|
|
|
106
104
|
## Anti-patterns
|
|
107
105
|
|
|
108
|
-
- **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the env's DB / sandbox / preview. Always use `fimo` for branch operations so resources are provisioned atomically. (Running `fimo branch <name>` after the fact provisions them.)
|
|
106
|
+
- **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the env's DB / sandbox / preview. Always use `fimo` for branch operations so resources are provisioned atomically. (Running `fimo branch <name>` after the fact provisions them.) The running app itself follows the git branch either way.
|
|
107
|
+
- **Hardcoding the tenant API URL** — the app derives it from the git branch and `.fimo/project.json`. Set `VITE_API_URL` / `NEXT_PUBLIC_FIMO_API_URL` yourself only as a deliberate override (e.g. a local API); it then wins over derivation on every branch.
|
|
109
108
|
- **Trying to push to or delete `prod` / `release/*`** — these are read-only/protected. Publish to update prod; never push.
|
|
110
109
|
- **`fimo merge` straight onto `main` as a habit** — it's gated for a reason. Merge on a branch, then publish.
|
|
111
110
|
- **Confusing `fimo switch` (env) with `fimo orgs switch` (org).**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Content workflow (schemas + Singles + entries)
|
|
2
2
|
|
|
3
|
-
>
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
273
|
-
7. Run `
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
**`fimo deploy` is on-demand, not the working loop and not a required final step.** The loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), iterate with the developer, and let live reload show changes. Reach for `fimo deploy` only when the developer wants a **hosted preview**, a **shareable link**, or to **go live** — and only on their signal. It commits everything, pushes to the current env's branch, and round-trips that env's sandbox (install + restart); it's a milestone command, not a save step. Batch related edits into one deploy; never deploy after every change.
|
|
3
|
+
**`fimo deploy` is on-demand, not the working loop and not a required final step.** The loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), iterate with the developer, and let live reload show changes. Reach for `fimo deploy` only when the developer wants a **hosted preview**, a **shareable link**, or to **go live** — and only on their signal. New-project onboarding counts as the signal for its single automatic first preview deploy (see `references/init.md` § Create the first hosted preview). It commits everything, pushes to the current env's branch, and round-trips that env's sandbox (install + restart); it's a milestone command, not a save step. Batch related edits into one deploy; never deploy after every change.
|
|
6
4
|
|
|
7
5
|
> **Local vs hosted.** The local dev server is localhost only. The Fimo **dashboard preview** and the **shareable preview URL** are served by the deployed sandbox — so if the developer wants to see the site in the dashboard or send someone a link, that requires a `fimo deploy`.
|
|
8
6
|
|
|
@@ -54,13 +52,14 @@ framework default. Production uses `.fimo/config.json#runtime.framework` and
|
|
|
54
52
|
the same bounded build/install overrides. Existing applications keep their
|
|
55
53
|
router and hosting behavior: do not replace the router or derive
|
|
56
54
|
deployment rewrites from `.fimo/config.json#routes`. When setup changes are
|
|
57
|
-
needed, load the `fimo-code` skill's
|
|
58
|
-
|
|
59
|
-
used only by plain Vite `BrowserRouter`
|
|
55
|
+
needed, load the `fimo-code` skill's framework reference:
|
|
56
|
+
`references/frameworks/hosting.md` covers the React Router `fimoPreset()`
|
|
57
|
+
connector and the explicit catch-all used only by plain Vite `BrowserRouter`
|
|
58
|
+
SPAs; Astro's `fimo()` integration lives in `references/frameworks/astro.md`.
|
|
60
59
|
|
|
61
60
|
## Warm the sandbox early in a session (optional)
|
|
62
61
|
|
|
63
|
-
This is a **performance optimization, only worth doing when you already know a deploy is coming** (the developer asked to publish, or you're confident they'll want a hosted preview soon). If you're just iterating locally, skip it — don't deploy pre-emptively.
|
|
62
|
+
This is a **performance optimization, only worth doing when you already know a deploy is coming** (the developer asked to publish, or you're confident they'll want a hosted preview soon). If you're just iterating locally, skip it — don't deploy pre-emptively. New-project onboarding never needs it: its automatic first preview deploy is the warm-up.
|
|
64
63
|
|
|
65
64
|
The first deploy of a project's life pays a one-time cost: the sandbox has to provision (create the VM, install the user's deps if they differ from the template's baked ones, start the dev server) — about 15-30s. Every deploy after that lands on a warm sandbox (~10s, or ~4s when you also use `--no-restart` and the lockfile hasn't changed).
|
|
66
65
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Describe — read-only snapshot of the current project
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
`fimo describe` prints a structured snapshot of the Fimo project in the current working directory: project name + config version, detected framework, fimo package version, package manager, route / schema / locale counts, and a file tree.
|
|
6
4
|
|
|
7
5
|
It is **read-only**. Never writes, never hits the network. Safe to run any time.
|
|
@@ -77,5 +75,5 @@ The scoped view still emits the project-level metadata header (name, framework,
|
|
|
77
75
|
## Notes for AI tools
|
|
78
76
|
|
|
79
77
|
- The JSON shape is stable; parse it rather than scraping the human output when you need a specific field.
|
|
80
|
-
-
|
|
78
|
+
- `framework` is normally auto-detected. If it is `null`, inspect the project before choosing framework-specific guidance.
|
|
81
79
|
- The command runs in any directory that contains `.fimo/project.json` or one of its ancestors. If you're not in a Fimo project, `describe` will run against whatever directory you point it at (it doesn't require Fimo credentials).
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Domains
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
`fimo domains` is the surface for everything URL-related on a project. Three resources live here, and they're easy to confuse — keep them straight:
|
|
6
4
|
|
|
7
5
|
| Resource | What it is | Plan | Per project | Source of truth |
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
# Forms workflow
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
> Package contract: run `npx fimo@latest skills get fimo-code --ref forms` for the JSON spec, generated Zod schema, submit helper, and application usage.
|
|
3
|
+
> Package contract: run `fimo skills get fimo-code --ref forms` for the JSON spec, generated Zod schema, submit helper, and application usage.
|
|
6
4
|
|
|
7
5
|
This file covers the **CLI workflow** for forms. Use it when the user wants to add a contact form, signup, feedback form, etc.
|
|
8
6
|
|
|
9
7
|
## Flow
|
|
10
8
|
|
|
11
|
-
1. Write `src/forms/{name}.json` — kebab-case filename (e.g. `contact-us.json`). For the JSON spec and field types, run `
|
|
9
|
+
1. Write `src/forms/{name}.json` — kebab-case filename (e.g. `contact-us.json`). For the JSON spec and field types, run `fimo skills get fimo-code --ref forms`.
|
|
12
10
|
2. Register with `fimo forms push {name}` — creates the form, obtains its `id`, patches it back into the JSON file.
|
|
13
11
|
3. Pre-build generates `src/forms/{name}.ts` (Zod schema + `submitX` helper). Use the same `fimo-code` reference for the generated API.
|
|
14
12
|
4. Write the application form using the generated `@/forms/{name}` module and the existing framework conventions.
|
|
15
13
|
|
|
16
|
-
Steps 1, 3, and 4 reference the `fimo-code` skill (`
|
|
14
|
+
Steps 1, 3, and 4 reference the `fimo-code` skill (`fimo skills get fimo-code`). Step 2 is the CLI command.
|
|
17
15
|
|
|
18
16
|
## CLI commands
|
|
19
17
|
|
|
@@ -45,11 +43,11 @@ Use this when the user asks "who filled out the contact form?", "how many signup
|
|
|
45
43
|
|
|
46
44
|
## "Add a contact form" recipe
|
|
47
45
|
|
|
48
|
-
1. Run `
|
|
46
|
+
1. Run `fimo skills get fimo-code --ref forms` for the JSON spec.
|
|
49
47
|
2. Write `src/forms/contact-us.json` with the required fields.
|
|
50
48
|
3. Run `fimo forms push contact-us` — the `id` is patched back into the JSON automatically.
|
|
51
49
|
4. Use the same `fimo-code` forms reference for the generated `submitContactUs` + `ContactUsSchema` API.
|
|
52
|
-
5. Run `
|
|
50
|
+
5. Run `fimo skills get fimo-code --ref labels` and load the detected framework reference for form labels.
|
|
53
51
|
6. Write the application form using the generated `@/forms/contact-us` module.
|
|
54
52
|
|
|
55
53
|
**Register BEFORE writing app code that depends on the form** — otherwise the generated `.ts` doesn't exist and the runtime fetch 404s.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Project History
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
History is scoped to the selected project environment. A restore point records the environment's CMS content and the matching Git commit so code and content can be recovered together.
|
|
6
4
|
|
|
7
5
|
Fimo also creates restore points automatically after a successful deploy, on the destination of a completed environment merge, and after direct content editing has been quiet for 30 seconds. Rapid Studio auto-saves are grouped into one content point.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# `fimo init`
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
One-stop project setup: sign in, create a new Fimo project (or link an existing one), install dependencies, and optionally set up Fimo skills for your AI tools.
|
|
6
4
|
|
|
7
5
|
## Command
|
|
@@ -13,17 +11,17 @@ fimo init [dir] [options]
|
|
|
13
11
|
`fimo init` runs the full onboarding in one shot:
|
|
14
12
|
|
|
15
13
|
1. **Signs in automatically** — if there's no session it opens the browser loopback login. In `--json` / non-TTY with no session it fails with `NOT_AUTHENTICATED` (run `fimo login` first).
|
|
16
|
-
2. **Resolves the project** — with `--project-id <id>` it
|
|
14
|
+
2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use React Router by default; `--framework nextjs` and `--framework sveltekit` select minimal framework-native shells. An optional `--starter fimo-site@1` adds a content-led starter only to a newly created project without `--project-id`.
|
|
17
15
|
3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
|
|
18
16
|
4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
|
|
19
17
|
|
|
20
18
|
| Flag | Required | Purpose |
|
|
21
19
|
| ---------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
20
|
| `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
|
|
23
|
-
| `--project-id <id>` | no |
|
|
21
|
+
| `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
|
|
24
22
|
| `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
|
|
25
23
|
| `--env <name>` | no | Env to check out when linking an existing project (defaults to `main`). |
|
|
26
|
-
| `--framework <framework>` | no | New-project scaffold: `react-router` (default)
|
|
24
|
+
| `--framework <framework>` | no | New-project scaffold: `react-router` (default), `nextjs` (App Router), or `sveltekit`. Existing repositories are preserved. |
|
|
27
25
|
| `--starter <id>` | no | Opt-in project starter for create-new (currently `fimo-site@1`). It seeds CMS content, labels, a contact form, and manual-only agents. Rejects `--project-id`. |
|
|
28
26
|
| `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
|
|
29
27
|
| `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
|
|
@@ -42,7 +40,7 @@ caller one stable result envelope; `--yes` is useful when running in a TTY but
|
|
|
42
40
|
is not required in a pipe or CI shell. The starter is never selected by default.
|
|
43
41
|
|
|
44
42
|
```bash
|
|
45
|
-
|
|
43
|
+
fimo --json init my-site \
|
|
46
44
|
--starter fimo-site@1 \
|
|
47
45
|
--org <organizationId> \
|
|
48
46
|
--no-install \
|
|
@@ -59,38 +57,39 @@ singleton, `contact` form, and labels in `main`, writes the form id into
|
|
|
59
57
|
writing anything. If dependencies were skipped, install them and run
|
|
60
58
|
`fimo validate` before starting the app so generated clients are present.
|
|
61
59
|
|
|
62
|
-
> **Zero-install:**
|
|
60
|
+
> **Zero-install:** the selected `fimo init` invocation needs no global install. `fimo projects create` is also an alias of `fimo init` (create-new path).
|
|
63
61
|
|
|
64
62
|
### Choose the application framework
|
|
65
63
|
|
|
66
|
-
Omit `--framework` for the existing React Router scaffold, or select
|
|
67
|
-
minimal
|
|
64
|
+
Omit `--framework` for the existing React Router scaffold, or select a
|
|
65
|
+
minimal framework-native shell explicitly:
|
|
68
66
|
|
|
69
67
|
```bash
|
|
70
|
-
|
|
68
|
+
fimo init my-next-site --framework nextjs --org <organizationId>
|
|
69
|
+
fimo init my-svelte-site --framework sveltekit --org <organizationId>
|
|
71
70
|
```
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
Both shells include their framework adapter, hosted-preview connector, and
|
|
73
|
+
`.fimo/config.json#runtime.framework`. They intentionally contain no schema,
|
|
75
74
|
labels, or designed website. After init, load the project rules and `fimo-code`
|
|
76
75
|
to build the requested site. The current `fimo-site@1` content starter supports
|
|
77
76
|
React Router only.
|
|
78
77
|
|
|
79
78
|
For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for Claude Code, `--agents=cursor` for Cursor, `--agents=codex` for Codex, etc. When the flag is omitted, env-var detection of the invoking harness (e.g. `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT` → claude-code) auto-targets that agent; other agents must be selected explicitly via `--agents`/`-a` or the interactive picker.
|
|
80
79
|
|
|
81
|
-
##
|
|
80
|
+
## Setting up a project by ID
|
|
82
81
|
|
|
83
|
-
Pass `--project-id <id>` to
|
|
82
|
+
Pass `--project-id <id>` to set up a known Fimo project. If the project has no code yet — for example, one just created in Fimo Studio — `init` scaffolds a fresh site into it and pushes the initial commit: the same create-new path, linked to the existing ID. If the project already has code, `init` clones it into `[dir]`, like `fimo clone`. Use `--env <name>` to check out a specific env (defaults to `main`). Without `--project-id`, `fimo init` creates a new project.
|
|
84
83
|
|
|
85
|
-
## What gets written (create-new)
|
|
84
|
+
## What gets written (create-new path)
|
|
86
85
|
|
|
87
86
|
`fimo init` (create-new path) scaffolds:
|
|
88
87
|
|
|
89
|
-
- The selected project shell: React Router by default,
|
|
88
|
+
- The selected project shell: React Router by default, Next.js App Router with `--framework nextjs`, or SvelteKit with `--framework sveltekit`
|
|
90
89
|
- `.fimo/project.json` — links this directory to the remote project (read-only after creation)
|
|
91
90
|
- `.fimo/config.json` — project, route, locale, SEO, and agent policy
|
|
92
91
|
- `.fimo/agents/` — versioned agent bundles
|
|
93
|
-
- `.env` — tenant content API URLs for
|
|
92
|
+
- `.env` — framework-specific tenant content API URLs for local development
|
|
94
93
|
- `AGENTS.md` + `CLAUDE.md` — project rules (from the template) read by AGENTS.md-compatible tools and Claude Code. Both point the agent at `fimo skills get` to load the real skills on demand.
|
|
95
94
|
- A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
|
|
96
95
|
|
|
@@ -106,7 +105,7 @@ Nothing is written into per-agent skill dirs: the rich skills are fetched on dem
|
|
|
106
105
|
|
|
107
106
|
Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
|
|
108
107
|
|
|
109
|
-
`.env` is only the bootstrap app env so local `pnpm dev` works immediately. User-managed public variables are stored with `fimo vars add` and synced into a managed `.env.local` block; hidden values use `fimo secrets add`. See `references/project-vars-and-secrets.md`.
|
|
108
|
+
`.env` is only the bootstrap app env so local `pnpm dev` works immediately. Fimo writes the tenant API aliases used by its supported frameworks; users should not discover or set those URLs manually. User-managed public variables are stored with `fimo vars add` and synced into a managed `.env.local` block; hidden values use `fimo secrets add`. See `references/project-vars-and-secrets.md`.
|
|
110
109
|
|
|
111
110
|
## Right after scaffolding
|
|
112
111
|
|
|
@@ -117,15 +116,13 @@ cd my-site
|
|
|
117
116
|
fimo rename "Acme Coffee"
|
|
118
117
|
```
|
|
119
118
|
|
|
120
|
-
**Then start the local dev loop
|
|
119
|
+
**Then start the local dev loop.** Run the app with the project's package-manager `dev` script — `pnpm dev`, `npm run dev`, `yarn dev`, or `bun dev` (match the lockfile) — in the background; it serves the site on localhost with live reload. Edit, show, iterate. You do not need to deploy to see local changes. If the initiating request did not say what to build, ask the developer — after the first preview below, never as a blocker before initializing.
|
|
121
120
|
|
|
122
121
|
```bash
|
|
123
122
|
pnpm dev & # or npm run dev / yarn dev / bun dev — the project's package manager
|
|
124
123
|
```
|
|
125
124
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
**Optional — warm the sandbox early:** only if you already know a deploy is coming, kick off a background `fimo deploy -m "chore: init" &` so the one-time ~15-30s sandbox provision + dep install happens while you work. This is a perf optimization, not a required step — skip it while you're just iterating locally. See `references/deploy.md` § Warm the sandbox early in a session.
|
|
125
|
+
Outside the first-preview path below, when a unit of work looks done, **offer** to deploy (`fimo deploy` for a hosted preview / shareable link, `fimo deploy --publish` to go live) and run it only after the developer confirms.
|
|
129
126
|
|
|
130
127
|
## Load the project context
|
|
131
128
|
|
|
@@ -135,12 +132,24 @@ After `fimo init` completes, the project root has `AGENTS.md` (universal) and `C
|
|
|
135
132
|
|
|
136
133
|
1. `cd <project-dir>` — switch into the new project.
|
|
137
134
|
2. `Read` the project rules file: `AGENTS.md` (or `CLAUDE.md` if you're Claude Code).
|
|
138
|
-
3. Run `
|
|
139
|
-
4. Load the code skill on demand: `
|
|
140
|
-
5. Follow its decision tree and load only the task reference plus the detected framework reference. For Next.js, start with `
|
|
135
|
+
3. Run `fimo describe --json` with the current invocation prefix and read the detected framework, schemas, locales, and tree.
|
|
136
|
+
4. Load the code skill on demand with the same prefix: `fimo skills get fimo-code`.
|
|
137
|
+
5. Follow its decision tree and load only the task reference plus the detected framework reference. For Next.js, start with `fimo skills get fimo-code --ref frameworks/next`, then load App Router, Pages Router, or locales only when the project shape requires it. For SvelteKit, start with `fimo skills get fimo-code --ref frameworks/sveltekit`. For Astro, `fimo skills get fimo-code --ref frameworks/astro` is the single framework reference.
|
|
141
138
|
|
|
142
139
|
Do not batch-load every reference. Progressive disclosure keeps unrelated framework and product guidance out of the coding context.
|
|
143
140
|
|
|
141
|
+
### Create the first hosted preview (create-new path)
|
|
142
|
+
|
|
143
|
+
Whenever `fimo init` created or scaffolded a new project — including a Studio-supplied `--project-id`, since Studio creates the project before any code exists — finish onboarding with exactly one plain preview deploy after init and context loading succeed, unless the user explicitly said not to deploy:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
fimo deploy -m "chore: first preview" --json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`-m` is required because you run non-interactively; the deploy validates, commits pending changes, pushes, and syncs the hosted preview. It is also the sandbox warm-up — never run a separate warm-up deploy on this path. Read `data.preview_url` and `data.dashboard_url` from the envelope and return both links. If the initiating request described a concrete site, build a minimal meaningful first screen before this single deploy; otherwise deploy the scaffolded site as-is and then ask what to build.
|
|
150
|
+
|
|
151
|
+
This first deploy creates a preview only — never add `--publish`, and treat every later deploy as offer-then-confirm. The rule does not apply when `init` cloned a project with existing code or when the work is a migration; those paths keep their normal deployment approval rules.
|
|
152
|
+
|
|
144
153
|
## Adding another AI tool to an existing project later
|
|
145
154
|
|
|
146
155
|
If a teammate joins on a different AI tool (e.g. Cursor) after the project was scaffolded for claude-code only:
|
|
@@ -155,4 +164,3 @@ The first installs the global bootstrap skill for the new agent; the second gene
|
|
|
155
164
|
## Multi-org accounts
|
|
156
165
|
|
|
157
166
|
If you belong to a single organization, `fimo init` defaults to it. If you belong to multiple and don't pass `--org`, the CLI shows an interactive picker. For `fimo init`, pass the org **id** (from the `ID` column of `fimo orgs list`) — not the slug. Use `fimo orgs switch --org <id-or-slug>` to set a default for future `fimo init` invocations. See `references/account.md`.
|
|
158
|
-
</content>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Firecrawl Integration
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
Use Firecrawl when an agent needs to research or inspect public websites: direct web answers, landing-page research, competitor structure analysis, migration prep, link extraction, and factual page snapshots. Do not use Firecrawl for private URLs, logged-in websites, or content the user has not asked you to fetch.
|
|
6
4
|
|
|
7
5
|
Current execution support is `search`, `scrape`, `map`, `crawl`, and `monitor.*`.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Integrations
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
Use integrations to enable external services for a Fimo project. API keys are stored by Fimo and never printed back to the CLI. Teammates and agents receive access to the integration, not the underlying token.
|
|
6
4
|
|
|
7
5
|
## Inspect
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Invite users
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
Invite collaborators to your Fimo organization or project. After deploying a website for the first time, suggest inviting team members so they can contribute.
|
|
6
4
|
|
|
7
5
|
## When to suggest inviting users
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# Labels workflow
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
> Package contract: run `npx fimo@latest skills get fimo-code --ref labels` for the `t()` contract and key rules, then load the detected framework reference for its label readers.
|
|
3
|
+
> Package contract: run `fimo skills get fimo-code --ref labels` for the `t()` contract and key rules, then load the detected framework reference for its label readers.
|
|
6
4
|
> For locale configuration and route-prefix validation, see **`references/locales.md`**.
|
|
7
5
|
|
|
8
6
|
This file covers the **CLI workflow** for labels: static UI copy such as nav items, buttons, headings, placeholders, alt text, and SEO strings.
|
|
9
7
|
|
|
10
8
|
## What validate does
|
|
11
9
|
|
|
12
|
-
`fimo validate` scans `src/**/*.{ts,tsx,js,jsx}` for literal `t('key')` calls
|
|
10
|
+
`fimo validate` scans `src/**/*.{ts,tsx,js,jsx,svelte}` for literal `t('key')` calls and framework-supported `<Label value="key">` elements (skipping `src/ui` and `node_modules`), then verifies every key has a value in the tenant DB for the default locale.
|
|
13
11
|
|
|
14
12
|
The database is the source of truth for visible label values. Code declares keys; it does not create visible copy.
|
|
15
13
|
|
|
@@ -55,15 +53,15 @@ Prefer `fimo validate` — this primitive is for narrow debugging/test use.
|
|
|
55
53
|
|
|
56
54
|
## When to run validate
|
|
57
55
|
|
|
58
|
-
- After adding or changing any `t()` keys in code, run `fimo validate`.
|
|
56
|
+
- After adding or changing any `t()` or `<Label>` keys in code, run `fimo validate`.
|
|
59
57
|
- If validate reports `labels/missing`, add values with `fimo labels set` or `fimo labels set-many`, then run validate again.
|
|
60
58
|
- After renaming/removing keys, clean old DB labels intentionally with `fimo labels delete` when they are no longer used.
|
|
61
59
|
|
|
62
60
|
## Workflow
|
|
63
61
|
|
|
64
|
-
1.
|
|
62
|
+
1. Declare literal label keys using the API documented for the detected framework. Run `fimo skills get fimo-code --ref labels` before writing them.
|
|
65
63
|
2. Run `fimo validate`.
|
|
66
64
|
3. Add missing values with `fimo labels set` or `fimo labels set-many`.
|
|
67
65
|
4. Editors can now change copy in the Fimo admin without code changes.
|
|
68
66
|
|
|
69
|
-
For helper signatures and code patterns, run `
|
|
67
|
+
For helper signatures and code patterns, run `fimo skills get fimo-code --ref labels` before writing code that uses `t()`.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Locales Workflow
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
This file covers CLI-side locale configuration and validation. For code integration, run `npx fimo@latest skills get fimo-code --ref locales` plus the detected framework's locale reference.
|
|
3
|
+
This file covers CLI-side locale configuration and validation. For code integration, run `fimo skills get fimo-code --ref locales` plus the detected framework's locale reference.
|
|
6
4
|
|
|
7
5
|
## Configure Locales
|
|
8
6
|
|
|
@@ -88,7 +86,7 @@ For every framework, the application owns its URL scheme and passes the resolved
|
|
|
88
86
|
|
|
89
87
|
Inspect the existing locale provider, route table, switcher, redirects, and public URLs before editing configuration. Preserve working URL behavior during the migration.
|
|
90
88
|
|
|
91
|
-
Preserve the existing locale provider, router, switcher, redirects, and public URLs. Use framework helpers only when they fit that architecture. Next.js projects run `
|
|
89
|
+
Preserve the existing locale provider, router, switcher, redirects, and public URLs. Use framework helpers only when they fit that architecture. Next.js projects run `fimo skills get fimo-code --ref frameworks/next/locales`; React Router projects load the React Router setup reference; Astro projects run `fimo skills get fimo-code --ref frameworks/astro` and pass the page-resolved locale into server reads and `getLabels`.
|
|
92
90
|
|
|
93
91
|
## Labels And Content
|
|
94
92
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Project MCP
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
The **Project MCP** lets an AI coding client use Fimo's project workflows through the Model Context Protocol. It is
|
|
6
4
|
the same Fimo tool surface exposed in two ways:
|
|
7
5
|
|
|
@@ -17,13 +15,13 @@ The local and remote Project MCP modes share the same catalog. The public Docs M
|
|
|
17
15
|
Authenticate the CLI first:
|
|
18
16
|
|
|
19
17
|
```bash
|
|
20
|
-
|
|
18
|
+
fimo login
|
|
21
19
|
```
|
|
22
20
|
|
|
23
21
|
Then configure the MCP client to launch:
|
|
24
22
|
|
|
25
23
|
```text
|
|
26
|
-
|
|
24
|
+
fimo mcp
|
|
27
25
|
```
|
|
28
26
|
|
|
29
27
|
For clients that accept a JSON command configuration, the equivalent entry is:
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# AI media tasks
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** so the task catalog and CLI stay aligned.
|
|
4
|
-
|
|
5
3
|
Use task commands for AI media. The command describes the outcome; Fimo chooses and can change the underlying generation route without changing agent instructions.
|
|
6
4
|
|
|
7
5
|
```bash
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Preview URL (without deploying)
|
|
2
2
|
|
|
3
|
-
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
-
|
|
5
3
|
**Use `fimo preview url` whenever you need the current preview link — to open it, screenshot it, hand it to another tool, or verify a change you've already deployed. Never trigger a `fimo deploy` just to refresh a URL.**
|
|
6
4
|
|
|
7
5
|
`fimo deploy` is a milestone command: it commits, pushes, syncs the sandbox, and only then prints the preview URL. `fimo preview url` skips all of that. It calls the API directly, gets a fresh 15-min token, and prints the URL. No commit, no push, no restart. Sub-second on a warm sandbox.
|