Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
.claude/settings.local.json

# binary
hp
hittyping
/hp
/hittyping
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to hp (hittyping) will be documented in this file.

## [0.8.8] - 2026-11-15

### Added

- `--skill` prints the agent skill (`skills/hp/SKILL.md`, embedded): how an AI agent should run hp bounded and read its output; a test fails when a flag is missing from it
- `--fail-style dots|bang` (env `HP_FAIL_STYLE`) picks the braille failure marker: `dots` is the purple `⣿` of 0.8.7 (default), `bang` restores the red `!` of 0.8.6 and earlier

### Changed

- Fixed-rate sending, as ping does: a request starts every `--interval` whatever earlier ones are doing, so one glyph is one interval of wall time during outages too. Before, a timed-out request blocked the next, and with the defaults each failure glyph stood for 6 s (12 s per braille cell) against 1 s while up. Loss % is now the share of time the host did not answer. Results are drawn in send order; up to timeout ÷ interval requests can be in flight
- Timeline periods start at the send time of their first request

### Fixed

- `host:port` targets (`hp example.com:8443`, `hp 127.0.0.1:8080`) no longer fail the startup DNS check with "cannot resolve"

## [0.8.7] - 2026-11-08

### Security
Expand Down
13 changes: 13 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ hp -3 cloudflare.com # Use HTTP/3 (or --http3)
hp -3 -d example.com # HTTP/3 with auto-downgrade on failures
hp -3 -D example.com # Auto-downgrade including plain HTTP
hp -b cloudflare.com # Braille mode (2x density)
hp -b --fail-style bang cloudflare.com # Braille failures as red ! (up to 0.8.6 look)
hp --skill # Print the agent skill (skills/hp/SKILL.md, embedded)
hp -g 100 -y 200 8.8.8.8 # Custom thresholds (or --green, --yellow)
HTTPS_PROXY=socks5://host:port hp cloudflare.com # Via SOCKS5 proxy
```
Expand All @@ -63,6 +65,7 @@ HTTPS_PROXY=socks5://host:port hp cloudflare.com # Via SOCKS5 proxy
| `-j` | `--jitter` | | 0 | Max random jitter to add to interval (e.g., 200ms, 3s) |
| `-t` | `--timeout` | | 5s | Request timeout |
| `-b` | `--braille` | | false | Use braille visualization (2x density) |
| | `--fail-style` | `HP_FAIL_STYLE` | dots | Braille failure marker: `dots` (purple ⣿) or `bang` (red !, up to 0.8.6) |
| | `--legend` | | false | Show legend line |
| | `--noheader` | | false | Hide header line |
| `-q` | `--quiet` | | false | Hide header and legend |
Expand All @@ -77,6 +80,7 @@ HTTPS_PROXY=socks5://host:port hp cloudflare.com # Via SOCKS5 proxy
| `-d` | `--downgrade` | | false | Auto-downgrade on 3 failures (secure only) |
| `-D` | `--downgrade-insecure` | | false | Auto-downgrade including plain HTTP |
| `-v` | `--version` | | | Show version and exit |
| | `--skill` | | | Print the agent skill and exit |
| `-h` | `--help` | | | Show help and exit |

## Architecture
Expand All @@ -85,12 +89,21 @@ Go application using `spf13/pflag` for POSIX-style CLI flags. Uses latest stable

Key functions:

- `runFixedRate()` - Starts a request every interval (never waits on earlier ones) and hands results over in send order (`schedule.go`)
- `recordResult()` - Adds one result to stats, timeline and bar
- `measureRTT()` - HEAD request timing
- `createClient()` - Creates HTTP client for given protocol level
- `getURLForProto()` - Returns URL with appropriate scheme for protocol
- `getBlock()` - Maps latency to Unicode block + color
- `printDisplay()` - Live bar and stats rendering with ANSI cursor control
- `printFinal()` - Summary on Ctrl+C
- `defineFlags()` - Every CLI flag, on a given FlagSet (tests enumerate it)

### Agent skill

`skills/hp/SKILL.md` is the agent-facing usage guide, embedded in the binary and printed by `hp --skill`.
`TestSkillDocumentsEveryFlag` fails when a flag in `defineFlags()` is missing from it, so add or change a flag and
its skill row in the same commit.

## Visual Output

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ hp -3 dns.google # HTTP/3 (QUIC)
hp -3 -d example.com # HTTP/3 with auto-downgrade on failures
hp -3 -D example.com # Auto-downgrade including plain HTTP
hp -b cloudflare.com # Braille mode (2x density)
hp -b --fail-style bang site # Braille failures as red ! (pre-0.8.7 look)
hp --skill # Print the agent skill (usage guide for AI agents)
hp -g 50 -y 100 cloudflare.com # Custom thresholds (ms)
HTTPS_PROXY=socks5://host:1080 hp site # Via SOCKS5 proxy
HTTP_PROXY=http://proxy:8080 hp -1 site # Via HTTP proxy
Expand All @@ -112,6 +114,7 @@ HTTP_PROXY=http://proxy:8080 hp -1 site # Via HTTP proxy
| `-j` | `--jitter` | | 0 | Max random jitter to add to interval (e.g., 200ms, 3s) |
| `-t` | `--timeout` | | 5s | Request timeout |
| `-b` | `--braille` | | false | Use braille visualization (2x density) |
| | `--fail-style` | `HP_FAIL_STYLE` | dots | Braille failure marker: `dots` (purple ⣿) or `bang` (red !, the look up to 0.8.6) |
| | `--legend` | | false | Show legend (hidden by default) |
| | `--noheader` | | false | Hide header line |
| `-q` | `--quiet` | | false | Hide header and legend |
Expand All @@ -126,6 +129,7 @@ HTTP_PROXY=http://proxy:8080 hp -1 site # Via HTTP proxy
| `-d` | `--downgrade` | | false | Auto-downgrade on 3 failures (secure only) |
| `-D` | `--downgrade-insecure` | | false | Auto-downgrade including plain HTTP |
| `-v` | `--version` | | | Show version |
| | `--skill` | | | Print the agent skill (how an AI agent should run and read hp) |
| `-h` | `--help` | | | Show help |

## Visual Guide
Expand All @@ -137,6 +141,8 @@ HTTP_PROXY=http://proxy:8080 hp -1 site # Via HTTP proxy

Block height scales within each color zone based on latency.

In braille mode (`-b`) a cell holds two requests, and a cell with a failure is a purple `⣿`. `--fail-style bang` brings back the look up to 0.8.6: a red `!` when both requests failed, and a blank column when one did.

## Platform Support

Developed on macOS. Tested on Windows and Linux.
Expand Down
7 changes: 7 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ If hp evolves toward interactive features, consider migrating to [Bubble Tea](ht

## Completed

### v0.8.8 - Fixed-Rate Sending & Agent Skill

- [x] Fixed-rate sending like ping: one glyph per interval, also during outages; time-based loss %
- [x] `--fail-style dots|bang` to choose the braille failure marker (purple `⣿` or the pre-0.8.7 red `!`)
- [x] `--skill` prints the embedded agent skill
- [x] Fix `host:port` targets failing the startup DNS check

### v0.8.7 - Braille Failure Cells

- [x] Braille mode: failures render as a full purple cell instead of `!`
Expand Down
Loading
Loading