CLI Reference
Commands
Section titled “Commands”thymian sampler checkthymian sampler initthymian sampler show SELECTORthymian sampler syncthymian sampler validate
thymian sampler check
Section titled “thymian sampler check”Verify that all sampled transactions can be executed against the live API.
USAGE $ thymian sampler check [--json] [--verbose] [--debug] [--guidance] [--log-level trace|debug|info|warn|error|silent] [--config <value>] [--autoload] [--plugin <value>...] [--option <plugin>.<path>=<value>...] [--spec type:location...] [--traffic type:location...] [--rule-set package-name...] [--rule-severity off|error|warn|hint] [--sort-reports-by rule|endpoint|severity] [--timeout <value>] [--idle-timeout <value>] [--cwd <value>] [--suppress-feedback] [--validate-specs] [--incremental] [--target-url <value>]
FLAGS --cwd=<value> [default: /home/runner/work/thymian/thymian/packages/plugin-sampler] Set current working directory. --[no-]incremental After each transaction that is not passed, print how to shape it with a hook. --target-url=<value> Override the target URL for all check requests. When set, all requests are sent to this origin instead of the servers defined in the specification.
BASE FLAGS --[no-]autoload Automatically load and initialize plugins from the configuration file. --config=<value> Path to thymian configuration file. --debug Run thymian in debug mode. --[no-]guidance Show guidance hints on stderr. Defaults to true for TTY, false for non-TTY. --idle-timeout=<value> [default: 500] Set the duration in ms to waited for events and actions when closing Thymian. --log-level=<option> Set log level (trace, debug, info, warn, error, silent). When set to trace, all events are traced. <options: trace|debug|info|warn|error|silent> --option=<plugin>.<path>=<value>... Override plugin options. Format: <pluginName>.<property.path>=<value>. Supports nested paths (dot notation) and array indices (bracket notation). --plugin=<value>... [default: ] Load an additional plugin package or relative plugin path before running the command. Can be used multiple times. --rule-set=package-name... Add a rule set package to use for validation (e.g. @thymian/rules-rfc-9110). Can be specified multiple times. --rule-severity=<option> Set the minimum rule severity threshold for rule loading (off, error, warn, hint). Only rules at or above this severity are loaded. <options: off|error|warn|hint> --sort-reports-by=<option> Group report findings by rule, endpoint, or severity (default: endpoint). Affects the CLI report and any configured reporter that supports grouping. <options: rule|endpoint|severity> --spec=type:location... Specification input in the format <type>:<location> (e.g. openapi:./openapi.yaml). --suppress-feedback Suppress feedback messages from Thymian. --timeout=<value> [default: 10000] Set the duration in ms to wait for anything that happens in Thymian. --traffic=type:location... Traffic input in the format <type>:<location> (e.g. har:./traffic.har). --[no-]validate-specs Validate included specifications and fail on schema validation errors. --verbose Run thymian in verbose mode.
GLOBAL FLAGS --json Format output as json.
DESCRIPTION Verify that all sampled transactions can be executed against the live API.
EXAMPLES $ thymian sampler check
$ thymian sampler check --target-url http://localhost:8080
$ thymian sampler check --incremental
$ thymian sampler check --jsonSee code: src/commands/sampler/check.ts
thymian sampler init
Section titled “thymian sampler init”Set up the sampler for editor support: generate the committed type surface and scaffold a tsconfig.
USAGE $ thymian sampler init [--json] [--verbose] [--debug] [--guidance] [--log-level trace|debug|info|warn|error|silent] [--config <value>] [--autoload] [--plugin <value>...] [--option <plugin>.<path>=<value>...] [--spec type:location...] [--traffic type:location...] [--rule-set package-name...] [--rule-severity off|error|warn|hint] [--sort-reports-by rule|endpoint|severity] [--timeout <value>] [--idle-timeout <value>] [--cwd <value>] [--suppress-feedback] [--validate-specs]
FLAGS --cwd=<value> [default: /home/runner/work/thymian/thymian/packages/plugin-sampler] Set current working directory.
BASE FLAGS --[no-]autoload Automatically load and initialize plugins from the configuration file. --config=<value> Path to thymian configuration file. --debug Run thymian in debug mode. --[no-]guidance Show guidance hints on stderr. Defaults to true for TTY, false for non-TTY. --idle-timeout=<value> [default: 500] Set the duration in ms to waited for events and actions when closing Thymian. --log-level=<option> Set log level (trace, debug, info, warn, error, silent). When set to trace, all events are traced. <options: trace|debug|info|warn|error|silent> --option=<plugin>.<path>=<value>... Override plugin options. Format: <pluginName>.<property.path>=<value>. Supports nested paths (dot notation) and array indices (bracket notation). --plugin=<value>... [default: ] Load an additional plugin package or relative plugin path before running the command. Can be used multiple times. --rule-set=package-name... Add a rule set package to use for validation (e.g. @thymian/rules-rfc-9110). Can be specified multiple times. --rule-severity=<option> Set the minimum rule severity threshold for rule loading (off, error, warn, hint). Only rules at or above this severity are loaded. <options: off|error|warn|hint> --sort-reports-by=<option> Group report findings by rule, endpoint, or severity (default: endpoint). Affects the CLI report and any configured reporter that supports grouping. <options: rule|endpoint|severity> --spec=type:location... Specification input in the format <type>:<location> (e.g. openapi:./openapi.yaml). --suppress-feedback Suppress feedback messages from Thymian. --timeout=<value> [default: 10000] Set the duration in ms to wait for anything that happens in Thymian. --traffic=type:location... Traffic input in the format <type>:<location> (e.g. har:./traffic.har). --[no-]validate-specs Validate included specifications and fail on schema validation errors. --verbose Run thymian in verbose mode.
GLOBAL FLAGS --json Format output as json.
DESCRIPTION Set up the sampler for editor support: generate the committed type surface and scaffold a tsconfig.
EXAMPLES $ thymian sampler initSee code: src/commands/sampler/init.ts
thymian sampler show SELECTOR
Section titled “thymian sampler show SELECTOR”Print the freshly generated request for one transaction selector.
USAGE $ thymian sampler show SELECTOR [--json] [--verbose] [--debug] [--guidance] [--log-level trace|debug|info|warn|error|silent] [--config <value>] [--autoload] [--plugin <value>...] [--option <plugin>.<path>=<value>...] [--spec type:location...] [--traffic type:location...] [--rule-set package-name...] [--rule-severity off|error|warn|hint] [--sort-reports-by rule|endpoint|severity] [--timeout <value>] [--idle-timeout <value>] [--cwd <value>] [--suppress-feedback] [--validate-specs]
ARGUMENTS SELECTOR The transaction selector, as METHOD path [(requestMediaType)] -> status [(responseMediaType)].
FLAGS --cwd=<value> [default: /home/runner/work/thymian/thymian/packages/plugin-sampler] Set current working directory.
BASE FLAGS --[no-]autoload Automatically load and initialize plugins from the configuration file. --config=<value> Path to thymian configuration file. --debug Run thymian in debug mode. --[no-]guidance Show guidance hints on stderr. Defaults to true for TTY, false for non-TTY. --idle-timeout=<value> [default: 500] Set the duration in ms to waited for events and actions when closing Thymian. --log-level=<option> Set log level (trace, debug, info, warn, error, silent). When set to trace, all events are traced. <options: trace|debug|info|warn|error|silent> --option=<plugin>.<path>=<value>... Override plugin options. Format: <pluginName>.<property.path>=<value>. Supports nested paths (dot notation) and array indices (bracket notation). --plugin=<value>... [default: ] Load an additional plugin package or relative plugin path before running the command. Can be used multiple times. --rule-set=package-name... Add a rule set package to use for validation (e.g. @thymian/rules-rfc-9110). Can be specified multiple times. --rule-severity=<option> Set the minimum rule severity threshold for rule loading (off, error, warn, hint). Only rules at or above this severity are loaded. <options: off|error|warn|hint> --sort-reports-by=<option> Group report findings by rule, endpoint, or severity (default: endpoint). Affects the CLI report and any configured reporter that supports grouping. <options: rule|endpoint|severity> --spec=type:location... Specification input in the format <type>:<location> (e.g. openapi:./openapi.yaml). --suppress-feedback Suppress feedback messages from Thymian. --timeout=<value> [default: 10000] Set the duration in ms to wait for anything that happens in Thymian. --traffic=type:location... Traffic input in the format <type>:<location> (e.g. har:./traffic.har). --[no-]validate-specs Validate included specifications and fail on schema validation errors. --verbose Run thymian in verbose mode.
GLOBAL FLAGS --json Format output as json.
DESCRIPTION Print the freshly generated request for one transaction selector.
EXAMPLES $ thymian sampler show "GET /launches -> 200 (application/json)"
$ thymian sampler show "DELETE /astronauts/{id} -> 204" --jsonSee code: src/commands/sampler/show.ts
thymian sampler sync
Section titled “thymian sampler sync”Regenerate the committed sampler types from the current API description.
USAGE $ thymian sampler sync [--json] [--verbose] [--debug] [--guidance] [--log-level trace|debug|info|warn|error|silent] [--config <value>] [--autoload] [--plugin <value>...] [--option <plugin>.<path>=<value>...] [--spec type:location...] [--traffic type:location...] [--rule-set package-name...] [--rule-severity off|error|warn|hint] [--sort-reports-by rule|endpoint|severity] [--timeout <value>] [--idle-timeout <value>] [--cwd <value>] [--suppress-feedback] [--validate-specs] [--check]
FLAGS --check Report whether regeneration would change the committed types, and write nothing. Exits non-zero if it would. --cwd=<value> [default: /home/runner/work/thymian/thymian/packages/plugin-sampler] Set current working directory.
BASE FLAGS --[no-]autoload Automatically load and initialize plugins from the configuration file. --config=<value> Path to thymian configuration file. --debug Run thymian in debug mode. --[no-]guidance Show guidance hints on stderr. Defaults to true for TTY, false for non-TTY. --idle-timeout=<value> [default: 500] Set the duration in ms to waited for events and actions when closing Thymian. --log-level=<option> Set log level (trace, debug, info, warn, error, silent). When set to trace, all events are traced. <options: trace|debug|info|warn|error|silent> --option=<plugin>.<path>=<value>... Override plugin options. Format: <pluginName>.<property.path>=<value>. Supports nested paths (dot notation) and array indices (bracket notation). --plugin=<value>... [default: ] Load an additional plugin package or relative plugin path before running the command. Can be used multiple times. --rule-set=package-name... Add a rule set package to use for validation (e.g. @thymian/rules-rfc-9110). Can be specified multiple times. --rule-severity=<option> Set the minimum rule severity threshold for rule loading (off, error, warn, hint). Only rules at or above this severity are loaded. <options: off|error|warn|hint> --sort-reports-by=<option> Group report findings by rule, endpoint, or severity (default: endpoint). Affects the CLI report and any configured reporter that supports grouping. <options: rule|endpoint|severity> --spec=type:location... Specification input in the format <type>:<location> (e.g. openapi:./openapi.yaml). --suppress-feedback Suppress feedback messages from Thymian. --timeout=<value> [default: 10000] Set the duration in ms to wait for anything that happens in Thymian. --traffic=type:location... Traffic input in the format <type>:<location> (e.g. har:./traffic.har). --[no-]validate-specs Validate included specifications and fail on schema validation errors. --verbose Run thymian in verbose mode.
GLOBAL FLAGS --json Format output as json.
DESCRIPTION Regenerate the committed sampler types from the current API description.
EXAMPLES $ thymian sampler sync
$ thymian sampler sync --checkSee code: src/commands/sampler/sync.ts
thymian sampler validate
Section titled “thymian sampler validate”Check the sampler hooks against the current API description, and the committed types against both.
USAGE $ thymian sampler validate [--json] [--verbose] [--debug] [--guidance] [--log-level trace|debug|info|warn|error|silent] [--config <value>] [--autoload] [--plugin <value>...] [--option <plugin>.<path>=<value>...] [--spec type:location...] [--traffic type:location...] [--rule-set package-name...] [--rule-severity off|error|warn|hint] [--sort-reports-by rule|endpoint|severity] [--timeout <value>] [--idle-timeout <value>] [--cwd <value>] [--suppress-feedback] [--validate-specs]
FLAGS --cwd=<value> [default: /home/runner/work/thymian/thymian/packages/plugin-sampler] Set current working directory.
BASE FLAGS --[no-]autoload Automatically load and initialize plugins from the configuration file. --config=<value> Path to thymian configuration file. --debug Run thymian in debug mode. --[no-]guidance Show guidance hints on stderr. Defaults to true for TTY, false for non-TTY. --idle-timeout=<value> [default: 500] Set the duration in ms to waited for events and actions when closing Thymian. --log-level=<option> Set log level (trace, debug, info, warn, error, silent). When set to trace, all events are traced. <options: trace|debug|info|warn|error|silent> --option=<plugin>.<path>=<value>... Override plugin options. Format: <pluginName>.<property.path>=<value>. Supports nested paths (dot notation) and array indices (bracket notation). --plugin=<value>... [default: ] Load an additional plugin package or relative plugin path before running the command. Can be used multiple times. --rule-set=package-name... Add a rule set package to use for validation (e.g. @thymian/rules-rfc-9110). Can be specified multiple times. --rule-severity=<option> Set the minimum rule severity threshold for rule loading (off, error, warn, hint). Only rules at or above this severity are loaded. <options: off|error|warn|hint> --sort-reports-by=<option> Group report findings by rule, endpoint, or severity (default: endpoint). Affects the CLI report and any configured reporter that supports grouping. <options: rule|endpoint|severity> --spec=type:location... Specification input in the format <type>:<location> (e.g. openapi:./openapi.yaml). --suppress-feedback Suppress feedback messages from Thymian. --timeout=<value> [default: 10000] Set the duration in ms to wait for anything that happens in Thymian. --traffic=type:location... Traffic input in the format <type>:<location> (e.g. har:./traffic.har). --[no-]validate-specs Validate included specifications and fail on schema validation errors. --verbose Run thymian in verbose mode.
GLOBAL FLAGS --json Format output as json.
DESCRIPTION Check the sampler hooks against the current API description, and the committed types against both.
EXAMPLES $ thymian sampler validateSee code: src/commands/sampler/validate.ts