{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Quick Start","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":"quick-start","__idx":0},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This quick start assumes you have already installed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/cli#download--installation"},"children":["Download & Installation"]},") and that the MoreLogin client is running locally."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-check-the-service","__idx":1},"children":["1. Check The Service"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm that the local ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpServer"]}," is reachable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli status\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If MoreLogin is not running, the CLI will fail during port resolution."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-authenticate","__idx":2},"children":["2. Authenticate"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the endpoint requires authentication, log in first:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli login --api-id your-api-id --api-key your-api-key\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also provide the token through an environment variable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"export ML_API_KEY=your-token\nml-cli env list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-list-browser-profiles","__idx":3},"children":["3. List Browser Profiles"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List browser environments:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env list\nml-cli env list --page-no 1 --page-size 20\nml-cli env list --env-name test\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-start-a-browser-profile","__idx":4},"children":["4. Start A Browser Profile"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can start an environment by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envId"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["uniqueId/sn"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env start --id 1001\nml-cli env start --env-id 1868548141708648448\nml-cli env start --unique-id SN001\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-create-and-assign-a-proxy","__idx":5},"children":["5. Create And Assign A Proxy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a proxy first:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli proxy create \\\n  --proxy-name local-http \\\n  --proxy-ip 127.0.0.1 \\\n  --proxy-port 7890 \\\n  --proxy-type 0 \\\n  --proxy-provider 0\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then assign it to an environment:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env set-proxy \\\n  --env-ids 1001 \\\n  --proxy-ip 127.0.0.1 \\\n  --proxy-port 7890 \\\n  --proxy-type 0 \\\n  --proxy-provider 0 \\\n  --proxy-name local-http\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"6-work-with-cloud-phones","__idx":6},"children":["6. Work With Cloud Phones"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List cloud phones:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone list\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a cloud phone:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone create --sku-id 10004 --quantity 1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fetch details:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli cloudphone info --id 123456\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"7-query-schedules","__idx":7},"children":["7. Query Schedules"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List schedule templates and tasks:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli schedule template-market --page-no 1 --page-size 20\nml-cli schedule list --page-no 1 --page-size 20\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a one-time task:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli schedule create-once-task \\\n  --cloud-phone-id 123456 \\\n  --schedule-name once-task-demo \\\n  --template-id 888 \\\n  --template-parameter '{}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"8-use---json-data","__idx":8},"children":["8. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For endpoints with many fields, passing raw JSON is often faster:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env create-advanced \\\n  --json-data '{\"browserTypeId\":1,\"operatorSystemId\":1,\"envName\":\"cli-adv-test\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI flags and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}," can be combined. Explicit flags override matching keys from the JSON payload:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli env set-proxy \\\n  --env-ids 1001 \\\n  --json-data '{\"proxy\":{\"proxyProvider\":\"0\",\"proxyIp\":\"1.1.1.1\"}}' \\\n  --proxy-ip 127.0.0.1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"9-pipe-to-jq","__idx":9},"children":["9. Pipe To ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jq"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CLI prints raw JSON, which works well with shell pipelines:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"ml-cli status | jq '.status'\nml-cli env processes | jq '.data[].pid'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"10-common-failure-cases","__idx":10},"children":["10. Common Failure Cases"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Could not detect MoreLogin port"]},": MoreLogin is not running, IPC is unavailable, or no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--port"]}," was provided"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["business failure with exit code ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},": the HTTP request succeeded, but the JSON response contains an application-level error"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli env arrange"]}," on Linux: the current implementation does not support it and exits immediately"]}]}]},"headings":[{"value":"Quick Start","id":"quick-start","depth":1},{"value":"1. Check The Service","id":"1-check-the-service","depth":2},{"value":"2. Authenticate","id":"2-authenticate","depth":2},{"value":"3. List Browser Profiles","id":"3-list-browser-profiles","depth":2},{"value":"4. Start A Browser Profile","id":"4-start-a-browser-profile","depth":2},{"value":"5. Create And Assign A Proxy","id":"5-create-and-assign-a-proxy","depth":2},{"value":"6. Work With Cloud Phones","id":"6-work-with-cloud-phones","depth":2},{"value":"7. Query Schedules","id":"7-query-schedules","depth":2},{"value":"8. Use --json-data","id":"8-use---json-data","depth":2},{"value":"9. Pipe To jq","id":"9-pipe-to-jq","depth":2},{"value":"10. Common Failure Cases","id":"10-common-failure-cases","depth":2}],"frontmatter":{"seo":{"title":"Quick Start"}},"lastModified":"2026-05-09T11:21:33.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/cli/quick-start","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}