How jsbrains works
jsbrains reads IDE settings stored on the host. It can describe deployments, SSH configurations and project mappings without opening a remote session or asking an IDE window to perform the read.
Select an IDE and project
The original SDK discovers supported JetBrains configuration directories or opens an explicit configuration path. The default configuration roots are:
| Host platform | Configuration directory |
|---|---|
| Windows | %APPDATA%\JetBrains\<Product><Version> |
| macOS | ~/Library/Application Support/JetBrains/<Product><Version> |
| Linux | $XDG_CONFIG_HOME/JetBrains/<Product><Version>, or ~/.config/JetBrains/<Product><Version> |
<Product><Version> identifies an IDE configuration, for example a PhpStorm installation. These are settings directories, not executable locations. Discovery requires an options directory and does not accept a cache-only directory. JetBrains documents the default directories and custom configuration paths; use an explicit config path when the IDE uses a custom location.
Several IDE products or versions can be installed at once. Choose the intended installation explicitly when needed. A selected project contributes its .idea settings directory on the host. These settings are read from files, not the Windows registry.
Combine the relevant settings files
| Native file | What the reader takes from it |
|---|---|
options/webServers.xml or .idea/webServers.xml | Global or project deployment server definitions |
options/sshConfigs.xml or .idea/sshConfigs.xml | Shared SSH connection details referenced by a deployment |
.idea/deployment.xml | Project deployment mappings and default deployment selection |
The reader parses supported XML, associates the records and retains source paths. For a project deployment, project SSH configurations take precedence over global configurations with the same referenced ID. Global deployments use global SSH configurations. Reopen or reread settings after the native files change.
Follow a deployment's references
The following synthetic excerpts show the relevant records; their surrounding XML containers are omitted:
<!-- webServers.xml: inside WebServers / option name="servers" -->
<webServer id="demo" name="Example deployment">
<fileTransfer accessType="SFTP" rootFolder="/srv/example" sshConfigId="demo-ssh" />
</webServer>
<!-- sshConfigs.xml: inside SshConfigs / configs -->
<sshConfig id="demo-ssh" host="sftp.example.test" port="22"
username="deploy" authType="KEY_PAIR" keyPath="$USER_HOME$/.ssh/id_ed25519" />
<!-- deployment.xml: inside PublishConfigData / serverData -->
<paths id="demo" name="Example deployment">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$/public" deploy="/public" web="/" />
</mappings>
</serverdata>
</paths>sshConfigId="demo-ssh"points to the SSH record whoseidisdemo-ssh. That record supplies the host, port, username and authentication settings.paths id="demo"associates the mapping with the deployment'sid="demo". When a mapping has no ID, the reader matches its name instead.rootFolder="/srv/example"becomesDeploymentInfo.rootPath, a directory on the server.local="$PROJECT_DIR$/public"becomesDeploymentMapping.localPath. With a project at/work/exampleon the host, it expands to/work/example/public.deploy="/public"andweb="/"becomedeploymentPathandwebPath. The IDE interprets deployment mappings relative to its deployment root; jsbrains returns these fields separately without joining paths or transferring files.authType="KEY_PAIR"becomes authentication typeprivate-key.keyPathidentifies a file on the host, not a server path or key material stored in this XML.
See the public DeploymentInfo, DeploymentMapping and DeploymentAuthInfo definitions for the returned fields. DeploymentParser.ts and DeploymentMappingParser.ts implement these associations and macro expansion. Unsupported or unresolved values remain visible through diagnostics and explicit raw access.
JetBrains explains the native connection settings and mapping meanings. The compatibility evidence records the XML example reviewed on JetBrains' support site and the limits of the supported persistence formats.
The optional bridge uses selection paths such as global/deployments/demo and project/ssh/demo-ssh. These identify a record's scope and kind, not a filesystem location. See Portline profiles for the normalized API.
Resolve stored credentials explicitly
Listing deployments does not unlock Password Safe. Credential resolution is a separate operation through the supported provider and IDE context. A locked store, a required master password and an unsupported format remain explicit outcomes.
The connection XML describes authentication; the secret may live elsewhere. For example, options/security.xml describes the selected Password Safe provider and can specify a custom KeePass database. JetBrains' PasswordSafeSettings.kt defines those persisted settings. The IDE's Passwords documentation explains the native keychain, KeePass and master-password choices.
Supported Windows recovery depends on the owning user and DPAPI context. Some stores require a supplied master-password callback; native macOS/Linux password stores and unsupported plugin identifiers are not automatically recoverable. Private-key paths and SSH-agent settings describe authentication without extracting key material.
For supported SSH credential identities, JetBrains' RemoteCredentialsHolder.java defines the ssh://username@host:port identity and separate password/passphrase qualifiers. The credential identity evidence explains how jsbrains uses those definitions and why plugin-specific stores may still return not-stored.
Raw settings can contain sensitive native fields. The credential guide explains the CredentialResolution results and CLI redaction rules.
Reading and writing
The original SDK provides IDE-specific reads. The optional Portline bridge adds normalized profiles and guarded native writing. Reading does not change settings, create Password Safe entries, transfer files or run SSH commands. Supported writes use a separate preview/apply operation.
Start with the API quick start, CLI quick start or settings and deployments guide.
Shared execution after native interpretation
The source now exposes normalized execution details alongside metadata. @jalsoedesign/portline-dockline performs the shared mapping and delegates live sessions to optional Dockline clients. Native-only requirements appear in unsupportedOptions; they are refused rather than dropped. Read the scoped source-to-session walkthrough for supported operations and explicit trust/authentication options.