Slurm Connect (VS Code extension)

Slurm Connect helps you allocate Slurm resources on a cluster and connect VS Code Remote-SSH through a compute node.
Key features:
- One-click discovery of partitions, QoS/accounts (optional), modules, and free-resource hints.
- Persistent or ephemeral sessions, with reconnect to existing allocations.
- Automatic SSH include management for Remote-SSH (no manual host entries).
- Resource validation hints and profile support for repeatable runs.
- Module picker with paste, chips, and clear-all.
- Optional remote folder open (leave blank for an empty window) with window targeting.
- Optional local HTTP(S) proxy for outbound requests from compute nodes (proxies all non-loopback hosts).
Requirements:
- VS Code with Remote - SSH installed.
- SSH authentication configured for the cluster (SSH config or agent; agent forwarding recommended).
- Python 3.9+ available on the login nodes.
- Bundled
vscode-proxy.py auto-installed to ~/.slurm-connect/vscode-proxy.py on connect (can be disabled).
- Windows note: Slurm Connect follows Remote-SSH's SSH client selection. If Remote-SSH picks Git's
ssh.exe, the extension may prompt to switch to Windows OpenSSH so ssh-agent works reliably.
Install:
Quick start:
- Install Slurm Connect from the marketplace (or with the CLI command above).
- Open the Slurm Connect view from the activity bar.
- Select a login host (or pick from SSH config), username if needed, and an optional identity file.
- Click Get cluster info, choose resources, then Connect.
- While connecting, the button changes to Cancel so you can abort before Remote-SSH starts.
The extension queries the login host, writes a Slurm Connect SSH include file, ensures your SSH config contains a small managed Slurm Connect Include block (with a note), and connects. It does not replace your SSH config. On Windows, the Include path stays in its configured form (default ~/.ssh/slurm-connect.conf) for compatibility with both native and POSIX-style SSH clients. Local Slurm Connect logs are capped (currently 5 MB) to avoid unbounded growth.
Profiles store the values you edit in the Slurm Connect view (connection, resources, and advanced fields). The local proxy enable and proxy debug logging toggles are in the view. Advanced local proxy settings and other global-only settings like SSH host prefix, managed include path, session state directory, proxy auto-install, SSH query config, and SSH host key checking live in VS Code Settings under slurmConnect.
How it works:

The diagram above was inspired by the VS Code Remote-SSH architecture diagram.
Troubleshooting:
- In the Slurm Connect view, use Advanced > Open logs for extension logs and Remote-SSH log for transport errors.
- If authentication or host-key checks fail, review docs/ssh.md.
- For command/setting mismatches, review docs/settings.md and confirm your
slurmConnect settings.
Security and footprint:
- Slurm Connect adds a small managed
Include block in your SSH config and writes generated hosts to ~/.ssh/slurm-connect.conf (or your configured include path).
- On the cluster, it can manage
~/.slurm-connect/vscode-proxy.py and proxy logs under ~/.slurm-connect/.
- Local proxy support is optional and proxies non-loopback traffic only; loopback targets (
localhost, 127.0.0.1, ::1) are never proxied.
Uninstall and cleanup:
- Uninstall the extension from VS Code.
- Remove the managed Slurm Connect
Include block from your SSH config if you no longer need generated hosts.
- Remove the generated include file (default
~/.ssh/slurm-connect.conf) if you no longer need it.
- Optionally remove
~/.slurm-connect/ on cluster login nodes to delete the installed proxy script/logs.
QR links:
Docs:
Contributing and development:
- Install dependencies:
npm install
- Install Python test dependencies:
python3 -m pip install -r requirements-dev.txt
- Lint:
npm run lint
- Typecheck:
npm run typecheck
- Fast TS unit tests:
npm test
- TS unit tests with coverage gate:
npm run test:coverage
- VS Code smoke test:
npm run test:integration
- VS Code fixture integration test:
npm run test:integration:slurm
- External Slurm OS-matrix client integration test:
npm run test:integration:slurm-client
- External Slurm OS-matrix Remote-SSH allocation test:
npm run test:integration:slurm-client-remote-session
- External Slurm OS-matrix Remote-SSH local proxy routing test:
npm run test:integration:slurm-client-local-proxy
- Python proxy tests with coverage gate:
npm run test:python
- Full local pipeline:
npm run test:ci
- Real SSH/Slurm fixture startup:
npm run e2e:slurm:up
- Real SSH/Slurm smoke test:
npm run e2e:slurm:smoke
- Full Remote-SSH fixture session test:
npm run e2e:slurm:remote-session
- Full Remote-SSH fixture local proxy routing test:
npm run e2e:slurm:local-proxy-session
- Fixture teardown:
npm run e2e:slurm:clean
- Slurm fixture docs: docs/e2e-slurm-fixture.md
- Optional UI screenshot refresh:
npm run screenshot:webview -- --out media/slurm-connect-ui.png
- Project metadata: CHANGELOG.md, LICENSE
| |