@equinor/fusion-framework-cli 13.3.19-next.0 → 14.0.0

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +114 -8
  2. package/README.md +150 -193
  3. package/bin/build/bin.mjs +1 -1
  4. package/bin/build/cli.mjs +3 -3
  5. package/dist/esm/lib/app/app-manifest.js.map +1 -1
  6. package/dist/esm/lib/app/index.js +8 -0
  7. package/dist/esm/lib/app/index.js.map +1 -1
  8. package/dist/esm/lib/dev-server.js +8 -0
  9. package/dist/esm/lib/dev-server.js.map +1 -1
  10. package/dist/esm/lib/index.js.map +1 -1
  11. package/dist/esm/lib/portal/index.js +8 -0
  12. package/dist/esm/lib/portal/index.js.map +1 -1
  13. package/dist/esm/lib/portal/portal-manifest.js +20 -1
  14. package/dist/esm/lib/portal/portal-manifest.js.map +1 -1
  15. package/dist/esm/lib/utils/expect.js +16 -2
  16. package/dist/esm/lib/utils/expect.js.map +1 -1
  17. package/dist/esm/lib/utils/file-exists.js +28 -0
  18. package/dist/esm/lib/utils/file-exists.js.map +1 -1
  19. package/dist/esm/lib/utils/index.js +8 -0
  20. package/dist/esm/lib/utils/index.js.map +1 -1
  21. package/dist/esm/version.js +1 -1
  22. package/dist/types/bin/app-config-publish.d.ts +9 -0
  23. package/dist/types/bin/index.d.ts +10 -0
  24. package/dist/types/bin/portal-config-publish.d.ts +10 -0
  25. package/dist/types/bin/utils/index.d.ts +9 -0
  26. package/dist/types/cli/commands/index.d.ts +9 -0
  27. package/dist/types/lib/app/app-manifest.d.ts +4 -14
  28. package/dist/types/lib/app/index.d.ts +9 -1
  29. package/dist/types/lib/dev-server.d.ts +8 -0
  30. package/dist/types/lib/index.d.ts +8 -0
  31. package/dist/types/lib/legacy.d.ts +1 -1
  32. package/dist/types/lib/portal/index.d.ts +8 -0
  33. package/dist/types/lib/portal/portal-manifest.d.ts +20 -0
  34. package/dist/types/lib/utils/expect.d.ts +18 -2
  35. package/dist/types/lib/utils/file-exists.d.ts +30 -0
  36. package/dist/types/lib/utils/index.d.ts +8 -0
  37. package/dist/types/version.d.ts +1 -1
  38. package/docs/ai-commands.md +162 -40
  39. package/docs/application.md +27 -0
  40. package/docs/auth.md +9 -0
  41. package/docs/portal.md +20 -0
  42. package/package.json +21 -25
package/CHANGELOG.md CHANGED
@@ -1,17 +1,123 @@
1
1
  # Change Log
2
2
 
3
- ## 13.3.19-next.0
3
+ ## 14.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - abffa53: Major version bump for Fusion Framework React 19 release.
8
+
9
+ All packages are bumped to the next major version as part of the React 19 upgrade. This release drops support for React versions below 18 and includes breaking changes across the framework.
10
+
11
+ **Breaking changes:**
12
+ - Peer dependencies now require React 18 or 19 (`^18.0.0 || ^19.0.0`)
13
+ - React Router upgraded from v6 to v7
14
+ - Navigation module refactored with new history API
15
+ - `renderComponent` and `renderApp` now use `createRoot` API
16
+
17
+ **Migration:**
18
+ - Update your React version to 18.0.0 or higher before upgrading
19
+ - Replace `NavigationProvider.createRouter()` with `@equinor/fusion-framework-react-router`
20
+ - See individual package changelogs for package-specific migration steps
21
+
22
+ ### Minor Changes
23
+
24
+ - abffa53: Add automatic support for `?raw` imports in Vite builds.
25
+
26
+ The CLI now automatically includes the `rawImportsPlugin` in Vite configurations, enabling `?raw` imports for markdown files (and other configured extensions) without manual plugin configuration.
27
+
28
+ ```typescript
29
+ import readmeContent from "../../README.md?raw";
30
+ ```
31
+
32
+ This ensures consistent behavior across all Fusion Framework CLI builds.
33
+
34
+ - abffa53: Add `app serve` command to serve built applications with the dev-portal.
35
+
36
+ The new `serve` command provides a production-like preview environment for testing built applications locally. It serves your built application through the dev-portal, similar to the `dev` command but using production-built files.
37
+
38
+ ```sh
39
+ pnpm fusion-framework-cli app serve
40
+ pnpm fusion-framework-cli app serve --port 5000
41
+ pnpm fusion-framework-cli app serve --dir ./dist --host 0.0.0.0
42
+ ```
43
+
44
+ The command automatically detects the build directory from your Vite configuration and provides options for custom port, host, directory, manifest, and config files. The application must be built first using `ffc app build` before serving.
45
+
46
+ - abffa53: Add route schema support to app manifests for documentation and API schema generation.
47
+
48
+ **New Features:**
49
+ - **module-app**: Added `RouteSchemaEntry` type and `routes` field to `AppManifest` interface
50
+ - **cli**: Added `RouteSchemaEntry` type export for app manifest generation
51
+
52
+ Route schemas allow applications to document their routes in app manifests, enabling automatic API documentation and schema generation. The `RouteSchemaEntry` type represents a route with its path, description, and optional parameter/search schemas.
53
+
54
+ ```typescript
55
+ import type {
56
+ RouteSchemaEntry,
57
+ AppManifest,
58
+ } from "@equinor/fusion-framework-module-app";
59
+
60
+ const manifest: AppManifest = {
61
+ appKey: "my-app",
62
+ displayName: "My App",
63
+ description: "My app description",
64
+ type: "standalone",
65
+ routes: [
66
+ ["/", "Home page"],
67
+ ["/products", "Products listing page"],
68
+ ["/products/:id", "Product detail page", { id: "Product ID" }],
69
+ ],
70
+ };
71
+ ```
4
72
 
5
73
  ### Patch Changes
6
74
 
7
- - [#3820](https://github.com/equinor/fusion-framework/pull/3820) [`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78) Thanks [@odinr](https://github.com/odinr)! - relase next
75
+ - ae92f13: Require `simple-git` 3.32.3 or newer in published package manifests to align installs with the upstream fix for CVE-2026-28292.
76
+
77
+ This does not change the CLI API. It tightens the minimum allowed dependency version so fresh installs and manifest-based scanners resolve the first safe `simple-git` release.
78
+
79
+ - c123c39: chore: bump simple-git from 3.32.3 to 3.33.0
80
+
81
+ Includes security improvements:
82
+ - Pathspec input sanitization for git.clone() and git.mirror()
83
+ - Enhanced git -c safety checks
84
+
85
+ - 3de232c: fix(cli): break turbo workspace cycle for AI plugins
86
+
87
+ Upgrade turbo from 2.8.10 to 2.8.14. This version introduces stricter workspace cycle detection, requiring the AI plugin dependencies to be moved from the CLI package's devDependencies to the root package.json.
88
+
89
+ The CLI plugins are now configured at the repository root (fusion-cli.config.ts) instead of in the packages/cli package, ensuring a clean workspace dependency graph for turbo's build scheduler.
90
+
91
+ This change has no impact on the published CLI package's public API. Plugins continue to be wired identically; only the source of the wire definition has changed.
92
+
93
+ Additional improvements from turbo 2.8.14:
94
+ - Fix: Ensures turbo watch mode respects task dependencies on first run
95
+ - Perf: Skip irrelevant packages for faster monorepo builds
96
+ - Feature: AI agent telemetry support in turbo traces
97
+
98
+ - 32bcf83: Bump `vite` from `7.3.1` to `8.0.0`.
99
+
100
+ Vite 8 replaces Rollup with Rolldown and esbuild with Oxc for faster builds.
101
+ No breaking API changes affect this codebase. The `dev-server` peerDependency
102
+ is widened to accept both Vite 7 and Vite 8.
8
103
 
9
- - Updated dependencies [[`f647825`](https://github.com/equinor/fusion-framework/commit/f647825cb5712763b09dafda21fd996211c78b78), [`fa89ed8`](https://github.com/equinor/fusion-framework/commit/fa89ed8aeed919950ef6a6775e60eb6904ec7946)]:
10
- - @equinor/fusion-framework-vite-plugin-raw-imports@1.1.0-next.1
11
- - @equinor/fusion-imports@1.1.12-next.0
12
- - @equinor/fusion-framework-dev-portal@5.0.0-next.0
13
- - @equinor/fusion-framework-dev-server@1.1.32-next.0
14
- - @equinor/fusion-framework-module-msal-node@3.0.2-next.0
104
+ - Updated dependencies [abffa53]
105
+ - Updated dependencies [abffa53]
106
+ - Updated dependencies [abffa53]
107
+ - Updated dependencies [abffa53]
108
+ - Updated dependencies [abffa53]
109
+ - Updated dependencies [abffa53]
110
+ - Updated dependencies [abffa53]
111
+ - Updated dependencies [aa35c46]
112
+ - Updated dependencies [abffa53]
113
+ - Updated dependencies [abffa53]
114
+ - Updated dependencies [32bcf83]
115
+ - Updated dependencies [abffa53]
116
+ - @equinor/fusion-framework-dev-portal@5.0.0
117
+ - @equinor/fusion-framework-dev-server@2.0.0
118
+ - @equinor/fusion-framework-module-msal-node@4.0.0
119
+ - @equinor/fusion-framework-vite-plugin-raw-imports@2.0.0
120
+ - @equinor/fusion-imports@2.0.0
15
121
 
16
122
  ## 13.3.18
17
123
 
package/README.md CHANGED
@@ -1,242 +1,199 @@
1
- [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](./LICENSE)
1
+ # @equinor/fusion-framework-cli
2
2
 
3
- Fusion Framework CLI is a command-line tool for developing, building, and publishing applications and portal templates within the Fusion Framework ecosystem. It streamlines workflows, automates common tasks, and supports modern CI/CD pipelines.
3
+ Command-line toolkit for developing, building, and publishing Fusion Framework applications and portal templates. Provides a unified developer experience from local development to production deployment.
4
4
 
5
- **What you can build:**
6
- - **Fusion Applications**: Interactive web apps that run within the Fusion Portal
7
- - **Portal Templates**: Customizable portal configurations for different business contexts
5
+ ## Features
8
6
 
9
- **Key capabilities:**
10
- - **Template-based app creation**: Generate new Fusion applications from predefined templates
11
- - Development server with hot reload and service discovery
12
- - Application manifest and configuration management
13
- - Automated building, bundling, and deployment
14
- - Environment-specific configuration handling
15
- - Integrated authentication and authorization
16
- - CI/CD pipeline support with automated publishing
17
- - **Plugin system**: Extensible architecture with optional plugins (e.g., AI/LLM commands)
7
+ - **Application scaffolding** — generate new Fusion apps from predefined templates
8
+ - **Development server** hot-reload dev server with service discovery and authentication
9
+ - **Build & bundle** Vite-based production builds with manifest generation
10
+ - **Publish & tag** — upload bundles and configs to the Fusion app/portal service
11
+ - **Snapshot versions** timestamped preview builds for PRs and CI (`--snapshot`)
12
+ - **Portal templates** — build, bundle, and deploy portal configurations
13
+ - **Service discovery** resolve Fusion service endpoints from any environment
14
+ - **Authentication** — Azure AD login, token management, CI/CD token support
15
+ - **Plugin system** extend the CLI with optional plugin packages
18
16
 
19
- ## Prerequisites
20
-
21
- - **Node.js** (LTS version recommended)
22
- - **pnpm** (or npm/yarn) package manager
23
- - **Fusion Framework app or portal project** (or create a new one)
24
- - **Access to Fusion services** (for authentication and deployment)
25
-
26
- ## Features & Benefits
27
-
28
- - **🚀 Unified developer experience**: Single tool for the entire development lifecycle - from local development to production deployment
29
- - **⚡ Rapid local development**: Built-in dev server with hot reload, service discovery, and real-time feedback
30
- - **🎯 Environment-specific configuration**: Seamlessly manage manifests and configs across dev, test, and production environments
31
- - **🔐 Integrated authentication**: Secure your apps locally and in CI/CD with Azure AD integration and token management
32
- - **🔍 Service discovery**: Built-in support for Fusion services with automatic endpoint resolution
33
- - **📦 Automated bundling & deployment**: One-command building, packaging, and publishing to Fusion registry
34
- - **🏗️ Extensible architecture**: Support for apps, portals, widgets, and future Fusion components
35
- - **📚 Comprehensive documentation**: Migration guides, detailed setup instructions, and troubleshooting resources
36
-
37
- ## Getting Started
38
-
39
- **Install the CLI**
17
+ ## Installation
40
18
 
41
19
  ```sh
42
20
  pnpm add -D @equinor/fusion-framework-cli
43
21
  ```
44
22
 
45
- **Create a new Fusion application from template**
23
+ The package exposes two binary aliases: `fusion-framework-cli` and `ffc`.
46
24
 
47
- Generate a new Fusion application using predefined templates:
25
+ ## Usage
26
+
27
+ ### Create a new application
48
28
 
49
29
  ```sh
50
- # Create a new app with interactive template selection
51
- pnpm fusion-framework-cli app create my-new-app
30
+ # Interactive template selection
31
+ pnpm fusion-framework-cli app create my-app
52
32
 
53
- # Create with a specific template
33
+ # Use a specific template
54
34
  pnpm fusion-framework-cli app create my-app --template react-app
55
-
56
- # Create in a specific directory with debug logging
57
- pnpm fusion-framework-cli app create my-app --directory ./projects --debug
58
35
  ```
59
36
 
60
- **Initialize or update your app's manifest and config files**
61
-
62
- Create the required configuration files for your app:
63
-
64
- - `app.manifest.ts` - Defines your app's metadata and capabilities
65
- - `app.config.ts` - Contains runtime configuration and environment variables
66
-
67
- See [Developing Apps](docs/application.md) for detailed setup and configuration guidance.
68
-
69
- **Start the development server**
37
+ ### Local development
70
38
 
71
39
  ```sh
40
+ # Start the dev server (app)
72
41
  pnpm fusion-framework-cli dev
73
- ```
74
-
75
- **Log in to the Fusion Framework (if needed)**
76
42
 
77
- ```sh
78
- pnpm fusion-framework-cli auth login
43
+ # Start the dev server (portal)
44
+ pnpm fusion-framework-cli portal dev
79
45
  ```
80
46
 
81
- **Build and publish your app**
47
+ ### Build and publish
82
48
 
83
49
  ```sh
84
- # Publish without config
85
- pnpm fusion-framework-cli publish --env <environment>
86
-
87
- # Publish and upload config in one command
88
- pnpm fusion-framework-cli publish --env <environment> --config
89
- ```
90
-
91
- **Build or publish snapshot artifacts**
92
-
93
- > [!CAUTION]
94
- > Snapshot versions are designed for **preview and testing purposes only** (e.g., pull requests, CI/CD test deployments). The snapshot version **only affects the manifest build metadata** — your `package.json` and source files remain unchanged.
50
+ # Build an application
51
+ pnpm fusion-framework-cli app build
95
52
 
96
- - Use `--snapshot` to emit timestamped snapshot versions
97
- - Default: `--snapshot` → `{version}-snapshot.{unix_timestamp}`
98
- - Optional identifier: `--snapshot pr-123` → `{version}-pr-123.{unix_timestamp}`
99
- - Semver coercion strips any pre-release suffix first, e.g. `1.2.3-beta.1` → `1.2.3-snapshot.{unix_timestamp}`
53
+ # Bundle into a zip archive
54
+ pnpm fusion-framework-cli app pack
100
55
 
101
- **Common use cases:**
102
- - Pull request previews: `--snapshot pr-456`
103
- - Nightly builds: `--snapshot nightly`
104
- - Feature branch testing: `--snapshot feature-xyz`
56
+ # Publish bundle + config to an environment
57
+ pnpm fusion-framework-cli app publish --env ci --config
105
58
 
106
- ```sh
107
- # Package an app with a snapshot version
108
- pnpm fusion-framework-cli app pack --snapshot
59
+ # Snapshot build for a PR
109
60
  pnpm fusion-framework-cli app pack --snapshot pr-123
110
-
111
- # Publish with a snapshot version
112
- pnpm fusion-framework-cli app publish --snapshot
113
- pnpm fusion-framework-cli app publish --snapshot nightly
114
61
  ```
115
62
 
116
- **Upload configuration**
63
+ ### Authentication
117
64
 
118
65
  ```sh
119
- # Upload config with publish command
120
- pnpm fusion-framework-cli publish --config --env <environment>
121
-
122
- # Or upload config separately
123
- pnpm fusion-framework-cli app config --publish --env <environment>
124
- ```
66
+ # Interactive login
67
+ pnpm fusion-framework-cli auth login
125
68
 
126
- > **Tip:** For CI/CD and automation, set the `FUSION_TOKEN` environment variable. See [Authentication](docs/auth.md) for details.
69
+ # Retrieve a token
70
+ pnpm fusion-framework-cli auth token
127
71
 
128
- ## Common Commands
72
+ # CI/CD: set FUSION_TOKEN environment variable instead
73
+ ```
129
74
 
130
- | Command | Description |
131
- | -------------------------------------- | ------------------------------------ |
132
- | `pnpm fusion-framework-cli app create` | Create new Fusion applications from templates |
133
- | `pnpm fusion-framework-cli auth ...` | Authenticate with Fusion |
134
- | `pnpm fusion-framework-cli app ...` | Working with Fusion applications |
135
- | `pnpm fusion-framework-cli portal ...` | Working with Fusion portal templates |
136
- | `pnpm fusion-framework-cli disco ...` | Service discovery and resolution |
75
+ ### Command overview
137
76
 
138
- **Optional Plugins:**
139
77
  | Command | Description |
140
- |---------|-------------|
141
- | `pnpm fusion-framework-cli ai ...` | AI/LLM commands (requires `@equinor/fusion-framework-cli-plugin-ai`) |
142
-
143
- **Plugin System:**
144
-
145
- The CLI supports optional plugins that extend functionality. To use plugins:
146
-
147
- 1. Install the plugin package: `pnpm add -D @equinor/fusion-framework-cli-plugin-ai`
148
- 2. Create a `fusion-cli.config.ts` file in your project root:
149
- ```typescript
150
- import { defineFusionCli } from '@equinor/fusion-framework-cli';
151
-
152
- export default defineFusionCli(() => ({
153
- plugins: [
154
- '@equinor/fusion-framework-cli-plugin-ai',
155
- ],
156
- }));
157
- ```
158
-
159
- Plugins are automatically discovered and loaded when the CLI starts. The config file can be `.ts`, `.js`, or `.json`. If no config file exists, the CLI works normally without plugins.
160
-
161
- ## Example: package.json
162
-
163
- A minimal example for a Fusion Framework app:
164
-
165
- ```json
166
- {
167
- "name": "@equinor/fusion-framework-app",
168
- "version": "1.0.0",
169
- "description": "My Fusion Framework Application",
170
- "main": "dist/bundle.js",
171
- "files": [
172
- "dist/",
173
- "assets/",
174
- "README.md"
175
- ],
176
- "scripts": {
177
- "build": "fusion-framework-cli app build",
178
- "dev": "fusion-framework-cli dev",
179
- "publish": "fusion-framework-cli app publish"
180
- },
181
- "devDependencies": {
182
- "@equinor/fusion-framework-cli": "^11.0.0"
183
- }
184
- }
78
+ |---|---|
79
+ | `app create` | Scaffold a new Fusion application from a template |
80
+ | `app build` | Build the application with Vite |
81
+ | `app pack` | Bundle the build into a zip archive |
82
+ | `app publish` | Build, pack, and upload in one step |
83
+ | `app upload` | Upload a pre-built bundle |
84
+ | `app config` | Generate or publish app configuration |
85
+ | `app tag` | Tag a published version (e.g. `latest`) |
86
+ | `app check` | Verify app registration in the app store |
87
+ | `app dev` | Start the application dev server |
88
+ | `app serve` | Preview a production build locally |
89
+ | `portal build` | Build a portal template |
90
+ | `portal pack` | Bundle the portal into a zip archive |
91
+ | `portal publish` | Build, pack, and upload a portal |
92
+ | `portal upload` | Upload a pre-built portal bundle |
93
+ | `portal config` | Generate or publish portal configuration |
94
+ | `portal tag` | Tag a published portal version |
95
+ | `portal dev` | Start the portal dev server |
96
+ | `auth login` | Authenticate with Azure AD |
97
+ | `auth logout` | Clear stored credentials |
98
+ | `auth token` | Print or acquire an access token |
99
+ | `disco resolve` | Resolve a Fusion service endpoint |
100
+
101
+ Run `pnpm fusion-framework-cli <command> --help` for detailed options.
102
+
103
+ ## API Reference
104
+
105
+ The package exposes several sub-path exports for programmatic use:
106
+
107
+ ### `@equinor/fusion-framework-cli` (root)
108
+
109
+ - `defineDevServerConfig` / `defineFusionCli` — type-safe config definition helpers
110
+ - `loadDevServerConfig` — load and merge dev-server configuration files
111
+ - `resolvePackage` / `resolveEntryPoint` — package and entry-point resolution
112
+ - `RuntimeEnv` — runtime environment type used across the CLI
113
+
114
+ ### `@equinor/fusion-framework-cli/app`
115
+
116
+ - `defineAppManifest` / `defineAppConfig` — type-safe manifest and config helpers
117
+ - `loadAppManifest` / `loadAppConfig` — load and validate app manifest/config files
118
+ - `createAppManifestFromPackage` — generate a manifest from `package.json`
119
+ - `mergeAppManifests` / `mergeAppConfig` — deep-merge manifest/config objects
120
+ - `ApiAppConfigSchema` — Zod schema for app config validation
121
+
122
+ ### `@equinor/fusion-framework-cli/portal`
123
+
124
+ - `definePortalManifest` / `definePortalConfig` / `definePortalSchema` — type-safe helpers
125
+ - `loadPortalManifest` / `loadPortalConfig` / `loadPortalSchema` — load and validate files
126
+ - `createPortalManifestFromPackage` — generate a portal manifest from `package.json`
127
+ - `validatePortalManifest` — validate a manifest against the Zod schema
128
+
129
+ ### `@equinor/fusion-framework-cli/bin`
130
+
131
+ - `buildApplication` / `buildPortal` — programmatic Vite builds
132
+ - `bundleApp` / `bundlePortal` — build + pack into zip
133
+ - `uploadApplication` / `uploadPortalBundle` — upload bundles to the service
134
+ - `tagApplication` / `tagPortal` — tag published versions
135
+ - `initializeFramework` / `configureFramework` — set up the Fusion Framework for CLI operations
136
+ - `FusionEnv` — enum of supported Fusion environments
137
+
138
+ ### `@equinor/fusion-framework-cli/utils`
139
+
140
+ - `assert` / `assertFileExists` / `assertObject` — assertion helpers
141
+ - `fileExists` / `fileExistsSync` — file-existence checks
142
+ - `writeFile` — write files with automatic directory creation
143
+ - `resolveAnnotations` — resolve CI/CD build annotations
144
+ - `generateSnapshotVersion` — create timestamped snapshot versions
145
+
146
+ ## Configuration
147
+
148
+ ### Application manifest (`app.manifest.ts`)
149
+
150
+ ```ts
151
+ import { defineAppManifest } from '@equinor/fusion-framework-cli/app';
152
+
153
+ export default defineAppManifest((env, { base }) => ({
154
+ ...base,
155
+ // override manifest fields here
156
+ }));
185
157
  ```
186
158
 
187
- **Key fields:**
188
- - `main`: **Required** - Points to your build output directory (CLI uses this to determine where to place built files)
189
- - `files`: Specifies which files to include in your app bundle
190
- - `scripts`: Convenient shortcuts for common CLI commands
191
-
192
- > **Note:** The CLI determines the build output location from the `main` field in your package.json. If not specified, it defaults to `dist/bundle.js`.
193
-
194
- ## Documentation
159
+ ### Application config (`app.config.ts`)
195
160
 
196
- **Getting Started**
197
- - [Developing Apps](docs/application.md): Complete guide to building, configuring, and deploying Fusion applications
198
- - [Developing Portals](docs/portal.md): Guide to building, configuring, and publishing portal templates
199
- - [Dev Server](docs/dev-server.md): Understanding how the development server works, including architecture and configuration
161
+ ```ts
162
+ import { defineAppConfig } from '@equinor/fusion-framework-cli/app';
200
163
 
201
- **Setup & Configuration**
202
- - [Authentication](docs/auth.md): Setting up authentication for local development and CI/CD environments
203
- - [libsecret Installation](https://equinor.github.io/fusion-framework/modules/auth/msal-node/docs/libsecret.html): Fix credential storage issues on Linux systems
204
-
205
- **Migration & Updates**
206
- - [Migration Guide: v10 to v11](docs/migration-v10-to-v11.md): Breaking changes, deprecated commands, and upgrade instructions
207
-
208
- **Additional Resources**
209
- - [CLI Command Reference](docs/application.md#commands): Detailed documentation of all available commands and options
210
- - [CI/CD Best Practices](docs/application.md#ci-cd): Automated workflows and deployment strategies
211
- - [Troubleshooting Guide](docs/application.md#troubleshooting-faq): Common issues and solutions
212
-
213
- **Internal Tools** (Fusion Core Team Only)
214
- - [AI Commands](docs/ai-commands.md): ⚠️ **Internal use only** - AI-powered chat, embeddings, and search commands for codebase understanding (not supported for third-party users ...yet)
215
-
216
- ## Troubleshooting
164
+ export default defineAppConfig((env, { base }) => ({
165
+ environment: { MY_VAR: 'value' },
166
+ endpoints: {
167
+ api: { url: 'https://api.example.com', scopes: ['api://scope/.default'] },
168
+ },
169
+ }));
170
+ ```
217
171
 
218
- ### Common Issues
172
+ ### Dev-server config (`dev-server.config.ts`)
219
173
 
220
- **Authentication & Credentials**
221
- - **Authentication issues?** See [Authentication Guide](docs/auth.md) for token setup and troubleshooting
222
- - **libsecret errors on Linux?** Install libsecret using our [installation guide](https://equinor.github.io/fusion-framework/modules/auth/msal-node/#troubleshooting)
174
+ ```ts
175
+ import { defineDevServerConfig } from '@equinor/fusion-framework-cli';
223
176
 
224
- **CLI & Commands**
225
- - **Command not found?** Ensure `node_modules/.bin` is in your PATH or use `pnpm`/`npx`
226
- - **Permission errors?** Check that you have the correct access rights to Fusion services
177
+ export default defineDevServerConfig((env, { base }) => ({
178
+ ...base,
179
+ // override dev-server options here
180
+ }));
181
+ ```
227
182
 
228
- **Build & Development**
229
- - **Build errors?** Verify your `app.manifest.ts` and `app.config.ts` files for syntax errors
230
- - **Dev server not starting?** Check for port conflicts (default: 3000) or use `--port` option
231
- - **Missing dependencies?** Ensure all required packages are installed with `pnpm install`
183
+ ### CLI plugins (`fusion-cli.config.ts`)
232
184
 
233
- **Publishing & Deployment**
234
- - **Upload failures?** Verify your app is registered in the Fusion App Admin
235
- - **Environment issues?** Check that you're using the correct `--env` parameter
185
+ ```ts
186
+ import { defineFusionCli } from '@equinor/fusion-framework-cli';
236
187
 
237
- ### Getting Help
188
+ export default defineFusionCli(() => ({
189
+ plugins: ['@equinor/fusion-framework-cli-plugin-ai'],
190
+ }));
191
+ ```
238
192
 
239
- - **Detailed troubleshooting:** See our [comprehensive troubleshooting guide](docs/application.md#troubleshooting-faq)
240
- - **Found a bug?** Open an issue on our GitHub repository
241
- - **Need support?** Check the [docs folder](docs/) or reach out to the Fusion team
193
+ ## Documentation
242
194
 
195
+ - [Developing Apps](docs/application.md) — build, configure, and deploy applications
196
+ - [Developing Portals](docs/portal.md) — build and publish portal templates
197
+ - [Dev Server](docs/dev-server.md) — architecture and configuration
198
+ - [Authentication](docs/auth.md) — local and CI/CD authentication setup
199
+ - [Migration v10 → v11](docs/migration-v10-to-v11.md) — breaking changes and upgrade steps