Skip to main content

k6 version

Show the k6 version and build information.

Synopsis

Description

The k6 version command displays version and build information for the k6 binary. This includes:
  • k6 version number
  • Git commit hash (if available)
  • Go version used to build k6
  • Operating system and architecture
  • Loaded extensions (if any)

Examples

Flags

boolean
Output version information in JSON format

Output Format

Standard Output

The standard output format shows a human-readable version string:
This includes:
  • Version number (e.g., v0.48.0)
  • Git commit hash (e.g., a1b2c3d4)
  • Go version (e.g., go1.21.4)
  • Platform (e.g., linux/amd64)

With Extensions

If k6 extensions are loaded, they are listed:

JSON Output

With the --json flag, output is structured JSON:

Version Components

Version Number

The semantic version of k6 (e.g., v0.48.0). Follows Semantic Versioning:
  • Major version: Breaking changes
  • Minor version: New features (backwards compatible)
  • Patch version: Bug fixes

Commit Hash

The Git commit hash from which k6 was built. Useful for:
  • Identifying exact build
  • Debugging issues
  • Verifying builds
If the working directory had uncommitted changes, -dirty is appended.

Go Version

The version of Go used to compile k6. Important for:
  • Compatibility verification
  • Performance characteristics
  • Security updates

Platform

The target operating system and architecture:
  • linux/amd64 - 64-bit Linux
  • darwin/amd64 - Intel Mac
  • darwin/arm64 - Apple Silicon Mac
  • windows/amd64 - 64-bit Windows

Use Cases

Bug Reports

Include full version information in bug reports:

CI/CD Verification

Verify the correct k6 version in pipelines:

Extension Verification

Check if required extensions are loaded:

Debugging

Identify build characteristics:

Development Builds

Development builds show (devel) as the version:
This indicates k6 was built from source without a version tag.

Extensions Information

The output includes details about loaded k6 extensions:
  • Module: Go module path
  • Version: Extension version
  • Imports: JavaScript import paths (for JS extensions)
  • Outputs: Output names (for output extensions)
Example with multiple extension types:

Exit Codes

  • 0 - Command executed successfully

See Also