CLI tool
kavehtehrani/cloudflare-speed-cli avatar
kavehtehrani/cloudflare-speed-cli

cloudflare-speed-cli puts a Cloudflare speed test in your terminal

CLI for internet speed test via cloudflare

1,065 stars63 forksRustGPL-3.0

At a glance

What is it?
A Rust command line tool that runs Cloudflare's speed test service and renders download, upload, latency and UDP quality numbers in a terminal interface, with headless output for scripts. It is a good fit for engineers who want a quick network check on a server, and a poor fit if you need comparable numbers across ISPs or documented methodology.
Who is it for?
cloudflare-speed-cli fits engineers who want a quick Cloudflare speed check on a Linux or macOS host, in a terminal or a container, and who are willing to treat the output as a single-network snapshot rather than a benchmark. Teams that need reproducible cross-ISP measurements, documented methodology or a supported Windows path should look elsewhere.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 21, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What cloudflare-speed-cli measures, and against which server

The tool exists for a narrow job: run a speed test against Cloudflare and show the numbers without opening a browser. The README states that it displays network speed test results from Cloudflare's speed test service in a TUI interface, and the Source section points at speed.cloudflare.com as the source of the endpoints. There is no account, no API key and no configuration file to fill in. The measured quantities are download and upload throughput, idle latency and loaded latency, so you get both a bandwidth figure and a latency figure that reflects a saturated link rather than an idle one.

The audience is a person sitting in front of a terminal: someone on a jump host, a homelab box, a CI worker, or a laptop that feels slow. It also suits a script, because the same binary can emit text or JSON instead of drawing a screen. What it does not attempt to be is a general purpose internet speed test suite with a server picker, a saved result database and a comparison against other speed test providers. The measurement target is fixed to Cloudflare, which is both its strength and its limit.

One binary, several measurement layers in a single pass

The dependency list in Cargo.toml shows what the measurement is built on. reqwest with the rustls-tls, http2, gzip, brotli, deflate, json, stream and socks features handles the HTTP transfers, tokio provides the multi-threaded runtime and the time and sync primitives, and socket2 with the all feature gives low level socket control that the higher level client does not expose. A separate tokio-rustls and rustls pair sits in the tree specifically for TLS handshake measurement, which is why the diagnostic numbers are not just timings around a request.

The result is that a single run produces several layers at once. Throughput comes from the HTTP downloads and uploads. Idle and loaded latency come from separate request timing. DNS resolution time and TLS handshake time are recorded alongside the test. UDP quality is measured too, covering packet loss, jitter and a MOS style link score, and that path is built on raw sockets rather than on HTTP. In other words the tool does not ask one endpoint one question and print a number; it opens several kinds of connection and reports each one. The cost of that breadth is that a failure in any layer can colour the whole run, and the TUI has to keep several measurement streams visible at once while the throughput test is still running.

Installing it: cargo, Homebrew, MacPorts, Arch, Nix and Docker

The README calls cargo the preferred route for anyone who already has cargo installed, and the package sits on crates.io under the name cloudflare-speed-cli. That is the shortest path for a Linux server:

bash
cargo install cloudflare-speed-cli

The same paragraph offers a second cargo route for the latest unreleased source, pulled straight from the repository with the tui feature enabled:

bash
cargo install --git https://github.com/kavehtehrani/cloudflare-speed-cli --features tui

Mac users have two documented package-manager options. Homebrew works on both Intel and newer Silicon machines, and the README points out that MacPorts supports both architectures as well. The Arch Linux package is in the official repositories, and NixOS users can run the project without installing it at all. On a machine where you would rather not touch the host, the Docker path pulls a published image and runs it as an interactive container, which is the form to use on a build server:

bash
docker pull ghcr.io/kavehtehrani/cloudflare-speed-cli:latest
docker run --rm -it ghcr.io/kavehtehrani/cloudflare-speed-cli

History is written to a data directory under the container's home, so a plain run discards it when the container exits. The README notes that persisting history requires mounting a volume, and gives this command:

bash
docker run --rm -it -v cloudflare-speed-data:/root/.local/share/cloudflare-speed-cli ghcr.io/kavehtehrani/cloudflare-speed-cli

Static binaries are also offered on the latest release page. The author states plainly that the binaries were checked on Linux for x64 and ARM64 and on Windows 11, but that no Apple device was available for checking.

The TUI is the default and --text is the path for scripts

Running the binary with no arguments starts the interactive interface, which draws real time charts and statistics and can show and manage past test results. Two screenshots in the repository, one for history and one for the charts, show the kind of live view you get. The interactive mode also has a text input widget attached to it, since ratatui-textarea is an optional dependency with the search feature enabled, which is how a user filters or queries stored results rather than scrolling.

For anything unattended, the same program drops the screen. The README documents a text output mode:

bash
cloudflare-speed-cli --text

Results can be saved as JSON or CSV, and the feature list also mentions headless text and JSON modes for scripting, so a run can be captured in a form a monitoring script can parse without a terminal emulator in the middle. That combination of a real TUI and a machine readable mode is the design choice that makes the tool more than a demo. The repository also carries an install.sh script, and the Dockerfile builds a static musl binary on Alpine with Rust 1.88 and a two stage layout, ending with the binary copied into a minimal runtime image and TERM set to xterm-256color. The CI badge points at a GitHub Actions workflow, and the Rust badge states a 1.81 or newer requirement, which is lower than the 1.88 used inside the container build.

IPv4 against IPv6, and a traceroute to the edge

Two of the flags exist to settle arguments about address families. The feature list describes an optional side by side comparison of IPv4 and IPv6 under --compare-ip-versions, and two flags that force a single family, -4 with the long form --ipv4-only and -6 with --ipv6-only. Forcing one family is what you want when a dual stack host is quietly preferring one protocol and you need to know how the other behaves, and the comparison mode is what you want when you are chasing an asymmetry between the two paths.

The same section of the README offers an optional ICMP traceroute to the Cloudflare edge under --traceroute. That is the one feature with a privilege implication worth noting. Sending echo requests to intermediate hops is not the same operation as the speed test, and on a locked down network the hops may simply not answer, which produces a partial path rather than a failure. Run it where raw sockets are permitted, and read a missing intermediate as missing data rather than as a fault in the link.

The tool also accepts a proxy, and the feature list names HTTP, HTTPS and SOCKS5, along with TLS trust handling that loads the operating system truststore by default or accepts a private CA through --certificate, and a binding option that pins traffic to a specific network interface or source IP. The dependency list includes the socks feature on reqwest and the if-addrs crate, which is consistent with those two capabilities.

Where the tool is incomplete: Windows network details and macOS SSID

The repository keeps an Outstanding Issues section, and its two entries are worth reading before you install. The first says that network information on Windows is incomplete, that the author has not used Windows outside gaming in many years, and that this part will likely not be implemented unless there is demand for it. The author adds that the only reason a Windows binary exists at all is how easy cargo-dist made producing one. So the Windows build is a portable artefact rather than a tested platform, and the network details you would rely on there are known to be thin.

The second entry is narrower: the SSID cannot be detected on macOS Sonoma 14.4 and later, because that data is now treated as location sensitive. That affects the network identification shown alongside a result on newer macOS releases, not the measurement itself.

A third limit is about the method rather than the code. Because the endpoint is fixed to Cloudflare, the numbers describe the path to Cloudflare's edge and its own measurement service, not a neutral estimate of your link. A second ISP can serve a different result for the same line, and a peering dispute with Cloudflare will show up as a slow test even when the line is fine. The README does not document a way to select a different measurement server, and it does not document any calibration or repeat count control, so treat a single run as one sample rather than a stable figure.

Licence, release cadence and what a dependency update costs

The project is published under GPL-3.0, stated in the Cargo.toml license field, the README badge and the LICENSE file at the repository root. GPL-3.0 is a strong copyleft licence with obligations that attach to distributing a modified version of the program, so if you intend to bundle it into a larger product rather than run it as a command, read the licence text and the terms of your own distribution. This is a pointer to a legal question rather than legal advice.

The release list is short and recent: v1.0.9 on 2026-10-02, v1.0.8 on 2026-07-27 and v1.0.7 on 2026-07-16, with the last push to the repository on 2026-10-02. The project is not archived. Two releases landed within about a week and a half in July, then a gap of a little over two months before v1.0.9, so the pace is irregular rather than fixed.

For upgrade cost, the dependency set is the main thing to watch. The tree includes tokio, reqwest, rustls, clap, ratatui, crossterm, serde and serde_json, all with pinned version requirements in Cargo.toml, and a Cargo.lock file is committed at the repository root. Because a network measurement tool depends on TLS and HTTP stacks, an update that changes certificate handling or HTTP behaviour can alter results, so pin a version in production rather than tracking the git install path.

Editorial conclusion

cloudflare-speed-cli fits engineers who want a quick Cloudflare speed check on a Linux or macOS host, in a terminal or a container, and who are willing to treat the output as a single-network snapshot rather than a benchmark. Teams that need reproducible cross-ISP measurements, documented methodology or a supported Windows path should look elsewhere. Before adopting it, verify the endpoint path on your own network with the --text mode, confirm that your proxy and certificate flags behave in your environment, and check whether the v1.0.9 release covers the platforms you actually run.

Frequently asked questions

Does cloudflare-speed-cli work on Windows and macOS?

Binaries exist for Linux on x64 and ARM64 and for Windows 11, and the author notes those were the platforms checked, with no Apple device available for checking. The README states that network information on Windows is incomplete, and that the SSID cannot be detected on macOS Sonoma 14.4 and later because it is now treated as location sensitive data.

How do I install cloudflare-speed-cli on a Linux server?

The preferred route is cargo install cloudflare-speed-cli from crates.io, and Arch Linux users can install it with pacman -S cloudflare-speed-cli. NixOS users can run the project directly with nix run github:kavehtehrani/cloudflare-speed-cli, and a container image is published as ghcr.io/kavehtehrani/cloudflare-speed-cli:latest.

Can I run cloudflare-speed-cli in a script instead of the TUI?

Yes. The README documents a text output mode started with cloudflare-speed-cli --text, and the feature list mentions headless text and JSON modes for scripting. Results can be saved as JSON or CSV, and past test results can be viewed and managed from the interactive view.

Which service does cloudflare-speed-cli test against, and does it need an account?

The README states that it uses endpoints from speed.cloudflare.com, and the install and usage steps ask for no account, key or configuration file. Because the target is fixed, the numbers describe the path to Cloudflare's edge rather than a provider neutral estimate of the line.

Official sources

  1. Issues
  2. kavehtehrani/cloudflare-speed-cli on GitHub
  3. License: GPL-3.0
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/kavehtehrani-cloudflare-speed-cli.svg)](https://hysenlabs.com/projects/kavehtehrani-cloudflare-speed-cli)