fimo 0.8.0 → 0.9.0-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/content-templates/hooks-template.eta +4 -2
- package/assets/content-templates/types-template.eta +66 -1
- package/assets/skills/fimo/SKILL.md +17 -54
- package/assets/skills/fimo-cli/SKILL.md +21 -17
- package/assets/skills/fimo-cli/references/agent-setup.md +36 -53
- package/assets/skills/fimo-cli/references/agents.md +4 -4
- package/assets/skills/fimo-cli/references/content.md +62 -3
- package/assets/skills/fimo-cli/references/deploy.md +1 -1
- package/assets/skills/fimo-cli/references/forms.md +1 -1
- package/assets/skills/fimo-cli/references/init.md +16 -24
- package/assets/skills/fimo-cli/references/integrations/firecrawl.md +20 -4
- package/assets/skills/fimo-cli/references/integrations.md +5 -1
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +14 -11
- package/assets/skills/fimo-cli/references/projects.md +1 -1
- package/assets/skills/fimo-cli/references/support.md +11 -9
- package/assets/skills/fimo-cli/references/webhooks.md +164 -0
- package/assets/skills/fimo-code/SKILL.md +67 -0
- package/assets/skills/{fimo → fimo-code}/references/content.md +86 -15
- package/assets/skills/fimo-studio/SKILL.md +5 -3
- package/assets/skills/fimo-studio/references/cms.md +9 -1
- package/assets/skills/fimo-studio/references/webhooks.md +42 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +306 -297
- package/dist/runtime/content/client/createContentClient.js +2 -1
- package/dist/runtime/content/client/internal.js +1 -0
- package/dist/runtime/content/client/types.d.ts +16 -0
- package/dist/scripts/validate-schemas.js +42 -1
- package/package.json +1 -1
- package/release.json +2 -2
- package/scripts/postinstall.mjs +11 -65
- package/templates/react-router/AGENTS.md +44 -0
- package/templates/react-router/CLAUDE.md +5 -0
- package/templates/react-router/package.json +1 -1
- package/assets/agents-starter/AGENTS.md +0 -66
- /package/assets/skills/{fimo → fimo-code}/assets/react-router-locales/navigation.tsx +0 -0
- /package/assets/skills/{fimo → fimo-code}/assets/react-router-locales/routes.ts +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/assets.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/design.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/forms.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/labels.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/locales.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/setup-plain-vite.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/setup-react-router.md +0 -0
- /package/assets/skills/{fimo → fimo-code}/references/ui.md +0 -0
|
@@ -14,12 +14,14 @@ This file covers the **CLI workflow** for content. Use it when the user wants to
|
|
|
14
14
|
4. Seed entries via `fimo entries create`. Generate cover images first with `fimo image generate` if needed (see `media.md` / `assets.md`).
|
|
15
15
|
5. Write React pages that import from `@/schemas/{Uid}` and render with `fimo/ui` components.
|
|
16
16
|
|
|
17
|
-
Steps 1, 3, and 5 reference the
|
|
17
|
+
Steps 1, 3, and 5 reference the `fimo-code` skill (`npx fimo@latest skills get fimo-code`) for shape and React API. Steps 2 and 4 are CLI commands documented here.
|
|
18
18
|
|
|
19
19
|
## Schema CLI commands
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
22
|
fimo schemas push [TypeName] # push JSON to API (create or update). Omit TypeName to push all.
|
|
23
|
+
fimo schemas push <TypeName> --rename old.path=new.path
|
|
24
|
+
# preserve a renamed field; repeat --rename for multiple fields.
|
|
23
25
|
# Pushing all sends every schema as ONE atomic batch, so types that
|
|
24
26
|
# reference each other (even cycles) can be added in a single push.
|
|
25
27
|
# Files not present are never deleted — use `schemas delete` for that.
|
|
@@ -32,11 +34,11 @@ The command is `fimo schemas` (plural). There is no singular `fimo schema` alias
|
|
|
32
34
|
|
|
33
35
|
All commands accept `-C, --cwd <dir>` to point at a different project directory.
|
|
34
36
|
|
|
35
|
-
Schema transitions are automatic. Adding fields and changing labels preserve content. Removing a field removes only
|
|
37
|
+
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-singleton removes that type's entries and cleans inbound references; singleton-to-collection preserves its entry. Run `fimo validate` after pushing.
|
|
36
38
|
|
|
37
39
|
## Entries CLI commands
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
Use singular commands for one entry. Bulk create and per-entry bulk update also accept JSON files or stdin.
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
44
|
fimo entries create <TypeName> --body '<json>'
|
|
@@ -46,6 +48,11 @@ fimo entries list <TypeName> --locale es
|
|
|
46
48
|
fimo entries get <TypeName> <id> [--locale es]
|
|
47
49
|
fimo entries update <TypeName> <id> [--locale es] --body '<json>'
|
|
48
50
|
fimo entries delete <TypeName> <id> [--locale es]
|
|
51
|
+
fimo entries query (--sql '<select>' | --file <path> | --stdin)
|
|
52
|
+
fimo entries bulk-create <TypeName> (--body '<json-array>' | --file <path> | --stdin)
|
|
53
|
+
fimo entries bulk-update <TypeName> (--ids <id1>,<id2> | --where '<json>') --body '<json>'
|
|
54
|
+
fimo entries bulk-update <TypeName> (--file <path> | --stdin)
|
|
55
|
+
fimo entries bulk-delete <TypeName> (--ids <id1>,<id2> | --where '<json>') [--locale es]
|
|
49
56
|
```
|
|
50
57
|
|
|
51
58
|
`--body` is a **required** option on `create` and `update`. Its JSON shape (where `slug` goes, how `media` fields look, Tiptap richtext format) lives in `fimo/references/content.md`. **Always read that first before constructing an entry payload — slug must be inside `data`, media has a specific shape, richtext must be Tiptap JSONContent.**
|
|
@@ -74,6 +81,58 @@ Polymorphic references declare `targets: ["Post", "Product"]` instead of `target
|
|
|
74
81
|
|
|
75
82
|
In generated React code, the equivalent is `populate: ['author', 'contributors'] as const` in the schema hook/query params. Let hooks infer the result when possible; if a named TypeScript shape is needed, use the generated `BlogPostResult<TFields, TPopulate>` type documented in `fimo/references/content.md`. Writes use the separate generated `BlogPostInput` type.
|
|
76
83
|
|
|
84
|
+
### Read-only SQL
|
|
85
|
+
|
|
86
|
+
Use `entries query` when SQL is clearer than list filters, especially for grouping and aggregation. It requires content view access, accepts one `SELECT` statement, can only read the `entries` table, and supports common aggregation, JSON, text, date, and window functions. Queries time out after five seconds and return at most 1,000 rows.
|
|
87
|
+
|
|
88
|
+
**Never use SQL for content writes.** SQL writes are rejected because they would bypass schema validation, locale and reference handling, content-change events, and current or future webhooks. Use `entries create`, `entries update`, `entries delete`, or their bulk variants so every mutation follows the content domain path.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
fimo entries query --sql "SELECT content_type, count(*) AS total FROM entries GROUP BY content_type"
|
|
92
|
+
fimo entries query --sql "SELECT document_id AS id, data->>'title' AS title FROM entries WHERE content_type = 'BlogPost' LIMIT 20"
|
|
93
|
+
fimo entries query --file query.sql
|
|
94
|
+
cat query.sql | fimo entries query --stdin
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
SQL exposes the raw internal representation. `document_id` is the stable ID used by `fimo entries`, content tools, references, and the API. `id` is the internal ID of one exact locale variant. When query results will feed another Fimo command or tool, select `document_id AS id`; use `locale` to select a variant.
|
|
98
|
+
|
|
99
|
+
The available columns are `id`, `document_id`, `content_type`, `locale`, `slug`, `data`, `created_at`, and `updated_at`. Schema fields live inside the JSONB `data` column. If a safe read is blocked because a SQL function is unavailable, tell the user which function is missing and use the built-in `supportReport` tool when the platform gap materially blocks the task. Do not bypass the restriction with a write.
|
|
100
|
+
|
|
101
|
+
### Bulk mutations
|
|
102
|
+
|
|
103
|
+
`bulk-create` takes an array of regular create bodies. Inline JSON, a file, and stdin all carry the same array shape:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
fimo entries bulk-create BlogPost --body '[{"data":{"title":"First"}},{"data":{"title":"Second"},"locale":"es"}]'
|
|
107
|
+
fimo entries bulk-create BlogPost --file posts.json
|
|
108
|
+
cat posts.json | fimo entries bulk-create BlogPost --stdin
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`bulk-update` applies the regular update body to explicit IDs or the normal `--where` filter:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
fimo entries bulk-update BlogPost --ids <id1>,<id2> --body '{"data":{"status":"published"}}'
|
|
115
|
+
fimo entries bulk-update BlogPost --where '{"status":"draft"}' --body '{"data":{"status":"published"}}'
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
For different changes per entry, `--file` and `--stdin` accept an array of `{ "id", "body" }` records:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
[
|
|
122
|
+
{ "id": "<id1>", "body": { "data": { "status": "published" } } },
|
|
123
|
+
{ "id": "<id2>", "body": { "data": { "featured": true } } }
|
|
124
|
+
]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
fimo entries bulk-update BlogPost --file updates.json
|
|
129
|
+
cat updates.json | fimo entries bulk-update BlogPost --stdin
|
|
130
|
+
fimo entries bulk-delete BlogPost --ids <id1>,<id2>
|
|
131
|
+
fimo entries bulk-delete BlogPost --where '{"archived":true}'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
77
136
|
For reference schema JSON and entry value shape, load `fimo/references/content.md` § Reference fields. The short version:
|
|
78
137
|
|
|
79
138
|
```json
|
|
@@ -24,7 +24,7 @@ fimo deploy -m "<commit message>" --publish # also publish a new live version
|
|
|
24
24
|
- **`-m`** is the commit message used when there are uncommitted local changes; required in non-interactive shells. Omit if the working tree is already clean.
|
|
25
25
|
- **`--no-restart`** — tells the sandbox to skip the dev-server restart and let Vite HMR pick up the change. Shaves ~3s per deploy. See "Skipping the dev-server restart" below for when it's safe.
|
|
26
26
|
|
|
27
|
-
Public project variables
|
|
27
|
+
Public project variables managed with `fimo vars add` and `fimo vars update` are injected into preview/build/deploy environments. Project secrets are not injected into app builds; agents request secrets separately through their own config. See `references/project-vars-and-secrets.md`.
|
|
28
28
|
|
|
29
29
|
## Warm the sandbox early in a session (optional)
|
|
30
30
|
|
|
@@ -13,7 +13,7 @@ This file covers the **CLI workflow** for forms. Use it when the user wants to a
|
|
|
13
13
|
3. Pre-build generates `src/forms/{name}.ts` (Zod schema + `submitX` helper). See `fimo/references/forms.md` for the generated API.
|
|
14
14
|
4. Write a React component that imports from `@/forms/{name}`.
|
|
15
15
|
|
|
16
|
-
Steps 1, 3, and 4 reference the
|
|
16
|
+
Steps 1, 3, and 4 reference the `fimo-code` skill (`npx fimo@latest skills get fimo-code`). Step 2 is the CLI command.
|
|
17
17
|
|
|
18
18
|
## CLI commands
|
|
19
19
|
|
|
@@ -25,12 +25,11 @@ fimo init [dir] [options]
|
|
|
25
25
|
| `--env <name>` | no | Env to check out when linking an existing project (defaults to `main`). |
|
|
26
26
|
| `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
|
|
27
27
|
| `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
|
|
28
|
-
| `--skills` / `--no-skills` | yes in non-TTY |
|
|
29
|
-
| `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to
|
|
28
|
+
| `--skills` / `--no-skills` | yes in non-TTY | Install the global Fimo skill (or skip it). |
|
|
29
|
+
| `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to skip installing the global skill. |
|
|
30
30
|
| `-a, --agent <id>` | alternative | Repeatable form: `-a claude-code -a cursor`. |
|
|
31
|
-
| `--mode <symlink\|copy>` | no | Project skill install method. |
|
|
32
31
|
| `--template-root <path>` | no | Override the bundled template (development only). |
|
|
33
|
-
| `-y, --yes` | no |
|
|
32
|
+
| `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
|
|
34
33
|
|
|
35
34
|
In a non-TTY shell the create-new path requires `[dir]`, `--install` / `--no-install`, and `--skills` / `--no-skills` (and `--org` if you have no active org and belong to multiple orgs). Without them the command exits with `Cannot prompt in a non-interactive shell.`
|
|
36
35
|
|
|
@@ -40,7 +39,7 @@ For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for C
|
|
|
40
39
|
|
|
41
40
|
## Linking an existing project
|
|
42
41
|
|
|
43
|
-
Pass `--project-id <id>` to link an EXISTING project instead of creating one. This clones the project's git repo into `[dir]` and writes the local `.fimo.settings.json
|
|
42
|
+
Pass `--project-id <id>` to link an EXISTING project instead of creating one. This clones the project's git repo into `[dir]` and writes the local `.fimo.settings.json`, the same as `fimo clone` (init's `--project-id` path reuses it). Use `--env <name>` to check out a specific env (defaults to `main`). Without `--project-id`, `fimo init` creates a new project.
|
|
44
43
|
|
|
45
44
|
## What gets written (create-new)
|
|
46
45
|
|
|
@@ -49,19 +48,14 @@ Pass `--project-id <id>` to link an EXISTING project instead of creating one. Th
|
|
|
49
48
|
- The project template (Vite + React 19 + TypeScript + Tailwind v4 + shadcn/ui + react-router)
|
|
50
49
|
- `.fimo.settings.json` — links this directory to the remote project (read-only after creation)
|
|
51
50
|
- `.env` — initial env vars (currently just `VITE_API_URL`)
|
|
52
|
-
- `AGENTS.md` — project rules read by
|
|
53
|
-
-
|
|
54
|
-
- `claude-code` → `CLAUDE.md` + `.claude/settings.json`
|
|
55
|
-
- `cursor` → `.cursor/rules/fimo.mdc`
|
|
56
|
-
- `windsurf` → `.windsurfrules`
|
|
57
|
-
- `gemini-cli` → `GEMINI.md`
|
|
58
|
-
- codex / opencode / aider / others → no extra file; AGENTS.md is read natively
|
|
59
|
-
- The project-scope `fimo` skill (npm package surface: schemas, forms, `t()`, `fimo/ui` components) copied into each selected agent's skill dir (`.claude/skills/fimo/`, `.cursor/skills/fimo/`, etc.). Version-locked to the bundled `fimo` package — the installed `SKILL.md` is stamped with `fimoVersion`. Refresh later with `fimo skills sync`. See `references/agent-setup.md`.
|
|
60
|
-
- A git repository with `fimo` as the remote, an initial commit, and an initial push
|
|
51
|
+
- `AGENTS.md` + `CLAUDE.md` — project rules (from the template) read by AGENTS.md-compatible tools and Claude Code. Both point the agent at `fimo skills get` to load the real skills on demand.
|
|
52
|
+
- A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
|
|
61
53
|
|
|
62
|
-
|
|
54
|
+
Nothing is written into per-agent skill dirs: the rich skills are fetched on demand via `fimo skills get <name>`, never copied into the project. `fimo init` separately installs the small global `fimo` bootstrap skill for the agents you select (machine-wide, not in the project) unless you pass `--no-skills`. For other agents' rule-file variants (`.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`), run `fimo rules sync`. See `references/agent-setup.md`.
|
|
63
55
|
|
|
64
|
-
|
|
56
|
+
Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
|
|
57
|
+
|
|
58
|
+
`.env` is only the bootstrap app env so local `pnpm dev` works immediately. User-managed public variables are stored with `fimo vars add` and synced into a managed `.env.local` block; hidden values use `fimo secrets add`. See `references/project-vars-and-secrets.md`.
|
|
65
59
|
|
|
66
60
|
## Right after scaffolding
|
|
67
61
|
|
|
@@ -84,17 +78,14 @@ When a unit of work looks done, **offer** to deploy (`fimo deploy` for a hosted
|
|
|
84
78
|
|
|
85
79
|
## Load the project context
|
|
86
80
|
|
|
87
|
-
After `fimo init` completes, the project root has
|
|
88
|
-
|
|
89
|
-
- `AGENTS.md` (universal) plus the per-agent variant for the AI tool you're running in (e.g. `CLAUDE.md` for Claude Code, `.cursor/rules/fimo.mdc` for Cursor)
|
|
90
|
-
- `.claude/skills/fimo/SKILL.md` (or the equivalent per-agent path) — the project-scope `fimo` skill, version-locked to the installed `fimo` package
|
|
81
|
+
After `fimo init` completes, the project root has `AGENTS.md` (universal) and `CLAUDE.md` (for Claude Code) from the template.
|
|
91
82
|
|
|
92
83
|
**These files came into existence mid-session, so they may not be auto-loaded by the harness.** Explicitly:
|
|
93
84
|
|
|
94
85
|
1. `cd <project-dir>` — switch into the new project.
|
|
95
86
|
2. `Read` the project rules file: `AGENTS.md` (or `CLAUDE.md` if you're Claude Code).
|
|
96
|
-
3.
|
|
97
|
-
4. From the
|
|
87
|
+
3. Load the code skill on demand: `npx fimo@latest skills get fimo-code`.
|
|
88
|
+
4. From the `fimo-code` skill's "load these references up front" section, batch-read the referenced docs (`npx fimo@latest skills get fimo-code --ref content`, `--ref forms`, `--ref assets`, `--ref labels`, `--ref locales`, `--ref ui`) before generating any significant code.
|
|
98
89
|
|
|
99
90
|
Once those are in context, generation respects the project's conventions (schemas, `t()`, `fimo/ui` components, asset handling).
|
|
100
91
|
|
|
@@ -103,10 +94,11 @@ Once those are in context, generation respects the project's conventions (schema
|
|
|
103
94
|
If a teammate joins on a different AI tool (e.g. Cursor) after the project was scaffolded for claude-code only:
|
|
104
95
|
|
|
105
96
|
```bash
|
|
106
|
-
fimo skills install --agents=cursor #
|
|
97
|
+
fimo skills install --agents=cursor # install the global Fimo skill for cursor
|
|
98
|
+
fimo rules sync --agents=cursor # generate cursor's rule file (.cursor/rules/fimo.mdc)
|
|
107
99
|
```
|
|
108
100
|
|
|
109
|
-
|
|
101
|
+
The first installs the global bootstrap skill for the new agent; the second generates its project rule file from `AGENTS.md`. See `references/agent-setup.md`.
|
|
110
102
|
|
|
111
103
|
## Multi-org accounts
|
|
112
104
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
4
|
|
|
5
|
-
Use Firecrawl when an agent needs to inspect public websites: 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.
|
|
5
|
+
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
6
|
|
|
7
7
|
Current execution support is `search`, `scrape`, `map`, `crawl`, and `monitor.*`.
|
|
8
8
|
|
|
@@ -47,6 +47,20 @@ Search the web:
|
|
|
47
47
|
fimo integrations run firecrawl search --query "Example Domain" --max-results 3
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
Search returns query-relevant excerpts with their source URLs. Narrow results when the request names a site, recency,
|
|
51
|
+
source type, category, or geography:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
fimo integrations run firecrawl search --query "latest React release" --sources web,news --freshness week
|
|
55
|
+
fimo integrations run firecrawl search --query "Firecrawl search API" --include-domains firecrawl.dev --categories research
|
|
56
|
+
fimo integrations run firecrawl search --query "Barcelona developer events" --location "Barcelona, Spain" --country ES
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Search options are `--sources web,news,images`, `--categories github,research,pdf`, `--include-domains`,
|
|
60
|
+
`--exclude-domains`, `--freshness hour|day|week|month|year`, `--location`, `--country`,
|
|
61
|
+
and `--no-highlights`. Do not combine `--include-domains` and `--exclude-domains`. Query-relevant highlights are on by
|
|
62
|
+
default.
|
|
63
|
+
|
|
50
64
|
Default markdown scrape:
|
|
51
65
|
|
|
52
66
|
```bash
|
|
@@ -179,10 +193,12 @@ fimo deploy
|
|
|
179
193
|
If they bring a key, run `fimo integrations connect firecrawl --name <name> --token-stdin`, then
|
|
180
194
|
`fimo integrations enable firecrawl --connection <name>`.
|
|
181
195
|
6. For one-off research, pick the smallest action that answers the question:
|
|
182
|
-
- `search` to
|
|
183
|
-
- `scrape` to read one known page.
|
|
196
|
+
- `search` to get query-relevant excerpts and source URLs.
|
|
197
|
+
- `scrape` to read one known page when the excerpt lacks context or exact wording matters.
|
|
184
198
|
- `map` to collect URLs from one site.
|
|
185
199
|
- `crawl --limit <small>` to read several pages.
|
|
200
|
+
Treat search excerpts as concise evidence for straightforward questions. Scrape the source for full context,
|
|
201
|
+
exact quotations, implementation details, ambiguous claims, or high-stakes verification.
|
|
186
202
|
7. For a project agent, update `integrations`, validate, preview with `fimo agents integrations <agent>`, then deploy.
|
|
187
203
|
8. Keep findings in the agent report or task output; do not write scraped content into source files unless the user asks.
|
|
188
204
|
|
|
@@ -204,7 +220,7 @@ fimo integrations run firecrawl scrape --url https://competitor.example --format
|
|
|
204
220
|
Find likely source pages:
|
|
205
221
|
|
|
206
222
|
```bash
|
|
207
|
-
fimo integrations run firecrawl search --query "acme pricing page" --max-results 5 --json
|
|
223
|
+
fimo integrations run firecrawl search --query "acme pricing page" --max-results 5 --include-domains acme.example --json
|
|
208
224
|
```
|
|
209
225
|
|
|
210
226
|
Collect a simple URL map:
|
|
@@ -67,7 +67,7 @@ Use `connect` for provider accounts, workspaces, OAuth installs, and API-key acc
|
|
|
67
67
|
fimo integrations run firecrawl scrape --url https://example.com
|
|
68
68
|
fimo integrations run firecrawl scrape --url https://example.com --formats markdown,summary,links
|
|
69
69
|
fimo integrations run firecrawl scrape --url https://example.com --connection client-b
|
|
70
|
-
fimo integrations run firecrawl search --query "Example Domain" --max-results 3
|
|
70
|
+
fimo integrations run firecrawl search --query "Example Domain" --max-results 3 --include-domains example.com
|
|
71
71
|
fimo integrations run firecrawl map --url https://example.com --limit 20
|
|
72
72
|
fimo integrations run firecrawl crawl --url https://example.com --limit 3 --formats markdown
|
|
73
73
|
fimo integrations run firecrawl monitor.create --name pricing --url https://example.com/pricing --schedule hourly
|
|
@@ -76,6 +76,10 @@ fimo integrations run firecrawl monitor.list
|
|
|
76
76
|
|
|
77
77
|
Firecrawl execution supports `search`, `scrape`, `map`, `crawl`, and `monitor.*` lifecycle tools. The default scrape/crawl output format is `markdown`; supported formats are `markdown`, `summary`, `links`, `images`, `html`, and `raw-html`.
|
|
78
78
|
|
|
79
|
+
Firecrawl search returns query-relevant excerpts by default. Use them for direct, sourced answers and scrape only when
|
|
80
|
+
full context or exact wording is needed. Search can be narrowed with source, category, domain, freshness, location,
|
|
81
|
+
and country options; see the Firecrawl reference for the full command shape.
|
|
82
|
+
|
|
79
83
|
Use `--connection <alias>` only for one run when a named connection already exists. It does not change the project default
|
|
80
84
|
integration setup.
|
|
81
85
|
|
|
@@ -9,12 +9,13 @@ There is no private-variable mode. If leaking the value would be a problem, use
|
|
|
9
9
|
## Public Variables
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
fimo vars
|
|
12
|
+
fimo vars add VITE_PUBLIC_SITE_URL https://example.com
|
|
13
|
+
fimo vars update VITE_PUBLIC_SITE_URL https://www.example.com
|
|
13
14
|
fimo vars list
|
|
14
15
|
fimo vars unset VITE_PUBLIC_SITE_URL
|
|
15
16
|
```
|
|
16
17
|
|
|
17
|
-
`fimo vars
|
|
18
|
+
`fimo vars add` refuses to replace an existing variable. Use `fimo vars update` when the variable already exists. All variable writes refresh the managed block in `.env.local` so local development can use it immediately. Fimo also injects public variables into preview, build, and deploy environments.
|
|
18
19
|
|
|
19
20
|
To refresh local values later:
|
|
20
21
|
|
|
@@ -30,13 +31,15 @@ Variables are public by design. They may use browser-safe prefixes such as `VITE
|
|
|
30
31
|
## Secrets
|
|
31
32
|
|
|
32
33
|
```bash
|
|
33
|
-
fimo secrets
|
|
34
|
-
fimo secrets
|
|
34
|
+
fimo secrets add FIRECRAWL_API_KEY --stdin
|
|
35
|
+
fimo secrets update FIRECRAWL_API_KEY --stdin
|
|
36
|
+
fimo secrets add SLACK_BOT_TOKEN --value "$SLACK_BOT_TOKEN"
|
|
35
37
|
fimo secrets list
|
|
36
38
|
fimo secrets unset FIRECRAWL_API_KEY
|
|
37
39
|
```
|
|
38
40
|
|
|
39
41
|
Secret values are hidden after write. Listing secrets shows the key and a masked value, never the plaintext.
|
|
42
|
+
`fimo secrets add` refuses to replace an existing value. Use `fimo secrets update` for an intentional rotation.
|
|
40
43
|
|
|
41
44
|
Secrets are not written to `.env.local`, preview app env files, browser bundles, or generated project files. Secrets cannot use public prefixes such as `VITE_`, `PUBLIC_`, or `NEXT_PUBLIC_`; those prefixes are for public variables.
|
|
42
45
|
|
|
@@ -44,7 +47,7 @@ Secrets are not written to `.env.local`, preview app env files, browser bundles,
|
|
|
44
47
|
|
|
45
48
|
`fimo init` writes `.env` for bootstrap app runtime values such as `VITE_API_URL`. This lets `pnpm dev` work without a Fimo wrapper.
|
|
46
49
|
|
|
47
|
-
`fimo vars
|
|
50
|
+
`fimo vars add`, `fimo vars update`, and `fimo vars pull` write public project variables to a managed block in `.env.local`.
|
|
48
51
|
|
|
49
52
|
Local env files are ignored by git in Fimo projects. They are for local development only; deployment reads project variables from Fimo and injects them into the remote build.
|
|
50
53
|
|
|
@@ -56,15 +59,15 @@ Agents receive only the secrets they request in their own config.
|
|
|
56
59
|
fimo agents secrets add seo-publisher FIRECRAWL_API_KEY
|
|
57
60
|
fimo agents secrets list seo-publisher
|
|
58
61
|
fimo agents secrets remove seo-publisher FIRECRAWL_API_KEY
|
|
59
|
-
fimo validate
|
|
62
|
+
fimo agents validate
|
|
60
63
|
```
|
|
61
64
|
|
|
62
|
-
`fimo agents secrets add` edits `agents/<name>/config.yaml`. It does not create or rotate the secret value. Use `fimo secrets
|
|
65
|
+
`fimo agents secrets add` edits `agents/<name>/config.yaml`. It does not create or rotate the secret value. Use `fimo secrets add` to create the value or `fimo secrets update` to rotate it.
|
|
63
66
|
|
|
64
|
-
`fimo validate` checks that required agent secrets exist in the project. A running agent keeps the environment it started with; the next run reads the deployed agent config again.
|
|
67
|
+
`fimo agents validate` checks that required agent secrets exist in the project. A running agent keeps the environment it started with; the next run reads the deployed agent config again.
|
|
65
68
|
|
|
66
69
|
## Choosing Between Them
|
|
67
70
|
|
|
68
|
-
- If the value can safely be visible in browser code or page source, use `fimo vars
|
|
69
|
-
- If leaking the value would be a problem, use `fimo secrets
|
|
70
|
-
- If an agent needs a secret, first store it with `fimo secrets
|
|
71
|
+
- If the value can safely be visible in browser code or page source, use `fimo vars add`.
|
|
72
|
+
- If leaking the value would be a problem, use `fimo secrets add`.
|
|
73
|
+
- If an agent needs a secret, first store it with `fimo secrets add`, then request it in that agent config with `fimo agents secrets add`.
|
|
@@ -29,7 +29,7 @@ fimo projects rename <name> [projectId] [-C <dir>] # local-only: set seo.siteN
|
|
|
29
29
|
fimo clone [projectId] [dir] [--env <name>] # same as `fimo projects clone`
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Use the top-level shortcut for the common "get this project onto my machine" workflow. After clone succeeds, `cd` into the printed directory
|
|
32
|
+
Use the top-level shortcut for the common "get this project onto my machine" workflow. After clone succeeds, `cd` into the printed directory, `Read` the project's `AGENTS.md`, and load the code skill with `npx fimo@latest skills get fimo-code` before generating code.
|
|
33
33
|
|
|
34
34
|
## Top-level shortcuts (current project)
|
|
35
35
|
|
|
@@ -4,20 +4,22 @@
|
|
|
4
4
|
|
|
5
5
|
`fimo support report` sends a project-scoped problem to Fimo support. It automatically includes the project, current environment, and CLI version so support can start investigating without asking the user to repeat that context.
|
|
6
6
|
|
|
7
|
-
## When to
|
|
7
|
+
## When to prepare it
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Prepare a report proactively when:
|
|
10
10
|
|
|
11
11
|
- A Fimo command, API, preview, deploy, sandbox, or platform operation repeatedly fails or returns an unexpected response.
|
|
12
12
|
- A documented or previously working API or CLI argument is rejected, ignored, or behaves differently from its contract.
|
|
13
13
|
- A supported operation only works through an undocumented workaround or an unnecessarily complex sequence.
|
|
14
14
|
- A Fimo API repeatedly times out or is abnormally slow enough to disrupt the workflow.
|
|
15
|
-
- A missing Fimo capability blocks completion
|
|
15
|
+
- A confirmed missing Fimo capability blocks completion or forces a fragile or heavily manual workaround.
|
|
16
16
|
- The remaining problem or capability gap appears to be in Fimo rather than the user's application code.
|
|
17
17
|
|
|
18
18
|
For failures, read the error and try one safe, relevant recovery step before reporting. Feature requests do not need a failed recovery attempt; confirm that the capability is actually absent.
|
|
19
19
|
|
|
20
|
-
Do not
|
|
20
|
+
Do not interrupt the user's main work to prepare a report. Complete it, use a safe workaround, or preserve progress first. Then use the built-in `supportReport` tool without waiting for the user to request it. Do not stop after merely describing the Fimo problem or gap.
|
|
21
|
+
|
|
22
|
+
Do not report ordinary application bugs, small conveniences, vague wishlist items, one-off latency, speculative gaps, or failures you have not inspected. A clearly documented unsupported capability is still worth reporting when its absence crosses the blocking threshold above; describe it as a feature request rather than a bug.
|
|
21
23
|
|
|
22
24
|
## What to write
|
|
23
25
|
|
|
@@ -33,22 +35,22 @@ Keep the report factual and short:
|
|
|
33
35
|
|
|
34
36
|
Do not include secrets, environment values, raw shell history, hidden reasoning, full source files, or unrelated conversation history.
|
|
35
37
|
|
|
36
|
-
##
|
|
38
|
+
## Sending
|
|
39
|
+
|
|
40
|
+
Agents should use the built-in `supportReport` tool after the main work is complete or safely preserved. The tool submits through this CLI command and records the normal tool activity in chat.
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
To inspect the exact CLI payload manually without sending it:
|
|
39
43
|
|
|
40
44
|
```bash
|
|
41
45
|
fimo support report --message-file /tmp/fimo-support-report.md --preview --json
|
|
42
46
|
```
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
To send non-interactively:
|
|
45
49
|
|
|
46
50
|
```bash
|
|
47
51
|
fimo support report --message-file /tmp/fimo-support-report.md --yes --json
|
|
48
52
|
```
|
|
49
53
|
|
|
50
|
-
`--yes` means the report has already been reviewed and approved. Never pass it preemptively or report automatically.
|
|
51
|
-
|
|
52
54
|
For a person using an interactive terminal:
|
|
53
55
|
|
|
54
56
|
```bash
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Outbound webhooks
|
|
2
|
+
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** so the event catalog and delivery commands match the platform.
|
|
4
|
+
|
|
5
|
+
> **Beta:** Test each destination and inspect its delivery history before depending on it in production.
|
|
6
|
+
|
|
7
|
+
Use `fimo webhooks` to send project events to external HTTPS endpoints. The CLI and Studio edit the same project-wide configurations and delivery history. The CLI has no provider presets: inspect the destination's API documentation, then pass its URL, headers, and JSON body explicitly.
|
|
8
|
+
|
|
9
|
+
Webhook commands require Full Access to the project. Do not attempt them when the current CLI identity has Edit, Comment, View, or agent access; the API enforces the same permission boundary as Studio.
|
|
10
|
+
|
|
11
|
+
## Start from the live event catalog
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
fimo webhooks events
|
|
15
|
+
fimo webhooks events form.submitted
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Run this before writing a custom payload. The list shows supported event types, descriptions, and valid
|
|
19
|
+
`event.data...` template variables. Pass one event name to get its example payload too. The initial families are:
|
|
20
|
+
|
|
21
|
+
- Forms: `form.submitted`
|
|
22
|
+
- Publish: `publish.started`, `publish.succeeded`, `publish.failed`, `publish.unpublished`
|
|
23
|
+
- Agents: run started/completed/failed/cancelled and review requested/resolved
|
|
24
|
+
- Analytics: `analytics.report_ready`
|
|
25
|
+
- Media: uploaded/updated/deleted/generated/processing_failed
|
|
26
|
+
- Entries: `entry.changed`
|
|
27
|
+
|
|
28
|
+
Do not guess variable paths. The common envelope is:
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"id": "event-id",
|
|
33
|
+
"type": "form.submitted",
|
|
34
|
+
"version": 1,
|
|
35
|
+
"test": false,
|
|
36
|
+
"createdAt": "2026-07-17T10:00:00.000Z",
|
|
37
|
+
"project": { "id": "project-id" },
|
|
38
|
+
"env": { "name": "main" },
|
|
39
|
+
"data": {}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Omit `--body` to send this full envelope. Prefer that default when the receiver can accept Fimo's shape.
|
|
44
|
+
|
|
45
|
+
## Create a provider-specific request
|
|
46
|
+
|
|
47
|
+
Store credentials as project secrets, never literal header flags:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
printf '%s' "$RESEND_API_KEY" | fimo secrets add RESEND_API_KEY --stdin
|
|
51
|
+
|
|
52
|
+
fimo webhooks create waitlist-resend \
|
|
53
|
+
--event form.submitted \
|
|
54
|
+
--form waitlist \
|
|
55
|
+
--url https://api.resend.com/contacts \
|
|
56
|
+
--header "Authorization=bearer:RESEND_API_KEY" \
|
|
57
|
+
--body '{"email":"{{ event.data.submission.data.email }}"}'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`fimo secrets add` refuses to replace an existing value. Use `fimo secrets update` for an intentional rotation.
|
|
61
|
+
|
|
62
|
+
Header sources:
|
|
63
|
+
|
|
64
|
+
- `Name=secret:KEY`: secret is the complete value
|
|
65
|
+
- `Name=bearer:KEY`: `Bearer ` plus the secret
|
|
66
|
+
- `Name=token:KEY`: `token ` plus the secret
|
|
67
|
+
- `Name=literal:value`: non-secret fixed value
|
|
68
|
+
|
|
69
|
+
Secret-backed values resolve when a delivery runs, so rotating a project secret updates later deliveries without editing the webhook. Fimo masks destination URLs, credentials, payload secrets, and response excerpts in CLI and Studio output.
|
|
70
|
+
|
|
71
|
+
## Shape custom JSON safely
|
|
72
|
+
|
|
73
|
+
`--body` accepts JSON with exact `{{ event... }}` substitutions in values:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
fimo webhooks create publish-slack \
|
|
77
|
+
--event publish.succeeded \
|
|
78
|
+
--url https://hooks.slack.com/services/... \
|
|
79
|
+
--body '{"text":"Published {{ event.data.publication.url }}"}'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use `--body @path/to/payload.json` for a file or `--body -` for stdin. Paths resolve from `-C` or the current
|
|
83
|
+
project directory.
|
|
84
|
+
|
|
85
|
+
When a variable occupies the entire JSON value, objects and arrays retain their JSON type:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"submission": "{{ event.data.submission }}",
|
|
90
|
+
"email": "{{ event.data.submission.data.email }}"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Do not add executable transform scripts or workers to a project just to reshape a payload. Use the JSON template for deterministic mappings; use an external workflow endpoint only when the integration genuinely needs branching or code.
|
|
95
|
+
|
|
96
|
+
Available filters are event-specific:
|
|
97
|
+
|
|
98
|
+
- `--environments <main|all>` for the event origin; the default is `main`
|
|
99
|
+
- `--form <id>` for `form.submitted`
|
|
100
|
+
- `--agent <name>` for agent events
|
|
101
|
+
- `--media-type <image|video|audio|document|other>` for media events
|
|
102
|
+
- `--action <created|updated|deleted>`, `--content-type <name>`, and `--locale <locale>` for `entry.changed`
|
|
103
|
+
- `--debounce-changes <immediate|5s|30s|1m>` for direct `entry.changed` delivery grouping
|
|
104
|
+
|
|
105
|
+
`entry.changed` represents content accepted in the selected environments. New entry webhooks wait 5 seconds after the last direct edit by default, then send one delivery with the combined `data.changes`. Exact repeated autosave changes appear once. Use `--debounce-changes immediate` to disable grouping. Accepted agent edits and environment merges already carry compact batches and send immediately. Operations above the delivery batch size share an `operationId` and include `{ index, total }` batch metadata. Every event includes its origin at `event.env.name`.
|
|
106
|
+
|
|
107
|
+
## Inspect before depending on it
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
fimo webhooks list
|
|
111
|
+
fimo webhooks get <webhook-id>
|
|
112
|
+
fimo webhooks test <webhook-id> --wait
|
|
113
|
+
fimo webhooks deliveries <webhook-id> --limit 20
|
|
114
|
+
fimo webhooks delivery <webhook-id> <delivery-id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`test` uses the selected event's documented example data and adds `X-Fimo-Test: true`. `--wait` waits up to 60
|
|
118
|
+
seconds for success or failure. Pass `--data '{...}'` only when a specific shape needs testing.
|
|
119
|
+
|
|
120
|
+
Fimo automatically retries temporary failures with backoff. After retries are exhausted:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
fimo webhooks retry <webhook-id> <delivery-id>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Use the delivery error code and attempt history to distinguish destination errors, timeouts, missing secrets, invalid templates, and blocked unsafe URLs. A delivery accepts up to five manual retries.
|
|
127
|
+
|
|
128
|
+
## Manage configurations
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
fimo webhooks update <webhook-id> --enabled off
|
|
132
|
+
fimo webhooks update <webhook-id> --url https://example.com/hooks/fimo
|
|
133
|
+
fimo webhooks update <webhook-id> --default-body
|
|
134
|
+
fimo webhooks delete <webhook-id>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Webhooks belong to the project, with up to 20 configurations per project. The same configuration is visible from every environment. Delivery listens to `main` by default. Use `--environments all` to include branch activity, or `--environments main` to return to main-only delivery.
|
|
138
|
+
|
|
139
|
+
## Verify Fimo signatures
|
|
140
|
+
|
|
141
|
+
Signing is on by default. Save the signing secret shown once at creation. Fimo sends:
|
|
142
|
+
|
|
143
|
+
- `X-Fimo-Delivery`: stable delivery ID
|
|
144
|
+
- `X-Fimo-Event`: event type
|
|
145
|
+
- `X-Fimo-Event-Id`: stable event ID for receiver deduplication
|
|
146
|
+
- `X-Fimo-Test`: `true` for synthetic test deliveries
|
|
147
|
+
- `X-Fimo-Timestamp`: Unix timestamp for the attempt
|
|
148
|
+
- `X-Fimo-Signature`: `v1=` plus HMAC-SHA256 of `<timestamp>.<raw-request-body>`
|
|
149
|
+
|
|
150
|
+
At the receiver, reject stale timestamps and compare the computed signature with a timing-safe comparison before parsing or acting on the payload. Rotate an exposed signing secret with:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
fimo webhooks rotate-secret <webhook-id>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Save the returned value immediately; it is not shown again.
|
|
157
|
+
|
|
158
|
+
## Guardrails
|
|
159
|
+
|
|
160
|
+
- Destinations must use public HTTPS URLs in production. Local/private/link-local addresses and redirects are blocked.
|
|
161
|
+
- Do not place access tokens in URLs, literal headers, payload templates, logs, or committed files.
|
|
162
|
+
- Do not retry a pending or actively retrying delivery manually.
|
|
163
|
+
- Do not assume a successful queue operation means the destination accepted the request; inspect the delivery result.
|
|
164
|
+
- Use `--json` when another agent or script needs stable, parseable output.
|