From 9fcd2ecb491c8a4e1d0959fb3a58b1ba86b8c517 Mon Sep 17 00:00:00 2001 From: Thibault Le Ouay Date: Mon, 8 Jun 2026 15:48:53 +0200 Subject: [PATCH] docs: fix cli and heading (#2249) --- .../src/content/mdx-components/heading.tsx | 17 +- .../pages/docs/reference/cli-reference.mdx | 352 +++++++++++------- 2 files changed, 230 insertions(+), 139 deletions(-) diff --git a/apps/web/src/content/mdx-components/heading.tsx b/apps/web/src/content/mdx-components/heading.tsx index f51e588df..1f3eefed2 100644 --- a/apps/web/src/content/mdx-components/heading.tsx +++ b/apps/web/src/content/mdx-components/heading.tsx @@ -11,9 +11,22 @@ export function slugify(str: string) { .replace(/--+/g, "-"); // Replace multiple - with single - } +function flattenChildren(children: React.ReactNode): string { + if (children == null || typeof children === "boolean") return ""; + if (typeof children === "string" || typeof children === "number") + return String(children); + if (Array.isArray(children)) return children.map(flattenChildren).join(""); + if (React.isValidElement(children)) + return flattenChildren( + (children.props as { children?: React.ReactNode }).children, + ); + return ""; +} + export function createHeading(level: number) { const Heading = ({ children }: { children: React.ReactNode }) => { - const slug = slugify(children?.toString() ?? ""); + const text = flattenChildren(children); + const slug = slugify(text); return React.createElement( `h${level}`, { id: slug }, @@ -22,7 +35,7 @@ export function createHeading(level: number) { href: `#${slug}`, key: `link-${slug}`, className: "anchor", - "aria-label": `Link to section: ${children?.toString()}`, + "aria-label": `Link to section: ${text}`, }), ], children, diff --git a/apps/web/src/content/pages/docs/reference/cli-reference.mdx b/apps/web/src/content/pages/docs/reference/cli-reference.mdx index b85d194f9..b70ff6ccd 100644 --- a/apps/web/src/content/pages/docs/reference/cli-reference.mdx +++ b/apps/web/src/content/pages/docs/reference/cli-reference.mdx @@ -14,12 +14,40 @@ $ openstatus [GLOBAL FLAGS] [COMMAND] [COMMAND FLAGS] [ARGUMENTS...] Global flags: -| Name | Description | Default value | Environment variables | -|------------------|---------------------------|:-------------:|:---------------------:| -| `--json` | Output results as JSON | `false` | *none* | -| `--no-color` | Disable colored output | `false` | *none* | -| `--quiet` (`-q`) | Suppress non-error output | `false` | *none* | -| `--debug` | Enable debug output | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|------------------|---------------------------|------|:-------------:|:---------------------:| +| `--json` | Output results as JSON | bool | `false` | *none* | +| `--no-color` | Disable colored output | bool | `false` | *none* | +| `--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 \1 +> 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`) @@ -49,12 +77,12 @@ $ openstatus [GLOBAL FLAGS] monitors apply [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------------------|:-----------------:|:----------------------:| -| `--config="…"` (`-c`) | The configuration file containing monitor information | `openstatus.yaml` | *none* | -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--auto-accept` (`-y`) | Automatically accept the prompt | `false` | *none* | -| `--dry-run` (`-n`) | Show what would be changed without applying | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------------------|--------|:-------------------:|:----------------------:| +| `--config="…"` (`-c`) | The configuration file containing monitor information | string | `"openstatus.yaml"` | *none* | +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--auto-accept` (`-y`) | Automatically accept the prompt | bool | `false` | *none* | +| `--dry-run` (`-n`) | Show what would be changed without applying | bool | `false` | *none* | ### `monitors create` subcommand @@ -73,17 +101,17 @@ $ openstatus [GLOBAL FLAGS] monitors create [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------------------|:-----------------:|:----------------------:| -| `--config="…"` (`-c`) | The configuration file containing monitor information | `openstatus.yaml` | *none* | -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--auto-accept` (`-y`) | Automatically accept the prompt | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------------------|--------|:-------------------:|:----------------------:| +| `--config="…"` (`-c`) | The configuration file containing monitor information | string | `"openstatus.yaml"` | *none* | +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--auto-accept` (`-y`) | Automatically accept the prompt | bool | `false` | *none* | ### `monitors delete` subcommand Delete a monitor. -> openstatus monitors delete MonitorID +> openstatus monitors delete \1 > openstatus monitors delete 12345 -y Usage: @@ -94,10 +122,10 @@ $ openstatus [GLOBAL FLAGS] monitors delete [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|---------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--auto-accept` (`-y`) | Automatically accept the prompt | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|---------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--auto-accept` (`-y`) | Automatically accept the prompt | bool | `false` | *none* | ### `monitors import` subcommand @@ -116,16 +144,16 @@ $ openstatus [GLOBAL FLAGS] monitors import [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-----------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--output="…"` (`-o`) | The output file name | `openstatus.yaml` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--output="…"` (`-o`) | The output file name | string | `"openstatus.yaml"` | *none* | ### `monitors info` subcommand Get a monitor information. -> openstatus monitors info MonitorID +> openstatus monitors info \1 > openstatus monitors info 12345 > openstatus monitors info 12345 --time-range 7d @@ -139,10 +167,10 @@ $ openstatus [GLOBAL FLAGS] monitors info [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|----------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--time-range="…"` | Time range for summary metrics (1d, 7d, 14d) | `1d` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|----------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--time-range="…"` | Time range for summary metrics (1d, 7d, 14d) | string | `"1d"` | *none* | ### `monitors list` subcommand @@ -161,16 +189,65 @@ $ openstatus [GLOBAL FLAGS] monitors list [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------|:-------------:|:----------------------:| -| `--all` | List all monitors including inactive ones | `false` | *none* | -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------|--------|:-------------:|:----------------------:| +| `--all` | List all monitors including inactive ones | bool | `false` | *none* | +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | + +### `monitors logs` subcommand + +List HTTP response logs for a monitor. + +> openstatus monitors logs \1 +> openstatus monitors logs 12345 +> openstatus monitors logs 12345 --limit 10 +> openstatus monitors logs 12345 --limit 5 --offset 5 +> openstatus monitors logs 12345 --from 2026-05-06T00:00:00Z --to 2026-05-07T00:00:00Z + +List HTTP response logs for a monitor from the 14-day retention window. Supports pagination and time filtering. + +Usage: + +```bash +$ openstatus [GLOBAL FLAGS] monitors logs [COMMAND FLAGS] [ARGUMENTS...] +``` + +The following flags are supported: + +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--limit="…"` | Maximum number of logs to return (1-100) | int | `0` | *none* | +| `--offset="…"` | Number of logs to skip for pagination | int | `0` | *none* | +| `--from="…"` | Start of time window (RFC 3339 format) | string | | *none* | +| `--to="…"` | End of time window (RFC 3339 format) | string | | *none* | + +### `monitors log-info` subcommand + +Get detailed HTTP response log for a monitor. + +> openstatus monitors log-info \1 \1 +> openstatus monitors log-info 12345 abc-def-ghi + +Fetch a single HTTP response log with full details including timing phases, response headers, and assertion results. + +Usage: + +```bash +$ openstatus [GLOBAL FLAGS] monitors log-info [COMMAND FLAGS] [ARGUMENTS...] +``` + +The following flags are supported: + +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `monitors trigger` subcommand Trigger a monitor execution. -> openstatus monitors trigger MonitorID +> openstatus monitors trigger \1 > openstatus monitors trigger 12345 Trigger a monitor execution on demand. This command allows you to launch your tests on demand. @@ -183,9 +260,9 @@ $ openstatus [GLOBAL FLAGS] monitors trigger [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `status-report` command (aliases: `sr`) @@ -212,17 +289,17 @@ $ openstatus [GLOBAL FLAGS] status-report list [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|--------------------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--status="…"` | Filter by status (investigating, identified, monitoring, resolved) | | *none* | -| `--limit="…"` | Maximum number of reports to return (1-100) | `0` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|--------------------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--status="…"` | Filter by status (investigating, identified, monitoring, resolved) | string | | *none* | +| `--limit="…"` | Maximum number of reports to return (1-100) | int | `0` | *none* | ### `status-report info` subcommand Get status report details. -> openstatus status-report info ReportID +> openstatus status-report info \1 > openstatus status-report info 12345 Usage: @@ -233,9 +310,9 @@ $ openstatus [GLOBAL FLAGS] status-report info [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `status-report create` subcommand @@ -251,22 +328,22 @@ $ openstatus [GLOBAL FLAGS] status-report create [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|------------------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--title="…"` | Title of the status report | | *none* | -| `--status="…"` | Initial status (investigating, identified, monitoring, resolved) | | *none* | -| `--message="…"` | Initial message describing the incident | | *none* | -| `--page-id="…"` | Status page ID to associate with this report | | *none* | -| `--component-ids="…"` | Comma-separated page component IDs | | *none* | -| `--notify` | Notify subscribers about this status report | `false` | *none* | -| `--date="…"` | Date when the event occurred (RFC 3339 format, defaults to now) | | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|------------------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--title="…"` | Title of the status report | string | | *none* | +| `--status="…"` | Initial status (investigating, identified, monitoring, resolved) | string | | *none* | +| `--message="…"` | Initial message describing the incident | string | | *none* | +| `--page-id="…"` | Status page ID to associate with this report | string | | *none* | +| `--component-ids="…"` | Comma-separated page component IDs | string | | *none* | +| `--notify` | Notify subscribers about this status report | bool | `false` | *none* | +| `--date="…"` | Date when the event occurred (RFC 3339 format, defaults to now) | string | | *none* | ### `status-report update` subcommand Update status report metadata. -> openstatus status-report update ReportID [--title "New title"] [--component-ids id1,id2] +> openstatus status-report update \1 [--title "New title"] [--component-ids id1,id2] Usage: @@ -276,17 +353,17 @@ $ openstatus [GLOBAL FLAGS] status-report update [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--title="…"` | New title for the report | | *none* | -| `--component-ids="…"` | Comma-separated page component IDs (replaces existing list) | | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--title="…"` | New title for the report | string | | *none* | +| `--component-ids="…"` | Comma-separated page component IDs (replaces existing list) | string | | *none* | ### `status-report delete` subcommand Delete a status report. -> openstatus status-report delete ReportID +> openstatus status-report delete \1 > openstatus status-report delete 12345 -y Usage: @@ -297,16 +374,16 @@ $ openstatus [GLOBAL FLAGS] status-report delete [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|---------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--auto-accept` (`-y`) | Automatically accept the prompt | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|---------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--auto-accept` (`-y`) | Automatically accept the prompt | bool | `false` | *none* | ### `status-report add-update` subcommand Add an update to a status report. -> openstatus status-report add-update ReportID --status resolved --message "Issue has been resolved" +> openstatus status-report add-update \1 --status resolved --message "Issue has been resolved" Usage: @@ -316,13 +393,13 @@ $ openstatus [GLOBAL FLAGS] status-report add-update [COMMAND FLAGS] [ARGUMENTS. The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|--------------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--status="…"` | New status (investigating, identified, monitoring, resolved) | | *none* | -| `--message="…"` | Message describing what changed | | *none* | -| `--date="…"` | Date for the update (RFC 3339 format, defaults to now) | | *none* | -| `--notify` | Notify subscribers about this update | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|--------------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--status="…"` | New status (investigating, identified, monitoring, resolved) | string | | *none* | +| `--message="…"` | Message describing what changed | string | | *none* | +| `--date="…"` | Date for the update (RFC 3339 format, defaults to now) | string | | *none* | +| `--notify` | Notify subscribers about this update | bool | `false` | *none* | ### `maintenance` command (aliases: `mt`) @@ -349,17 +426,17 @@ $ openstatus [GLOBAL FLAGS] maintenance list [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|--------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--page-id="…"` | Filter by status page ID | | *none* | -| `--limit="…"` | Maximum number of maintenances to return (1-100) | `0` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|--------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--page-id="…"` | Filter by status page ID | string | | *none* | +| `--limit="…"` | Maximum number of maintenances to return (1-100) | int | `0` | *none* | ### `maintenance info` subcommand Get maintenance window details. -> openstatus maintenance info MaintenanceID +> openstatus maintenance info \1 > openstatus maintenance info 12345 Usage: @@ -370,9 +447,9 @@ $ openstatus [GLOBAL FLAGS] maintenance info [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `maintenance create` subcommand @@ -388,22 +465,22 @@ $ openstatus [GLOBAL FLAGS] maintenance create [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|--------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--title="…"` | Title of the maintenance | | *none* | -| `--message="…"` | Message describing the maintenance | | *none* | -| `--from="…"` | Start time of the maintenance window (RFC 3339 format) | | *none* | -| `--to="…"` | End time of the maintenance window (RFC 3339 format) | | *none* | -| `--page-id="…"` | Status page ID to associate with this maintenance | | *none* | -| `--component-ids="…"` | Comma-separated page component IDs | | *none* | -| `--notify` | Notify subscribers about this maintenance | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|--------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--title="…"` | Title of the maintenance | string | | *none* | +| `--message="…"` | Message describing the maintenance | string | | *none* | +| `--from="…"` | Start time of the maintenance window (RFC 3339 format) | string | | *none* | +| `--to="…"` | End time of the maintenance window (RFC 3339 format) | string | | *none* | +| `--page-id="…"` | Status page ID to associate with this maintenance | string | | *none* | +| `--component-ids="…"` | Comma-separated page component IDs | string | | *none* | +| `--notify` | Notify subscribers about this maintenance | bool | `false` | *none* | ### `maintenance update` subcommand Update a maintenance window. -> openstatus maintenance update MaintenanceID [--title "New title"] [--message "New message"] [--from ...] [--to ...] +> openstatus maintenance update \1 [--title "New title"] [--message "New message"] [--from ...] [--to ...] Usage: @@ -413,20 +490,20 @@ $ openstatus [GLOBAL FLAGS] maintenance update [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--title="…"` | New title for the maintenance | | *none* | -| `--message="…"` | New message for the maintenance | | *none* | -| `--from="…"` | New start time (RFC 3339 format) | | *none* | -| `--to="…"` | New end time (RFC 3339 format) | | *none* | -| `--component-ids="…"` | Comma-separated page component IDs (replaces existing list) | | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--title="…"` | New title for the maintenance | string | | *none* | +| `--message="…"` | New message for the maintenance | string | | *none* | +| `--from="…"` | New start time (RFC 3339 format) | string | | *none* | +| `--to="…"` | New end time (RFC 3339 format) | string | | *none* | +| `--component-ids="…"` | Comma-separated page component IDs (replaces existing list) | string | | *none* | ### `maintenance delete` subcommand Delete a maintenance window. -> openstatus maintenance delete MaintenanceID +> openstatus maintenance delete \1 > openstatus maintenance delete 12345 -y Usage: @@ -437,10 +514,10 @@ $ openstatus [GLOBAL FLAGS] maintenance delete [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|---------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--auto-accept` (`-y`) | Automatically accept the prompt | `false` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|---------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--auto-accept` (`-y`) | Automatically accept the prompt | bool | `false` | *none* | ### `status-page` command (aliases: `sp`) @@ -467,16 +544,16 @@ $ openstatus [GLOBAL FLAGS] status-page list [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--limit="…"` | Maximum number of pages to return (1-100) | `0` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--limit="…"` | Maximum number of pages to return (1-100) | int | `0` | *none* | ### `status-page info` subcommand Get status page details. -> openstatus status-page info PageID +> openstatus status-page info \1 > openstatus status-page info 12345 Usage: @@ -487,9 +564,9 @@ $ openstatus [GLOBAL FLAGS] status-page info [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `notification` command (aliases: `n`) @@ -516,16 +593,16 @@ $ openstatus [GLOBAL FLAGS] notification list [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|---------------------------------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--limit="…"` | Maximum number of notifications to return (1-100) | `0` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|---------------------------------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--limit="…"` | Maximum number of notifications to return (1-100) | int | `0` | *none* | ### `notification info` subcommand Get notification details. -> openstatus notification info NotificationID +> openstatus notification info \1 > openstatus notification info 12345 Usage: @@ -536,9 +613,9 @@ $ openstatus [GLOBAL FLAGS] notification info [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `run` command (aliases: `r`) @@ -557,10 +634,10 @@ $ openstatus [GLOBAL FLAGS] run [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:------------------------:|:----------------------:| -| `--config="…"` | The configuration file | `config.openstatus.yaml` | *none* | -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:--------------------------:|:----------------------:| +| `--config="…"` | The configuration file | string | `"config.openstatus.yaml"` | *none* | +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `whoami` command (aliases: `w`) @@ -578,9 +655,9 @@ $ openstatus [GLOBAL FLAGS] whoami [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------|:-------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|-----------------------------|--------|:-------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | ### `login` command @@ -632,7 +709,8 @@ $ openstatus [GLOBAL FLAGS] terraform generate [COMMAND FLAGS] [ARGUMENTS...] The following flags are supported: -| Name | Description | Default value | Environment variables | -|-----------------------------|-----------------------------------------|:-------------------------:|:----------------------:| -| `--access-token="…"` (`-t`) | openstatus API Access Token | | `OPENSTATUS_API_TOKEN` | -| `--output-dir="…"` (`-o`) | Directory to write Terraform files into | `./openstatus-terraform/` | *none* | +| Name | Description | Type | Default value | Environment variables | +|-----------------------------|------------------------------------------|--------|:---------------------------:|:----------------------:| +| `--access-token="…"` (`-t`) | openstatus API Access Token | string | | `OPENSTATUS_API_TOKEN` | +| `--output-dir="…"` (`-o`) | Directory to write Terraform files into | string | `"./openstatus-terraform/"` | *none* | +| `--force` (`-f`) | Overwrite existing files in --output-dir | bool | `false` | *none* | -- 2.51.2