Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Run {
Show 30 fields input: PathBuf, format: Option<String>, vus: Option<u32>, duration: Option<String>, env: Vec<String>, env_file: Option<PathBuf>, data_file: Option<PathBuf>, config: Option<PathBuf>, reporter: Vec<String>, output: Option<PathBuf>, prometheus_url: Option<String>, otlp_endpoint: Option<String>, summary_export: Option<PathBuf>, json_stream: Option<PathBuf>, statsd_addr: Option<String>, influxdb_addr: Option<String>, execution_segment: Option<String>, execution_segment_sequence: Option<String>, threshold: Vec<String>, control_port: Option<u16>, insecure: bool, verbose: bool, http_debug: Option<String>, no_redirects: bool, no_thresholds: bool, mode: Option<String>, stages: Option<String>, iterations: Option<u64>, subprocess_adapter: Vec<String>, plugins_dir: Option<PathBuf>,
}, Extensions { plugins_dir: Option<PathBuf>, }, Inspect { input: PathBuf, format: Option<String>, plugins_dir: Option<PathBuf>, subprocess_adapter: Vec<String>, }, Archive { input: PathBuf, format: Option<String>, output: Option<PathBuf>, data_file: Option<PathBuf>, env_file: Option<PathBuf>, config: Option<PathBuf>, }, Build { with: Vec<String>, output: Option<PathBuf>, debug: bool, }, Version, New { output: PathBuf, }, Agent { port: u16, token: Option<String>, bind: String, exit_with_parent: bool, allow_origin: Vec<String>, }, }

Variants§

§

Run

Run a load test

Fields

§input: PathBuf

Path to the input file (collection, HAR, script, etc.)

§format: Option<String>

Input format (auto-detect if not specified). Use tropel extensions to list available formats.

§vus: Option<u32>

Number of virtual users (overrides collection config)

§duration: Option<String>

Test duration (e.g. “30s”, “5m”)

§env: Vec<String>

Environment variable (can be specified multiple times: -e KEY=VALUE)

§env_file: Option<PathBuf>

Environment file (JSON)

§data_file: Option<PathBuf>

Data file (CSV or JSON)

§config: Option<PathBuf>

JSON config file (partial JobConfig overlay). Merged with precedence: explicit CLI flags > config file > K6_* env > defaults.

§reporter: Vec<String>

Report format (stdout, json, csv)

§output: Option<PathBuf>

Output file path (for json/csv reporters)

§prometheus_url: Option<String>

Prometheus remote-write endpoint (e.g. http://localhost:9090)

§otlp_endpoint: Option<String>

OTLP/HTTP collector endpoint (e.g. http://localhost:4318)

§summary_export: Option<PathBuf>

k6-style summary export path: writes the aggregated summary data object as JSON (when no script handleSummary overrides output)

§json_stream: Option<PathBuf>

NDJSON streaming output file (k6 --out json=file equivalent): every sample is appended as one JSON line during the run

§statsd_addr: Option<String>

StatsD / Datadog agent address (host:port, e.g. localhost:8125) for streaming datagram output

§influxdb_addr: Option<String>

InfluxDB line-protocol UDP address (host:port, e.g. localhost:8089) for streaming line-protocol datagrams

§execution_segment: Option<String>

Deterministic workload partition for this node, as “from:to” (e.g. “0:1/3”) — k6 executionSegment. Combined with –execution-segment-sequence this node runs only its fraction of the workload (VUs/iterations/rate), scaled deterministically.

§execution_segment_sequence: Option<String>

Full sequence of segment boundaries shared by all cooperating nodes, e.g. “0,1/3,2/3,1” — k6 executionSegmentSequence.

§threshold: Vec<String>

Threshold expression (can be specified multiple times)

§control_port: Option<u16>

Port for the runtime control API (k6 REST parity). When set with an externally-controlled executor, binds 127.0.0.1: and serves GET/PATCH /v1/status so VUs can be adjusted mid-run.

§insecure: bool

Insecure TLS (skip certificate verification)

§verbose: bool

Show verbose output

§http_debug: Option<String>

Log every HTTP request/response at debug level. Without =full, prints the method, URL, status, timing, and body / header counts. With --http-debug=full, also prints the request/response headers and the first 1 KiB of the body. Equivalent to k6’s --http-debug and --http-debug=full.

§no_redirects: bool

Never follow redirects: each 3xx response is returned to the script as-is and every redirect hop is counted as a request (default) — with this flag the 3xx itself IS the final response. k6 always follows redirects (up to maxRedirects); this opt-out is a Tropel extra.

§no_thresholds: bool

Skip all threshold evaluation — don’t fail the run even if thresholds would fail. Mid-run abortOnFail is also disabled. k6 has no equivalent; this pairs with –no-summary.

§mode: Option<String>

Run mode: constant-vus, ramping-vus, shared-iterations, arrival-rate (optional — when absent, a k6 script’s own export const options drives the load profile; passing this flag makes the CLI profile win)

§stages: Option<String>

Ramping stages (JSON array, for ramping-vus mode)

§iterations: Option<u64>

Iterations (for shared-iterations mode)

§subprocess_adapter: Vec<String>

Subprocess adapter command (e.g. --subprocess-adapter "python3 my-adapter.py"). Runs the command for each detect/parse call, passing bytes on stdin and reading a JSON Scenario from stdout. The adapter is registered as subprocess:<cmd> (use with --format) and is also probed during content auto-detection, like WASM plugins. Each call is bounded by a 30s timeout and a 16 MiB output cap.

§plugins_dir: Option<PathBuf>

Directory of WASM plugins (.wasm) to load as input adapters. Modules are AOT-precompiled to .cwasm next to the source and registered under wasm:<plugin_id>; content auto-detection probes them too. Example: --plugins-dir ./plugins.

§

Extensions

List available input formats and their capabilities

Fields

§plugins_dir: Option<PathBuf>

Optional directory of WASM plugins to include in the listing.

§

Inspect

Inspect an input file without running it: shows how Tropel resolves it (driver or adapter), the parsed scenario summary (name, request count, methods, variables, auth), and any script-declared options.

Fields

§input: PathBuf

Path to the input file (collection, HAR, script, etc.)

§format: Option<String>

Input format (auto-detect if not specified)

§plugins_dir: Option<PathBuf>

Directory of WASM plugins to include in resolution

§subprocess_adapter: Vec<String>

Subprocess adapter command (same semantics as run)

§

Archive

Bundle a test into a self-contained directory: the input file plus its referenced dependencies (data file, env file, config file) and a manifest, so the test can be replayed on another machine without the original paths.

Fields

§input: PathBuf

Path to the input file (collection, HAR, script, etc.)

§format: Option<String>

Input format (auto-detect if not specified)

§output: Option<PathBuf>

Output directory for the bundle (default: ./tropel-archive)

§data_file: Option<PathBuf>

Data file (CSV/JSON) to bundle

§env_file: Option<PathBuf>

Environment file (JSON) to bundle

§config: Option<PathBuf>

Config file (JSON) to bundle

§

Build

Build a custom Tropel binary with extensions

Fields

§with: Vec<String>

Extension crates to include. Forms: name or name@1.2.3 (crates.io), ./path (local dir), https://host/user/repo or git@host:user/repo.git (git), and git refs: git-url@main (branch), git-url@v1.2.3 (tag), git-url@<sha> (rev). Example: --with tropel-x-grpc --with ./my-ext --with https://github.com/u/r@v0.2.0

§output: Option<PathBuf>

Output binary path

§debug: bool

Build in debug mode (default: release)

§

Version

Print the version and build information

§

New

Generate a new k6-style script template.

Fields

§output: PathBuf

Output file path (default: script.js).

§

Agent

Run the localhost agent server (TR-405). knockport’s desktop transport reaches the same engine over this socket — one engine from Send to 10 000 VU. Localhost-only by default; refuses a non-loopback bind.

Fields

§port: u16

Bind port (default 9876). Only loopback addresses are accepted.

§token: Option<String>

Auth token required on every request (rate-limited too).

§bind: String

Bind address (default 127.0.0.1). Anything non-loopback is refused.

§exit_with_parent: bool

Exit as soon as the process that spawned this agent is gone.

TR-471: a supervisor’s own cleanup does not run when it is SIGKILLed or crashes, and an agent left behind keeps a loopback port open with the variables and client secrets it was sent.

Detected by stdin EOF, so the spawning process MUST give the agent a stdin pipe and hold it open. With stdin on /dev/null or closed, the agent exits immediately (and says so).

§allow_origin: Vec<String>

Browser origin allowed to reach this agent, e.g. --allow-origin https://app.knockport.dev. Repeatable.

TR-459: an ALLOWLIST, and empty by default, so a browser cannot reach the agent at all unless a human names the page. The agent holds collection variables and OAuth client secrets and will execute any request handed to it — * would let any tab the user has open drive it, and the token is no defence because a browser attaches it automatically once CORS permits the call.

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<'a, T> FromIn<'a, T> for T

Source§

fn from_in(t: T, _: &'a Allocator) -> T

Converts to this type from the input type within the given allocator.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'a, T, U> IntoIn<'a, U> for T
where U: FromIn<'a, T>,

Source§

fn into_in(self, allocator: &'a Allocator) -> U

Converts this type into the (usually inferred) input type within the given allocator.
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> ParallelSend for T

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more