Skip to content

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.

Install the CLI globally so the yuv command is available in any project:

Terminal window
npm install -g @yuuvis/client-cli

Verify the installation:

Terminal window
yuv --help

To update the CLI, always install the latest version within the major that matches your Angular version:

Terminal window
# Angular 19 project
npm install -g @yuuvis/client-cli@19
# Angular 18 project
npm install -g @yuuvis/client-cli@18

All commands follow the structure yuv <command> [subcommand] <argument> [options]. Most commands support short aliases for faster use in the terminal.

Creates a new yuuvis client project with all required dependencies, build scripts, and configuration pre-wired.

Terminal window
yuv new <project-name> [options]

If --shell-version is not provided, the CLI prompts interactively.

Options

OptionTypeDescription
--shell-versionstringShell version to install (default: latest)
--skip-gitbooleanSkip initializing a git repository
--skip-installbooleanSkip running npm install
--skip-testsbooleanSkip generating spec.ts test files

Example

Terminal window
yuv new my-client
yuv new my-client --shell-version 2.6.0 --skip-tests

What 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

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.

Generates a new app within the client workspace — including the UI component, routing, and an extension layer that registers services with the shell.

Terminal window
yuv generate app <name> [options]
yuv g a <name> [options] # short alias

If --app-id, --route, --prefix, --app-header, or --hide-from-nav are not provided, the CLI prompts interactively.

Options

OptionTypeDescription
--app-idstringUnique app identifier in reverse-domain notation (e.g. com.example.myapp)
--routestringRoute path under which the app is registered in the client
--prefixstringSelector prefix for generated components (default: lib)
--app-headerbooleanUse the shell’s app header layout
--hide-from-navbooleanHide the app icon from the navigation bar
--skip-extensionbooleanSkip generating the extension layer

Example

Terminal window
yuv generate app @mycompany/document-viewer --app-id com.mycompany.docviewer
yuv g a @mycompany/document-viewer --app-id com.mycompany.docviewer --skip-extension

What 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

Generates a widget component for use in the widget grid framework.

Terminal window
yuv generate widget <name> [options]
yuv g w <name> [options] # short alias

Options

OptionTypeDescription
--generate-setup-component / --gscbooleanAlso generate a setup component for widget configuration UI
--pathstringPath where the widget component should be created
--projectstringTarget project (auto-detected from current directory if omitted)
--prefixstringSelector prefix for the generated component

Example

Terminal window
yuv generate widget my-chart
yuv g w my-chart --gsc # include setup component
yuv g w widgets/my-chart --gsc # place in specific path

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.

Terminal window
yuv add app <package-name>
yuv a a <package-name> # short alias

Example

Terminal window
yuv add app @vendor/document-viewer
yuv add app @vendor/document-viewer@2.1.0

What happens

  • Package is fetched from the npm registry
  • yuv-manifest.json is 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

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.

Lists all available patches with their ID, name, and description.

Terminal window
yuv patch list
yuv patch list <id> # show details for a specific patch
yuv p l # short alias

Example 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 │
└───────┴───────────────────┴──────────────────────────────────────────────────┘

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.

Terminal window
yuv patch apply <patchId>
yuv p a <patchId> # short alias

Example

Terminal window
yuv patch apply p0001

yuv new adds several npm scripts to package.json that cover common maintenance tasks:

ScriptWhen it runsDescription
prestartBefore npm startCollects i18n translations before starting the dev server
prebuildBefore npm run buildExtracts client version and component metadata before every build
i18n:collectManualCollects translation strings from all source files into the i18n assets
i18n:extractManualExtracts translation keys for localization workflows
update:shellManualUpdates all yuuvis shell library dependencies to a specified version

Example: updating the shell

Terminal window
npm run update:shell -- 2.6.0
Terminal window
yuv new my-client
cd my-client
npm start
Terminal window
# Generate the app scaffold
yuv generate app @mycompany/my-app --app-id com.mycompany.myapp
# Develop in the app library
# projects/mycompany/my-app/...
# Build and test
npm run build
npm test
Terminal window
yuv add app @vendor/document-viewer@2.1.0
npm start # app is registered and available immediately
Terminal window
# Update shell libraries to a new version
npm run update:shell -- 2.6.0
# Check for applicable patches
yuv patch list
# Apply a patch
yuv patch apply p0001

Follow these conventions to keep client projects maintainable and portable across teams.

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 versionAngular version@yuuvis/client-shell
v18Angular 18v1.x
v19Angular 19v2.x

Install the CLI version that matches both your Angular version and the required shell version.