Client CLI
The Client CLI (@yuuvis/client-cli) is a command-line tool for scaffolding,
generating, and maintaining client projects. It automates the repetitive
setup work that comes with Angular-based shell development — from creating a fully configured
client project in a single command, to generating apps and widgets with the correct structure
and wiring, to applying patches that keep existing projects aligned with the latest conventions.
The CLI is the recommended starting point for any new yuuvis shell client project.
Installation
Section titled “Installation”Install the CLI globally so the yuv command is available in any project:
npm install -g @yuuvis/client-cliVerify the installation:
yuv --helpTo update the CLI, always install the latest version within the major that matches your Angular version:
# Angular 19 projectnpm install -g @yuuvis/client-cli@19
# Angular 18 projectnpm install -g @yuuvis/client-cli@18Commands
Section titled “Commands”All commands follow the structure yuv <command> [subcommand] <argument> [options].
Most commands support short aliases for faster use in the terminal.
yuv new — Create a client project
Section titled “yuv new — Create a client project”Creates a new yuuvis client project with all required dependencies, build scripts, and configuration pre-wired.
yuv new <project-name> [options]If --shell-version is not provided, the CLI prompts interactively.
Options
| Option | Type | Description |
|---|---|---|
--shell-version | string | Shell version to install (default: latest) |
--skip-git | boolean | Skip initializing a git repository |
--skip-install | boolean | Skip running npm install |
--skip-tests | boolean | Skip generating spec.ts test files |
Example
yuv new my-clientyuv new my-client --shell-version 2.6.0 --skip-testsWhat gets generated
- Angular standalone application with SCSS
- All yuuvis shell libraries pre-installed (
@yuuvis/client-core,@yuuvis/client-shell-core,@yuuvis/client-framework,@yuuvis/client-shell,@yuuvis/material) - Monaco editor and the media viewer assets configured
- npm scripts for i18n, component metadata extraction, and shell updates
- Git repository initialized
yuv generate — Generate code
Section titled “yuv generate — Generate code”Generates Angular code artifacts within an existing client workspace. Use yuv generate app
to scaffold a new app with all required wiring, or yuv generate widget to add a widget
component to an existing app.
yuv generate app
Section titled “yuv generate app”Generates a new app within the client workspace — including the UI component, routing, and an extension layer that registers services with the shell.
yuv generate app <name> [options]yuv g a <name> [options] # short aliasIf --app-id, --route, --prefix, --app-header, or --hide-from-nav are not provided,
the CLI prompts interactively.
Options
| Option | Type | Description |
|---|---|---|
--app-id | string | Unique app identifier in reverse-domain notation (e.g. com.example.myapp) |
--route | string | Route path under which the app is registered in the client |
--prefix | string | Selector prefix for generated components (default: lib) |
--app-header | boolean | Use the shell’s app header layout |
--hide-from-nav | boolean | Hide the app icon from the navigation bar |
--skip-extension | boolean | Skip generating the extension layer |
Example
yuv generate app @mycompany/document-viewer --app-id com.mycompany.docvieweryuv g a @mycompany/document-viewer --app-id com.mycompany.docviewer --skip-extensionWhat gets generated
- Angular library structure under
projects/ - App manifest (
yuv-manifest.json) with id, title, and UI configuration - UI component with routing
- Extension layer with service registration (unless
--skip-extension) - Path mappings added to
tsconfig.json - App routes registered in
app.routes.ts - Extension registered in
app.config.ts
yuv generate widget
Section titled “yuv generate widget”Generates a widget component for use in the widget grid framework.
yuv generate widget <name> [options]yuv g w <name> [options] # short aliasOptions
| Option | Type | Description |
|---|---|---|
--generate-setup-component / --gsc | boolean | Also generate a setup component for widget configuration UI |
--path | string | Path where the widget component should be created |
--project | string | Target project (auto-detected from current directory if omitted) |
--prefix | string | Selector prefix for the generated component |
Example
yuv generate widget my-chartyuv g w my-chart --gsc # include setup componentyuv g w widgets/my-chart --gsc # place in specific pathyuv add app — Add an existing app
Section titled “yuv add app — Add an existing app”Integrates a published app package from npm into the current client project. The CLI reads
the app’s yuv-manifest.json, registers its routes and extensions automatically, and installs
the package as a dependency.
yuv add app <package-name>yuv a a <package-name> # short aliasExample
yuv add app @vendor/document-vieweryuv add app @vendor/document-viewer@2.1.0What happens
- Package is fetched from the npm registry
yuv-manifest.jsonis read from the package to determine routes and extensions- App routes are registered in
app.routes.ts - Extensions are registered in
app.config.ts - Package is installed via npm
yuv add language — Add a language
Section titled “yuv add language — Add a language”Adds a new language to the client project. The command updates package.json and the main
configuration so that the full project is aware of the new language from that point on.
yuv add language <locale> [options]yuv a l <locale> [options] # short aliasArguments
| Argument | Description |
|---|---|
locale | ISO 639-1 language code (lowercase letters and hyphens only, e.g. es, fr, pt-br) |
Options
| Option | Type | Description |
|---|---|---|
--label | string | Display name of the language written in that language itself (e.g. Español, Français).Defaults to the locale code if omitted. |
Example
yuv add language es --label Españolyuv add language fr --label FrançaisWhat happens
- Creates
i18n-external/<locale>.jsonwith an empty object{}— only if the file does not yet exist. - Adds the new locale to the
--lang=argument of thei18n:extractscript inpackage.json. - Adds a new language entry to
core.languagesinsrc/assets/_yuuvis/config/main.json.
After the command completes, run the following to populate translation keys and merge all sources:
npm run i18n:extract && npm run i18n:collecti18n:extract writes empty-valued keys for the new locale into every local src/assets/i18n/ folder.
i18n:collect then picks up the external library translations for the new locale and merges everything
into the final src/assets/_yuuvis/i18n/<locale>.json runtime file.
yuv patch — Manage patches
Section titled “yuv patch — Manage patches”Patches are targeted updates that extend or migrate existing client projects. They add missing configuration, scripts, or files that were introduced in newer shell versions or that a project may not yet have. Each patch checks its own preconditions before running and will not apply if it has already been applied or is not relevant for the current project.
yuv patch list
Section titled “yuv patch list”Lists all available patches with their ID, name, and description.
yuv patch listyuv patch list <id> # show details for a specific patchyuv p l # short aliasExample output
┌───────┬───────────────────┬──────────────────────────────────────────────────┐│ ID │ Name │ Description │├───────┼───────────────────┼──────────────────────────────────────────────────┤│ p0001 │ component-data │ Adds a script for extracting component metadata ││ p0002 │ mv2-migration │ Updates angular.json for media-viewer v2.0.0+ ││ p0003 │ build-docker │ Adds Dockerfile and nginx config for Docker │└───────┴───────────────────┴──────────────────────────────────────────────────┘yuv patch apply
Section titled “yuv patch apply”Applies a specific patch to the current client project. The CLI checks whether the patch is applicable before executing — it will not apply a patch that has already been applied or whose preconditions are not met.
yuv patch apply <patchId>yuv p a <patchId> # short aliasExample
yuv patch apply p0001Generated Build Scripts
Section titled “Generated Build Scripts”yuv new adds several npm scripts to package.json that cover common maintenance tasks:
| Script | When it runs | Description |
|---|---|---|
prestart | Before npm start | Collects i18n translations before starting the dev server |
prebuild | Before npm run build | Extracts client version and component metadata before every build |
i18n:collect | Manual | Collects translation strings from all source files into the i18n assets |
i18n:extract | Manual | Extracts translation keys for localization workflows |
update:shell | Manual | Updates all yuuvis shell library dependencies to a specified version |
Example: updating the shell
npm run update:shell -- 2.6.0Typical Workflows
Section titled “Typical Workflows”Set up a new client project
Section titled “Set up a new client project”yuv new my-clientcd my-clientnpm startCreate and develop a new app
Section titled “Create and develop a new app”# Generate the app scaffoldyuv generate app @mycompany/my-app --app-id com.mycompany.myapp
# Develop in the app library# projects/mycompany/my-app/...
# Build and testnpm run buildnpm testIntegrate a published app from npm
Section titled “Integrate a published app from npm”yuv add app @vendor/document-viewer@2.1.0npm start # app is registered and available immediatelyAdd a new language
Section titled “Add a new language”yuv add language es --label Españolnpm run i18n:extract && npm run i18n:collect# Translate empty values in src/assets/_yuuvis/i18n/es.jsonKeep a project up to date
Section titled “Keep a project up to date”# Update shell libraries to a new versionnpm run update:shell -- 2.6.0
# Check for applicable patchesyuv patch list
# Apply a patchyuv patch apply p0001Best Practices
Section titled “Best Practices”Follow these conventions to keep client projects maintainable and portable across teams.
Version Compatibility
Section titled “Version Compatibility”The CLI follows a synchronized versioning strategy with Angular. Each major CLI version supports
the corresponding Angular version and a specific major version of @yuuvis/client-shell.
| CLI version | Angular version | @yuuvis/client-shell |
|---|---|---|
v18 | Angular 18 | v1.x |
v19 | Angular 19 | v2.x |
Install the CLI version that matches both your Angular version and the required shell version.