{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/pt/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Início rápido","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":"início-rápido","__idx":0},"children":["Início rápido"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Este início rápido pressupõe que você já instalou o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli"]}," (consulte ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/pt/cli#download--installation"},"children":["Download e instalação"]},") e que o cliente MoreLogin está sendo executado localmente."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-verifique-o-serviço","__idx":1},"children":["1. Verifique o serviço"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirme se o ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["httpServer"]}," local está acessível:"]},{"$$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":["Se MoreLogin não estiver em execução, a CLI falhará durante a resolução da porta."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-autenticar","__idx":2},"children":["2. Autenticar"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Se o endpoint exigir autenticação, faça login primeiro:"]},{"$$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":["Você também pode fornecer o token por meio de uma variável de ambiente:"]},{"$$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-listar-perfis-de-navegador","__idx":3},"children":["3. Listar perfis de navegador"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Listar ambientes de navegador:"]},{"$$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-inicie-um-perfil-de-navegador","__idx":4},"children":["4. Inicie um perfil de navegador"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Você pode iniciar um ambiente por ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envId"]}," ou ",{"$$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-crie-e-atribua-um-proxy","__idx":5},"children":["5. Crie e atribua um proxy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Crie um proxy primeiro:"]},{"$$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":["Em seguida, atribua-o a um ambiente:"]},{"$$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-trabalhe-com-telefones-em-nuvem","__idx":6},"children":["6. Trabalhe com telefones em nuvem"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Listar telefones na nuvem:"]},{"$$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":["Crie um telefone na nuvem:"]},{"$$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":["Buscar detalhes:"]},{"$$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-agendamentos-de-consulta","__idx":7},"children":["7. Agendamentos de consulta"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Liste modelos de agendamento e tarefas:"]},{"$$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":["Crie uma tarefa única:"]},{"$$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":["Para endpoints com muitos campos, passar JSON bruto geralmente é mais rápido:"]},{"$$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":["Sinalizadores CLI e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--json-data"]}," podem ser combinados. Sinalizadores explícitos substituem chaves correspondentes da carga JSON:"]},{"$$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-canalize-para-jq","__idx":9},"children":["9. Canalize para ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jq"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A CLI imprime JSON bruto, que funciona bem com pipelines de shell:"]},{"$$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-casos-de-falha-comuns","__idx":10},"children":["10. Casos de falha comuns"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Could not detect MoreLogin port"]},": MoreLogin não está em execução, o IPC não está disponível ou nenhum ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--port"]}," foi fornecido"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["falha comercial com código de saída ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},": a solicitação HTTP foi bem-sucedida, mas a resposta JSON contém um erro no nível do aplicativo"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ml-cli env arrange"]}," no Linux: a implementação atual não oferece suporte e sai imediatamente"]}]}]},"headings":[{"value":"Início rápido","id":"início-rápido","depth":1},{"value":"1. Verifique o serviço","id":"1-verifique-o-serviço","depth":2},{"value":"2. Autenticar","id":"2-autenticar","depth":2},{"value":"3. Listar perfis de navegador","id":"3-listar-perfis-de-navegador","depth":2},{"value":"4. Inicie um perfil de navegador","id":"4-inicie-um-perfil-de-navegador","depth":2},{"value":"5. Crie e atribua um proxy","id":"5-crie-e-atribua-um-proxy","depth":2},{"value":"6. Trabalhe com telefones em nuvem","id":"6-trabalhe-com-telefones-em-nuvem","depth":2},{"value":"7. Agendamentos de consulta","id":"7-agendamentos-de-consulta","depth":2},{"value":"8. Use --json-data","id":"8-use---json-data","depth":2},{"value":"9. Canalize para jq","id":"9-canalize-para-jq","depth":2},{"value":"10. Casos de falha comuns","id":"10-casos-de-falha-comuns","depth":2}],"frontmatter":{"seo":{"title":"Início rápido"}},"lastModified":"2026-06-10T11:47:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/pt/cli/quick-start","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}