Loading...
Loading...
Manages SAPUI5/OpenUI5 projects using the UI5 Tooling CLI (@ui5/cli). Use when initializing UI5 projects, configuring ui5.yaml or ui5-workspace.yaml files, building UI5 applications or libraries, running development servers with HTTP/2 support, creating custom build tasks or server middleware, managing workspace/monorepo setups, troubleshooting UI5 CLI errors, migrating between UI5 CLI versions, or optimizing build performance. Supports both OpenUI5 and SAPUI5 frameworks with complete configuration and extensibility guidance.
npx skill4agent add secondsky/sap-skills sapui5-cli# 1. Install UI5 CLI (choose one)
npm install --global @ui5/cli # Global installation
npm install --save-dev @ui5/cli # Project-level installation
# 2. Initialize project (if new)
npm init --yes # Initialize npm
ui5 init # Create ui5.yaml
# 3. Select framework variant
ui5 use openui5@latest # For OpenUI5
ui5 use sapui5@latest # For SAPUI5
# 4. Add framework libraries
ui5 add sap.ui.core sap.m sap.ui.table themelib_sap_fiori_3
# 5. Start development
ui5 serve # Start dev server
ui5 serve --open index.html # Start and open browser
# 6. Build for production
ui5 build --all # Build with dependencies
ui5 build --clean-dest # Clean before building# 1. Enable CLI support
ui5 init
# 2. Configure framework (if ui5.yaml exists)
ui5 use openui5@latest # or sapui5@latest
# 3. Verify setup
ui5 tree # Show dependency tree
ui5 serve # Test development serverwebappwebapp//templates/ui5.yaml.applicationsrc//resourcestest//test-resourcessrc/my/company/library/templates/ui5.yaml.librarymy/library/themes/custom_theme/references/configuration.mdreferences/project-types.mdui5 init # Initialize UI5 CLI configuration
ui5 use <framework>[@version] # Set framework (openui5/sapui5)
ui5 add <libraries...> # Add framework libraries
ui5 remove <libraries...> # Remove framework librariesui5 serve [options] # Start development server
--port <number> # Specify port (default: 8080)
--open <path> # Open browser to path
--h2 # Enable HTTP/2
--accept-remote-connections # Allow non-localhost access
ui5 tree [options] # Display dependency tree
--flat # Show flat list
--level <number> # Limit tree depthui5 build [child-command] [options] # Build project
preload # Create preload bundles (default)
self-contained # Create standalone bundle
jsdoc # Generate JSDoc documentation
--all # Include all dependencies
--include-dependency <names> # Include specific dependencies
--exclude-dependency <names> # Exclude dependencies
--dest <path> # Output directory (default: ./dist)
--clean-dest # Clean destination before build
--create-build-manifest # Store build metadata
--experimental-css-variables # Generate CSS variable artifacts [experimental]ui5 config set <key> [value] # Set configuration value
ui5 config get <key> # Get configuration value
ui5 config list # List all settings
# Common configurations
ui5 config set ui5DataDir /path/.ui5 # Change cache directoryui5 versions # Display all module versions
ui5 --help # Display help
ui5 --version # Display versionreferences/cli-commands.mdspecVersion: "4.0" # Specification version (required)
type: application # Project type (required)
metadata:
name: my.project.name # Project name (required)
copyright: "© ${currentYear} Company" # Optional copyright
framework:
name: SAPUI5 # OpenUI5 or SAPUI5
version: "1.120.0" # Framework version
libraries:
- name: sap.ui.core
- name: sap.m
- name: sap.ui.table
- name: themelib_sap_fiori_3
optional: true # Optional library
resources:
configuration:
paths:
webapp: webapp # Path mapping
propertiesFileSourceEncoding: UTF-8 # Encoding (default: UTF-8)
builder:
resources:
excludes:
- "index.html" # Exclude from build
- "/resources/my/project/test/**"
server:
settings:
httpPort: 8080 # HTTP port
httpsPort: 8443 # HTTPS portreferences/configuration.mdreferences/cli-commands.mdreferences/configuration.mdreferences/project-structures.mdreferences/extensibility.mdreferences/filesystem-api.mdreferences/build-process.mdreferences/server-features.mdreferences/code-analysis.mdreferences/es-support.mdreferences/benchmarking.mdreferences/migration-guides.mdreferences/troubleshooting.mdnpm init --yesnpm install --save-dev @ui5/cliui5 initui5 use sapui5@latestopenui5@latestui5 add sap.ui.core sap.m themelib_sap_fiori_3ui5 servegit add ui5.yaml package.json && git commitui5 initui5 use sapui5@latestui5 add sap.ui.core sap.m sap.ui.tableresources.configuration.pathsui5 serveui5 build --alllib/tasks/customTask.jstemplates/custom-task-template.jsui5 buildreferences/extensibility.md--workspace <name>ui5 treereferences/configuration.mdnpm install --save-dev @ui5/cli@latest"4.0"references/migration-guides.mdusePredefineCallsasync: trueui5 build --allui5 serveDoes project need SAP-specific components (e.g., sap.ui.comp, sap.ushell)?
├─ YES → Use SAPUI5
│ └─ Command: ui5 use sapui5@latest
└─ NO → Can use OpenUI5
└─ Command: ui5 use openui5@latest
Note: SAPUI5 projects can depend on OpenUI5, but not vice versa.What is the deployment target?
├─ Standard deployment (with separate framework loading)
│ └─ Use: ui5 build --all
│
├─ Standalone deployment (single bundle with framework)
│ └─ Use: ui5 build self-contained --all
│
├─ Documentation generation
│ └─ Use: ui5 build jsdoc
│
└─ Development/testing (no build needed)
└─ Use: ui5 serveWhat do you need to extend?
├─ Build process (modify/generate resources during build)
│ └─ Create custom task (see templates/custom-task-template.js)
│ Examples: Transpiling, image optimization, file generation
│
├─ Development server (modify requests/responses during dev)
│ └─ Create custom middleware (see templates/custom-middleware-template.js)
│ Examples: Proxying, authentication, dynamic content
│
└─ Third-party library configuration
└─ Create project shim (see references/extensibility.md)
Examples: Configuring non-UI5 npm packagestemplates/ui5.yaml.applicationtemplates/ui5.yaml.librarytemplates/ui5-workspace.yamltemplates/custom-task-template.jstemplates/custom-middleware-template.jsui5 serveui5 buildUI5_CLI_NO_LOCAL=X ui5 serve~/.ui5/ui5DataDirrm -rf ~/.ui5/framework/importexportsap.ui.defineimport Module from './module.js';
export default MyClass;sap.ui.define(['./module'], function(Module) {
return MyClass;
});sap.ui.define([`modules/${moduleName}`], ...); // Will fail_versionsupportedLocalesreferences/troubleshooting.mdERR_SSL_PROTOCOL_ERRORchrome://net-internals/#hsts~/.ui5/rm -rf ~/.ui5/framework/_versionbeforeTaskafterTaskui5 build --verboseUI5_LOG_LVLUI5_DATA_DIRUI5_CLI_NO_LOCALUI5_LOG_LVL=verbose ui5 build
UI5_DATA_DIR=/custom/.ui5 ui5 serve--save-devui5 serve --h2ui5 build --clean-dest --allreferences/cli-commands.mdreferences/configuration.mdreferences/project-structures.mdreferences/server-features.mdreferences/build-process.mdreferences/es-support.mdreferences/extensibility.mdreferences/code-analysis.mdreferences/migration-guides.mdreferences/troubleshooting.mdreferences/benchmarking.mdtemplates/package.json.template