Skip to main content
Version: 5.35.0

Mobiscroll CLI

Overview​

The Mobiscroll Command Line Interface installs and configures Mobiscroll UI in a project. Mobiscroll Connect doesn't use the CLI: its SDKs install from public package registries.

info

Requires Node.js 11 or newer.

Installing the trial requires Mobiscroll CLI 1.14.0 or newer. Signing in through the browser, --yes and --no-wait require Mobiscroll CLI 2.0.0 or newer.

Installation​

Using the node package manager (npm), the Mobiscroll CLI can be installed with the following command:

$ npm install -g @mobiscroll/cli
info

On Windows client computers, the execution of PowerShell scripts is disabled by default. When using Powershell, to be able to install the Mobiscroll CLI you will need to set the following execution policy:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Make sure to read the message displayed after executing the command and follow the instructions.

Global options​

These options work with every command:

  • -g, --global: Use the .npmrc file in your home folder instead of the project's .npmrc file. By default, the login is saved in the project's directory. npm reads the project's .npmrc first, so if the project already has a token there, npm keeps using it after a -g login. The CLI warns you; remove the token line from the project's .npmrc to use the new login.
  • -y, --yes: Never ask a question. The CLI uses the default answer, or stops with a message that names the option to add. This is automatic when there is no terminal, for example in CI or when an AI agent runs the CLI.
  • -v, -V: Output the version number of the CLI.

Config​

Configures your current project with the Mobiscroll resources and dependencies. Use the --version option to define which supported main version would you like to install:

Install the latest version
$ mobiscroll config [types] [options]
Install the latest v4 version
$ mobiscroll config [types] [options] --version=4

If you're not logged in, the command starts the login first. When you have no license, the CLI installs the trial. When your license doesn't include the framework, the CLI asks before installing the trial; with --yes, it installs the trial without asking and prints a message about it. After installing the trial, the CLI says whether your account's trial works: if you haven't started one, it links the page that starts it (until then the trial package shows "Trial not found"); if it has ended, it tells you how to extend it; otherwise it shows when it ends.

Options:

  • -t, --trial: The project will be configured with the trial version.
  • -i, --lite: The project will be configured with the lite version. The CLI installs the @mobiscroll/[framework]-lite package and doesn't log you in for it.
  • -n, --no-npm: This option can be used if you are building a custom package with the download builder. Mobiscroll resources won't be installed from npm. In this case the Mobiscroll resources must be copied manually to the src/lib folder from the downloaded package.
  • -h, --help: Output usage information.
  • --proxy [url]: Define a proxy URL which will be passed to the internal requests.
  • --scss: The project will be configured with scss styles instead of css.
  • --css: The project will be configured with css styles instead of scss.
  • --legacy-peer-deps: This option will be passed to internally executed npm install command.
  • --version [version]: Pass the Mobiscroll version which you want to install. It supports semver versions (--version="4.10.7") and main versions (--version="4"). In case of main version it will install the latest package available.
  • --password: Log in with your user name and password (or the team npm user secret) in the terminal instead of the browser. It needs a terminal to type into.
  • --no-wait: Don't wait for the browser approval: print the login link and code, then stop. Run the same command again after approving: it picks up the login. The link expires in 10 minutes.

Types:

  • angular: Use it for configuring Angular 4+ applications.
  • ionic: Use it for configuring Ionic 2.2.0+ applications.
  • javascript: Use it for configuring JavaScript applications. Use it with frameworks like: Knockout, Ember.js...
  • jquery: Use it for configuring jQuery 1.7+ applications.
  • react: Use it for configuring React 16.2+ applications.
  • vue: Use it for configuring Vue 3+ applications.

Login​

Logs you in to the Mobiscroll npm registry through your browser. (Use the --global flag if you want to login globally).

$ mobiscroll login [options]

The CLI opens a page on mobiscroll.com and prints its link and a code. Check that the page shows the same code, then approve. To approve on another device, open mobiscroll.com/device there and type the code. On the approve page, a team member can log in as the team npm user or as themselves.

Each login creates a new token and saves it in the .npmrc file. Tokens don't expire. You can see and cancel your tokens on the Access Tokens page. If you commit the project's .npmrc, installs work for everyone out of the box, but anyone who can read the repository can use the token. For other setups, such as the user-level ~/.npmrc or an environment variable, see Using the npm auth token securely.

Options:

  • -h, --help: output usage information.
  • --password: Log in with your user name and password (or the team npm user secret) in the terminal instead of the browser. It needs a terminal to type into.
  • --no-wait: Don't wait for the browser approval: print the login link and code, then stop. Run the same command again after approving: it picks up the login. The link expires in 10 minutes.
  • --proxy [url]: Define a proxy URL which will be passed to the internal requests.

Logout​

Logs you out from the Mobiscroll npm registry and cancels your token. (Use the --global flag if you want to log out globally).

$ mobiscroll logout [options]

A team npm user's token is only removed from the .npmrc file, because teammates and CI may still use it. If needed, cancel it on the Access Tokens page.

Options:

  • -h, --help: output usage information.
  • --proxy [url]: Define a proxy URL which will be passed to the internal requests.

AI agents and CI​

An AI agent can't approve a login. Run the config command with --yes --no-wait:

$ mobiscroll config [types] --yes --no-wait
  1. The command prints a login link and a code, then stops. The agent shows both to you, and you approve in your browser. The agent never approves the login itself and never asks for your password.
  2. After you approve (within 10 minutes), the agent runs the same command again. It picks up the login and finishes the setup.

A CI pipeline doesn't run the login: nobody is there to approve it. Log in once, store your token in a CI secret and reference it from the .npmrc file, as described in Using the npm auth token securely. An AI agent working without a browser, for example in a cloud sandbox, still uses the steps above: you approve on your own device.

Using the CLI behind a proxy​

If you're behind a proxy, the mobiscroll command might not work out of the box. There are multiple ways to solve this.

  1. Using environment variables

The preferred way is to set the http_proxy and https_proxy environment variables on your system. This is usually needed for other CLI commands as well which are making requests and needs to be routed through a proxy server as well.

Mac OS / Linux
$ export http_proxy=http://myuser:mypassword@myproxy.com:1234
$ export https_proxy=http://myuser:mypassword@myproxy.com:1234

This will set the environment variables for the current terminal session. To permanently set the variables, add the above lines to your user's ~/.bash_profile or ~/.zshrc files.

Windows
$ setx HTTP_PROXY "http://myuser:mypassword@myproxy.com:1234"
$ setx HTTPS_PROXY "http://myuser:mypassword@myproxy.com:1234"

The setx command will permanently set the environment variables.

  1. Using the --proxy parameter

The quick and dirty method without the need to modify any system configuration, is to pass the proxy address to the mobiscroll config command using the --proxy option. This will be used for any external request made to our servers or the npm registry.

$ mobiscroll config [framework] --proxy http://myuser:mypassword@myproxy.com:1234

Integrity errors with trial packages​

On October 16, 2026, we changed how trial packages are built, so the checksum of every trial package changed once. Projects that installed a trial package before that date can fail with one of these errors:

Package managerError
npmnpm error code EINTEGRITY
pnpmERR_PNPM_TARBALL_INTEGRITY
Yarn 1Integrity check failed for "@mobiscroll/..." (computed integrity doesn't match our records
Yarn 2+YN0018: ... The remote archive doesn't match the expected checksum
BunIntegrity check failed for tarball

To fix it:

  1. Delete the lockfile (package-lock.json, pnpm-lock.yaml, yarn.lock or bun.lock) and install again. In a team, one person does this and commits the new lockfile; everyone else pulls it.
  2. If the install still fails once, run it again.
  3. pnpm only: if it keeps failing, delete pnpm's cached package data for the Mobiscroll registry, then install again. Run pnpm config get cache-dir, and in that folder delete:
    • metadata-v1.3/npm.mobiscroll.com (pnpm 9 to 11)
    • v12/metadata/https%3A+npm.mobiscroll.com (pnpm 12)

Deleting the lockfile also lets your other dependencies update within the version ranges in package.json.

Licensed packages are not affected.