Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 9, 2026·3 min de lectura

speedtest-cli — Test Network Bandwidth from the Command Line

A Python CLI that measures download, upload, and ping against Ookla Speedtest servers, ideal for scripted network monitoring and CI health checks.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
speedtest-cli Overview
Comando de instalación directa
npx -y tokrepo@latest install 4e2d478d-4b7f-11f1-9bc6-00163e2b0d79 --target codex

Ejecutar después de confirmar el plan con dry-run.

Introduction

speedtest-cli is a command-line interface for testing internet bandwidth using Ookla's Speedtest.net infrastructure. It lets developers and ops teams measure network performance from servers, containers, or CI pipelines without opening a browser.

What speedtest-cli Does

  • Measures download and upload throughput against the nearest Speedtest server
  • Reports latency (ping) to the selected test server
  • Outputs results in plain text, CSV, or JSON for scripted consumption
  • Lets you pick a specific server by ID or list available servers by distance
  • Supports simple and share-image output modes

Architecture Overview

speedtest-cli is a single-file Python script that communicates with the Speedtest.net HTTP API. It fetches a server list ranked by geographic distance, selects the best candidate based on latency, then performs multi-threaded download and upload transfers to calculate throughput. Results are computed locally and printed to stdout.

Self-Hosting & Configuration

  • Install via pip, pipx, or your distro package manager
  • No configuration files needed; all options are passed as CLI flags
  • Use --server to pin a specific Speedtest server ID for consistent benchmarks
  • Integrate into monitoring with --json piped to a time-series database
  • Works on Linux, macOS, Windows, and inside Docker containers

Key Features

  • Zero-config instant bandwidth test from any terminal
  • JSON and CSV output for integration with dashboards and alerting
  • Server selection by ID, country, or automatic nearest-server detection
  • Lightweight single-file script with no compiled dependencies
  • Widely used as a baseline network diagnostic in DevOps runbooks

Comparison with Similar Tools

  • Ookla Speedtest CLI — official binary from Ookla; speedtest-cli is the community Python alternative
  • fast-cli — tests against Netflix Fast.com; speedtest-cli uses the Ookla network
  • iperf3 — measures raw TCP/UDP between two endpoints you control; speedtest-cli tests internet bandwidth
  • LibreSpeed — self-hosted speed test; speedtest-cli relies on public Ookla servers
  • mtr — focuses on route-level latency and packet loss; speedtest-cli measures throughput

FAQ

Q: Is speedtest-cli the same as the official Ookla Speedtest CLI? A: No. speedtest-cli is a community open-source Python project. Ookla later released their own closed-source binary with the same name concept.

Q: Can I run it in a cron job for continuous monitoring? A: Yes. Use --json and pipe results into InfluxDB, Prometheus Pushgateway, or a log file for trend analysis.

Q: How accurate are the results compared to the browser test? A: Results are generally comparable. Differences may arise from thread count, server selection, and network conditions during the test window.

Q: Does it support IPv6? A: The tool defaults to the system's preferred IP version. Some Speedtest servers support IPv6 depending on their configuration.

Sources

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados