Set up an AI coding assistant to drive MoreLogin through ml-cli, then control browser profiles and cloud phones in plain language.
Works with Codex, Claude Code, Cursor, Gemini CLI, and any other assistant that can run shell commands.
Looking for a different integration route? Use MCP for MCP-capable clients, or Agent Skills for OpenClaw and Hermes. See the route comparison if you are not sure which to pick.
Paste this into your assistant. It installs and verifies MoreLogin CLI without further hand-holding.
This template's language is not my preference. Before your first substantive reply, detect and use my OS UI language (Windows: `Get-UICulture`, then `Get-Culture`); if unavailable, use my latest non-template message's language.
Follow the MoreLogin installation, verification, and `ml-cli` usage guide:
https://github.com/MoreLoginBrowser/morelogin-skills/blob/main/skills/morelogin-setup/install.md
Keep commands, paths, JSON/API fields, and original MoreLogin responses unchanged. Ask before permissions, login/security steps, downloads, installation, GUI launches, or state changes.If the CLI is already installed, generate the same prompt from it:
ml-cli install-promptThe last paragraph matters: it tells the agent to preserve MoreLogin responses verbatim and to stop and ask before anything that changes state. Keep it.
ml-cli agent-guideThis is the agent's reference, not yours. It covers when to reach for ml-cli, how to discover command formats, how to map a natural-language request to a command, when to pause for confirmation, and how to recover from local sandbox failures such as connect EPERM 127.0.0.1:40000.
If your agent runs in a sandbox that blocks loopback connections, that EPERM error is the signal. Grant the agent local network access or run it outside the sandbox.
ml-cli doctor
ml-cli doctor --output-jsondoctor discovers the local API port and calls the MoreLogin status endpoint. Use --output-json when you want the agent to parse the result instead of reading it.
Requires the MoreLogin desktop client to be running and signed in.
Users say "open P-1", not "open 1993244721490239488". The find and open commands accept names, and they refuse to guess:
ml-cli env find --name P-1
ml-cli env find --keyword Amazon
ml-cli env open --name P-1
ml-cli env open --name P-1 --exact--keyword matches profile name, group name, tag name, and remark. --name matches the profile name; add --exact to require an exact match.
open acts only when exactly one profile matches. On multiple matches it prints the candidates and exits without starting anything. This is the behavior that makes it safe to hand to an agent: an ambiguous request never silently starts the wrong profile.
Cloud phones follow the same rule:
ml-cli cloudphone find --keyword "android-test"
ml-cli --timeout 120 cloudphone open --name CP-1
ml-cli --timeout 120 cloudphone open --name CP-1 --headless false
ml-cli --timeout 30 cloudphone close --name CP-1Cloud phone operations are slow, so pass --timeout. For --headless, false shows the window and true hides it; the API default is true.
| Ask | What the agent does |
|---|---|
| How many browser profiles are on the first page? | Lists page 1 and counts |
| Show profile name, ID, and status for the first page | Lists page 1 with fields |
| Open the P-1 profile | Resolves the name, then starts it |
| Is P-1 already running? | Checks run status before acting |
| Close the P-1 profile | Stops it |
| Start the first profile and tell me the debug port | Starts it and returns the CDP debug port |
| Ask | What the agent does |
|---|---|
| Find profiles whose names contain Amazon | env find --name |
| Find profiles where name, group, tag, or remark contains Amazon | env find --keyword |
| Open the profile whose group or tag contains Amazon; show candidates if more than one | env open --keyword, stops on ambiguity |
| Ask | What the agent does |
|---|---|
| Show me the cloud phone list | Lists cloud phones |
| Open the CP-1 cloud phone | Resolves the name, then powers on |
| Find cloud phones whose group, tag, or remark contains Android | cloudphone find --keyword |
| Open the cloud phone matching CP-204 and display the window | Opens with --headless false |
| Close the CP-1 cloud phone | Powers off |
| Ask | What the agent does |
|---|---|
| Show me all groups | Lists groups |
| Show me all tags | Lists tags |
| Show me the first page of proxy records | Lists proxies |
| Ask | What the agent does |
|---|---|
Read ml-cli help and summarize the common profile commands | Reads help output and summarizes |
Asking the agent to read its own help is the reliable way to handle a command this page does not cover.
| Topic | Where |
|---|---|
| Full command and flag reference | CLI Commands |
| Installing and configuring the CLI | CLI Quick Start |
| CLI-side view of this guide | CLI AI Agent Usage |
| Underlying HTTP endpoints | Browser Local API |