{"id":15519300,"url":"https://github.com/pichillilorenzo/mlab-speed-test","last_synced_at":"2025-04-23T04:39:47.363Z","repository":{"id":60673570,"uuid":"543841373","full_name":"pichillilorenzo/mlab-speed-test","owner":"pichillilorenzo","description":"Test your download and upload speed using speed.measurementlab.net","archived":false,"fork":false,"pushed_at":"2022-10-02T00:25:13.000Z","size":208,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T22:11:27.514Z","etag":null,"topics":["bandwidth","check","cli","cli-app","connection","down","download","internet","mbps","measure","mlab","mlab-speed-test","ndt7","speed","speed-test","speedtest","test","tester","up","upload"],"latest_commit_sha":null,"homepage":"https://pichillilorenzo.github.io/mlab-speed-test/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pichillilorenzo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.me/LorenzoPichilli"]}},"created_at":"2022-10-01T00:46:13.000Z","updated_at":"2025-01-21T15:11:29.000Z","dependencies_parsed_at":"2022-10-03T01:20:14.003Z","dependency_job_id":null,"html_url":"https://github.com/pichillilorenzo/mlab-speed-test","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fmlab-speed-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fmlab-speed-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fmlab-speed-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pichillilorenzo%2Fmlab-speed-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pichillilorenzo","download_url":"https://codeload.github.com/pichillilorenzo/mlab-speed-test/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372692,"owners_count":21419720,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bandwidth","check","cli","cli-app","connection","down","download","internet","mbps","measure","mlab","mlab-speed-test","ndt7","speed","speed-test","speedtest","test","tester","up","upload"],"created_at":"2024-10-02T10:20:58.514Z","updated_at":"2025-04-23T04:39:47.340Z","avatar_url":"https://github.com/pichillilorenzo.png","language":"TypeScript","funding_links":["https://www.paypal.me/LorenzoPichilli"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# MLab Speed Test\n\n### Test your download and upload speed using [speed.measurementlab.net](https://speed.measurementlab.net/)\n\n[![NPM](https://nodei.co/npm/mlab-speed-test.png?compact=true)](https://nodei.co/npm/mlab-speed-test/)\n\u003cbr /\u003e\n[![](https://img.shields.io/npm/dt/mlab-speed-test.svg?style=flat-square)](https://www.npmjs.com/package/mlab-speed-test)\n\n\u003c/div\u003e\n\n[![NPM Version](https://badgen.net/npm/v/mlab-speed-test)](https://npmjs.org/package/mlab-speed-test)\n[![Coverage Status](https://coveralls.io/repos/github/pichillilorenzo/mlab-speed-test/badge.svg?branch=main)](https://coveralls.io/github/pichillilorenzo/mlab-speed-test?branch=main)\n[![license](https://img.shields.io/github/license/pichillilorenzo/mlab-speed-test)](/LICENSE)\n[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.me/LorenzoPichilli)\n\n## Getting started\n\nTo get started with this library, you need to install it and add it to your project.\n\n### Installation\n\n```bash\n# npm\nnpm install mlab-speed-test --save\n\n# yarn\nyarn add mlab-speed-test\n```\n\n## Library Usage\n\nAPI Reference available\nat [https://pichillilorenzo.github.io/mlab-speed-test/](https://pichillilorenzo.github.io/mlab-speed-test/).\n\n```javascript\nimport {MLabSpeedTest} from 'mlab-speed-test';\n// or\nconst {MLabSpeedTest} = require('mlab-speed-test');\n\nconst speedTest = new MLabSpeedTest();\nspeedTest.on('server-chosen', (serverInfo) =\u003e {\n   console.log(serverInfo.location);\n});\nspeedTest.on('download-complete', downloadData =\u003e {\n   const downloadSpeed = downloadData.LastClientMeasurement ? downloadData.LastClientMeasurement.MeanClientMbps.toFixed(2) : '0';\n   console.log(downloadSpeed + 'Mb/s');\n});\nspeedTest.on('upload-complete', uploadData =\u003e {\n   const uploadSpeed = uploadData.LastServerMeasurement ?\n           (uploadData.LastServerMeasurement.TCPInfo.BytesReceived / uploadData.LastServerMeasurement.TCPInfo.ElapsedTime * 8).toFixed(2) : '0';\n   console.log(uploadSpeed + 'Mb/s');\n});\nconst exitCode = await speedTest.run();\n```\n\n## CLI Usage\n\n```\nUsage: mlab-speed-test [options]\n\nExamples: \n  mlab-speed-test -a -p\n  mlab-speed-test -a -p --json\n\nOptions:\n  -p, --accept-privacy-policy  Accept M-Lab's Privacy Policy (https://www.measurementlab.net/privacy/) (default: false)\n  -a, --autostart              Run speed test on command start. Requires --accept-privacy-policy (default: false)\n  --json                       Output data in json format (default: false)\n  --pretty                     If json should be pretty formatted (default: false)\n  -h, --help                   display help for command\n```\n\n## CLI Usage Example\n\n#### Example 1\n\n```bash\nmlab-speed-test -a -p\n```\n\nExample output:\n\n```\n\n    M-Lab's Speed Test\n\n    ⊠ Privacy Policy ( https://www.measurementlab.net/privacy/ )\n\n    Test Server: 🖥  Milan, IT\n  ⠸ 65.98 Mb/s ↓ / 17.04 Mb/s ↑\n    Latency: 26 ms\n    Loss: 1.81%\n\n    Restart (enter) - Stop (delete)\n    Decline Privacy Policy (a) - Quit (ctrl + q)\n\n```\n\n#### Example 2\n\n```bash\nmlab-speed-test -ap --json --pretty\n```\n\nExample output:\n\n```json\n{\n   \"privacyPolicyAccepted\": true,\n   \"running\": true,\n   \"isDone\": false,\n   \"downloadSpeed\": \"64.80\",\n   \"downloadUnit\": \"Mb/s\",\n   \"downloadCompleted\": true,\n   \"downloadProgress\": 1,\n   \"uploadSpeed\": \"16.97\",\n   \"uploadUnit\": \"Mb/s\",\n   \"uploadCompleted\": false,\n   \"uploadProgress\": 0.6515323619008064,\n   \"latencyUnit\": \"ms\",\n   \"lossUnit\": \"%\",\n   \"location\": {\n      \"city\": \"Milan\",\n      \"country\": \"IT\"\n   },\n   \"latency\": \"51\",\n   \"loss\": \"6.57\"\n}\n```\n\n## Contributors\n\nAny contribution is appreciated. You can get started with the steps below:\n\n1. Fork [this repository](https://github.com/pichillilorenzo/mlab-speed-test) (learn how to do\n   this [here](https://help.github.com/articles/fork-a-repo)).\n\n2. Clone the forked repository.\n\n3. Make your changes and create a pull\n   request ([learn how to do this](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request))\n   .\n\n4. I will attend to your pull request and provide some feedback.\n\n## License\n\nThis repository is licensed under the [ISC](LICENSE) License.\n\nThis project is strongly inspired by the [fast-cli](https://github.com/sindresorhus/fast-cli) package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fmlab-speed-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpichillilorenzo%2Fmlab-speed-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpichillilorenzo%2Fmlab-speed-test/lists"}