Skip to content

mikkelam/fast-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fast-cli

Zig CI License: MIT

A blazingly fast CLI tool for testing internet speed uses fast.com v2 api. Written in Zig for maximum performance.

1.2 MB binary • 🚀 Zero runtime deps • 📊 Smart stability detection

Demo

Fast-CLI Demo

Why fast-cli?

  • Tiny binary: Just 1.2 MB, no runtime dependencies
  • Blazing fast: Concurrent connections with adaptive chunk sizing
  • Cross-platform: Single binary for Linux, macOS
  • Smart stopping: Uses Coefficient of Variation (CoV) algorithm for adaptive test duration

Supported Platforms

  • Linux: x86_64, aarch64 (ARM64)
  • macOS: x86_64 (Intel), aarch64 (aka Apple Silicon)

Installation

Quick Install

curl -sSL https://raw.githubusercontent.com/mikkelam/fast-cli/main/install.sh | bash

Pre-built Binaries

For example, on an Apple Silicon Mac:

curl -L https://github.com/mikkelam/fast-cli/releases/latest/download/fast-cli-aarch64-macos.tar.gz -o fast-cli.tar.gz
tar -xzf fast-cli.tar.gz
chmod +x fast-cli && sudo mv fast-cli /usr/local/bin/
fast-cli --help

Build from Source

git clone https://github.com/mikkelam/fast-cli.git
cd fast-cli
zig build -Doptimize=ReleaseSafe

Usage

./fast-cli --help
Estimate connection speed using fast.com
v0.0.1

Usage: fast-cli [options]

Flags:
 -u, --upload      Check upload speed as well [Bool] (default: false)
 -d, --duration    Maximum test duration in seconds (uses Fast.com-style stability detection by default) [Int] (default: 30)
     --https      Use https when connecting to fast.com [Bool] (default: true)
 -j, --json        Output results in JSON format [Bool] (default: false)
 -h, --help        Shows the help for a command [Bool] (default: false)

Use "fast-cli --help" for more information.

Example Output

$ fast-cli --upload
🏓 25ms | ⬇️ Download: 113.7 Mbps | ⬆️ Upload: 62.1 Mbps

$ fast-cli -d 15  # Quick test with 15s max duration
🏓 22ms | ⬇️ Download: 105.0 Mbps

$ fast-cli -j     # JSON output
{"download_mbps": 131.4, "ping_ms": 20.8}

Development

# Debug build
zig build

# Run tests
zig build test

# Release build
# Consider removing -Dcpu if you do not need a portable build
zig build -Doptimize=ReleaseFast -Dcpu=baseline

License

MIT License - see LICENSE for details.


Not affiliated with Netflix or Fast.com