Finished migration to commander.js, updated table rendering engine to use code blocks for resource Guids.
All checks were successful
build / build (push) Successful in 8s

This commit is contained in:
2026-03-10 07:41:47 +01:00
parent 47a8b19748
commit 047e342842
9 changed files with 90 additions and 138 deletions

View File

@@ -2,26 +2,41 @@
The `sk-tools` package provides generic CLI utilities not tied to a specific cloud provider.
## Global Options
These options apply to all commands unless stated otherwise:
- `--query`, `-q` <jmespath> - Apply JMESPath filter before output rendering.
- `--output`, `-o` <format> - Output format: `table|t|alignedtable|at|prettytable|pt|tsv`.
- `--columns`, `-C` <definition> - Column selection for table outputs:
- `col1` - Select column (case-insensitive match), keep raw header label.
- `col1:` - Select column (case-insensitive match), use auto-generated header label.
- `col1: Label 1` - Select column (case-insensitive match), use custom header label.
- Prefix token with `=` for exact column-name match: `=col1`, `=col1:`, `=col1:Label`.
- Tokens are comma-separated and rendered in the specified order.
- `--help`, `-h` - Show help.
## Table
**Command name:** `table`
**Command name:** `table` (alias: `t`)
**Usage:** `sk-tools table [--from|-F <json|csv|tsv>] [--columns|-C <definition>] [global options]`
**Options:**
- `--from`, `-F` <json|csv|tsv> - Input format read from stdin. Default: `json`.
- `--columns`, `-C` <definition> - Column definition. Possible values:
- `col1` - Select column (case-insensitive match), keep raw header label.
- `col1:` - Select column (case-insensitive match), use auto-generated header label.
- `col1: Label 1` - Select column (case-insensitive match), use custom header label.
- Prefix token with `=` for exact column-name match: `=col1`, `=col1:`, `=col1:Label`.
- Tokens are comma-separated and rendered in the specified order.
**Global options:**
- `--query`, `-q` <jmespath> - JMESPath filter applied before rendering.
- `--output`, `-o` <format> - Output format: `table|t|alignedtable|at|prettytable|pt|tsv`.
- `--help`, `-h` - Show help.
- `--columns`, `-C` <definition> - Column definition (see global options).
**Description:** The `table` command transforms stdin data into tabular output. It accepts JSON, CSV, or TSV input and renders either Markdown table variants or TSV output.
## Table Info
**Command name:** `table-info` (alias: `ti`)
**Usage:** `sk-tools table-info [--from|-F <json|csv|tsv>]`
**Options:**
- `--from`, `-F` <json|csv|tsv> - Input format read from stdin. Default: `json`.
**Description:** The `table-info` command reads stdin data and prints basic diagnostics: number of rows, number of columns, and inferred type for each column.