fimo 0.3.3-staging.23 → 0.3.3-staging.25
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 +6 -12
- package/assets/agents-starter/AGENTS.md +14 -2
- package/assets/skills/fimo/SKILL.md +1 -1
- package/assets/skills/fimo/references/content.md +14 -2
- package/assets/skills/fimo/references/locales.md +13 -1
- package/assets/skills/fimo/references/setup-plain-vite.md +8 -3
- package/assets/skills/fimo/references/setup-react-router.md +13 -6
- package/assets/skills/fimo/references/ui.md +1 -1
- package/assets/skills/fimo-cli/SKILL.md +30 -18
- package/assets/skills/fimo-cli/references/account.md +4 -2
- package/assets/skills/fimo-cli/references/agent-setup.md +14 -16
- package/assets/skills/fimo-cli/references/agents.md +2 -0
- package/assets/skills/fimo-cli/references/analytics.md +2 -0
- package/assets/skills/fimo-cli/references/assets.md +2 -0
- package/assets/skills/fimo-cli/references/branches.md +2 -0
- package/assets/skills/fimo-cli/references/content.md +3 -1
- package/assets/skills/fimo-cli/references/credits.md +2 -0
- package/assets/skills/fimo-cli/references/deploy.md +10 -4
- package/assets/skills/fimo-cli/references/describe.md +2 -0
- package/assets/skills/fimo-cli/references/domains.md +2 -0
- package/assets/skills/fimo-cli/references/forms.md +2 -0
- package/assets/skills/fimo-cli/references/init.md +114 -0
- package/assets/skills/fimo-cli/references/integrations/firecrawl.md +2 -0
- package/assets/skills/fimo-cli/references/integrations.md +2 -0
- package/assets/skills/fimo-cli/references/invite.md +2 -0
- package/assets/skills/fimo-cli/references/labels.md +2 -0
- package/assets/skills/fimo-cli/references/locales.md +2 -0
- package/assets/skills/fimo-cli/references/media.md +2 -0
- package/assets/skills/fimo-cli/references/preview.md +2 -0
- package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +3 -1
- package/assets/skills/fimo-cli/references/projects.md +5 -3
- package/assets/skills/fimo-cli/references/schedules.md +2 -0
- package/assets/skills/fimo-migration/SKILL.md +2 -0
- package/assets/skills/fimo-migration/references/manifest.md +5 -1
- package/dist/build/vite/index.d.ts.map +1 -1
- package/dist/build/vite/index.js +8 -6
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +2916 -2544
- package/package.json +2 -1
- package/scripts/postinstall.mjs +10 -54
- package/templates/react-router/package.json +1 -1
- package/assets/agents-starter/claude/settings.json +0 -19
- package/assets/skills/fimo-cli/references/create.md +0 -90
package/README.md
CHANGED
|
@@ -17,28 +17,22 @@
|
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Run the CLI with `npx` — no global install, always the latest:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Log in and scaffold a new project:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
fimo login
|
|
30
|
-
fimo create my-site
|
|
23
|
+
npx fimo@latest login
|
|
24
|
+
npx fimo@latest init my-site
|
|
31
25
|
cd my-site
|
|
32
26
|
```
|
|
33
27
|
|
|
34
|
-
`fimo
|
|
28
|
+
Every command runs the same way: **`npx fimo@latest <command>`**. `fimo init` sets up the project, pushes the first commit, and wires it to your Fimo account. Open it in your coding agent and start building.
|
|
35
29
|
|
|
36
30
|
## AI coding tools
|
|
37
31
|
|
|
38
|
-
Fimo ships skills and rules for your AI coding tools (Claude Code, Cursor, Codex, Gemini, and more) so the agent knows how to work in a Fimo project. `fimo
|
|
32
|
+
Fimo ships skills and rules for your AI coding tools (Claude Code, Cursor, Codex, Gemini, and more) so the agent knows how to work in a Fimo project. `fimo init` installs them for you — add or refresh them any time (`--mode=copy` is required under npx):
|
|
39
33
|
|
|
40
34
|
```bash
|
|
41
|
-
fimo skills install
|
|
35
|
+
npx fimo@latest skills install --mode=copy
|
|
42
36
|
```
|
|
43
37
|
|
|
44
38
|
## Local development
|
|
@@ -31,10 +31,22 @@ fimo skills install # interactive: pick agents to add
|
|
|
31
31
|
|
|
32
32
|
If you later edit this `AGENTS.md` and want the per-agent variants (`CLAUDE.md`, `.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`) regenerated from it, delete the stale variant file and run `fimo rules sync`. Sync is purely additive — it never overwrites existing files, so project-specific edits are preserved unless you remove the file first.
|
|
33
33
|
|
|
34
|
+
## Development loop
|
|
35
|
+
|
|
36
|
+
Work with the developer locally, not through deploys:
|
|
37
|
+
|
|
38
|
+
1. Start the app with the project's package-manager `dev` script — `pnpm dev`, `npm run dev`, `yarn dev`, or `bun dev` (match the lockfile). Run it in the background; it serves the site on localhost with live reload.
|
|
39
|
+
2. Ask the developer what they want to build or change.
|
|
40
|
+
3. Make the edits — the running dev server shows them instantly. You do not need to deploy to see local changes.
|
|
41
|
+
4. Iterate until they are happy with it locally.
|
|
42
|
+
5. When a unit of work looks done, **offer** to deploy: `fimo deploy` for a hosted preview / shareable link, or `fimo deploy --publish` to go live. Run it only after they confirm (or when they ask). Never deploy on your own.
|
|
43
|
+
|
|
44
|
+
The local dev server is local (localhost). The Fimo dashboard preview and the shareable preview URL come from `fimo deploy` — so if the developer wants to see it in the dashboard or share a link, that needs a deploy.
|
|
45
|
+
|
|
34
46
|
## Critical project rules
|
|
35
47
|
|
|
36
|
-
- **Deploy
|
|
37
|
-
- **Run `fimo deploy --publish` only when the
|
|
48
|
+
- **Deploy is on-demand — not a save step and not a mandatory final step.** `fimo deploy` commits everything, pushes to the current env's branch, and round-trips the sandbox. Iterate locally with the dev server; deploy only when the developer wants a hosted preview, a shareable link, or to go live — and only after they confirm. Batch related edits into one deploy; never deploy after every change.
|
|
49
|
+
- **Run `fimo deploy --publish` only when the developer signals "ship it"** — an explicit "publish" / "go live" request. Plain `fimo deploy` (preview) is the default; `--publish` is the visible, externally-facing step.
|
|
38
50
|
- Do not add a second deploy tool (Vercel, Netlify, etc.).
|
|
39
51
|
- **Never edit `.fimo.settings.json`.** It is the link between this folder and the remote project — it is written once by `fimo create`.
|
|
40
52
|
- The scaffolded homepage is disposable starter content. On the first real generation, replace its copy, layout, and visual style instead of extending the Fimo-branded design. Keep only the technical shell and required legal pages unless the user explicitly asks to preserve the starter.
|
|
@@ -14,7 +14,7 @@ You are writing code in a Fimo project — a content + media + forms + analytics
|
|
|
14
14
|
|
|
15
15
|
This skill is version-locked to this project's installed `fimo` package — the shapes here match what your code can actually use.
|
|
16
16
|
|
|
17
|
-
For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. If `fimo-cli` isn't loaded for your AI tool,
|
|
17
|
+
For CLI commands and workflows (creating a project, pushing schemas/forms, deploying, managing labels, etc.), the **`fimo-cli`** skill is the source of truth. Run every CLI command as `npx fimo@latest <command>` (always the latest, no global install). If `fimo-cli` isn't loaded for your AI tool, register it with `npx fimo@latest skills install --mode=copy`.
|
|
18
18
|
|
|
19
19
|
## Critical: NEVER hardcode user-facing things
|
|
20
20
|
|
|
@@ -12,7 +12,6 @@ This file covers the **package surface**: the JSON shape you write, the generate
|
|
|
12
12
|
"name": "Blog Posts",
|
|
13
13
|
"fields": {
|
|
14
14
|
"title": { "type": "string" },
|
|
15
|
-
"slug": { "type": "string" },
|
|
16
15
|
"body": { "type": "richtext" },
|
|
17
16
|
"publishDate": { "type": "string" },
|
|
18
17
|
"featured": { "type": "boolean" },
|
|
@@ -24,11 +23,24 @@ This file covers the **package surface**: the JSON shape you write, the generate
|
|
|
24
23
|
|
|
25
24
|
**Required**: `uid` (PascalCase, matches filename), `name`, `fields`.
|
|
26
25
|
|
|
26
|
+
### Reserved field names — do NOT declare these in `fields`
|
|
27
|
+
|
|
28
|
+
Every entry already carries this metadata automatically. Declaring any of them as a
|
|
29
|
+
schema field is rejected by `fimo schemas push` with a 400 (e.g. `fields.slug: "slug" is
|
|
30
|
+
reserved entry metadata and cannot be used as a content field.`):
|
|
31
|
+
|
|
32
|
+
`id`, `documentId`, `slug`, `locale`, `createdAt`, `updatedAt`, `__fimo`.
|
|
33
|
+
|
|
34
|
+
In particular **do not add a `slug` field** — every entry gets a `slug` for free. You still
|
|
35
|
+
pass `slug` inside `data` when *creating an entry* (see "Entry body shape" below); it just
|
|
36
|
+
must not appear in the schema's `fields`. If you need an additional URL-ish string, name it
|
|
37
|
+
something else (e.g. `handle`, `permalink`).
|
|
38
|
+
|
|
27
39
|
## Field types
|
|
28
40
|
|
|
29
41
|
| Type | `data` JSON shape | Use for |
|
|
30
42
|
| ---------- | ----------------------------------------------------------------------- | --------------------------------- |
|
|
31
|
-
| `string` | `"..."` | Titles,
|
|
43
|
+
| `string` | `"..."` | Titles, short text |
|
|
32
44
|
| `richtext` | Tiptap JSONContent (see below) | Blog body, descriptions, articles |
|
|
33
45
|
| `number` | `42` | Counts, quantities |
|
|
34
46
|
| `boolean` | `true` / `false` | Flags |
|
|
@@ -85,7 +85,19 @@ Read the active locale with `useLocale()` when component logic needs it:
|
|
|
85
85
|
```tsx
|
|
86
86
|
import { useLocale } from 'fimo/ui';
|
|
87
87
|
|
|
88
|
-
const { locale, defaultLocale, routePath } = useLocale();
|
|
88
|
+
const { locale, defaultLocale, locales, routePath, dir } = useLocale();
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`locales` lists every configured locale, so a language switcher needs no API call and no extra component:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
const { locale, locales, routePath } = useLocale();
|
|
95
|
+
|
|
96
|
+
locales.map((code) => (
|
|
97
|
+
<FimoLink key={code} to={routePath} locale={code} aria-current={code === locale ? 'true' : undefined}>
|
|
98
|
+
{new Intl.DisplayNames([code], { type: 'language' }).of(code)}
|
|
99
|
+
</FimoLink>
|
|
100
|
+
));
|
|
89
101
|
```
|
|
90
102
|
|
|
91
103
|
## Custom Frameworks
|
|
@@ -17,7 +17,7 @@ so this layout is what those projects look like now.
|
|
|
17
17
|
## Prerequisites
|
|
18
18
|
|
|
19
19
|
- Node 20+
|
|
20
|
-
- A Fimo project created via `fimo
|
|
20
|
+
- A Fimo project created via `fimo init`.
|
|
21
21
|
|
|
22
22
|
## Install
|
|
23
23
|
|
|
@@ -195,9 +195,14 @@ framework-mode project that `reactRouter()` plugin is added by your own
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
## Verify
|
|
198
|
+
## Verify and iterate
|
|
199
199
|
|
|
200
|
-
Run
|
|
200
|
+
Run the app with the project's package-manager `dev` script (`pnpm dev` /
|
|
201
|
+
`npm run dev` / `yarn dev` / `bun dev` — match the lockfile). It serves the site
|
|
202
|
+
on localhost with live reload — this is your iteration loop: edit, see the change,
|
|
203
|
+
repeat with the developer. `fimo deploy` is on-demand (hosted preview / shareable
|
|
204
|
+
link / go live), run only on the developer's signal; the dashboard's preview iframe
|
|
205
|
+
shows the **deployed** app, not the localhost dev server.
|
|
201
206
|
|
|
202
207
|
## Known limitations vs. React Router
|
|
203
208
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Setup Fimo on React Router 7
|
|
2
2
|
|
|
3
3
|
This recipe describes the canonical Fimo + React Router framework-mode setup.
|
|
4
|
-
It mirrors what `fimo
|
|
4
|
+
It mirrors what `fimo init` scaffolds today; you can also apply it to an
|
|
5
5
|
existing RR project.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
9
|
- Node 20+
|
|
10
|
-
- A Fimo project created via `fimo
|
|
10
|
+
- A Fimo project created via `fimo init` (gives you `projectId`,
|
|
11
11
|
`organizationId`, and an `apiUrl`).
|
|
12
12
|
|
|
13
13
|
## Install
|
|
@@ -206,7 +206,7 @@ export default function HomePage() {
|
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
Replace the `__PROJECT_ID__` / `__ORG_ID__` / `__API_URL__` sentinels with the
|
|
209
|
-
values from `fimo
|
|
209
|
+
values from `fimo init`'s output (or `fimo projects info`).
|
|
210
210
|
|
|
211
211
|
## File: `tsconfig.json`
|
|
212
212
|
|
|
@@ -239,10 +239,17 @@ values from `fimo create`'s output (or `fimo projects info`).
|
|
|
239
239
|
(Optional — only if using Tailwind. Tailwind is not required for Fimo to
|
|
240
240
|
function; it just ships with the canonical template.)
|
|
241
241
|
|
|
242
|
-
## Verify
|
|
242
|
+
## Verify and iterate
|
|
243
243
|
|
|
244
|
-
Run
|
|
245
|
-
|
|
244
|
+
Run the app with the project's package-manager `dev` script (`pnpm dev` /
|
|
245
|
+
`npm run dev` / `yarn dev` / `bun dev` — match the lockfile). It serves the site
|
|
246
|
+
on localhost with live reload — this is your iteration loop: edit, see the change,
|
|
247
|
+
repeat with the developer.
|
|
248
|
+
|
|
249
|
+
`fimo deploy` is on-demand, not part of this loop: run it only when the developer
|
|
250
|
+
wants a hosted preview, a shareable link, or to go live — and only on their signal.
|
|
251
|
+
The dashboard's preview iframe shows the **deployed** app, so it only reflects
|
|
252
|
+
changes after a `fimo deploy` (the local dev server is localhost-only).
|
|
246
253
|
|
|
247
254
|
## What you don't add
|
|
248
255
|
|
|
@@ -60,7 +60,7 @@ The template uses **Vite + React 19 + TypeScript + Tailwind v4 + shadcn/ui + rea
|
|
|
60
60
|
|
|
61
61
|
### Starter replacement
|
|
62
62
|
|
|
63
|
-
- `src/pages/Index.tsx` is disposable scaffold so a fresh `fimo
|
|
63
|
+
- `src/pages/Index.tsx` is disposable scaffold so a fresh `fimo init` project renders immediately.
|
|
64
64
|
- **On the first real website generation, replace that starter page's copy, layout, and visual system entirely** instead of decorating the existing Fimo-branded design.
|
|
65
65
|
- Reuse only the app shell, route contracts, and legal pages unless the user explicitly wants the starter aesthetic.
|
|
66
66
|
|
|
@@ -17,6 +17,12 @@ This skill describes **what the CLI does and the workflows it drives**. For the
|
|
|
17
17
|
|
|
18
18
|
Use `fimo <command> --help` for full flag details on any command.
|
|
19
19
|
|
|
20
|
+
## Running the CLI: always `npx fimo@latest`
|
|
21
|
+
|
|
22
|
+
Run every command as **`npx fimo@latest <command>`**. It always fetches the latest CLI — no install, nothing to keep up to date, and it can't fall behind and get blocked. Do **not** install `fimo` globally.
|
|
23
|
+
|
|
24
|
+
The examples in this skill and its references write `fimo <command>` for brevity — mentally prefix them with `npx fimo@latest`. (One exception, because npx has no stable package path to symlink into: install skills with `npx fimo@latest skills install --mode=copy`.)
|
|
25
|
+
|
|
20
26
|
## Output for agents: `--json` is the stable contract
|
|
21
27
|
|
|
22
28
|
Every command accepts a global `--json` flag (or `FIMO_OUTPUT=json` env) and emits exactly one structured envelope on stdout:
|
|
@@ -32,7 +38,7 @@ For shell composition use plain pretty mode (`cd $(fimo …)`); for structured p
|
|
|
32
38
|
|
|
33
39
|
## Critical: `.fimo.settings.json` is the project link
|
|
34
40
|
|
|
35
|
-
A Fimo project is identified by `.fimo.settings.json` at its root, written once by `fimo
|
|
41
|
+
A Fimo project is identified by `.fimo.settings.json` at its root, written once by `fimo init`. This file connects the local directory to the remote Fimo project. **Never edit it manually.** Most CLI commands look at this file in the cwd to know which project they operate on.
|
|
36
42
|
|
|
37
43
|
## Critical: commands target the env of the current git branch
|
|
38
44
|
|
|
@@ -41,25 +47,28 @@ A project can have multiple **envs** — each is a git branch _plus_ its own DB,
|
|
|
41
47
|
## Quick Start
|
|
42
48
|
|
|
43
49
|
```bash
|
|
44
|
-
|
|
45
|
-
fimo
|
|
46
|
-
fimo
|
|
47
|
-
fimo
|
|
48
|
-
fimo clone
|
|
49
|
-
cd my-site
|
|
50
|
-
|
|
51
|
-
fimo
|
|
52
|
-
fimo
|
|
53
|
-
fimo deploy
|
|
50
|
+
npx fimo@latest login # authenticate via browser
|
|
51
|
+
npx fimo@latest skills install --mode=copy # install Fimo skills for your AI tools (copy mode: required under npx)
|
|
52
|
+
npx fimo@latest init my-site --org <id> # one-stop setup: sign in, create/link a project, install deps + skills. Use the org **id** from `fimo orgs list`, NOT the slug.
|
|
53
|
+
npx fimo@latest init --project-id <id> my-site # link an EXISTING project instead of creating one
|
|
54
|
+
npx fimo@latest clone # interactively choose an existing project to clone locally
|
|
55
|
+
cd my-site # the `fimo` project skill auto-loads from here
|
|
56
|
+
pnpm dev # run the app locally (use the project's PM: pnpm/npm run/yarn/bun) — your iteration loop
|
|
57
|
+
npx fimo@latest credits # inspect the owning org's AI credit balance (read-only)
|
|
58
|
+
npx fimo@latest validate # run all checks + codegen; fails on missing DB labels
|
|
59
|
+
npx fimo@latest deploy # ON-DEMAND: hosted preview / shareable link (runs validate internally)
|
|
60
|
+
npx fimo@latest deploy --publish # ON-DEMAND: publish live (only when the developer says "ship it")
|
|
54
61
|
```
|
|
55
62
|
|
|
63
|
+
The working loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), ask the developer what they want, edit, and iterate against the live localhost server. `fimo deploy` is **not** a required final step — reach for it only when the developer wants a hosted preview, a shareable link, or to go live, and only on their signal (see `references/deploy.md`).
|
|
64
|
+
|
|
56
65
|
`fimo validate` is the single entrypoint for "prove this project is ready" — it covers schema/form codegen, route metadata checks, lint, and missing label checks for `i18n.defaultLocale` from `fimo-config.json` (fallback: `en`). Use `fimo labels set` / `set-many` to create or update label values in the DB. The underlying phases are also available individually under the hidden `fimo scripts` namespace for advanced/debug use.
|
|
57
66
|
|
|
58
67
|
## Decision Tree
|
|
59
68
|
|
|
60
69
|
Load the matching reference when the user's request fires its trigger. Recipes that involve writing code also need the `fimo` skill's package references — they're called out where relevant.
|
|
61
70
|
|
|
62
|
-
- "Create a new Fimo project / scaffold a site / start a new website" → `references/
|
|
71
|
+
- "Create a new Fimo project / scaffold a site / start a new website / link an existing project locally" → `references/init.md`
|
|
63
72
|
- "Add a content type / blog / products / pages / CMS" → `references/content.md` (workflow) **+ load `fimo/references/content.md` for the JSON shape and React hooks**
|
|
64
73
|
- "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ load `fimo/references/forms.md` for the JSON spec and generated client**
|
|
65
74
|
- "View form submissions / who filled out the contact form / inspect what users sent / how many signups" → `references/forms.md` § Reading submissions
|
|
@@ -94,10 +103,12 @@ Load the matching reference when the user's request fires its trigger. Recipes t
|
|
|
94
103
|
|
|
95
104
|
These fire at specific moments in the project lifecycle. **Surface them proactively** rather than waiting for the user to ask:
|
|
96
105
|
|
|
97
|
-
- **Right after `fimo
|
|
98
|
-
- **Right after `fimo
|
|
99
|
-
- **Right after `fimo
|
|
100
|
-
- **
|
|
106
|
+
- **Right after `fimo init`** → `cd` into the new directory, then `Read` the project's `AGENTS.md` (or `CLAUDE.md` for Claude Code) **and** `.claude/skills/fimo/SKILL.md` (or `.cursor/skills/fimo/SKILL.md` etc. for other agents) to load the project context before generating any code. The new files came into existence mid-session and may not be auto-loaded by the harness. See `references/init.md` § Load the project context.
|
|
107
|
+
- **Right after `fimo init`** → suggest `fimo rename "<Display Name>"` to set a human-readable name (the default post-init name is an auto-generated slug). Infer the name from what the user is building (e.g. "Acme Coffee" for a café, "Jane Doe Portfolio" for a personal site). See `references/init.md`.
|
|
108
|
+
- **Right after `fimo init`** → start the app locally with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev`) in the background, then ask the developer what they want to build. This localhost server with live reload is your iteration loop — edit, show, repeat. No deploy is needed to see local changes.
|
|
109
|
+
- **When a user-visible unit of work looks done** → **offer** to deploy (`fimo deploy` for a hosted preview / shareable link, `fimo deploy --publish` to go live) and run it only after the developer confirms — or immediately if they ask. Never deploy on your own. See `references/deploy.md`.
|
|
110
|
+
- **Optional, if you already know a deploy is coming** → warm the sandbox early with `fimo deploy -m "chore: init" &` in the background so the one-time ~15-30s provision + dep install happens while you work and the real deploy lands warm (~4-10s). This is a perf optimization, not a requirement. See `references/deploy.md` § Warm the sandbox early in a session.
|
|
111
|
+
- **Iterative code-only deploys** → once you are deploying, `fimo deploy --no-restart` skips the sandbox dev-server restart on HMR-safe edits. See `references/deploy.md` § Skipping the dev-server restart for when it's safe.
|
|
101
112
|
- **You need the current preview URL but haven't changed code** (opening it, screenshotting it, handing it to another tool, the previous URL expired) → `fimo preview url`, never a no-op `fimo deploy`. See `references/preview.md`.
|
|
102
113
|
- **When the user wants to try something risky / explore a redesign without touching the live site** → suggest a feature env: `fimo checkout -b <name>` gives an isolated branch + DB + preview. Deploy previews there, then `fimo merge` it back and `fimo publish`. See `references/branches.md`.
|
|
103
114
|
- **After the first successful `fimo deploy`** → suggest `fimo invite` if the project involves multiple people. Typical roles: `edit` for developers/content editors, `view` or `comment` for clients/stakeholders, `full` for project leads. See `references/invite.md`.
|
|
@@ -106,10 +117,11 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
|
|
|
106
117
|
## Anti-Patterns
|
|
107
118
|
|
|
108
119
|
- **Editing `.fimo.settings.json`** — read-only; it's the link between local and remote project. Treat as a generated file.
|
|
109
|
-
- **
|
|
120
|
+
- **Treating `fimo deploy` as the working loop or a required final step** — the loop is local (`pnpm dev` etc.). Deploy commits + pushes + round-trips the sandbox; it's for hosted previews / going live, on-demand. Iterate locally and deploy at logical breakpoints. See `references/deploy.md`.
|
|
121
|
+
- **Deploying without the developer asking or confirming** — offer, then wait for their yes. Don't auto-deploy after finishing an edit.
|
|
110
122
|
- **Running `fimo deploy` just to get a fresh preview URL** — that's a commit + push + sandbox sync for what should be a sub-second read. Use `fimo preview url` instead. See `references/preview.md`.
|
|
111
123
|
- **Using `fimo deploy --publish` casually** — `--publish` makes the site live to the public. Plain `fimo deploy` (preview) is the default. Use `--publish` only when the user says "ship it" / "go live" / "publish".
|
|
112
|
-
- **Bare `fimo
|
|
124
|
+
- **Bare `fimo init` in a non-interactive shell** — will hang. Always pass `[dir]`, `--no-install` (or `--install`), `--no-skills` (or `--skills`), and `--org`/`--agents` as needed explicitly when scripted.
|
|
113
125
|
- **Hardcoding content / strings / images in code** — that's what schemas, `t()`, and the media library are for. See the `fimo` skill's anti-patterns.
|
|
114
126
|
- **Adding another deploy tool (Vercel, Netlify, Cloudflare Pages)** — Fimo handles deploys; don't bolt another platform on.
|
|
115
127
|
- **Committing secrets** — hidden values use `fimo secrets`; public browser-safe values use `fimo vars`. Local env files are ignored and must not become deploy inputs.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Account, authentication, and organizations
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
The `fimo` CLI authenticates against the Fimo platform via a browser-based flow. Credentials are stored **per backend** at `~/.config/fimo/credentials/<host>-<hash>.json` (so a localhost dev backend and production don't clobber each other) and used by every CLI command that talks to the Fimo API.
|
|
4
6
|
|
|
5
7
|
## Sign in
|
|
@@ -17,7 +19,7 @@ fimo logout # revoke the current session and clear local credentials
|
|
|
17
19
|
|
|
18
20
|
## Organizations
|
|
19
21
|
|
|
20
|
-
A Fimo account belongs to one or more organizations. Every project lives inside an organization. The "active organization" is the default for `fimo
|
|
22
|
+
A Fimo account belongs to one or more organizations. Every project lives inside an organization. The "active organization" is the default for `fimo init` and other org-scoped commands.
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
25
|
fimo orgs list # list orgs you belong to
|
|
@@ -45,5 +47,5 @@ fimo referral stats # show your referral stats
|
|
|
45
47
|
|
|
46
48
|
## Notes for AI tools / scripted use
|
|
47
49
|
|
|
48
|
-
- `--org` (with explicit id or slug) is required in non-TTY shells for `fimo
|
|
50
|
+
- `--org` (with explicit id or slug) is required in non-TTY shells for `fimo init` (create-new) only when you have no active org and belong to multiple orgs; it's always required for `fimo orgs switch` in non-TTY. If an active org is stored, or you belong to exactly one org, `fimo init` resolves the org without `--org`.
|
|
49
51
|
- Never hardcode tokens in command flags. The per-backend credentials files written by `fimo login` (`~/.config/fimo/credentials/`) are the canonical store.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# AI agent setup
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
Fimo wires up to AI coding tools in three layers:
|
|
4
6
|
|
|
5
7
|
1. **Global skills** — `fimo-cli`, `fimo-studio`, and `fimo-migration` skills installed once per user, machine-wide. They describe the CLI workflows, the Fimo Studio web app, and URL/source-backed migrations, and load in any compatible AI tool.
|
|
@@ -11,24 +13,20 @@ Two CLI namespaces manage all three:
|
|
|
11
13
|
- `fimo skills install / sync / uninstall` — skill artifacts (layers 1 + 3)
|
|
12
14
|
- `fimo rules sync` — rule files (layer 2)
|
|
13
15
|
|
|
14
|
-
##
|
|
16
|
+
## Set up skills (no install needed)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Run the CLI via `npx fimo@latest` — do not install `fimo` globally. To set up the Fimo skills for your AI tools, use **copy mode** (npx runs from an ephemeral cache with no stable package path to symlink into):
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
|
|
21
|
+
npx fimo@latest skills install --mode=copy
|
|
20
22
|
```
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`npx fimo@latest <command>` is useful for one-off commands. For skill setup, a global install is better because the default symlink mode points skills at a stable package path. If you use `npx` for skills, copy the files instead:
|
|
24
|
+
This opens the agent picker and installs everything that applies (see below). Then connect your account when you are ready:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
npx fimo@latest
|
|
27
|
+
npx fimo@latest login
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
After installation, run `fimo login` when you are ready to connect a Fimo account.
|
|
31
|
-
|
|
32
30
|
## `fimo skills` — install + sync + uninstall
|
|
33
31
|
|
|
34
32
|
```bash
|
|
@@ -36,7 +34,7 @@ fimo skills install # interactive: pick agents, insta
|
|
|
36
34
|
fimo skills install --agents=claude-code,cursor # explicit list
|
|
37
35
|
fimo skills install -a claude-code -a cursor # repeatable form
|
|
38
36
|
fimo skills install --agents=claude-code --yes # skip the install preview prompt (headless / scripts)
|
|
39
|
-
fimo skills install --mode=copy #
|
|
37
|
+
fimo skills install --mode=copy # copy files instead of symlinking (required under npx)
|
|
40
38
|
fimo skills sync # refresh installed skills (global + project, where applicable)
|
|
41
39
|
fimo skills uninstall # remove the global skills
|
|
42
40
|
```
|
|
@@ -59,8 +57,8 @@ The command prints exactly which files were written, so the context-aware behavi
|
|
|
59
57
|
|
|
60
58
|
You rarely have to invoke it by hand:
|
|
61
59
|
|
|
62
|
-
- **Global skills auto-refresh**
|
|
63
|
-
- **The project skill auto-refreshes during Fimo-controlled installs** when the `fimo` package version bumps — the package's postinstall hook re-syncs the skill from `node_modules/fimo/assets/skills/fimo/` (which is version-locked to the installed package). For pnpm, `fimo
|
|
60
|
+
- **Global skills auto-refresh** whenever a newer CLI runs — any `npx fimo@latest …` command detects a version change (marker at `~/.config/fimo/last-version`) and re-copies the latest skills.
|
|
61
|
+
- **The project skill auto-refreshes during Fimo-controlled installs** when the `fimo` package version bumps — the package's postinstall hook re-syncs the skill from `node_modules/fimo/assets/skills/fimo/` (which is version-locked to the installed package). For pnpm, `fimo init --install`, sandbox `fimopm install`, and E2E helper installs pass a scoped allow-all-builds flag so the hook can run without persisting build-script approvals in the template. npm / yarn run lifecycle scripts by default and need no extra config.
|
|
64
62
|
|
|
65
63
|
Invoke `fimo skills sync` explicitly when iterating on skill content locally, when you bumped the package via something other than a fresh install, or any time you want to force a refresh.
|
|
66
64
|
|
|
@@ -68,7 +66,7 @@ Invoke `fimo skills sync` explicitly when iterating on skill content locally, wh
|
|
|
68
66
|
|
|
69
67
|
## `fimo rules sync` — rule files only
|
|
70
68
|
|
|
71
|
-
`fimo
|
|
69
|
+
`fimo init` writes `AGENTS.md` (the universal-spec file) and per-agent variants for the AI tools you selected. Variants and their generators:
|
|
72
70
|
|
|
73
71
|
| Agent | File(s) generated |
|
|
74
72
|
| --------------------------------- | ------------------------------------- |
|
|
@@ -101,8 +99,8 @@ Every command that takes agents accepts the same selection inputs:
|
|
|
101
99
|
- No flag → interactive multi-select. The picker has two sections:
|
|
102
100
|
- **Universal** — agents that read `AGENTS.md` natively (codex, opencode, aider, …). Always covered, not toggleable.
|
|
103
101
|
- **Additional** — agents that need a per-agent rule file or skills dir. The 6 popular ones (`claude-code`, `cursor`, `codex`, `opencode`, `windsurf`, `gemini-cli`) appear at the top of an 8-item scrollable viewport; the full list of 50+ supported agents is below the fold. Each row shows the install path next to the name (e.g. `Claude Code (.claude/skills)`). Agents already present on the machine are pre-checked.
|
|
104
|
-
- `--agents=none` (only `fimo
|
|
105
|
-
- `--mode=symlink|copy` (only `fimo skills install` and `fimo
|
|
102
|
+
- `--agents=none` (only `fimo init`) — skip per-agent variants entirely; write only `AGENTS.md`.
|
|
103
|
+
- `--mode=symlink|copy` (only `fimo skills install` and `fimo init`) — pick the install method for the per-agent skills layer. Defaults to symlink so the canonical `.agents/skills/<name>/` is the single source of truth; pass `--mode=copy` to materialize the skill in each per-agent dir.
|
|
106
104
|
|
|
107
105
|
In headless contexts (CI, AI-tool-spawned commands), pass the flag explicitly. Env-var detection (only Claude Code's `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT`) silently targets `claude-code` if the flag is omitted; every other agent must be named explicitly with `--agents` in a headless shell, or the command exits with "No agents detected and no --agents flag passed."
|
|
108
106
|
|
|
@@ -117,4 +115,4 @@ Every installed `SKILL.md` (global or project) is stamped with `fimoVersion: <cl
|
|
|
117
115
|
- "The agent doesn't know about my project's latest fimo conventions" → `fimo skills sync`
|
|
118
116
|
- "I edited `AGENTS.md` and want variants regenerated" → delete the stale variant + `fimo rules sync`
|
|
119
117
|
- "I'm done with Fimo on this machine" → `fimo skills uninstall`
|
|
120
|
-
- For a fresh project, `fimo
|
|
118
|
+
- For a fresh project, `fimo init` wires up everything for the AI tools you select at scaffold time.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Agents workflow (`fimo agents *`)
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
The `fimo agents` namespace authors and operates **agent bundles** — multi-file definitions under `<project>/agents/<name>/` (a `config.yaml`, a `GOAL.md`, optional `capabilities.yaml`, etc.).
|
|
4
6
|
|
|
5
7
|
## Mental model
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Analytics workflow
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
Pageview aggregates for the **published** site are stored in Fimo's analytics pipeline. Preview traffic is not recorded.
|
|
4
6
|
|
|
5
7
|
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,5 +1,7 @@
|
|
|
1
1
|
# Assets workflow (media library)
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
> For how to plug returned media into UI components (`FimoMedia` shape, `<Image>` integration), see **`fimo/references/assets.md`** and **`fimo/references/ui.md`**.
|
|
4
6
|
> For **generating** new images / videos with AI, see **`references/media.md`** — the `fimo generate <model>` surface is documented there.
|
|
5
7
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Envs & branches (git-shaped workflow)
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
> **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.
|
|
4
6
|
|
|
5
7
|
A Fimo **env** is a multi-surface clone of the project: a git branch **plus** its own Neon DB branch, sandbox, preview URL, and R2 asset prefix. The CLI mirrors `git` command shapes so the workflow transfers directly — same verbs, multi-surface semantics.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Content workflow (schemas + entries)
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
> For the JSON shape, field types, Tiptap node spec, slug rules, and generated React Query hooks — these are package surface (version-locked to the project's `fimo`). See **`fimo/references/content.md`**.
|
|
4
6
|
|
|
5
7
|
This file covers the **CLI workflow** for content. Use it when the user wants to add a content type (blog, products, pages) or create/manage entries.
|
|
@@ -67,7 +69,7 @@ When creating a localized variant of an existing entry, pass the source entry's
|
|
|
67
69
|
## "Add a blog" recipe
|
|
68
70
|
|
|
69
71
|
1. Load `fimo/references/content.md` for the JSON shape and field types.
|
|
70
|
-
2. Write `src/schemas/BlogPost.json` with fields `title`, `
|
|
72
|
+
2. Write `src/schemas/BlogPost.json` with fields `title`, `body` (richtext), `coverImage` (media), etc. Do NOT declare a `slug` field — `slug` (and `id`, `documentId`, `locale`, `createdAt`, `updatedAt`, `__fimo`) is reserved entry metadata and will be rejected; every entry gets a `slug` for free.
|
|
71
73
|
3. Run `fimo schemas push BlogPost`.
|
|
72
74
|
4. Generate cover images: `fimo generate pruna/p-image --prompt "..."` (per-model flags come from `fimo models show <model>`; see `media.md`).
|
|
73
75
|
5. Seed entries: `fimo entries create BlogPost --body '{"data": {"slug": "first-post", "title": "...", "coverImage": {...}}}'`.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Credits
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
`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.settings.json` unless `--project <project-id>` is provided.
|
|
4
6
|
|
|
5
7
|
```bash
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Deploy pipeline
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
5
|
+
**`fimo deploy` is on-demand, not the working loop and not a required final step.** The loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), iterate with the developer, and let live reload show changes. Reach for `fimo deploy` only when the developer wants a **hosted preview**, a **shareable link**, or to **go live** — and only on their signal. It commits everything, pushes to the current env's branch, and round-trips that env's sandbox (install + restart); it's a milestone command, not a save step. Batch related edits into one deploy; never deploy after every change.
|
|
6
|
+
|
|
7
|
+
> **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`.
|
|
4
8
|
|
|
5
9
|
`fimo deploy` is **env-aware**: it targets the env of the current git branch (the same one `fimo status` reports on) and prints a one-line banner saying which. New projects are on `main`. It refuses to deploy to read-only `release/*` envs, and `--publish` only runs from `main`. The full multi-env workflow is in `references/branches.md`.
|
|
6
10
|
|
|
@@ -22,11 +26,13 @@ fimo deploy -m "<commit message>" --publish # also publish a new live version
|
|
|
22
26
|
|
|
23
27
|
Public project variables set with `fimo vars set` 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`.
|
|
24
28
|
|
|
25
|
-
## Warm the sandbox early in a session
|
|
29
|
+
## Warm the sandbox early in a session (optional)
|
|
30
|
+
|
|
31
|
+
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.
|
|
26
32
|
|
|
27
33
|
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).
|
|
28
34
|
|
|
29
|
-
**To hide that one-time cost, kick off an early deploy in the background while you keep working
|
|
35
|
+
**To hide that one-time cost, kick off an early deploy in the background while you keep working.** The provisioning happens during your generation work, so by the time the developer wants a hosted preview, the sandbox is already warm and the deploy is fast.
|
|
30
36
|
|
|
31
37
|
```bash
|
|
32
38
|
fimo deploy -m "chore: init" & # background; keep generating code while it runs
|
|
@@ -92,7 +98,7 @@ fimo deploy
|
|
|
92
98
|
## Other facts
|
|
93
99
|
|
|
94
100
|
- Source of truth is this git repo.
|
|
95
|
-
- **Never** edit `.fimo.settings.json`; it is written once by `fimo
|
|
101
|
+
- **Never** edit `.fimo.settings.json`; it is written once by `fimo init`.
|
|
96
102
|
- Each env deploys to its own branch + preview sandbox; `--publish` and `fimo publish` run from `main` only. See `references/branches.md`.
|
|
97
103
|
|
|
98
104
|
## After the first successful deploy
|
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
`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.
|
|
4
6
|
|
|
5
7
|
It is **read-only**. Never writes, never hits the network. Safe to run any time.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Domains
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
`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:
|
|
4
6
|
|
|
5
7
|
| Resource | What it is | Plan | Per project | Source of truth |
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Forms workflow
|
|
2
2
|
|
|
3
|
+
> **Run via `npx fimo@latest <command>`** — always the latest CLI, no install needed.
|
|
4
|
+
|
|
3
5
|
> For the JSON spec, generated Zod schema, submit helper signature, and React usage patterns — these are package surface (version-locked to the project's `fimo`). See **`fimo/references/forms.md`**.
|
|
4
6
|
|
|
5
7
|
This file covers the **CLI workflow** for forms. Use it when the user wants to add a contact form, signup, feedback form, etc.
|