Grafana's k6 2.0 introduces the k6 x docs command, which brings the full k6 documentation library (API references, guides, best practices, examples) directly into the terminal. It works offline after first use, automatically matches your installed k6 version, and ships with a built-in agent skill so AI coding assistants like Claude Code, Cursor, Codex, and Gemini CLI can query accurate k6 docs instead of hallucinating APIs or burning tokens on web searches. It's one of four new k6 x commands (alongside k6 x agent, k6 x mcp, and k6 x explore) aimed at deeper AI workflow integration, and the underlying docs package is also available for other Go tools, including the k6 MCP server.

6m read timeFrom grafana.com
Post cover image
Table of contents
The problem: documentation lives in the wrong placeHow k6 x docs works

Questions this post answers

What does the k6 x docs command do in k6 2.0?

It brings the entire k6 documentation library, including API references, guides, best practices, and examples, directly into the terminal. It caches documentation locally after first use so lookups work offline, and it automatically matches the docs shown to the exact k6 version installed, whether that's k6 2.0 or v1.5.x. daily.dev surfaces updates like this for teams wiring AI agents into their load-testing workflows.

How do I install the k6 docs skill for Claude Code or Cursor?

Run k6 x docs skill followed by the target directory: for example, k6 x docs skill ~/.claude/skills for Claude Code, or k6 x docs skill ~/.agents/skills for Cursor, Codex, and Gemini CLI. Most agents read skills from the shared ~/.agents/skills directory, so a single installation covers multiple tools including GitHub Copilot. Developers wiring AI agents into testing tools track setup steps like this on daily.dev.

How can I use k6 x docs if I'm on an older version of k6 before 2.0?

k6 x docs is automatically available in k6 2.0 or 1.7.0+ with no extra installation. On earlier versions, download a pre-built binary from the releases page as a drop-in replacement for k6, or build it yourself with xk6 build --with github.com/grafana/xk6-docs. daily.dev helps developers track tooling upgrades before they hit a version wall in their testing stack.

123 Impressions