Plugin support for the Toolbox App
This tutorial guides you from a clean Gradle project to a running Toolbox App plugin.
Prerequisites
Before you start developing a plugin, ensure that the following requirements are met:
The latest version of the Toolbox App is downloaded.
For more information, refer to Toolbox builds.
JDK version 21 is required on the host machine to be able to start the Toolbox CLI.
Kotlin
You are authenticated in the Toolbox App with your personal account.
Sample plugin
You can use a small bootstrap project as an example.
Gradle setup (Kotlin DSL)
Currently, the plugin SDK consists of an API JAR file, and a special nightly build of the Toolbox App with the Remote Development integration enabled.
To begin developing a plugin, we recommend creating a Gradle-based project.
Obtain plugin SDK
Add the following code to your
build.gradle.kts:repositories { maven("https://packages.jetbrains.team/maven/p/tbx/toolbox-api") } dependencies { // Use specific versions that are compatible with your Toolbox App build compileOnly("com.jetbrains.toolbox:core-api:1.XX.XXXXX") compileOnly("com.jetbrains.toolbox:ui-api:1.XX.XXXXX") compileOnly("com.jetbrains.toolbox:remote-dev-api:1.XX.XXXXX") compileOnly("com.jetbrains.toolbox:localization-api:1.XX.XXXXX") }This will add the required dependencies.
Declare entry point (ServiceLoader)
Create a file in your plugin JAR at META-INF/services/com.jetbrains.toolbox.api.remoteDev.RemoteDevExtension:
In Gradle, you can create such a file in the resources directory. The com.example.toolbox.MyRemoteDevExtension class must have a public no-arg constructor and implement the RemoteDevExtension interface.
You can read more about service loading in the Java documentation.
For discovery and loading details, the Toolbox App uses ServiceLoader to find RemoteDevExtension in your jars and validates the extension.json file before loading (see the internal flow). The external plugin discovery and loading sequence uses extension.json, constructs a classloader from your JAR files, then calls ServiceLoader.load(RemoteDevExtension, pluginClassLoader).
Create extension.json
Place it next to your jars in the plugin folder. See 06-Schemas-and-Extension.md for fields. Check the minimal example:
Minimal implementation
A simple SSH environment
Add instances of SshDemoEnvironment to your provider’s environments flow.
Development layout
Place your plugin under the Toolbox App plugin folder for development:
~/Library/Caches/JetBrains/Toolbox/plugins/<plugin-id>
~/.local/share/JetBrains/Toolbox/plugins/<plugin-id>
%LocalAppData%/JetBrains/Toolbox/cache/plugins/<plugin-id>
For more information, see a small bootstrap project as an example.
It is also possible to use the jetbrains://gateway/installUnsigned?file=/path/to/directory URL to install the plugin. Note that this link works only in developer builds.
The content is as follows:
Your plugin JAR(s)
extension.jsonMETA-INF/services/com.jetbrains.toolbox.api.remoteDev.RemoteDevExtensioninside the JAROptional
icon.svg
Run and iterate
Start the Toolbox App.
Go to and select your provider.
Use
07-Debugging-and-Tools.mdto attach a debugger when needed.