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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
dist/
.env
.claude/
plan.md
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ iwr https://raw.githubusercontent.com/openstatusHQ/cli/refs/heads/main/install.p
## Quick Start

```bash
# Run a one-shot HTTP check against a URL from 28 global regions (no auth)
openstatus check https://openstat.us

# Authenticate with your API token
openstatus login

Expand All @@ -44,10 +47,26 @@ openstatus status-report create --title "API degradation" --status investigating
openstatus run
```

## Global Speed Check

`openstatus check <URL>` runs a one-shot HTTP check from 28 global probe
regions via the public OpenStatus speed checker. No API token required.

```bash
openstatus check https://openstat.us
openstatus check https://openstat.us -X POST -H 'Authorization: Bearer …' -d '{"ping":true}'
openstatus check https://openstat.us -d @payload.json
openstatus check https://openstat.us --timing # adds DNS/Connection/TLS/TTFB/Transfer columns
openstatus check https://openstat.us --json | jq '.summary'
```

Rate limit: 3 requests per 60 seconds.

## Commands

| Command | Alias | Description |
|---------|-------|-------------|
| `check` | `c` | Run an HTTP check against a URL from 28 global regions (no auth) |
| `login` / `logout` | | Authenticate with the OpenStatus API |
| `whoami` | `w` | Show current workspace info |
| `monitors` | `m` | List, inspect, trigger, import, and apply monitors |
Expand Down
28 changes: 28 additions & 0 deletions docs/openstatus-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@ Global flags:
| `--quiet` (`-q`) | Suppress non-error output | bool | `false` | *none* |
| `--debug` | Enable debug output | bool | `false` | *none* |

### `check` command (aliases: `c`)

Run an HTTP check against a URL from 28 global regions.

> openstatus check <URL>
> openstatus check https://openstat.us
> openstatus check https://openstat.us -X POST -H 'Authorization: Bearer …' -d '{"ping":true}'
> openstatus check https://openstat.us -d @payload.json
> openstatus check https://openstat.us --timing
> openstatus check https://openstat.us --json | jq '.summary'

Run a one-shot HTTP check against a URL from 28 global regions. The check is executed by the public OpenStatus speed checker. No API token is required. Results stream to the terminal as they arrive from each region. Output is sorted in the order regions report back (roughly fastest first). Pass --timing to see DNS/Connection/TLS/TTFB/Transfer phase breakdowns. Pass --json for a machine-readable single object including all phase data. Rate limit: 3 requests per 60 seconds.

Usage:

```bash
$ openstatus [GLOBAL FLAGS] check [COMMAND FLAGS] [ARGUMENTS...]
```

The following flags are supported:

| Name | Description | Type | Default value | Environment variables |
|-----------------------|----------------------------------------------------------|--------|:-------------:|:---------------------:|
| `--method="…"` (`-X`) | HTTP method | string | `"GET"` | *none* |
| `--header="…"` (`-H`) | Header in "Key: Value" form (repeatable) | string | | *none* |
| `--body="…"` (`-d`) | Request body. Use @filename to read a file, @- for stdin | string | | *none* |
| `--timing` | Show DNS/Connection/TLS/TTFB/Transfer phases | bool | `false` | *none* |

### `monitors` command (aliases: `m`)

Manage your monitors.
Expand Down
90 changes: 90 additions & 0 deletions docs/openstatus.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,96 @@ T}@T{
\f[I]none\f[R]
T}
.TE
.SS \f[CR]check\f[R] command (aliases: \f[CR]c\f[R])
Run an HTTP check against a URL from 28 global regions.
.RS
.PP
openstatus check openstatus check https://openstat.us openstatus check
https://openstat.us \-X POST \-H `Authorization: Bearer \&...' \-d
`{\(lqping\(rq:true}' openstatus check https://openstat.us \-d
\(atpayload.json openstatus check https://openstat.us \(entiming
openstatus check https://openstat.us \(enjson | jq `.summary'
.RE
.PP
Run a one\-shot HTTP check against a URL from 28 global regions.
The check is executed by the public OpenStatus speed checker.
No API token is required.
Results stream to the terminal as they arrive from each region.
Output is sorted in the order regions report back (roughly fastest
first).
Pass \(entiming to see DNS/Connection/TLS/TTFB/Transfer phase
breakdowns.
Pass \(enjson for a machine\-readable single object including all phase
data.
Rate limit: 3 requests per 60 seconds.
.PP
Usage:
.IP
.EX
$ openstatus [GLOBAL FLAGS] check [COMMAND FLAGS] [ARGUMENTS...]
.EE
.PP
The following flags are supported:
.PP
.TS
tab(@);
lw(12.7n) lw(32.0n) lw(4.4n) cw(8.3n) cw(12.7n).
T{
Name
T}@T{
Description
T}@T{
Type
T}@T{
Default value
T}@T{
Environment variables
T}
_
T{
\f[CR]\-\-method=\(dq\&...\(dq\f[R] (\f[CR]\-X\f[R])
T}@T{
HTTP method
T}@T{
string
T}@T{
\f[CR]\(dqGET\(dq\f[R]
T}@T{
\f[I]none\f[R]
T}
T{
\f[CR]\-\-header=\(dq\&...\(dq\f[R] (\f[CR]\-H\f[R])
T}@T{
Header in \(lqKey: Value\(rq form (repeatable)
T}@T{
string
T}@T{
T}@T{
\f[I]none\f[R]
T}
T{
\f[CR]\-\-body=\(dq\&...\(dq\f[R] (\f[CR]\-d\f[R])
T}@T{
Request body.
Use \(atfilename to read a file, \(at\- for stdin
T}@T{
string
T}@T{
T}@T{
\f[I]none\f[R]
T}
T{
\f[CR]\-\-timing\f[R]
T}@T{
Show DNS/Connection/TLS/TTFB/Transfer phases
T}@T{
bool
T}@T{
\f[CR]false\f[R]
T}@T{
\f[I]none\f[R]
T}
.TE
.SS \f[CR]monitors\f[R] command (aliases: \f[CR]m\f[R])
Manage your monitors.
.PP
Expand Down
5 changes: 5 additions & 0 deletions internal/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const APIBaseURL = "https://api.openstatus.dev/v1"

const ConnectBaseURL = "https://api.openstatus.dev/rpc"

// PlayCheckerURL is the public Speed Checker endpoint backing the `check`
// command. The www. prefix is intentional: the bare openstatus.dev host
// returns a 308 redirect that adds latency to every call.
const PlayCheckerURL = "https://www.openstatus.dev/play/checker/api"

var DefaultHTTPClient = &http.Client{
Timeout: 30 * time.Second,
}
Expand Down
Loading
Loading