Remote Development API
Implement the Remote Development extension and provider. This section explains data flows, lifecycle, and recommended patterns.
Entry point
Registration: JetBrains Toolbox uses Java ServiceLoader to discover
RemoteDevExtensionin your JAR files (seeMETA-INF/services/...).RemoteDevExtension(functional interface): create yourRemoteProviderusingServiceLocator.
RemoteProvider
Lifecycle:
Instances may be created and closed multiple times. Avoid leaking resources.
Defer expensive work until
setVisiblesignals interest.
Recommended patterns:
Keep a single coroutine scope per provider; it is provided to you obtainable via
ServiceLocator.Expose environment lists with
LoadableState(Loading/Ready/Error) to improve perceived performance.
RemoteProvider components
Identity and visuals:
name,iconResource,noEnvironmentsIconResource, descriptionsCapabilities:
canCreateNewEnvironments,isSingleEnvironmentData:
environments: Flow<LoadableState<List<RemoteProviderEnvironment>>>Visibility:
setVisible(ProviderVisibilityState)UI:
getNewEnvironmentUiPage(),getOverrideUiPage(),additionalPluginActionsAccount UI:
getAccountDropDown()Deep link:
handleUri(uri: URI)(interceptsjetbrains://gateway/<provider-id>/...)Diagnostics:
getDiagnosticInfoCollector()Optional:
refresh()
RemoteProviderEnvironment
State model: your environment should expose state and description promptly when visible.
Use
StandardRemoteEnvironmentStatefor common cases (Disconnected/Connecting/Connected/Disconnecting).Use
CustomRemoteEnvironmentState(V2)for advanced states with custom colors/icons.
Deletion UX: prefer deleteActionFlow over deprecated onDelete().
RemoteProviderEnvironment components
Identity:
id,nameFlow(deprecatednamesetter kept for compatibility)Features:
supportedFeatures: Set<RemoteEnvironmentAbility>Tabs:
pageTabs: List<TabDefinition>(defaults include projects or tools tabs)State and description:
state: StateFlow<RemoteEnvironmentState>,description: StateFlow<EnvironmentDescription>Connect/disconnect programmatically:
connectionRequest: Flow<Boolean>?Actions:
actionsList: StateFlow<List<ActionDescription>>Visibility:
setVisible(EnvironmentVisibilityState)Hooks:
getBeforeConnectionHooks(),getAfterDisconnectHooks()Deletion:
getDeleteEnvironmentConfirmationParams(),deleteActionFlowIssues:
getEnvironmentIssueFlow(): Flow<EnvironmentIssue?>Diagnostics:
diagnosticInfoCollectorAdditional info:
additionalEnvironmentInformation: Map<LocalizableString, String>?Contents view:
getContentsView(): EnvironmentContentsView
EnvironmentContentsView and variants
Use the following Decision guide:
If you control the host and can run the agent upfront, implement
AgentConnectionBasedEnvironmentContentsView.If SSH is available,
SshEnvironmentContentsViewis the simplest integration (JetBrains Toolbox handles deployment and flows).If the environment is offline, supplement with
ManualEnvironmentContentsViewfor early UI.If you have custom networking, implement
PortForwardingCapableEnvironmentContentsView.Base sealed interface,
close(); getSupportsRedeploy()flagAt least one of the following:
SshEnvironmentContentsView: returnSshConnectionInfo; redeploy supported by defaultAgentConnectionBasedEnvironmentContentsView: returnAgentConnectionHandle
Optional mix-ins are as follows:
ManualEnvironmentContentsView:ideListState,projectListStateofLoadableState<List<Cached*Stub>>PortForwardingCapableEnvironmentContentsView:getHostTunnelConnector()
Connections and helpers
ToolboxProxySettings:
Access the user-configured HTTP/SOCKS proxy as a
ProxyorProxySelector.Listen for changes with
addProxyChangeListener. Reconfigure your clients on change.If
getProxyAuth()returnsBasic, set theProxy-Authorizationheader accordingly.
Check the following (OkHttp) example:
For the ClientHelper:
Pre-download the IDE clients for specific host versions to speed up first connections.
Request automatic client connection once environment becomes connected.
Check the following example:
For RemoteToolsHelper (experimental):
Inspect and manage IDEs/tools on the host (server side) by hint.
Toolbox installs the latest version matching the hint.
Check the following example:
For the SshConnectionValidator:
Validate SSH configuration before attempting to connect.
Returns a list of
SshValidationFailuresubclasses describing issues (host key, permissions, agent conflicts, and so on).
Check the following example:
Agent deployment helpers
AgentDistributionProvider: obtain agent binaries suitable for your host platform.DeploymentSettingsandDeploymentTarget: configure deployment flow for SSH flows; pre-seed locations, retries, and permissions.
Logs and diagnostics
LogCollector: contribute environment-specific logs (JetBrains Toolbox already collects IDE/Agent logs when connected).DiagnosticInfoCollector: attach plugin-specific logs or state snapshots to the support bundle.
UI integration
EnvironmentUiPageManager: request JetBrains Toolbox to re-evaluate or switch the plugin’s environments UI (such as after login completes).ToolboxProxySettings,ClientHelper,RemoteToolsHelperSSH validation helpers:
SshConnectionValidator,SshValidationFailureAgent deployment:
AgentDistributionProvider,DeploymentSettings,DeploymentTargetLogs:
LogCollector,DiagnosticInfoCollectorUI integration:
EnvironmentUiPageManager
Deep link handling
Your provider receives all URIs of the form
jetbrains://gateway/<provider-id>/...inhandleUri.Use this to complete OAuth flows, open specific environments, or trigger actions.
As a side effect, JetBrains Toolbox App will suggest installing your plugin if it is not installed.
Diagnostics and logs
Return
DiagnosticInfoCollectorfrom provider/environment to add files to the diagnostic bundle.Ensure you do not include secrets; prefer redaction where needed.