{
  "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,
    "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/k6.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "run"
        ],
        "label": "Run a load test",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k6.ts",
            "license": "MIT"
          }
        ],
        "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"
            ]
          },
          {
            "id": "vus",
            "label": "Virtual users",
            "type": "integer",
            "option": [
              "--vus",
              "-u"
            ],
            "description": "Number of virtual users (default 1).",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "duration",
            "label": "Duration",
            "type": "string",
            "option": [
              "--duration",
              "-d"
            ],
            "description": "Test duration limit, e.g. 30s or 5m.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "iterations",
            "label": "Iterations",
            "type": "integer",
            "option": [
              "--iterations",
              "-i"
            ],
            "description": "Total iteration limit across all VUs.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "stage",
            "label": "Stages",
            "type": "string",
            "option": [
              "--stage",
              "-s"
            ],
            "description": "Add a stage as duration:target, e.g. 30s:20.",
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "env",
            "label": "Environment variables",
            "type": "string",
            "option": [
              "--env",
              "-e"
            ],
            "description": "Add or override an environment variable as VAR=value.",
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tag",
            "label": "Tags",
            "type": "string",
            "option": [
              "--tag"
            ],
            "description": "Tag applied to all samples, as name=value.",
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "out",
            "label": "Metrics output",
            "type": "string",
            "option": [
              "--out",
              "-o"
            ],
            "description": "URI for an external metrics database.",
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "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"
            ]
          },
          {
            "id": "rps",
            "label": "Requests per second limit",
            "type": "integer",
            "option": [
              "--rps"
            ],
            "description": "Limit requests per second.",
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "quick",
            "label": "Quick smoke test",
            "fields": [
              "script",
              "vus",
              "duration",
              "env"
            ],
            "required": [
              "script"
            ]
          },
          {
            "id": "staged",
            "label": "Ramp with stages",
            "fields": [
              "script",
              "stage",
              "env",
              "out"
            ],
            "required": [
              "script",
              "stage"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "script",
              "vus",
              "duration",
              "iterations",
              "stage",
              "env"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "tag",
              "out",
              "summary_export",
              "rps"
            ]
          }
        ]
      },
      {
        "path": [
          "inspect"
        ],
        "label": "Inspect a script",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/k6.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "script",
            "label": "Script",
            "type": "path",
            "description": "k6 script or archive to inspect.",
            "path": {
              "kind": "file",
              "role": "input"
            },
            "position": 0,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "inspect",
            "label": "Inspect",
            "fields": [
              "script"
            ],
            "required": [
              "script"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "script"
            ]
          }
        ]
      }
    ]
  }
}
