Skip to content

feat(check): add global speed checker command#30

Merged
thibaultleouay merged 1 commit into
mainfrom
feat/check
May 13, 2026
Merged

feat(check): add global speed checker command#30
thibaultleouay merged 1 commit into
mainfrom
feat/check

Conversation

@thibaultleouay
Copy link
Copy Markdown
Member

Adds openstatus check <URL> (alias c): a top-level, unauthenticated command that runs a one-shot HTTP check from 28 global regions via the public OpenStatus speed checker.

Highlights:

  • Live row-per-region output streaming as NDJSON arrives, followed by a summary footer (fastest/slowest/mean/success-rate + share URL).
  • --timing adds DNS / Connection / TLS / TTFB / Transfer columns.
  • --json buffers a single object with full timing nested per region, ready for jq pipelines.
  • curl-style flags -X / -H / -d (with @file and @- stdin support).
  • Typed errors for 429 (parsed Retry-After + body reset fallback), 4xx (with VPN/proxy hint when body mentions client IP), 5xx, network errors, and truncated streams.
  • Region codes mapped to human-readable names (e.g. koyeb_tyo → "Tokyo (Koyeb)") from the upstream skill repo snapshot.

Internals:

  • New internal/check/ package: client.go (NDJSON streaming parser), render.go (table + summary + JSON output), regions.go (display names), types.go (typed errors).
  • internal/api/client.go gains PlayCheckerURL pinned to www.openstatus.dev (skips a 308 redirect on every call).
  • Tests use the existing RoundTripper-interceptor pattern from internal/run/run_test.go; fixtures captured from live probes live in internal/check/testdata/.

Docs:

  • README: new check row, dedicated Quick Start example, Global Speed Check section.
  • Manpage and generated markdown regenerated.
  • skills/cli/SKILL.md teaches when to reach for check vs. saved monitors.

Version bumped to v1.2.0 (new top-level command = semver minor).

Adds `openstatus check <URL>` (alias `c`): a top-level, unauthenticated
command that runs a one-shot HTTP check from 28 global regions via the
public OpenStatus speed checker.

Highlights:
- Live row-per-region output streaming as NDJSON arrives, followed by
  a summary footer (fastest/slowest/mean/success-rate + share URL).
- --timing adds DNS / Connection / TLS / TTFB / Transfer columns.
- --json buffers a single object with full timing nested per region,
  ready for jq pipelines.
- curl-style flags -X / -H / -d (with @file and @- stdin support).
- Typed errors for 429 (parsed Retry-After + body reset fallback),
  4xx (with VPN/proxy hint when body mentions client IP), 5xx,
  network errors, and truncated streams.
- Region codes mapped to human-readable names (e.g. koyeb_tyo →
  "Tokyo (Koyeb)") from the upstream skill repo snapshot.

Internals:
- New internal/check/ package: client.go (NDJSON streaming parser),
  render.go (table + summary + JSON output), regions.go (display
  names), types.go (typed errors).
- internal/api/client.go gains PlayCheckerURL pinned to
  www.openstatus.dev (skips a 308 redirect on every call).
- Tests use the existing RoundTripper-interceptor pattern from
  internal/run/run_test.go; fixtures captured from live probes live
  in internal/check/testdata/.

Docs:
- README: new check row, dedicated Quick Start example, Global Speed
  Check section.
- Manpage and generated markdown regenerated.
- skills/cli/SKILL.md teaches when to reach for check vs. saved
  monitors.

Version bumped to v1.2.0 (new top-level command = semver minor).
@thibaultleouay thibaultleouay merged commit aeae431 into main May 13, 2026
2 checks passed
@thibaultleouay thibaultleouay deleted the feat/check branch May 13, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant