id = "k6"
name = "k6"
homepage = "https://k6.io"
description = "Modern load testing for developers and testers in the DevOps era."
icon = "SimpleIcons:k6"
executables = ["k6"]
[dotfiles]
paths = ["[appData]/k6/config.json"]
exclude = []
secret = []
side_effect = false
[[dotfiles.secret_paths]]
file = "[appData]/k6/config.json"
match = { key_path = ["collectors.cloud.token"] }
[commands]
format = 1
label = "k6 load testing"
description = "Run or inspect a load test script locally. Output backends are limited to a plain out value; cloud runs, login, and the REST API controls are left out. Boolean-style k6 flags are not offered because the completion data models them as taking values."
quality = "ai-draft"
base = "fig:k6"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/k6.ts"
license = "MIT"
[[commands.subcommand]]
path = ["run"]
label = "Run a load test"
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/k6.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "script"
label = "Script"
type = "path"
description = "k6 script (JS file or archive) to run."
path = { kind = "file", role = "input" }
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "vus"
label = "Virtual users"
type = "integer"
option = ["--vus", "-u"]
description = "Number of virtual users (default 1)."
sources = ["fig"]
[[commands.subcommand.field]]
id = "duration"
label = "Duration"
type = "string"
option = ["--duration", "-d"]
description = "Test duration limit, e.g. 30s or 5m."
sources = ["fig"]
[[commands.subcommand.field]]
id = "iterations"
label = "Iterations"
type = "integer"
option = ["--iterations", "-i"]
description = "Total iteration limit across all VUs."
sources = ["fig"]
[[commands.subcommand.field]]
id = "stage"
label = "Stages"
type = "string"
option = ["--stage", "-s"]
description = "Add a stage as duration:target, e.g. 30s:20."
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "env"
label = "Environment variables"
type = "string"
option = ["--env", "-e"]
description = "Add or override an environment variable as VAR=value."
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "tag"
label = "Tags"
type = "string"
option = ["--tag"]
description = "Tag applied to all samples, as name=value."
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "out"
label = "Metrics output"
type = "string"
option = ["--out", "-o"]
description = "URI for an external metrics database."
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "summary_export"
label = "Export summary to JSON"
type = "path"
option = ["--summary-export"]
description = "Write the end-of-test summary report to a JSON file."
path = { kind = "file", role = "output" }
effect = "overwrite"
sources = ["fig"]
[[commands.subcommand.field]]
id = "rps"
label = "Requests per second limit"
type = "integer"
option = ["--rps"]
description = "Limit requests per second."
sources = ["fig"]
[[commands.subcommand.task]]
id = "quick"
label = "Quick smoke test"
fields = ["script", "vus", "duration", "env"]
required = ["script"]
[[commands.subcommand.task]]
id = "staged"
label = "Ramp with stages"
fields = ["script", "stage", "env", "out"]
required = ["script", "stage"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["script", "vus", "duration", "iterations", "stage", "env"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["tag", "out", "summary_export", "rps"]
[[commands.subcommand]]
path = ["inspect"]
label = "Inspect a script"
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/k6.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "script"
label = "Script"
type = "path"
description = "k6 script or archive to inspect."
path = { kind = "file", role = "input" }
position = 0
sources = ["fig"]
[[commands.subcommand.task]]
id = "inspect"
label = "Inspect"
fields = ["script"]
required = ["script"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["script"]