I wished for a CLI internet #speedtest, and hey look, of course, it exists. https://pypi.org/project/speedtest-cli/
Alternatively, Netflix offers a Node-based CLI that uses their fast.com speedtest service.
@pbx There's also librespeed-cli but it can be unreliable and enables telemetry by default.