---
title: "Configure your code editor | Grafana k6 documentation"
description: "k6 has its TypeScript Type Definition that you can configure with your editor to unlock code editing features."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Configure your code editor

[IntelliSense](https://code.visualstudio.com/docs/editor/intellisense) refers to code editing features like **intelligent code completion** and **quick access to documentation**. These features can significantly improve the developer experience and productivity when working on k6 scripts in your editor of choice. Notable features are:

- Auto-completion of k6 functions, methods, and classes.
- Auto imports of k6 modules.
- Access to k6 documentation when writing and hovering code.

## Install k6 type definitions

k6 has its [TypeScript Type Definition](https://www.npmjs.com/package/@types/k6) that you can configure with your editor to unlock code editing features.

In Visual Studio Code and IntelliJ IDEA Ultimate, you can configure IntelliSense to recognize the [k6 JavaScript API](/docs/k6/latest/javascript-api/) by installing the k6 Types with a package manager.

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
# create a `package.json` file
$ npm init --yes

# install the k6 types as dev dependency
$ npm install --save-dev @types/k6
```

## Code editor extensions

You can also find k6 code editor extensions for Visual Studio Code and IntelliJ IDEA:

- [Visual Studio Code - k6 Extension](https://marketplace.visualstudio.com/items?itemName=k6.k6)
- [IntelliJ IDEA - k6 Plugin](https://plugins.jetbrains.com/plugin/16141-k6)

## AI assistants (MCP)

Connect k6 authoring and execution tools to MCP-compatible editors or assistants through the k6 MCP server. If you already have k6 installed, you can launch it directly with `k6 x mcp` — no extra install required.

- [Configure your AI assistant](/docs/k6/latest/set-up/configure-ai-assistant/)
- [Bootstrap your editor with `k6 x agent`](/docs/k6/latest/set-up/configure-ai-assistant/bootstrap-with-k6-x-agent/) — set up skills and the MCP server in one command for supported editors.

## Next steps

Now that you have k6 configured in your code editor, you can:

- Head over to [Running k6](/docs/k6/latest/get-started/running-k6/) to learn how to create and run your first test.
- Configure your editor for [TypeScript support](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support).
