Documentation Index
Fetch the complete documentation index at: https://mintlify.com/grafana/k6/llms.txt
Use this file to discover all available pages before exploring further.
k6 version
Show the k6 version and build information.Synopsis
Description
Thek6 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
Output version information in JSON format
Output Format
Standard Output
The standard output format shows a human-readable version string:- 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
-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 Linuxdarwin/amd64- Intel Macdarwin/arm64- Apple Silicon Macwindows/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:
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)
Exit Codes
0- Command executed successfully