fimo 0.14.0-staging.1 → 0.14.0-staging.3

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 CHANGED
@@ -27,7 +27,8 @@ Run the CLI with `npx` — no global install, always the latest:
27
27
 
28
28
  ```bash
29
29
  npx fimo@latest login
30
- npx fimo@latest init my-site
30
+ npx fimo@latest init my-site # default React Router scaffold
31
+ # or: npx fimo@latest init my-next-site --framework nextjs
31
32
  cd my-site
32
33
  ```
33
34
 
@@ -43,7 +44,7 @@ npx fimo@latest skills install --mode=copy
43
44
 
44
45
  ## Local development
45
46
 
46
- A Fimo project is a standard Vite app — run it like any other:
47
+ A Fimo project is a standard framework application. Run its normal package scripts:
47
48
 
48
49
  ```bash
49
50
  npm install
@@ -52,6 +52,7 @@ A project can have multiple **envs** — each is a git branch _plus_ its own DB,
52
52
  npx fimo@latest login # authenticate via browser
53
53
  npx fimo@latest skills install # install the global Fimo skill for your AI tools
54
54
  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.
55
+ npx fimo@latest init my-next-site --framework nextjs --org <id> # opt-in Next.js App Router scaffold
55
56
  npx fimo@latest init my-site --starter fimo-site@1 --org <id> --yes --no-skills # opt-in content-led starter for a new project
56
57
  npx fimo@latest init --project-id <id> my-site # link an EXISTING project instead of creating one
57
58
  npx fimo@latest clone # interactively choose an existing project to clone locally
@@ -83,6 +83,7 @@ There is no all-capabilities wildcard; keeping the list explicit makes each agen
83
83
  | `fimo:logs:read` | Read production logs | Low |
84
84
  | `fimo:analytics:read` | Read analytics data | Low |
85
85
  | `fimo:preview:read` | Read a current preview URL | Low |
86
+ | `fimo:history:read` | Read project restore points | Low |
86
87
  | `fimo:deploy` | Trigger a production deploy | Critical |
87
88
  | `net:fetch` | Make outbound HTTP requests | Medium |
88
89
  | `agent:delegate` | Invoke declared sub-agents | Medium |
@@ -13,6 +13,8 @@ fimo history create "Before content migration"
13
13
  fimo history restore <version-id>
14
14
  ```
15
15
 
16
+ Studio chat can run `history list` and `history show`. Create and restore remain available through the standalone CLI and Studio's History page.
17
+
16
18
  Use the global `--env <name>` option to target a different environment. Use `--project <id>` when there is no local `.fimo/project.json`.
17
19
 
18
20
  ## Pagination and usage
@@ -13,7 +13,7 @@ fimo init [dir] [options]
13
13
  `fimo init` runs the full onboarding in one shot:
14
14
 
15
15
  1. **Signs in automatically** — if there's no session it opens the browser loopback login. In `--json` / non-TTY with no session it fails with `NOT_AUTHENTICATED` (run `fimo login` first).
16
- 2. **Resolves the project** — with `--project-id <id>` it links an EXISTING project (clones it); without it, it creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. An optional `--starter fimo-site@1` adds a content-led starter only to a newly created project.
16
+ 2. **Resolves the project** — with `--project-id <id>` it links an EXISTING project (clones it); without it, it creates a NEW project. An interactive TTY shows a "Create new / Link existing" picker; non-interactive shells default to create-new. New projects use React Router by default; `--framework nextjs` selects the minimal Next.js App Router scaffold. An optional `--starter fimo-site@1` adds a React-Router content starter only to a newly created project.
17
17
  3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
18
18
  4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
19
19
 
@@ -23,6 +23,7 @@ fimo init [dir] [options]
23
23
  | `--project-id <id>` | no | Link an EXISTING project instead of creating one (clones it). |
24
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
25
  | `--env <name>` | no | Env to check out when linking an existing project (defaults to `main`). |
26
+ | `--framework <framework>` | no | New-project scaffold: `react-router` (default) or `nextjs` (App Router). Existing repositories are preserved. |
26
27
  | `--starter <id>` | no | Opt-in project starter for create-new (currently `fimo-site@1`). It seeds CMS content, labels, a contact form, and manual-only agents. Rejects `--project-id`. |
27
28
  | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
28
29
  | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
@@ -60,6 +61,21 @@ writing anything. If dependencies were skipped, install them and run
60
61
 
61
62
  > **Zero-install:** run `npx fimo@latest init` — no global install needed. `fimo projects create` is also an alias of `fimo init` (create-new path).
62
63
 
64
+ ### Choose the application framework
65
+
66
+ Omit `--framework` for the existing React Router scaffold, or select the
67
+ minimal Next.js App Router shell explicitly:
68
+
69
+ ```bash
70
+ npx fimo@latest init my-next-site --framework nextjs --org <organizationId>
71
+ ```
72
+
73
+ The Next scaffold includes `src/app`, `FimoProvider`, the hosted-preview config,
74
+ and `.fimo/config.json#runtime.framework`. It intentionally contains no schema,
75
+ labels, or designed website. After init, load the project rules and `fimo-code`
76
+ to build the requested site. The current `fimo-site@1` content starter supports
77
+ React Router only.
78
+
63
79
  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.
64
80
 
65
81
  ## Linking an existing project
@@ -70,7 +86,7 @@ Pass `--project-id <id>` to link an EXISTING project instead of creating one. Th
70
86
 
71
87
  `fimo init` (create-new path) scaffolds:
72
88
 
73
- - The project template (Vite + React 19 + TypeScript + Tailwind v4 + shadcn/ui + react-router)
89
+ - The selected project shell: React Router by default, or Next.js App Router with `--framework nextjs`
74
90
  - `.fimo/project.json` — links this directory to the remote project (read-only after creation)
75
91
  - `.fimo/config.json` — project, route, locale, SEO, and agent policy
76
92
  - `.fimo/agents/` — versioned agent bundles
@@ -15,6 +15,8 @@ fimo locales set-default es --yes --json
15
15
  fimo locales remove es --yes --json
16
16
  ```
17
17
 
18
+ Studio chat can run `locales list`. Manage the locale lifecycle through Studio Settings or the standalone CLI.
19
+
18
20
  These commands update the selected environment through the locale lifecycle API. The API commits `.fimo/config.json` to the Fimo branch, then the CLI synchronizes the **whole local branch** to that commit. They refuse a dirty config, a local-ahead branch, or a diverged branch before applying the remote change. `--yes` bypasses only the explanatory prompt.
19
21
 
20
22
  If a mutation exits with code `2` and `data.code` is `LOCALE_APPLIED_SYNC_REQUIRED`, the remote operation succeeded (`data.applied` is `true`) but the local fast-forward did not. **Do not retry the locale command.** Run the commands in `data.sync.recovery`, resolve the checkout, and confirm with `fimo status` or `fimo locales list`.
@@ -8,7 +8,7 @@ Commands for listing projects across an org, cloning a remote project locally, a
8
8
 
9
9
  ```bash
10
10
  fimo projects list [--org <id>] # list projects in an org (defaults to active org)
11
- fimo projects create [dir] [--org <id>] [--install|--no-install] # alias of `fimo init` (create-new path)
11
+ fimo projects create [dir] [--org <id>] [--framework react-router|nextjs] [--install|--no-install]
12
12
  fimo projects clone [projectId] [dir] [--env <name>] # clone an existing project locally
13
13
  fimo projects delete [projectId] [-C <dir>] [-y] # delete (defaults to current project)
14
14
  fimo projects publish [projectId] [-C <dir>] # make the project live (publish from main)
@@ -35,7 +35,7 @@ When labels are not needed at that boundary, use `<FimoProvider locale={locale}>
35
35
 
36
36
  With `next-i18next`, keep its routing and translation provider for the strings it owns. Pass the same resolved locale to Fimo; do not replace the library or duplicate its route structure.
37
37
 
38
- Before creating non-default Fimo labels or content variants, confirm that those locales are enabled for the linked Fimo project. `.fimo/config.json` documents the application's locale policy, but `fimo validate` does not currently add project locales.
38
+ Before creating non-default Fimo labels or content variants, confirm that those locales are enabled for the linked Fimo project. Load `fimo-cli` with its `locales` reference and run `fimo locales add <locale> --yes --json`; `.fimo/config.json` documents the application's locale policy, but `fimo validate` does not add project locales.
39
39
 
40
40
  ## Ownership boundary
41
41
 
@@ -1,7 +1,7 @@
1
1
  # Setup Fimo on React Router 8
2
2
 
3
3
  This recipe describes the canonical Fimo + React Router framework-mode setup.
4
- It mirrors what `fimo init` scaffolds today; you can also apply it to an
4
+ It mirrors the default `fimo init` scaffold; you can also apply it to an
5
5
  existing RR project.
6
6
 
7
7
  ## Prerequisites
@@ -15,7 +15,7 @@ The application owns locale resolution and routing. Fimo consumes the resolved l
15
15
 
16
16
  Keep one locale unless the product asks for multilingual output. Locale tags should be structurally valid, such as `en`, `pt-BR`, or `zh-Hans`.
17
17
 
18
- For an already linked project, the same locales must also be enabled in Fimo before writing non-default label or content variants. Local config and `fimo validate` do not currently provision project locales. If the API says a locale is not configured, enable it in Fimo Studio; do not change the application's route strategy to work around it.
18
+ For an already linked project, enable each locale in Fimo before writing non-default label or content variants. Load `fimo-cli` with its `locales` reference and run `fimo locales add <locale> --yes --json`; local config and `fimo validate` do not provision project locales. Do not change the application's route strategy to work around a missing locale.
19
19
 
20
20
  ## Application responsibilities
21
21
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-08-13T17:07:37.274Z",
4
+ "bundledAt": "2026-08-14T07:57:59.355Z",
5
5
  "cliVersion": "0.13.0",
6
6
  "external": [
7
7
  "oxc-parser",