API quick start
Read a saved deployment with the original jsbrains SDK. The optional normalized-profile bridge has its own quick start. This example uses synthetic settings on the host and does not connect to a server.
Install
npm install @jalsoedesign/jsbrainsUse Node.js 20 or newer for the original SDK. Follow language setup for TypeScript tooling and JavaScript module configuration.
Save the fixture
Save PhpStorm2026.2/options/webServers.xml at the shown path.
Fixture contents
<application>
<component name="WebServers">
<option name="servers">
<webServer id="demo" name="Demo">
<fileTransfer accessType="SFTP" host="127.0.0.1" port="22" username="deploy" />
</webServer>
</option>
</component>
</application>Save PhpStorm2026.2/options/sshConfigs.xml at the shown path.
Fixture contents
<application>
<component name="SshConfigs">
<configs>
<sshConfig id="demo-ssh" host="127.0.0.1" port="22" username="deploy" authType="OPEN_SSH" />
</configs>
</component>
</application>Create the PhpStorm2026.2/options directories first.
Read the settings
Save the selected language tab as read-deployments.ts or its matching variant, beside the fixture directory.
// read-deployments.ts
import {JetBrains} from '@jalsoedesign/jsbrains';
const installation = await JetBrains.fromConfigPath(process.argv[2] ?? './PhpStorm2026.2');
const deployments = await installation.getGlobalDeployments();
console.log('Deployments: ' + deployments.length);
for (const deployment of deployments) {
console.log(deployment.name + ': ' + deployment.type + ' ' + deployment.host + ':' + deployment.port);
}
console.log('Metadata only: no server connection or Password Safe unlock.');// read-deployments.js
import {JetBrains} from '@jalsoedesign/jsbrains';
const installation = await JetBrains.fromConfigPath(process.argv[2] ?? './PhpStorm2026.2');
const deployments = await installation.getGlobalDeployments();
console.log('Deployments: ' + deployments.length);
for (const deployment of deployments) {
console.log(deployment.name + ': ' + deployment.type + ' ' + deployment.host + ':' + deployment.port);
}
console.log('Metadata only: no server connection or Password Safe unlock.');// read-deployments.mjs
import {JetBrains} from '@jalsoedesign/jsbrains';
const installation = await JetBrains.fromConfigPath(process.argv[2] ?? './PhpStorm2026.2');
const deployments = await installation.getGlobalDeployments();
console.log('Deployments: ' + deployments.length);
for (const deployment of deployments) {
console.log(deployment.name + ': ' + deployment.type + ' ' + deployment.host + ':' + deployment.port);
}
console.log('Metadata only: no server connection or Password Safe unlock.');// read-deployments.cjs
async function main() {
const {JetBrains} = await import('@jalsoedesign/jsbrains');
const installation = await JetBrains.fromConfigPath(process.argv[2] ?? './PhpStorm2026.2');
const deployments = await installation.getGlobalDeployments();
console.log('Deployments: ' + deployments.length);
for (const deployment of deployments) {
console.log(deployment.name + ': ' + deployment.type + ' ' + deployment.host + ':' + deployment.port);
}
console.log('Metadata only: no server connection or Password Safe unlock.');
}
main().catch(error => {
console.error(error);
process.exitCode = 1;
});Run it
npx tsx read-deployments.tsnode read-deployments.jsnode read-deployments.mjsnode read-deployments.cjsOutput
Deployments: 1
Demo: sftp 127.0.0.1:22
Metadata only: no server connection or Password Safe unlock.Download: TypeScript · JavaScript · MJS · CommonJS
Continue by task
Read deployments and settings, explore discovery, or use normalized profiles and writing. Validation, unsupported settings and source lifetimes are explained in the corresponding guides and API reference.