# Install xk6 with Homebrew, Nix

Build k6 with extensions. Version 1.4.6 via Homebrew; verified 2026-06-10.

## Install

```sh
sudo av install brew:xk6
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install xk6
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#xk6
```

  Evidence: nixpkgs package indexes: pkgs/by-name/xk/xk6/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:xk6
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/xk6>
- **Version:** 1.4.6
- **Source summary:** Build k6 with extensions
- **Homepage:** <https://k6.io>
- **Repository:** <https://github.com/grafana/xk6>
- **Upstream docs:** <https://github.com/grafana/xk6/blob/master/README.md>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/grafana/xk6/archive/refs/tags/v1.4.6.tar.gz>
- **Last updated:** 2026-06-10T10:42:12Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- xk6 (cli)
- xk6 (alias)

## Dependencies

- go
- gosec
- govulncheck

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.4.6
- Package-manager updated: 2026-06-10
- Local data: ok
- Upstream repository: https://github.com/grafana/xk6
- Upstream latest detected: v1.4.6 (current)
## Project history and usage

xk6 is Grafana k6's extension-development toolbox: a command-line tool for creating extension skeletons, building custom k6 binaries, running k6 with extensions, testing extensions, linting extension projects, and sharing reusable extension workflows. In package terms it is the bridge between the stock k6 executable and the larger Go-module ecosystem of k6 extensions.

### Project history

The tool grew out of k6's decision to keep the core load-testing runtime small while letting users compile in Go-based extensions. The current Grafana repository presents xk6 as the official toolbox for extension authors and lists its main jobs as scaffolding, building, running, testing, linting, reusable workflows, Docker use, and development-container support.

xk6's command surface has expanded from the basic custom-builder role into a fuller extension workflow. Its README documents commands such as `xk6 new`, `xk6 build`, `xk6 run`, `xk6 lint`, `xk6 test`, and `xk6 sync`; the build command also handles extension module paths, replacements, target OS/architecture, k6 forks, and k6 major-version resolution.

### Adoption history

xk6 became important because many useful k6 capabilities live outside the default binary. Grafana's extension documentation tells users that official and community extensions may be resolved automatically in newer k6 releases, but that other extensions, including private or newly-created ones, still require building a custom k6 binary with xk6.

The tool is therefore part of the normal path for k6 users who need SQL outputs, custom protocols, test helpers, private modules, or experimental APIs before they are available in the main k6 release. Grafana also publishes an xk6 Docker image so users can build custom binaries without first setting up a local Go toolchain.

### How it is used

Typical use is `xk6 build --with module[@version]` to produce a custom `k6` executable containing one or more extensions. Extension developers also use `xk6 run` to rebuild and execute during development, `xk6 new` to create a template project, and `xk6 lint` or `xk6 test` to check extension compliance.

xk6 is most relevant when the desired extension is not handled by k6 automatic extension resolution, when an output extension is involved, when the extension is private, or when the user needs to pin or replace Go modules during a custom build.

### Why package nerds care

xk6 is a package-nerd example of a small CLI that exists to manufacture another CLI. Its value is not in running load tests directly, but in making reproducible, module-aware k6 binaries from Go extension packages.

It also shows how modern developer tools push extension distribution into language package ecosystems: the package manager installs xk6, xk6 asks Go for modules, and the result is a custom executable tailored to a testing stack.

### Timeline

- 2020: Public support discussions show users installing and troubleshooting xk6 for custom k6 builds.
- 2021-2022: Grafana community answers routinely recommend `xk6 build ... --with ...` for extension-based k6 binaries.
- 2025: The Grafana xk6 repository records v0.x development and documents xk6 as a broader extension-development toolbox, not only a builder.
- 2026: Grafana k6 documentation still directs users to xk6 for custom binaries when automatic extension resolution is not enough.

### Related projects

- k6 is the load-testing runtime that xk6 builds. The surrounding ecosystem includes Grafana's k6 extension registry, xk6 extension template repositories, and individual extensions such as xk6-sql, xk6-output-influxdb, xk6-faker, and xk6-disruptor.

### Sources

- <https://community.grafana.com/t/i-need-to-build-k6-with-an-extension-in-local/97838>
- <https://community.grafana.com/t/unable-to-locate-xk6-after-installing-it/99016>
- <https://github.com/grafana/xk6>
- <https://grafana.com/docs/k6/latest/extensions/>
- <https://grafana.com/docs/k6/latest/extensions/run/>
- <https://grafana.com/docs/k6/latest/extensions/run/build-k6-binary-using-go/>
- <https://registry.k6.io/>


## Security Notes

No matching local secret-handling manifest was found for xk6. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** xk6
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - xk6: normalized package name match | nixpkgs package indexes: pkgs/by-name/xk/xk6/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Runtime dependency declared by Homebrew.
- [gosec](https://www.automicvault.com/pkg/brew/gosec/) - Runtime dependency declared by Homebrew.
- [govulncheck](https://www.automicvault.com/pkg/brew/govulncheck/) - Runtime dependency declared by Homebrew.
- [k6](https://www.automicvault.com/pkg/brew/k6/) - Shares the same upstream homepage.
- [cassowary](https://www.automicvault.com/pkg/brew/cassowary/) - Shares av.db curated category or tags: cli, developer-tools, go, load-testing, testing.
- [artillery](https://www.automicvault.com/pkg/brew/artillery/) - Shares av.db curated category or tags: cli, developer-tools, load-testing, testing.
- [goku](https://www.automicvault.com/pkg/brew/goku/) - Shares av.db curated category or tags: cli, developer-tools, load-testing, testing.
- [locust](https://www.automicvault.com/pkg/brew/locust/) - Shares av.db curated category or tags: cli, developer-tools, load-testing, testing.
- [gor](https://www.automicvault.com/pkg/brew/gor/) - Shares av.db curated category or tags: cli, developer-tools, go, load-testing, testing.
- [vegeta](https://www.automicvault.com/pkg/brew/vegeta/) - Shares av.db curated category or tags: cli, developer-tools, go, load-testing, testing.
- [bzt](https://www.automicvault.com/pkg/brew/bzt/) - Shares av.db curated category or tags: cli, developer-tools, load-testing, testing.

## Combined YAML source

View the package source record on GitHub. [combined/xk6.yml](https://github.com/automic-vault/db/blob/main/combined/xk6.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
