{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"CLI Overview","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cli-overview","__idx":0},"children":["CLI Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]}," is a command-line interface for the MoreLogin local ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpServer"]},". It translates CLI arguments into HTTP requests and forwards them to the local APIs exposed by the MoreLogin client."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Who is it for?"]}," ","DevOps engineers, QA automation engineers, and developers who prefer working in the terminal or need to integrate MoreLogin into CI/CD pipelines (such as GitHub Actions, Jenkins, or shell scripts)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["What can it do?"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Call MoreLogin local APIs directly from a terminal without writing HTTP request code."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Manage browser environments, proxies, cloud phones, and schedules from one unified interface."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use stable CLI flags instead of manually building JSON payloads."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["How to start?"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Read the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prerequisites"]}," below."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download and install the CLI for your platform."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/quick-start"},"children":["Quick Start"]}," to run your first command."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]},", make sure the following requirements are met:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MoreLogin desktop client"]}," is installed and running on the same machine"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You have an active MoreLogin account with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API credentials"]}," (API ID + API Key)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"download--installation","__idx":3},"children":["Download & Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Download the latest ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]}," binary for your platform:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Platform"},"children":["Platform"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Architecture"},"children":["Architecture"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Link"},"children":["Link"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Windows"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["x64"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://releases.morelogin.com/prod/MoreLogin_AirDrop_window_x64_cli/2.6.2/MoreLogin_AirDrop_window_x64_cli_2.6.2.0.exe"},"children":["download"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["macOS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["x64 (Intel)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://releases.morelogin.com/prod/MoreLogin_AirDrop_darwin_x64_cli/2.6.2/MoreLogin_AirDrop_darwin_x64_cli_2.6.2.0"},"children":["download"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["macOS"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["arm64 (Apple Silicon)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://releases.morelogin.com/prod/MoreLogin_AirDrop_darwin_arm64_cli/2.6.2/MoreLogin_AirDrop_darwin_arm64_cli_2.6.2.0"},"children":["download"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Linux"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["x64"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://releases.morelogin.com/prod/MoreLogin_AirDrop_linux_x64_cli/2.6.2/MoreLogin_AirDrop_linux_x64_cli_2.6.2.0"},"children":["download"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"windows","__idx":4},"children":["Windows"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a directory for the CLI, for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["C:\\Program Files\\MoreLogin\\"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"New-Item -ItemType Directory -Force -Path \"C:\\Program Files\\MoreLogin\"\n","lang":"powershell"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Move the downloaded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli.exe"]}," into that directory."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the directory to your system ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATH"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"# Add to the current user's PATH permanently\n$currentPath = [Environment]::GetEnvironmentVariable(\"Path\", \"User\")\n[Environment]::SetEnvironmentVariable(\"Path\", \"$currentPath;C:\\Program Files\\MoreLogin\", \"User\")\n","lang":"powershell"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Restart your terminal"]}," (or open a new one) for the change to take effect."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"ml-cli --version\n","lang":"powershell"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"macos","__idx":5},"children":["macOS"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make the binary executable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"chmod +x ml-cli\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Move it to a directory in your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATH"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo mv ml-cli /usr/local/bin/\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/usr/local/bin"]}," does not exist, create it first: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sudo mkdir -p /usr/local/bin"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On macOS, the downloaded binary may be blocked by Gatekeeper. Remove the quarantine attribute:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"xattr -d com.apple.quarantine /usr/local/bin/ml-cli\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli --version\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"linux","__idx":6},"children":["Linux"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make the binary executable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"chmod +x ml-cli\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Move it to a directory in your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PATH"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"sudo mv ml-cli /usr/local/bin/\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli --version\n","lang":"bash"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once installed, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/quick-start"},"children":["Quick Start"]}," to connect to the MoreLogin client and run your first command."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"core-capabilities","__idx":7},"children":["Core Capabilities"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The current CLI covers these resource groups:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["service status and login"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["browser environment management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["env"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["cloud phone management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloudphone"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["group management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["tag management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tag"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["proxy management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proxy"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["cloud phone schedule management via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["schedule"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"request-model","__idx":8},"children":["Request Model"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI supports two input styles:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["explicit flags, such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--env-id"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--group-name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["raw JSON via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["They can be combined. The merge rules are:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}," provides the base request body"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["explicit CLI flags override matching keys from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This is useful for endpoints with many fields or nested payloads where dedicated flags would be too heavy."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"exit-codes","__idx":9},"children":["Exit Codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The HTTP request completed and a response was received. Check the JSON body for business success or failure."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Local CLI validation failed, or the command is not supported on the current platform."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Port resolution failed, JSON parsing failed, or the request could not be sent."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"port-resolution--troubleshooting","__idx":10},"children":["Port Resolution & Troubleshooting"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI needs to find the local ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpServer"]}," port to send requests. It checks in this order:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--port"]}," flag — explicitly pass the port on every call"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ML_PORT"]}," environment variable — set once per session"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IPC auto-discovery — the CLI reads the port from a local IPC pipe (no configuration needed)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Default IPC paths:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Platform"},"children":["Platform"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Path"},"children":["Path"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["macOS / Linux"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/tmp/MoreLogin-cli"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Windows"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\\\.\\pipe\\MoreLogin-cli"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you see the error ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["\"Could not detect MoreLogin port\""]},", check:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Is the MoreLogin desktop client running?"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--port"]},", is the port number correct?"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On Linux / macOS, does ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/tmp/MoreLogin-cli"]}," exist?"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"documentation-map","__idx":11},"children":["Documentation Map"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/quick-start"},"children":["Quick Start"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli/commands"},"children":["Commands"]}]}]}]},"headings":[{"value":"CLI Overview","id":"cli-overview","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Download & Installation","id":"download--installation","depth":2},{"value":"Windows","id":"windows","depth":3},{"value":"macOS","id":"macos","depth":3},{"value":"Linux","id":"linux","depth":3},{"value":"Core Capabilities","id":"core-capabilities","depth":2},{"value":"Request Model","id":"request-model","depth":2},{"value":"Exit Codes","id":"exit-codes","depth":2},{"value":"Port Resolution & Troubleshooting","id":"port-resolution--troubleshooting","depth":2},{"value":"Documentation Map","id":"documentation-map","depth":2}],"frontmatter":{"seo":{"title":"CLI Overview"}},"lastModified":"2026-06-26T12:23:50.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}