fimo 2.2.0-staging.2 → 2.2.0-staging.4
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 +3 -2
- package/assets/skills/fimo-cli/SKILL.md +4 -4
- package/assets/skills/fimo-cli/references/init.md +30 -39
- package/assets/skills/fimo-code/references/frameworks/react-router.md +4 -3
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +90 -91
- package/dist/runtime/templates.js +1 -1
- package/package.json +7 -7
- package/templates/astro/package.json +2 -2
- package/templates/nextjs/AGENTS.md +1 -1
- package/templates/nextjs/package.json +3 -3
- package/templates/react-router/.fimo/config.json +1 -2
- package/templates/react-router/AGENTS.md +1 -1
- package/templates/react-router/package.json +4 -4
- package/templates/sveltekit/package.json +2 -2
- package/templates/vite/package.json +4 -4
- package/assets/starters/fimo-site/manifest.json +0 -64
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/GOAL.md +0 -8
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/capabilities.yaml +0 -1
- package/assets/starters/fimo-site/template/.fimo/agents/content-guide/config.yaml +0 -9
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/GOAL.md +0 -14
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/capabilities.yaml +0 -3
- package/assets/starters/fimo-site/template/.fimo/agents/site-review/config.yaml +0 -9
- package/assets/starters/fimo-site/template/src/forms/contact.json +0 -14
- package/assets/starters/fimo-site/template/src/forms/contact.ts +0 -46
- package/assets/starters/fimo-site/template/src/pages/Contact.tsx +0 -193
- package/assets/starters/fimo-site/template/src/pages/Index.tsx +0 -27
- package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +0 -191
- package/assets/starters/fimo-site/template/src/schemas/HomePage.json +0 -28
- package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +0 -29
- package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +0 -64
package/README.md
CHANGED
|
@@ -27,9 +27,10 @@ Run the CLI with `npx` — no global install, always the latest:
|
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
29
|
npx fimo@latest login
|
|
30
|
-
|
|
30
|
+
# default Next.js App Router scaffold
|
|
31
|
+
npx fimo@latest init my-site
|
|
32
|
+
# or: npx fimo@latest init my-react-site --framework react-router
|
|
31
33
|
# or: npx fimo@latest init my-astro-site --framework astro
|
|
32
|
-
# or: npx fimo@latest init my-next-site --framework nextjs
|
|
33
34
|
# or: npx fimo@latest init my-svelte-site --framework sveltekit
|
|
34
35
|
cd my-site
|
|
35
36
|
```
|
|
@@ -52,7 +52,7 @@ A project can have multiple **Branches** — each is a git branch _plus_ its own
|
|
|
52
52
|
fimo login # authenticate via browser
|
|
53
53
|
fimo skills install # install the global Fimo skill for your AI tools
|
|
54
54
|
fimo init my-site --org <id> # one-stop setup: sign in, create/link a project, install deps + skills. Use the org **id** from `fimo orgs list`, NOT the slug.
|
|
55
|
-
fimo init my-site --
|
|
55
|
+
fimo init my-react-site --framework react-router --org <id> --yes --no-skills # canonical React Router template
|
|
56
56
|
fimo init --project-id <id> my-site # set up a project by ID: scaffold a newly created project or clone existing code
|
|
57
57
|
fimo clone # interactively choose an existing project to clone locally
|
|
58
58
|
cd my-site # then load skills on demand: fimo skills get fimo-code
|
|
@@ -64,6 +64,8 @@ fimo deploy # ON-DEMAND: hosted project previ
|
|
|
64
64
|
fimo deploy --publish # ON-DEMAND: publish live (only when the developer says "ship it")
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
+
New projects use the Next.js App Router template by default. Fimo's canonical React Router template is selected explicitly with `--framework react-router`; use `--framework vite` for a React SPA.
|
|
68
|
+
|
|
67
69
|
The working loop is local: run the app with the project's package-manager `dev` script (`pnpm dev` / `npm run dev` / `yarn dev` / `bun dev` — match the lockfile), ask the developer what they want, edit, and iterate against the live localhost server. Outside the first-time onboarding rule below, `fimo deploy` is **not** a required final step — reach for it only when the developer wants a hosted project preview or to go live, and only on their signal (see `references/deploy.md`).
|
|
68
70
|
|
|
69
71
|
`fimo validate` is the single entrypoint for "prove this project is ready" — it covers schema/form codegen, route metadata checks, lint, and missing label checks for `i18n.defaultLocale` from `.fimo/config.json` (fallback: `en`). Use `fimo labels set` / `set-many` to create or update label values in the DB. The underlying phases are also available individually under the hidden `fimo scripts` namespace for advanced/debug use.
|
|
@@ -76,7 +78,7 @@ Keep `fimo validate --json` at the front of the project's `build` script, which
|
|
|
76
78
|
|
|
77
79
|
Load the matching reference when the user's request fires its trigger. Recipes that involve writing code also need the `fimo-code` skill's package references — they're called out where relevant.
|
|
78
80
|
|
|
79
|
-
- "Create a new Fimo project / scaffold a site / start a new website /
|
|
81
|
+
- "Create a new Fimo project / scaffold a site / start a new website / link an existing project locally" → `references/init.md`
|
|
80
82
|
- "Add a content type / blog / products / content schemas / CMS" → `references/content.md` (workflow) **+ run `fimo skills get fimo-code --ref content/schema` and load the detected framework reference**
|
|
81
83
|
- "Declare Pages routes / configure Pages sources or route params / control what Studio shows for a route" → `references/pages.md`
|
|
82
84
|
- "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ run `fimo skills get fimo-code --ref forms` for the JSON spec and generated client**
|
|
@@ -140,8 +142,6 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
|
|
|
140
142
|
- **Running `fimo deploy` just to get the current preview URL** — that's a commit + push + sandbox sync when only destination resolution is needed. Use `fimo preview url` instead. See `references/preview.md`.
|
|
141
143
|
- **Using `fimo deploy --publish` casually** — `--publish` makes the site live to the public. Plain `fimo deploy` (preview) is the default. Use `--publish` only when the user says "ship it" / "go live" / "publish".
|
|
142
144
|
- **Bare `fimo init` in a non-interactive shell** — will hang. Always pass `[dir]`, `--no-install` (or `--install`), `--no-skills` (or `--skills`), and `--org`/`--agents` as needed explicitly when scripted.
|
|
143
|
-
- **Using a starter on an existing project** — `--starter` is create-new only. Keep `--project-id` flows blank and use explicit content/form/label commands when changing an existing project.
|
|
144
|
-
- **Treating a starter as a permanent demo tenant** — starters are opt-in seed data in the new project, not a global default. Keep starter agents manual-only; do not add schedules or webhooks unless the project owner explicitly asks for automation.
|
|
145
145
|
- **Hardcoding content / strings / images in code** — that's what schemas, `t()`, and the media library are for. See the `fimo-code` skill's anti-patterns.
|
|
146
146
|
- **Adding another deploy tool (Vercel, Netlify, Cloudflare Pages)** — Fimo handles deploys; don't bolt another platform on.
|
|
147
147
|
- **Committing secrets** — hidden values use `fimo secrets`; public browser-safe values use `fimo vars`. Local env files are ignored and must not become deploy inputs.
|
|
@@ -11,40 +11,40 @@ fimo init [dir] [options]
|
|
|
11
11
|
`fimo init` runs the full onboarding in one shot:
|
|
12
12
|
|
|
13
13
|
1. **Signs in automatically** — if there's no session it opens the browser loopback login. In `--json` / non-TTY with no session it fails with `NOT_AUTHENTICATED` (run `fimo login` first).
|
|
14
|
-
2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use
|
|
14
|
+
2. **Resolves the project** — with `--project-id <id>` it sets up the named Fimo project: a project with no code yet is scaffolded as a fresh site, while an existing repository is cloned. Without it, `init` creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use the Next.js App Router by default; `--framework react-router`, `--framework vite`, `--framework astro`, and `--framework sveltekit` select the other minimal framework-native shells.
|
|
15
15
|
3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
|
|
16
16
|
4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
|
|
17
17
|
|
|
18
18
|
Generated pnpm projects pin `pnpm@10.26.0` and carry project-owned `pnpm-workspace.yaml#strictDepBuilds: true` and `#allowBuilds` settings. Generated Bun projects trust the same required packages through `package.json#trustedDependencies`. Keep the selected package manager's policy committed. When adding a dependency with an install script, review it before extending that policy; never replace it with a blanket allow-all install.
|
|
19
19
|
|
|
20
|
-
| Flag | Required | Purpose
|
|
21
|
-
| ---------------------------- | ----------------------------- |
|
|
22
|
-
| `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`)
|
|
23
|
-
| `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it.
|
|
24
|
-
| `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY.
|
|
25
|
-
| `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`).
|
|
26
|
-
| `--env <name>` | no | Compatibility alias for `--branch <name>`.
|
|
27
|
-
| `--framework <framework>` | no | New-project scaffold: `
|
|
28
|
-
| `--
|
|
29
|
-
| `--
|
|
30
|
-
| `--
|
|
31
|
-
| `--
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
|
|
20
|
+
| Flag | Required | Purpose |
|
|
21
|
+
| ---------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
|
|
23
|
+
| `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
|
|
24
|
+
| `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
|
|
25
|
+
| `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`). |
|
|
26
|
+
| `--env <name>` | no | Compatibility alias for `--branch <name>`. |
|
|
27
|
+
| `--framework <framework>` | no | New-project scaffold: `nextjs` (App Router, default), `react-router`, `vite` (React SPA), `astro`, or `sveltekit`. Existing repositories are preserved. |
|
|
28
|
+
| `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
|
|
29
|
+
| `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
|
|
30
|
+
| `--skills` / `--no-skills` | yes in non-TTY | Install the global Fimo skill (or skip it). |
|
|
31
|
+
| `--agents <list>` | no | Comma-separated agent IDs (e.g. `claude-code,cursor`). Pass `none` to skip installing the global skill. |
|
|
32
|
+
| `-a, --agent <id>` | alternative | Repeatable form: `-a claude-code -a cursor`. |
|
|
33
|
+
| `--template-root <path>` | no | Override the bundled template (development only). |
|
|
34
|
+
| `-y, --yes` | no | Run non-interactively using defaults (no prompts). |
|
|
36
35
|
|
|
37
36
|
In a non-TTY shell the create-new path requires `[dir]`, `--install` / `--no-install`, and `--skills` / `--no-skills` (and `--org` if you have no active org and belong to multiple orgs). Without them the command exits with `Cannot prompt in a non-interactive shell.`
|
|
38
37
|
|
|
39
|
-
### Non-interactive
|
|
38
|
+
### Non-interactive setup
|
|
40
39
|
|
|
41
40
|
Use explicit flags when a script or agent owns the flow. `--json` gives the
|
|
42
41
|
caller one stable result envelope; `--yes` is useful when running in a TTY but
|
|
43
|
-
is not required in a pipe or CI shell. The
|
|
42
|
+
is not required in a pipe or CI shell. The default scaffold is the Next.js App
|
|
43
|
+
Router template. Select the canonical React Router template explicitly with
|
|
44
|
+
`--framework react-router`.
|
|
44
45
|
|
|
45
46
|
```bash
|
|
46
47
|
fimo --json init my-site \
|
|
47
|
-
--starter fimo-site@1 \
|
|
48
48
|
--org <organizationId> \
|
|
49
49
|
--no-install \
|
|
50
50
|
--no-skills \
|
|
@@ -52,22 +52,18 @@ fimo --json init my-site \
|
|
|
52
52
|
--yes
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`src/forms/contact.json`, and commits the starter agents as manual-only bundles.
|
|
58
|
-
`--starter` is create-new only; an existing-project command such as
|
|
59
|
-
`fimo init --project-id <id> --starter fimo-site@1` fails before cloning or
|
|
60
|
-
writing anything. If dependencies were skipped, install them and run
|
|
61
|
-
`fimo validate` before starting the app so generated clients are present.
|
|
55
|
+
If dependencies were skipped, install them and run `fimo validate` before
|
|
56
|
+
starting the app so generated clients are present.
|
|
62
57
|
|
|
63
58
|
> **Zero-install:** the selected `fimo init` invocation needs no global install. `fimo projects create` is also an alias of `fimo init` (create-new path).
|
|
64
59
|
|
|
65
60
|
### Choose the application framework
|
|
66
61
|
|
|
67
|
-
Omit `--framework` for the
|
|
68
|
-
|
|
62
|
+
Omit `--framework` for the default Next.js App Router shell, or select a
|
|
63
|
+
different framework explicitly:
|
|
69
64
|
|
|
70
65
|
```bash
|
|
66
|
+
fimo init my-react-site --framework react-router --org <organizationId>
|
|
71
67
|
fimo init my-vite-site --framework vite --org <organizationId>
|
|
72
68
|
fimo init my-astro-site --framework astro --org <organizationId>
|
|
73
69
|
fimo init my-next-site --framework nextjs --org <organizationId>
|
|
@@ -80,6 +76,10 @@ boundary that keeps the default locale unprefixed. The Astro shell also includes
|
|
|
80
76
|
content-backed example with static, on-demand, and dynamic routes; the other shells intentionally
|
|
81
77
|
contain no schema, labels, or designed website.
|
|
82
78
|
|
|
79
|
+
The React Router shell is the canonical Fimo React template for framework mode;
|
|
80
|
+
select it with `--framework react-router` when a project should use React Router
|
|
81
|
+
instead of the default Next.js App Router shell.
|
|
82
|
+
|
|
83
83
|
Set the primary locale from the request: when several are explicitly named, use the first as default;
|
|
84
84
|
if none is requested, keep `en` and tell the user. Update `.fimo/config.json#i18n`, the framework-native
|
|
85
85
|
locale boundary, matcher, and HTML language default. Do not keep `en` solely because the shell starts
|
|
@@ -89,7 +89,6 @@ After init, load the project rules and `fimo-code` to build the requested site.
|
|
|
89
89
|
If you replace a shell's code with a site that uses another framework or none,
|
|
90
90
|
fix `runtime.framework` in the same change
|
|
91
91
|
(`fimo-code` → `references/frameworks/hosting.md`).
|
|
92
|
-
The current `fimo-site@1` content starter supports React Router only.
|
|
93
92
|
|
|
94
93
|
For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for Claude Code, `--agents=cursor` for Cursor, `--agents=codex` for Codex, etc. When the flag is omitted, env-var detection of the invoking harness (e.g. `CLAUDECODE` / `CLAUDE_CODE_ENTRYPOINT` → claude-code) auto-targets that agent; other agents must be selected explicitly via `--agents`/`-a` or the interactive picker.
|
|
95
94
|
|
|
@@ -109,21 +108,13 @@ fimo link <projectId> --relink
|
|
|
109
108
|
|
|
110
109
|
`fimo init` (create-new path) scaffolds:
|
|
111
110
|
|
|
112
|
-
- The selected project shell:
|
|
111
|
+
- The selected project shell: Next.js App Router by default, React Router with `--framework react-router`, a native React SPA with `--framework vite`, Astro with `--framework astro`, or SvelteKit with `--framework sveltekit`
|
|
113
112
|
- `.fimo/project.json` — links this directory to the remote project (read-only after creation)
|
|
114
113
|
- `.fimo/config.json` — project, optional Studio Pages route metadata, locale, SEO, and agent policy
|
|
115
114
|
- `.fimo/agents/` — versioned agent bundles
|
|
116
115
|
- `AGENTS.md` + `CLAUDE.md` — project rules (from the template) read by AGENTS.md-compatible tools and Claude Code. Both point the agent at `fimo skills get` to load the real skills on demand.
|
|
117
116
|
- A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
|
|
118
117
|
|
|
119
|
-
When `--starter fimo-site@1` is supplied, the overlay also includes a
|
|
120
|
-
content-backed homepage, `src/schemas/HomePage.json`, a `contact` form spec,
|
|
121
|
-
nine English labels, and two read-only agent bundles (`site-review` and
|
|
122
|
-
`content-guide`). The seed is opt-in and scoped to the new project; the default
|
|
123
|
-
blank template and all existing-project flows remain unchanged. Starter agents
|
|
124
|
-
declare only a manual trigger so copying them does not create schedules or
|
|
125
|
-
webhooks.
|
|
126
|
-
|
|
127
118
|
Nothing is written into per-agent skill dirs: the rich skills are fetched on demand via `fimo skills get <name>`, never copied into the project. `fimo init` separately installs the small global `fimo` bootstrap skill for the agents you select (machine-wide, not in the project) unless you pass `--no-skills`. For other agents' rule-file variants (`.cursor/rules/fimo.mdc`, `.windsurfrules`, `GEMINI.md`), run `fimo rules sync`. See `references/agent-setup.md`.
|
|
128
119
|
|
|
129
120
|
Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# React Router framework mode
|
|
2
2
|
|
|
3
|
-
This is the canonical Fimo
|
|
4
|
-
`fimo init`. You can also apply it to an existing
|
|
5
|
-
its routes, rendering choices, providers, and
|
|
3
|
+
This is the canonical Fimo React Router template and framework-mode setup used
|
|
4
|
+
by `fimo init --framework react-router`. You can also apply it to an existing
|
|
5
|
+
React Router project: preserve its routes, rendering choices, providers, and
|
|
6
|
+
SEO.
|
|
6
7
|
|
|
7
8
|
## Install and build
|
|
8
9
|
|