Setting up your extension development environment manually

You can set up your extension development environment to suit your preferences. This page covers the setup requirements and steps.

Note

If you want a faster setup, try our starter project. The project provides a ready-to-use template, so you can skip these steps and start coding immediately. For more information, see Setting up your extension development environment using the starter project.

Prerequisites

Before you begin:

Step 1: Create a new project

Set up a new project in your IDE with the following details:

Step 2: Add the Montoya API dependency

Once your project is set up, add the Montoya API to your project's dependencies.

Gradle configuration

To add the Montoya API in a Gradle project:

  1. Go to the Gradle build file.

  2. Add the following inside the dependencies section:

  3. Update LATEST-VERSION with the latest Montoya API version number, available from the releases page on GitHub.
  4. Sync the Gradle changes.

Maven configuration

To add the Montoya API in a Maven project:

  1. Go to the pom.xml file.

  2. Add the following inside the dependency block:

    <dependency>     <groupId>net.portswigger.burp.extensions</groupId>     <artifactId>montoya-api</artifactId>     <version>LATEST-VERSION</version> </dependency>
  3. Update LATEST-VERSION with the latest Montoya API version number, available from the releases page on GitHub.
  4. Update your Maven dependencies.

Step 3: Create your extension class

Create a Java class. This file will contain your extension code.

To create a new class file in your IDE:

  1. Right-click the folder where you want to keep your code, typically src > main > java.

  2. Select the option to create a new Java class. Depending on your IDE, this may be labeled as New > Java class or similar.

  3. Enter a name for the class. For example, Extension.

Step 4: Confirm correct setup

To check that the project is correctly configured, attempt to build a JAR file. If the build is successful, you're ready to start writing.

For instructions, see Building a JAR file.

[Optional] Step 5: Enable LLM support

You can use an LLM to help you write your extension. To support this, we provide a CLAUDE.md file that includes essential context for the model. You can use this file with Claude Code or any other LLM.

Note

Make sure to review and test any code suggested by your LLM, as it may not always produce correct or secure output.

Claude Code support

To use Claude Code to help you write your extension:

  1. Download our CLAUDE.md file and supporting documentation from GitHub.

  2. Add the CLAUDE.md file to the root of your extension project folder.

  3. Create a docs folder in your extension project and add the supporting documentation inside it.

  4. Open a terminal and navigate to your extension project folder.

  5. Run Claude Code using the following command: claude.

  6. Prompt Claude to create some code for your extension.

Claude should automatically read the contents of the ExtensionTemplateProject folder, including the CLAUDE.md file, then create draft code for you to review. If you think it hasn't read the CLAUDE.md file, directly prompt it to do so before continuing.

Other LLM support

To use an LLM other than Claude Code to help you write your extension, directly prompt the LLM to read the CLAUDE.md file and supporting documentation in the docs folder, or provide their contents as part of your context window.

Next steps

You're ready to start writing your extension. For a tutorial, see Writing your first extension.