Skip to content
/ htping Public

cli app to http/s ping web endpoints and get stats

License

Notifications You must be signed in to change notification settings

kubblai/htping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

htping

Go Terminal License

A beautiful CLI tool for HTTP/HTTPS endpoint monitoring and web diagnostics with an interactive terminal interface.

๐Ÿš€ Quick Start

# Interactive welcome screen with guided examples
htping

# Quick ping with real-time TUI
htping google.com

# Get comprehensive URL information
htping info github.com

๐Ÿ“– Overview

htping is a modern CLI utility that transforms web diagnostics with a stunning terminal interface. Built with Go and powered by Bubble Tea, it provides real-time HTTP monitoring, comprehensive web analysis, and an intuitive user experience that makes network debugging enjoyable.

Key Highlights:

  • ๐ŸŽจ Beautiful TUI - Responsive interface with live updates and emoji indicators
  • โšก Real-time Monitoring - Live ping statistics with colorful progress tracking
  • ๐Ÿ” Deep Insights - DNS, certificates, WHOIS, and IP information at your fingertips
  • ๐ŸŽฏ Smart Navigation - Intuitive controls with seamless mode switching
  • ๐Ÿ›ก๏ธ Robust Design - Graceful fallback for all environments

โœจ Features

๐ŸŽช Interactive Experience

Feature Description
Welcome Screen Guided onboarding with interactive tutorials and examples
Live Ping Display Real-time statistics with emoji status indicators (โœ…๐Ÿ”„๐Ÿšซ๐Ÿ’ฅ)
Info Menu Navigate through DNS, IP, cert, and WHOIS data effortlessly
Responsive Design Automatically adapts to terminal size with dynamic content
Mouse Support Enhanced interaction with clickable elements

๐Ÿ”ง Technical Capabilities

  • โœ… HTTP/HTTPS Monitoring - Response time tracking with detailed statistics
  • โœ… DNS Analysis - Authoritative nameserver lookups and resolution
  • โœ… IP Resolution - Complete address mapping and network information
  • โœ… TLS Certificates - Detailed certificate analysis and validation
  • โœ… WHOIS Lookup - Domain registration and ownership details
  • โœ… Resource Analysis - Page resource statistics (images, scripts, stylesheets, external hosts)
  • โœ… Performance Metrics - Detailed timing breakdown (DNS, TCP, TLS, content transfer)
  • โœ… Geolocation - Server location mapping with ISP and AS information
  • โœ… HTML Export - Save and analyze page content
  • โœ… Protocol Detection - Automatic HTTP/HTTPS handling
  • โœ… Timeout Management - Configurable request timeouts
  • โœ… Authentication - Basic and cookie authentication support
  • โœ… Response Caching - Smart caching with configurable TTL (5 minutes)
  • โœ… Configurable Intervals - Custom ping intervals in seconds
  • โœ… Comprehensive Reporting - JSON and HTML exports with full ping and info data
  • โœ… Beautiful HTML Reports - Professional reports with all diagnostic information

๐Ÿšง Roadmap

  • ๐Ÿ”„ Header Manipulation - Custom header modification
  • ๐Ÿ”„ URL Crawling - Regex-based site exploration
  • ๐Ÿ”„ CSV Export - Additional export format support
  • ๐Ÿ”„ Multi-target Monitoring - Parallel monitoring of multiple endpoints
  • ๐Ÿ”„ Advanced Auth - OAuth and JWT token support

๐Ÿ’ป Installation

Option 1: Build from Source

git clone https://github.com/kubblai/htping.git
cd htping
go build -o htping
./htping

Option 2: Development Mode

git clone https://github.com/kubblai/htping.git
cd htping
go run main.go google.com

๐ŸŽฎ Usage Guide

Interactive Mode (Recommended)

htping                    # Launch welcome screen
htping example.com        # Quick ping with TUI
htping example.com -c 10  # Custom ping count
htping example.com -i 3   # Ping every 3 seconds
htping example.com --cache # Enable response caching

Authentication Examples

# Basic authentication
htping example.com -u username -p password

# Cookie authentication
htping example.com --cookie "session=abc123; auth=xyz456"

# Combined with other options
htping example.com -u admin -p secret --cache -i 2 -c 10

Direct Commands

# Ping operations
htping ping example.com                    # Default continuous pings
htping ping example.com -c 20              # Custom count
htping ping example.com --http             # Force HTTP
htping ping example.com --html -o page.html # Save HTML
htping ping example.com -i 5 --cache       # 5s intervals with caching

# Information gathering
htping info example.com        # Interactive menu
htping info dns example.com    # DNS servers
htping info ip example.com     # IP addresses  
htping info cert example.com   # TLS certificate
htping info whois example.com  # WHOIS data
htping info resources example.com  # Page resource statistics
htping info perf example.com   # Performance metrics
htping info geo example.com    # Geolocation information

Export & Reporting Examples

# Export comprehensive ping data with all info
htping example.com -c 5 --export-json report.json
htping example.com -c 5 --export-html report.html

# Export with authentication and caching
htping secure-site.com -u user -p pass --cache --export-html secure-report.html

# Generate both JSON and HTML reports
htping api.example.com -c 10 -i 2 --export-json api-data.json --export-html api-report.html

โŒจ๏ธ Navigation & Controls

๐Ÿ“ Ping Mode

Key Action
p Pause/resume pinging
i Switch to info menu
q Quit application
Ctrl+C Graceful exit

๐Ÿ“Š Info Mode

Key Action
โ†‘โ†“ / j k Navigate menu options
Enter Select current option
Esc / b / Backspace Return to previous screen
q Quit application

๐Ÿ  Welcome Screen

Key Action
1-4 Launch example demonstrations
h Show comprehensive help
โ†‘โ†“ / j k Navigate options
Enter Execute selected action

๐Ÿ“‹ Command Reference

Global Flags

-h, --help              Show help information
-c, --count int         Number of requests (default: 0 = continuous)
-i, --interval int      Ping interval in seconds (default: 1)
    --http              Force HTTP instead of HTTPS  
    --html              Display HTML content after requests
-o, --output string     Save HTML content to file (requires --html)
-u, --username string   Basic authentication username
-p, --password string   Basic authentication password
    --cookie string     Cookie authentication string
    --cache             Enable response caching (5 minute TTL)
    --export-json string Export comprehensive report to JSON file
    --export-html string Export comprehensive report to HTML file

Examples

# Continuous ping with custom interval
htping google.com -i 2

# Authenticated requests with caching
htping secure-site.com -u admin -p password --cache

# Cookie-based authentication
htping app.com --cookie "sessionid=abc123; csrftoken=xyz456"

# Combined authentication and performance analysis
htping api.example.com -u apikey -p secret -i 5 --cache

# HTTPS certificate analysis
htping info cert secure-site.com

# HTTP-only ping with HTML export
htping ping --http --html -o result.html http-site.com

# Quick DNS troubleshooting
htping info dns problematic-domain.com

# Website performance analysis with caching
htping info perf slow-site.com --cache

# Page resource breakdown
htping info resources complex-site.com

# Server location discovery
htping info geo international-site.com

# Comprehensive reporting
htping example.com -c 5 --export-json detailed-report.json
htping example.com -c 3 --export-html visual-report.html --cache

# Export with authentication
htping secure-api.com -u admin -p secret --export-html secure-analysis.html

๐Ÿ› ๏ธ Development

Prerequisites

  • Go 1.25.1+ - Latest Go installation
  • Color Terminal - For optimal visual experience
  • Internet Connection - Required for web requests

Project Structure

htping/
โ”œโ”€โ”€ main.go           # Single-file architecture (~700+ lines)
โ”œโ”€โ”€ go.mod           # Go module dependencies  
โ”œโ”€โ”€ go.sum           # Dependency checksums
โ”œโ”€โ”€ CLAUDE.md        # Development guidelines
โ””โ”€โ”€ README.md        # This file

Key Dependencies

Package Purpose
bubbletea TUI framework and event handling
lipgloss Terminal styling and layouts
cobra CLI command structure
whois Domain information lookup

Build Commands

go mod download     # Install dependencies
go build           # Create binary
go test ./...      # Run tests (if present)
go mod tidy        # Clean dependencies

๐Ÿค Contributing

We welcome contributions! Please feel free to:

  • ๐Ÿ› Report bugs and issues
  • ๐Ÿ’ก Suggest new features
  • ๐Ÿ”ง Submit pull requests
  • ๐Ÿ“š Improve documentation

๐Ÿ“œ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.


Made with โค๏ธ and Go
Bringing beautiful diagnostics to your terminal

About

cli app to http/s ping web endpoints and get stats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages