Skip to main content
LimelightLib is distributed as a single .java file. There is no package manager, Gradle plugin, or vendor dependency JSON to install. All WPILib projects already include every dependency the library needs.
The file declares package frc.robot; at the top. If your project uses a different root package, update that line to match before building.

Add the file to your project

1

Download LimelightHelpers.java

Get the latest release from the GitHub releases page. Download LimelightHelpers.java directly — you do not need to clone the repository.
2

Place it in your project

Copy the file into your WPILib project at:
src/main/java/frc/robot/LimelightHelpers.java
This is the standard WPILib project structure generated by the VS Code extension or the WPILib project creator. The file’s package frc.robot; declaration matches this location.
3

Use it in your robot code

Because LimelightHelpers.java is in the same package as your robot code, you can call its static methods directly without an import:
Robot.java
boolean hasTarget = LimelightHelpers.getTV("limelight");
double tx = LimelightHelpers.getTX("limelight");
If you prefer an explicit import:
Robot.java
import frc.robot.LimelightHelpers;
4

Build your project

Run a Gradle build. No additional configuration is required.
./gradlew build
The build uses WPILib’s bundled Jackson (com.fasterxml.jackson) for JSON parsing, which ships with every WPILib project.

USB-connected cameras (Limelight 3A / 3G)

If your Limelight is connected via USB rather than Ethernet, call setupPortForwardingUSB once during robotInit(). This sets up port forwarding through the roboRIO so the Limelight web interface and NetworkTables remain accessible over the robot’s main network connection.
Robot.java
@Override
public void robotInit() {
    // USB index 0: web UI available at roboRIO-(teamnum)-FRC.local:5801
    LimelightHelpers.setupPortForwardingUSB(0);
}
For a second USB camera, pass index 1. Its web UI will be available on port 5811.

Dependencies

LimelightLib uses only classes already present in every WPILib project:
DependencySource
edu.wpi.first.networktablesWPILib NetworkTables
edu.wpi.first.math.geometryWPILib geometry (Pose2d, Pose3d, etc.)
edu.wpi.first.net.PortForwarderWPILib networking utilities
com.fasterxml.jacksonBundled with WPILib
No additional build.gradle changes are needed.

Build docs developers (and LLMs) love