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. Follow the steps below!
Step 1: download CLI
CLI is included in the Multilogin directory. To make sure you have the latest version of CLI, launch the app.
Step 2: run the application
-
Open your local command prompt (
cmdfor Windows andTerminalfor macOS/Linux) - Using the command line, move to the folder where
xcli.exewas 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: log in to authenticate
In order to get your API token, you will need to first log in to your account via the login command. Select your OS and follow the instructions below.
Windows
- Paste this prompt to log in:
xcli login --username "your username" --password "your password" - Replace values of the flags (
--usernameand--password) with your email and password

macOS
- Paste this prompt to log in:
./xcli login --username “your username” --password “your password” - Replace values of the flags (
--usernameand--password) with your email and password

Linux
- Paste this prompt to log in:
./xcli login --username “your username” --password “your password” - Replace values of the flags (
--usernameand--password) with your email and password

Step 4: run script commands
Script runner is a series of API endpoints that offers tools to automate scripting in your Multilogin profiles. You can check them via xcli -h!
script-list
Lists all the scripts stored in the folder via xcli script-list:
Windows
xcli script-listmacOS/Linux
./xcli script-listFiles should be stored in:
-
Windows:
C:\Users\%username%\mlx\deps\scripts -
macOS:
/Users/%username%/mlx/deps/scripts -
Linux:
/home/%username%/mlx/deps/scripts

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). Lets see it applied in an example:
Windows
xcli script-start --script example_script1.py --profile-id profile_idmacOS/Linux
./xcli script-start --script example_script1.py --profile-id profile_id
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 YmacOS/Linux
./xcli script-start --script example_script1.py --profile-id X --profile-id Yscript-stop
This command stops one or more profiles that are running scripts. The only required flag is --profile-id:
Windows
xcli script-sttop --profile-id profile_idmacOS/Linux
./xcli script-sttop --profile-id profile_id
cookie-robot
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_idmacOS/Linux
./xcli cookie-robot --profile-id profile_id
You're all set with Script runner! We prepared a special article for running Cookie Robot in Multilogin CLI tool.