[Go to site: main page, start]

Skip to content
MultiloginHelp Center

How to use Script runner with Multilogin CLI

All set up with Multilogin CLI? You are now ready to use scripts in your browser profiles via Multilogin CLI. The steps below will walk you through setting up Script runner in CLI, so that you can start running scripts in no time from a prompt command. 

➡️ To run a script with Multilogin CLI, put the script in the Multilogin scripts folder → run script-list to confirm it is available → run script-start with the script name and browser profile ID → use script-stop when you want to stop it.

This guide covers Script runner automation for browser profiles.

For native Android app automation on cloud phones, use ADB or Appium.

Using CLI as a team member? You can only run Script runner commands for browser profiles your workspace role and folder access allow you to use.

Step 1: launch CLI

Launch Multilogin, then open Command Prompt or Terminal, go to the CLI folder and run CLI executable:

Windows

  1. Go to the CLI folder:
    C:/Users/%username%/mlx/deps/cli
  2. Run xcli.exe

macOS

  1. Go to the CLI folder:
    /Users/%username%/mlx/deps/cli
  2. Run ./xcli:
    ./xcli

Linux

  1. Go to the CLI folder:
    /Home/%username%/mlx/deps/cli
  2. Run ./xcli:
    ./xcli

Follow the article for more details: How to start working with CLI.

Step 2: run the application

  1. Open your local command prompt (cmd for Windows and Terminal for macOS/Linux) 
  2. Using the command line, move to the folder where xcli.exe was saved. Instructions: Windows | macOS | Linux

Once in the correct folder, you will be able to launch Multilogin CLI by simply calling the following command:

Windows

xcli commandname --flag “value”

macOS/Linux

./xcli commandname --flag “value”

Step 3: sign in to authenticate

In order to launch Script runner, you will need to first sign in to your account via the login command. Select your OS and follow the instructions below.

Windows

  1. Paste this prompt to sign in: 
    xcli login --username 'your username' --password 'your password'
  2. Replace values of the flags  (--username and --password) with your email and password
Windows Command Prompt showing a successful Multilogin CLI login.

macOS

  1. Paste this prompt to sign in: 
    ./xcli login --username 'your username' --password 'your password'
  2. Replace values of the flags  (--username and --password) with your email and password
macOS Terminal showing a successful Multilogin CLI login.

Linux

  1. Paste this prompt to sign in: 
    ./xcli login --username 'your username' --password 'your password'
  2. Replace values of the flags  (--username and --password) with your email and password
Ubuntu terminal showing a successful Multilogin CLI login.

Step 4: run script commands

Script runner lets you run scripts in Multilogin browser profiles from CLI. You can check them via xcli -h!Multilogin CLI help listing script-list, script-start, script-stop, and cookie-robot commands.

script-list

Lists all the scripts stored in the folder via xcli script-list:

Windows

xcli script-list

macOS/Linux

./xcli script-list

Files should be stored in: 

  • Windows: C:\Users\%username%\mlx\deps\scripts
  • macOS: /Users/%username%/mlx/deps/scripts
  • Linux: /home/%username%/mlx/deps/scripts

Multilogin CLI script-list output listing available Python script files.

script-start

Once you confirm that the script is located in the mlx\deps\scripts folder, you are ready to start your profile while running it.

To use this command, you need to specify your profile ID (--profile-id) and your script file (--script). Let's see it applied in an example:

Windows

xcli script-start --script example_script1.py --profile-id profile_id

macOS/Linux

./xcli script-start --script example_script1.py --profile-id profile_id
Multilogin CLI script-start command with a Python script and profile ID, followed by SUCCESS.

You can launch a script for several profiles at once by using --profile-id flag several times. Let's imagine profile X and profile Y. We want to launch example_script1.py.

The command will be the following:

Windows

xcli script-start --script example_script1.py --profile-id X --profile-id Y

macOS/Linux

./xcli script-start --script example_script1.py --profile-id X --profile-id Y

script-stop

This command stops one or more profiles that are running scripts. The only required flag is --profile-id:

Windows

xcli script-stop --profile-id profile_id

macOS/Linux

./xcli script-stop --profile-id profile_id
Multilogin CLI script-stop command showing stopped in the result table.

Instead of manually specifying the script in script-start, you can directly use the command xcli cookie-robot --profile-id profile_id to start it:

Windows

xcli cookie-robot --profile-id profile_id

macOS/Linux

./xcli cookie-robot --profile-id profile_id
Windows terminal running the Multilogin cookie-robot command and showing SUCCESS.

You're all set with Script runner! We prepared a special article for running Cookie Robot in Multilogin CLI tool. 

Stay in the loop

Catch the latest updates, exchange advice, explore practical use cases.

Get product updatesTelegram channelAsk other usersTelegram chatExplore use casesDiscord community