@fluid-app/fluid-cli-portal 0.1.26 → 0.1.28

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 ADDED
@@ -0,0 +1,107 @@
1
+ # Fluid Portal CLI — Pull & Push App Manifests
2
+
3
+ The Fluid CLI lets you pull a Fluid OS definition (your app manifest — screens, themes, navigations, profiles) into local JSON files, edit them, and push them back to production.
4
+
5
+ ## One-time setup
6
+
7
+ - **Build the CLI** (from the repo root):
8
+
9
+ ```bash
10
+ pnpm --filter @fluid-app/fluid-cli --filter @fluid-app/fluid-cli-portal build
11
+ ```
12
+
13
+ - The `fluid` binary is then at `packages/cli/core/dist/bin/fluid.mjs`. Optionally alias it:
14
+
15
+ ```bash
16
+ alias fluid="node /path/to/repo/packages/cli/core/dist/bin/fluid.mjs"
17
+ ```
18
+
19
+ (All examples below assume this alias. Without it, replace `fluid` with `node packages/cli/core/dist/bin/fluid.mjs`.)
20
+
21
+ ## Authenticate
22
+
23
+ - **Email + MFA flow:**
24
+
25
+ ```bash
26
+ fluid login
27
+ ```
28
+
29
+ - **Or skip MFA with an API token:**
30
+
31
+ ```bash
32
+ FLUID_TOKEN="<your-api-token>" fluid login
33
+ ```
34
+
35
+ ## Pull a definition
36
+
37
+ ```bash
38
+ fluid portal pull
39
+ ```
40
+
41
+ - Interactive picker, or target one directly: `fluid portal pull --app "<definition name>"`
42
+ - Writes `portal/` (`screens/`, `themes/`, `navigations/`, `profiles/`, `definition.json`) plus a `.portal-sync/` folder that tracks sync state.
43
+ - Switching to a different definition with unpushed local changes? Add `--force` to overwrite.
44
+
45
+ ## Edit & preview
46
+
47
+ - Edit the JSON files under `portal/`.
48
+ - Preview locally (serves the manifest from your local files):
49
+
50
+ ```bash
51
+ fluid portal dev
52
+ ```
53
+
54
+ ## Push changes back
55
+
56
+ ```bash
57
+ fluid portal push
58
+ ```
59
+
60
+ - Shows a diff and asks for confirmation (add `--yes` to skip).
61
+ - **Push does NOT publish** — it updates the definition's working/draft state. End users keep seeing the currently-active published version.
62
+
63
+ ## Publish portal versions (only when you want manifest changes live)
64
+
65
+ ```bash
66
+ fluid portal version create --activate # snapshot current state + make it live
67
+ fluid portal version list # see all versions
68
+ fluid portal version activate <version-id> # promote a specific version
69
+ ```
70
+
71
+ ## Publish widget runtime artifacts
72
+
73
+ Portal widget packages are published separately from the hosted portal shell.
74
+ The portal CLI only publishes company-owned portal widget packages:
75
+
76
+ ```bash
77
+ fluid portal deploy
78
+ ```
79
+
80
+ - Builds `defineWidgetPackage` runtime artifacts (`widget.js`, `manifest.json`,
81
+ CSS, source maps) into `.fluid/widget-dist` by default.
82
+ - Publishes a **company-owned** portal widget package for Fluid OS usage.
83
+ - Defaults to `--environment production` (an output/reporting label) and
84
+ `--out-dir .fluid/widget-dist`.
85
+ - Add `--dry-run` to build and print the upload payload without creating an
86
+ upload session.
87
+ - This publishes widget runtime artifacts only; it does **not** deploy the
88
+ hosted portal shell.
89
+
90
+ For droplet-owned marketplace widget packages, use the dedicated widget CLI
91
+ (`@fluid-app/fluid-cli-widget`) instead:
92
+
93
+ ```bash
94
+ fluid widget create my-widget --droplet <uuid>
95
+ fluid widget link --droplet <uuid>
96
+ fluid widget publish
97
+ ```
98
+
99
+ Droplets are managed outside the widget CLI and must already exist before you
100
+ link or publish a droplet-owned widget package.
101
+
102
+ ## Handy commands
103
+
104
+ - `fluid whoami` — show the active profile
105
+ - `fluid switch` — switch between profiles
106
+ - `fluid logout` — clear stored credentials
107
+ - `fluid portal doctor` — diagnose portal project issues