{"id":13813573,"url":"https://github.com/jsdelivr/globalping-cli","last_synced_at":"2025-12-29T23:35:08.814Z","repository":{"id":65809976,"uuid":"474372173","full_name":"jsdelivr/globalping-cli","owner":"jsdelivr","description":"A simple CLI tool to run networking commands remotely from hundreds of globally distributed servers","archived":false,"fork":false,"pushed_at":"2024-04-13T13:55:40.000Z","size":1426,"stargazers_count":100,"open_issues_count":10,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-01T16:35:54.892Z","etag":null,"topics":["cli","command-line","command-line-tool","devops","dig","globalping","ping","sysops","system-administration","traceroute"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsdelivr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"jsdelivr","open_collective":"jsdelivr","custom":["https://www.jsdelivr.com/sponsors"]}},"created_at":"2022-03-26T14:30:22.000Z","updated_at":"2024-04-25T20:02:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"706e409d-b759-4619-959a-df12c3d38112","html_url":"https://github.com/jsdelivr/globalping-cli","commit_stats":{"total_commits":97,"total_committers":8,"mean_commits":12.125,"dds":0.7216494845360825,"last_synced_commit":"c522c89bfbcce9943d656ed71585427bd10bccc8"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdelivr%2Fglobalping-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdelivr%2Fglobalping-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdelivr%2Fglobalping-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsdelivr%2Fglobalping-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsdelivr","download_url":"https://codeload.github.com/jsdelivr/globalping-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224385194,"owners_count":17302442,"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":["cli","command-line","command-line-tool","devops","dig","globalping","ping","sysops","system-administration","traceroute"],"created_at":"2024-08-04T04:01:21.859Z","updated_at":"2025-12-29T23:35:08.808Z","avatar_url":"https://github.com/jsdelivr.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e \u003ca href=\"https://globalping.io\"\u003e\u003cimg width=\"28\" alt=\"Globalping icon\" src=\"https://user-images.githubusercontent.com/1834071/216975126-01529980-a87e-478c-8ab3-bf7d927a1986.png\"\u003e\u003c/a\u003e Globalping CLI \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eAccess a global network of probes without leaving your console. Benchmark your internet infrastructure, automate uptime and latency monitoring with scripts, or optimize your anycast network – from any location and free of charge. Powered by the Globalping community!\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"80%\" src=\"https://user-images.githubusercontent.com/1834071/217010016-9da38f12-906a-47cf-adca-18017588efe5.png\"\u003e\n\u003c/p\u003e\n\n## Key features\n\n- The official command-line interface for the [Globalping](https://github.com/jsdelivr/globalping) network\n- Run networking commands from any location in the world\n- Real-time results for all supported commands: ping, mtr, traceroute, DNS resolve, HTTP\n- Includes detailed timings and latency metrics for every test\n- Human-friendly format and output\n- Supports Linux, MacOS, and Windows\n- Auto-updated via all automated installation methods\n- Explore additional [Globalping integrations](https://globalping.io/integrations), including our online tools, Slack app, and more\n\n## Table of contents\n\n\u003c!-- TOC --\u003e\n  * [Installation](#installation)\n  * [Get started with Globalping CLI](#get-started-with-globalping-cli)\n  * [Filter locations](#filter-locations)\n  * [Define multiple locations and basic flags](#define-multiple-locations-and-basic-flags)\n  * [Share results online](#share-results-online)\n  * [Authenticate](#authenticate)\n  * [Reselect probes](#reselect-probes)\n  * [Reselect probes from measurements in the current session](#reselect-probes-from-measurements-in-the-current-session)\n  * [Run continuous non-stop measurements](#run-continuous-non-stop-measurements)\n  * [Get TCP \u0026 TLS/SSL details](#get-tcp--tlsssl-details)\n  * [View your measurement history](#view-your-measurement-history)\n  * [Learn about available flags](#learn-about-available-flags)\n\u003c!-- TOC --\u003e\n\n## Installation\n\nInstall the repository and Globalping CLI using the relevant package manager command from below. This way, you can get future updates by simply running an update with your package manager.\n\n#### Ubuntu/Debian (deb)\n\n```shell\ncurl -s https://packagecloud.io/install/repositories/jsdelivr/globalping/script.deb.sh | sudo bash\napt install globalping\n```\n\n#### CentOS/Fedora/Rocky Linux/AlmaLinux (rpm)\n\n```shell\ncurl -s https://packagecloud.io/install/repositories/jsdelivr/globalping/script.rpm.sh | sudo bash\ndnf install globalping\n```\n\n[Manual installation instructions](https://packagecloud.io/jsdelivr/globalping/install#manual)\n\n#### MacOS - Homebrew\n\n```shell\nbrew tap jsdelivr/globalping\nbrew install globalping\n```\n\n#### Windows - [Chocolatey](https://community.chocolatey.org/packages/globalping)\n\n```shell\nchoco install globalping\n```\n\n#### Windows - WinGet\n\n```shell\nwinget install globalping\n```\n\n#### Binary installation\n\nEvery new release is compiled into binaries ready to run on most operating systems and provided as assets on GitHub. You can download and execute these binaries directly on your system.\n\n\u003e [!IMPORTANT]\n\u003e Opting for this installation method means you'll have to repeat this manual process to update the CLI to a newer release!\n\n[Explore the available versions](https://github.com/jsdelivr/globalping-cli/releases).\n\n## Get started with Globalping CLI\n\nAfter installing, verify the Globalping CLI is working by running:\n\n`globalping --help`\n\nThe result shows how to use the CLI and which commands and flags are available:\n\n```\nUsage:\n  globalping [command]\n\nMeasurement Commands:\n  dns           Resolve DNS records, similar to the dig command\n  http          Perform a HEAD, GET, or OPTIONS request to a host\n  mtr           Run a MTR test, which combines traceroute and ping\n  ping          Perform a ping test\n  traceroute    Run a traceroute test\n\nAdditional Commands:\n  auth          Authenticate with the Globalping API\n  completion    Generate the autocompletion script for the specified shell\n  help          Help about any command\n  history       Display the measurement history of your current session\n  install-probe Join the Globalping network by running a probe\n  limits        Show the current rate limits\n  version       Display the version of your installed Globalping CLI\n\nGlobal Measurement Flags:\n  -F, --from string   specify the probe locations as a comma-separated list; you may use:\n                       - names of continents, regions, countries, US states, cities, or\n                      networks\n                       - [@1 | first, @2 ... @-2, @-1 | last | previous] to run with the probes\n                      from previous measurements in this session\n                       - an ID of a previous measurement to run with its probes\n                       (default \"world\")\n  -4, --ipv4          resolve names to IPv4 addresses\n  -6, --ipv6          resolve names to IPv6 addresses\n  -J, --json          output results in JSON format (default false)\n      --latency       output only the latency stats; applicable only to dns, http, and ping\n                      commands (default false)\n  -L, --limit int     define the number of probes to use (default 1)\n      --share         print a link at the end of the results to visualize them online (default\n                      false)\n\nGlobal Flags:\n  -C, --ci     disable real-time terminal updates and colors, suitable for CI and scripting\n               (default false)\n  -h, --help   help for globalping\n\nUse \"globalping [command] --help\" for more information about a command.\n```\n\nGlobalping relies on a community-hosted probe network, enabling you to run network tests from any location with an active probe. The following examples show you through some tests, exploring how to define locations, set limits, and use some command flags.\n\n#### Filter locations\n\nFor example, if you want to run ping from a probe in Seattle that is also part of the Comcast network, run the following:\n\n```bash\nglobalping ping google.com from Comcast+Seattle\n\u003e Seattle (WA), US, NA, Comcast Cable Communications, LLC (AS33650)\nPING  (142.250.217.78) 56(84) bytes of data.\n64 bytes from sea09s29-in-f14.1e100.net (142.250.217.78): icmp_seq=1 ttl=58 time=14.0 ms\n64 bytes from sea09s29-in-f14.1e100.net (142.250.217.78): icmp_seq=2 ttl=58 time=14.5 ms\n64 bytes from sea09s29-in-f14.1e100.net (142.250.217.78): icmp_seq=3 ttl=58 time=15.9 ms\n\n---  ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 402ms\nrtt min/avg/max/mdev = 13.985/14.779/15.886/0.807 ms\n```\n\nYou can use the `+` symbol as a filter to select the desired location of the probes more precisely.\n\n\u003e [!TIP]\n\u003e You can mix and match any location type, including countries, continents, cities, US states, regions, ASNs, ISP names, eyeball or data center tags, and cloud region names.\n\n#### Define multiple locations and basic flags\n\nWith the following command, we execute four ping commands at four different locations and obtain the summarized latency metrics for each test as a result:\n\n```bash\nglobalping ping google.com from Amazon,Germany,USA,Dallas --limit 4 --latency\n\u003e Seoul, KR, AS, Amazon.com, Inc. (AS16509) (aws-ap-northeast-2)\nMin: 33.163 ms\nMax: 33.256 ms\nAvg: 33.22 ms\n\n\u003e Frankfurt, DE, EU, DE, OVH SAS (AS16276)\nMin: 1.221 ms\nMax: 1.291 ms\nAvg: 1.264 ms\n\n\u003e Chicago (IL), US, NA, Cogent Communications (AS174)\nMin: 112.405 ms\nMax: 112.686 ms\nAvg: 112.528 ms\n\n\u003e Dallas (TX), US, NA, Catalyst Host LLC (AS393336)\nMin: 1.579 ms\nMax: 1.588 ms\nAvg: 1.584 ms\n```\n\nYou can select multiple locations for running a command by using a comma `,` as a delimiter. When doing so, make sure to also specify the number of tests to run with the `--limit` flag.\nFor example, to run ping from four different locations (as we did in the example above), add `--limit 4` to make sure you get one test result per location. Otherwise, the default limit of 1 will be selected, resulting in a random result from one of the four locations.\n\nFinally, you can use the `--latency` parameter to only get the summarized latency data instead of the full raw output.\n\n\u003e [!TIP]\n\u003e We recommend reading our [tips and best practices](https://github.com/jsdelivr/globalping#best-practices-and-tips) to learn more about defining locations effectively!\n\n#### Share results online\n\nInclude a link at the bottom of your results using the `--share` flag to view and share the test results online.\n\n\u003e [!IMPORTANT]\n\u003e Shareable links and the respective saved measurement results expire after a few weeks, depending on the user type. GitHub Sponsors, for example, enjoy extended result storage.\n\n```bash\n globalping dns google.com from gcp-asia-south1 --share\n\u003e Mumbai, IN, AS, Google LLC (AS396982) (gcp-asia-south1)\n; \u003c\u003c\u003e\u003e DiG 9.16.37-Debian \u003c\u003c\u003e\u003e -t A google.com -p 53 -4 +timeout=3 +tries=2 +nocookie +nsid\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 23733\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 512\n;; QUESTION SECTION:\n;google.com.                    IN      A\n\n;; ANSWER SECTION:\ngoogle.com.             300     IN      A       142.250.183.206\n\n;; Query time: 3 msec\n;; SERVER: x.x.x.x#53(x.x.x.x)\n;; WHEN: Mon Jul 10 10:38:00 UTC 2023\n;; MSG SIZE  rcvd: 55\n\u003e View the results online: https://globalping.io?measurement=xrfXUEAOGfzwfHFz\n```\n\n## Authenticate\n\nRegister a free [Globalping account](https://dash.globalping.io/), then sign in with the CLI to increase the number of tests you can run every hour. GitHub sponsors and users hosting probes receive additional [credits](https://globalping.io/credits), which allow them to run even more tests.\n\n#### Interactive browser-based flow\n\nBy default, the CLI will open your web browser, where you simpy confirm the sign in by clicking a button.\n\n```bash\nglobalping auth login\nPlease visit the following URL to authenticate:\nhttps://auth.globalping.io/oauth/authorize...\n```\n\n#### Providing a token manually\n\nIf you can't use the interactive flow, you can create a token in the [Dashboard](https://dash.globalping.io/tokens) and provide it via `stdin`.\n\n```bash\nglobalping auth login --with-token\nPlease enter your token:\n```\n\nAlternatively, you may set the environment variable `GLOBALPING_TOKEN`, which will be used automatically when present.\n\n## Advanced features\n\nAfter learning the basics, you may also be interested in these extra features, which provide additional control over your measurements.\n\n#### Reselect probes\n\nYou can select the same probes used in a previous measurement by passing the measurement ID to the `--from` flag.\n\n```bash\nglobalping dns google.com from rvasVvKnj48cxNjC\n\u003e Mumbai, IN, AS, Google LLC (AS396982) (gcp-asia-south1)\n; \u003c\u003c\u003e\u003e DiG 9.16.42-Debian \u003c\u003c\u003e\u003e -t A google.com -p 53 -4 +timeout=3 +tries=2 +nocookie +nosplit +nsid\n;; global options: +cmd\n;; Got answer:\n;; -\u003e\u003eHEADER\u003c\u003c- opcode: QUERY, status: NOERROR, id: 42607\n;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 512\n;; QUESTION SECTION:\n;google.com.                    IN      A\n\n;; ANSWER SECTION:\ngoogle.com.             300     IN      A       142.250.199.174\n\n;; Query time: 5 msec\n;; SERVER: x.x.x.x#53(x.x.x.x)\n;; WHEN: Mon Dec 18 10:01:00 UTC 2023\n;; MSG SIZE  rcvd: 55\n```\n\n#### Reselect probes from measurements in the current session\n\nUse `[@1 | first, @2 ... @-2, @-1 | last | previous]` to select the probes from previous measurements in the current session.\n\n```bash\nglobalping ping google.com from USA --latency\n\u003e Ashburn (VA), US, NA, Hetzner Online GmbH (AS213230)\nMin: 7.314 ms\nMax: 7.413 ms\nAvg: 7.359 ms\n\nglobalping ping google.com from Germany --latency\n\u003e Falkenstein, DE, EU, Hetzner Online GmbH (AS24940)\nMin: 4.87 ms\nMax: 4.936 ms\nAvg: 4.911 ms\n\nglobalping ping google.com from previous --latency\n\u003e Falkenstein, DE, EU, Hetzner Online GmbH (AS24940)\nMin: 4.87 ms\nMax: 4.936 ms\nAvg: 4.911 ms\n\nglobalping ping google.com from @-1 --latency\n\u003e Falkenstein, DE, EU, Hetzner Online GmbH (AS24940)\nMin: 4.87 ms\nMax: 4.936 ms\nAvg: 4.911 ms\n\nglobalping ping google.com from @-2 --latency\n\u003e Ashburn (VA), US, NA, Hetzner Online GmbH (AS213230)\nMin: 7.314 ms\nMax: 7.413 ms\nAvg: 7.359 ms\n\nglobalping ping google.com from first --latency\n\u003e Ashburn (VA), US, NA, Hetzner Online GmbH (AS213230)\nMin: 7.314 ms\nMax: 7.413 ms\nAvg: 7.359 ms\n\nglobalping ping google.com from @1 --latency\n\u003e Ashburn (VA), US, NA, Hetzner Online GmbH (AS213230)\nMin: 7.314 ms\nMax: 7.413 ms\nAvg: 7.359 ms\n```\n\n#### Run continuous non-stop measurements\n\n\u003e [!IMPORTANT]\n\u003e Currently, this feature is limited to the ping command.\n\nUse the `--infinite` flag to continuously ping a host, just like on Linux or MacOS. Although it appears as a single measurement, the Globalping API combines multiple measurements from the same probes into one output. As a result, the test will stop once you run out of credits.\n\nHere's an example of running an infinite ping from a single probe:\n\n```bash\nglobalping ping cdn.jsdelivr.net from Europe --infinite\n\u003e London, GB, EU, Psychz Networks (AS40676)\nPING cdn.jsdelivr.net (151.101.1.229) 56(84) bytes of data.\n64 bytes from 151.101.1.229 (151.101.1.229): icmp_seq=1 ttl=59 time=0.54 ms\n64 bytes from 151.101.1.229 (151.101.1.229): icmp_seq=2 ttl=59 time=0.42 ms\n^C\n```\n\nIf you define multiple probes to perform your infinite ping, the CLI output switches to summary mode, letting you compare the result data collected from all probes:\n\n```bash\nglobalping ping cdn.jsdelivr.net from Europe --limit 5 --infinite\nLocation                                               | Sent |    Loss |     Last |      Min |      Avg |      Max\nLondon, GB, EU, OVH SAS (AS16276)                      |   22 |   0.00% |  3.33 ms |  3.07 ms |  3.20 ms |  3.33 ms\nFalkenstein, DE, EU, Hetzner Online GmbH (AS24940)     |   22 |   0.00% |  5.41 ms |  5.30 ms |  5.78 ms |  13.1 ms\nVienna, AT, EU, EDIS GmbH (AS57169)                    |   22 |   0.00% |  0.47 ms |  0.46 ms |  0.56 ms |  0.88 ms\nStockholm, SE, EU, The Constant Company, LLC (AS20473) |   22 |   0.00% |  1.03 ms |  0.83 ms |  1.15 ms |  4.66 ms\nMadrid, ES, EU, EDGOO NETWORKS LLC (AS47787)           |   22 |   0.00% |  0.24 ms |  0.13 ms |  0.26 ms |  0.42 ms\n^C\n```\n\n\u003e [!TIP]\n\u003e Stop the infinite ping by pressing CTRL+C on your keyboard.\n\n#### Get TCP \u0026 TLS/SSL details\n\nUse the `--full` option when running an `http` command to include the TCP and TLS/SSL details in the output.\n\n```bash\nglobalping http jsdelivr.com --full\n\u003e Kansas City (MO), US, NA, IONOS SE (AS8560), u-zGato\nResolved address: 172.67.208.113\n\nTLSv1.3/TLS_AES_256_GCM_SHA384\nSubject: jsdelivr.com; DNS:jsdelivr.com, DNS:*.jsdelivr.com\nIssuer: WE1; Google Trust Services; US\nValidity: 2025-02-02T21:13:14Z; 2025-05-03T22:10:40Z\nSerial number: 57:E1:7F:F0:C7:25:0A:A5:0D:3B:73:06:FD:C0:72:D4\nFingerprint: 73:A9:13:48:38:E7:42:E6:97:72:5A:87:D8:95:20:BE:3A:32:5F:27:78:40:CA:9C:BE:EC:F8:7F:75:11:43:79\nKey type: EC256\n\nHTTP/1.1 301\n...\n```\n\n\u003e [!TIP]\n\u003e Use `globalping http jsdelivr.com --full --method head` to omit the response body.\n\n#### View your measurement history\n\nYou can view the history of your current session's measurements by running the `history` command.\n\n```bash\nglobalping history\n1 | 2024-03-27 11:56:46 | ping google.com\n\u003e https://globalping.io?measurement=itcR65tYCqbouXib\n- | 2024-03-27 11:57:01 | dns google.com from last\n\u003e https://globalping.io?measurement=kWc5UBK9A6G4RUYM\n2 | 2024-03-27 11:57:20 | traceroute google.com from New York --limit 2\n\u003e https://globalping.io?measurement=Yz7A1UifUonZsC3C\n3 | 2024-03-27 11:57:37 | mtr google.com from New York --limit 2\n\u003e https://globalping.io?measurement=SX1NBgfDKiabM1vZ\n4 | 2024-03-27 11:57:52 | http google.com from London,Belgium --limit 2 --method get --ci\n\u003e https://globalping.io?measurement=eclwFSYX0zgU10Cs\n```\n\n\u003e [!TIP]\n\u003e Use this command to get the measurement IDs needed to run a new measurement, which [reuses the probes](#reselect-probes) from a previous one.\n\n#### Learn about available flags\n\nMost commands have shared and unique flags. We recommend that you familiarize yourself with these so that you can run and automate your network tests in powerful ways.\n\nSimply execute the command you want to learn more about with the `--help` flag:\n\n`globalping [command] --help`\n\n## Support and Feedback\n\nIf you are stuck or want to give us your feedback, please [open a new issue](https://github.com/jsdelivr/globalping-cli/issues).\n\n## Development\n\nPlease refer to [CONTRIBUTING.md](CONTRIBUTING.md) for more information.\n","funding_links":["https://github.com/sponsors/jsdelivr","https://opencollective.com/jsdelivr","https://www.jsdelivr.com/sponsors"],"categories":["Observability \u0026 Monitoring","Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdelivr%2Fglobalping-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsdelivr%2Fglobalping-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsdelivr%2Fglobalping-cli/lists"}