Suma Visual Studio Code
Full-featured SFTP client and task runner extension for Visual Studio Code.
Overview
Suma Visual Studio Code is a VS Code extension that provides a complete SFTP workflow — profile management, file upload/download/sync, remote file browsing, and credential storage — alongside task runner sidebars for NPM, Gulp, and Composer scripts. It replaces the need for separate SFTP extensions by bundling ssh2-powered transfers directly into the extension.
Current Version: 0.8.2
Requires: VS Code 1.110.0+
Publisher: rhino-group
Key Features
SFTP Client
- Full Upload/Download/Sync — Powered by ssh2 with concurrency-throttled recursive directory operations
- Quick Upload (Ctrl+U) — Upload active file via Quick Pick or pinned profile
- Upload on Save — Automatic upload when files are saved
- SSH Tunnel Support — Bastion/jump host connections
- Host Key Verification — Accept/Reject modal for unknown hosts
- Concurrency Control — Configurable parallel transfers (default 4, max 100)
- Multi-file Operations — Select multiple files from Explorer or SCM for concurrent upload/download
- Sync Options — Delete, skipCreate, ignoreExisting, update modes
SFTP Configuration Manager
- Visual Configuration — Full GUI (webview) for editing
.vscode/sftp.jsonfiles - Multi-Profile Support — Add, remove, duplicate, and switch between server profiles
- Tabbed Interface — Server, Authentication, Transfer, Sync, Watcher, Ignore, Advanced tabs
- Live JSON Preview — See exact configuration JSON before writing
- Real Connection Test — Performs actual SSH authentication (not just TCP check)
- Duplicate Profile — Deep copy with encrypted credentials cleared
Remote File Browser
- Tree View — Expandable remote directory tree in the activity bar
- Profile Selector — Switch between configured SFTP profiles
- Persistent Connection — Stays connected while browsing
- Download to Local — Right-click any remote file to download
- Compare with Local — Diff remote file vs local version
- Edit Remote File — Open remote files with upload-on-save prompt
- Download Folder — Recursive folder download
- File Info Tooltips — Size and date displayed on hover
Quick Upload
- Ctrl+U Keybinding — Upload active file instantly
- Pin Default Profile — Set a current upload profile for one-key deploy
- Editor Context Menu — Right-click in editor or tab for upload submenu
- SCM Multi-Select — Select multiple files in Git view and upload all at once
Credential Security
- AES-256-GCM Encryption — Credentials stored in encrypted file in extension globalStorage
- PBKDF2 Key Derivation — Encryption key derived from VS Code machineId
- Automatic Credential Prompting — Choose password or SSH key, save or use once
- Automatic Migration — Existing OS credential store entries migrated automatically
- Sentinel Pattern — Passwords never stored in
.vscode/sftp.json(replaced with sentinel values)
JetBrains SFTP Import
- One-Click Import — Import configurations from
.ideafolder - Source Files — Reads
deployment.xml,webServers.xml, andsshConfigs.xml - Username Extraction — Correctly resolves usernames from SSH config references
- Private Key Detection — Imported profiles with
privateKeyfield properly recognized
Compare with Remote
- Right-click any file in Explorer to diff local vs remote version
- Uses VS Code's built-in diff editor
Transfer Log
- Rolling log panel (500 entries) showing upload/download/error/skip history
- Real-time updates during operations
NPM Scripts Manager
- Auto-Detection — Discovers all
package.jsonfiles in workspace - Click to Run — Execute any script directly from sidebar
- Build/Watch Highlighting — Visual indicators for common script types
- File Watcher — Automatic refresh when
package.jsonchanges - Exclusion Filters — Ignores
vendor/and.vscode-test/directories
Gulp Tasks Manager
- Auto-Detection — Finds gulpfile variants (
gulpfile.js,gulpfile.ts,gulpfile.babel.js, etc.) - Runtime Discovery — Uses
gulp --tasks-simplefor accurate task listing - Click to Run — Execute any task from the sidebar
- File Watcher — Refreshes when gulpfile changes
Composer Scripts Manager
- Auto-Detection — Discovers
composer.jsonfiles in workspace - Click to Run — Execute any composer script from sidebar
- Lifecycle Hook Highlighting — Pre-/post- hooks shown with event icons
- File Watcher — Automatic refresh when
composer.jsonchanges
Architecture Overview
┌─────────────────────────────────────────────────────┐
│ extension.js (entry point, ~1490 lines) │
│ Registers commands, views, coordinates modules │
├─────────────────────────────────────────────────────┤
│ src/ │
│ ├── sftpService.js Core ssh2 SFTP client │
│ ├── sftpConfigPanel.js Webview config GUI │
│ ├── sftpProfilesProvider.js Profile tree sidebar │
│ ├── sftpAutoUpload.js Upload-on-save/watcher │
│ ├── sftpSecrets.js Hydrate/dehydrate │
│ ├── sftpCredentialStore.js AES-256-GCM storage │
│ ├── remoteBrowserProvider.js Remote file tree │
│ ├── remoteEditTracker.js Remote edit → upload │
│ ├── transferLogProvider.js Transfer history │
│ ├── jetbrainsImporter.js .idea config import │
│ ├── npmScriptsProvider.js NPM sidebar │
│ ├── gulpTasksProvider.js Gulp sidebar │
│ └── composerScriptsProvider.js Composer sidebar │
└─────────────────────────────────────────────────────┘
Design Decisions:
- No build step — Plain CommonJS modules, directly loaded by VS Code
- No TypeScript — JavaScript throughout for simplicity
- Worker-queue concurrency — Parallel file operations with configurable limit
- Context keys — Dynamic menu visibility (
suma-sftp:hasProfile0,suma-sftp:hasCurrentProfile,suma-sftp:remoteBrowserConnected) - File watcher — Watches
.vscode/sftp.jsonfor real-time context updates
Activity Bar Containers
The extension contributes 4 activity bar sidebar containers:
- SFTP Manager — Profile list, remote browser, transfer log
- NPM Scripts — Auto-discovered package.json scripts
- Gulp Tasks — Auto-discovered gulpfile tasks
- Composer Scripts — Auto-discovered composer.json scripts
Use Cases
- WordPress Development — Deploy to staging/production servers with Ctrl+U
- Theme/Plugin Development — Upload on save for instant remote sync
- Multi-Environment — Manage dev, staging, production profiles with one-click switching
- Remote Editing — Browse and edit files directly on the server
- Task Running — Execute npm/gulp/composer scripts without leaving the editor
- JetBrains Migration — Import existing SFTP configs from PhpStorm/WebStorm
Installation
From VSIX File
- Download
.vsixfile from releases - Open VS Code
- Press
Ctrl+Shift+P→ "Install from VSIX" - Select the
.vsixfile - Reload VS Code
Usage
Quick Upload (Ctrl+U)
- Open any file in the editor
- Press
Ctrl+U - Select target profile from Quick Pick (or uses pinned profile)
- File uploads immediately
Pin a default profile:
Ctrl+Shift+P → "SFTP: Set Current Upload Profile"
Upload from Explorer/SCM
- Single file — Right-click → Upload to SFTP
- Multiple files — Select multiple files → Right-click → Upload to SFTP
- SCM (Git) — Select changed files in Source Control view → Right-click → Upload
Multi-file selections upload concurrently using the profile's concurrency setting.
Remote File Browser
- Open the SFTP Manager sidebar
- Expand the Remote Browser section
- Select a profile (auto-connects to first profile on open)
- Browse the remote directory tree
- Right-click files for: Download, Compare with Local, Edit
Configuration Manager
Ctrl+Shift+P → "SFTP: Open Config Manager"
Or right-click any folder in Explorer → "SFTP: Open Config Manager"
Import from JetBrains
Ctrl+Shift+P → "SFTP: Import from JetBrains"
Reads .idea/deployment.xml, .idea/webServers.xml, and .idea/sshConfigs.xml.
Configuration Options
Server Tab
| Option | Description |
|---|---|
| Name | Profile identifier |
| Host | Server hostname or IP |
| Port | Default 22 (SFTP) or 21 (FTP) |
| Protocol | SFTP or FTP |
| Username | SSH/FTP username |
| Password | Authentication password (stored encrypted) |
| Remote Path | Target directory on server |
| Context | Local workspace folder to map |
Authentication Tab (SFTP Only)
| Option | Description |
|---|---|
| Private Key | Path to SSH private key file |
| Passphrase | SSH key passphrase |
| Agent | SSH agent socket path |
| Interactive Auth | Keyboard-interactive authentication |
| Hop (Jump Host) | Bastion/tunnel host configuration |
Transfer Tab
| Option | Description |
|---|---|
| Upload on Save | Auto-upload when files saved |
| Download on Open | Auto-download when files opened |
| Confirm Before Upload | Show confirmation prompt |
| Confirm Before Download | Show confirmation prompt |
Sync Tab
| Option | Description |
|---|---|
| Delete | Remove remote files not in local |
| Skip Create | Don't upload new files |
| Ignore Existing | Don't overwrite existing files |
| Update | Only upload newer files |
Watcher Tab
| Option | Description |
|---|---|
| Watcher Files | Glob patterns to watch |
| Auto Upload | Upload on file change |
| Auto Delete | Delete remote on local delete |
Ignore Tab
Glob patterns to exclude from operations:
.git/**
node_modules/**
*.log
.DS_Store
vendor/**
Advanced Tab
| Option | Description |
|---|---|
| Connect Timeout | Connection timeout in milliseconds |
| Retry Attempts | Failed upload retry count |
| Concurrency | Parallel transfer limit (default 4, max 100) |
| Algorithms | SSH cipher/key exchange preferences |
Extension Commands
| Command | Keybinding | Description |
|---|---|---|
suma-sftp.uploadCurrentFile | Ctrl+U | Upload active file via Quick Pick or pinned profile |
suma-sftp.setCurrentProfile | — | Pin a default upload profile |
suma-sftp.clearCurrentProfile | — | Unpin current upload profile |
suma-sftp.openConfigManager | — | Open SFTP Config Manager webview |
suma-sftp.createNewProfile | — | Create new SFTP profile |
suma-sftp.duplicateProfile | — | Deep copy existing profile |
suma-sftp.testConnection | — | Test SSH connection to profile |
suma-sftp.importJetBrains | — | Import from JetBrains .idea folder |
suma-sftp.uploadFile | — | Upload file (Explorer/SCM context) |
suma-sftp.downloadFile | — | Download file from remote |
suma-sftp.syncRemote | — | Sync local folder to remote |
suma-sftp.compareWithRemote | — | Diff local file vs remote |
suma-sftp.remoteBrowser.download | — | Download from remote browser |
suma-sftp.remoteBrowser.compare | — | Compare from remote browser |
suma-sftp.remoteBrowser.edit | — | Edit remote file |
suma-sftp.remoteBrowser.downloadFolder | — | Download remote folder recursively |
suma-sftp.remoteBrowser.refresh | — | Refresh remote browser tree |
suma-sftp.remoteBrowser.disconnect | — | Disconnect from remote |
suma-npm.runScript | — | Run NPM script |
suma-gulp.runTask | — | Run Gulp task |
suma-composer.runScript | — | Run Composer script |
Dependencies
| Package | Version | Purpose |
|---|---|---|
ssh2 | ^1.17.0 | SSH/SFTP connections |
picomatch | ^4.0.4 | Glob pattern matching for ignore rules |
xml2js | ^0.6.2 | JetBrains XML config parsing |
Development
Build from Source
git clone https://github.com/rhino-group/suma-visual-studio-code.git
cd suma-visual-studio-code
npm install
Package Extension
npm run package
# or
npm run build
Both run vsce package --allow-missing-repository.
Run in Development
- Open project in VS Code
- Press
F5to launch Extension Development Host - Test commands in new VS Code window
Lint
npm run lint
Runs ESLint across extension.js, src/, media/, and test/ directories.
File Structure
suma-visual-studio-code/
├── extension.js # Main entry point (~1490 lines)
├── package.json # Extension manifest (32 commands, 4 containers, 7 views)
├── src/
│ ├── sftpService.js # Core ssh2 SFTP client
│ ├── sftpConfigPanel.js # Webview config manager GUI
│ ├── sftpProfilesProvider.js # Profile tree sidebar
│ ├── sftpAutoUpload.js # Upload-on-save + file watcher
│ ├── sftpSecrets.js # Credential hydrate/dehydrate
│ ├── sftpCredentialStore.js # AES-256-GCM encrypted storage
│ ├── remoteBrowserProvider.js # Remote file tree view
│ ├── remoteEditTracker.js # Remote edit → upload tracking
│ ├── transferLogProvider.js # Transfer history panel
│ ├── jetbrainsImporter.js # JetBrains .idea import
│ ├── npmScriptsProvider.js # NPM scripts sidebar
│ ├── gulpTasksProvider.js # Gulp tasks sidebar
│ └── composerScriptsProvider.js # Composer scripts sidebar
├── media/ # Icons and webview assets
└── test/ # Extension tests
Changelog Highlights
| Version | Date | Change |
|---|---|---|
| 0.8.2 | 2026-05-21 | Multi-file upload/download concurrency from Explorer/SCM |
| 0.8.1 | 2026-05-20 | SCM multi-file upload fix (all selected files, not just right-clicked) |
| 0.8.0 | 2026-05-13 | Composer Scripts Manager sidebar |
| 0.7.3 | 2026-05-12 | AES-256-GCM encrypted credential storage (replaced OS store) |
| 0.7.2 | 2026-05-08 | Upload menu shows correct profile names (Quick Pick) |
| 0.7.0 | 2026-05-08 | Quick Upload (Ctrl+U), pin profile, editor context menu |
| 0.6.2 | 2026-05-08 | Duplicate Profile command |
| 0.6.0 | 2026-04-28 | Remote File Browser with download/compare/edit |
| 0.5.4 | 2026-04-17 | Automatic credential prompting |
| 0.5.2 | 2026-04-17 | JetBrains SFTP Import |
| 0.5.1 | 2026-04-16 | Compare with Remote |
| 0.5.0 | 2025-07-25 | Full SFTP upload/download/sync, SSH tunnels, host key verification |
| 0.4.0 | 2026-04-16 | Gulp Tasks Manager |
| 0.3.0 | 2026-04-06 | NPM Scripts Manager |
| 0.2.0 | — | SFTP Manager with webview config editor |
| 0.1.0 | — | Initial release |