Skip to main content

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.json files
  • 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 .idea folder
  • Source Files — Reads deployment.xml, webServers.xml, and sshConfigs.xml
  • Username Extraction — Correctly resolves usernames from SSH config references
  • Private Key Detection — Imported profiles with privateKey field 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.json files 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.json changes
  • 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-simple for 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.json files 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.json changes

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.json for real-time context updates

Activity Bar Containers

The extension contributes 4 activity bar sidebar containers:

  1. SFTP Manager — Profile list, remote browser, transfer log
  2. NPM Scripts — Auto-discovered package.json scripts
  3. Gulp Tasks — Auto-discovered gulpfile tasks
  4. 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

  1. Download .vsix file from releases
  2. Open VS Code
  3. Press Ctrl+Shift+P → "Install from VSIX"
  4. Select the .vsix file
  5. Reload VS Code

Usage

Quick Upload (Ctrl+U)

  1. Open any file in the editor
  2. Press Ctrl+U
  3. Select target profile from Quick Pick (or uses pinned profile)
  4. 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

  1. Open the SFTP Manager sidebar
  2. Expand the Remote Browser section
  3. Select a profile (auto-connects to first profile on open)
  4. Browse the remote directory tree
  5. 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

OptionDescription
NameProfile identifier
HostServer hostname or IP
PortDefault 22 (SFTP) or 21 (FTP)
ProtocolSFTP or FTP
UsernameSSH/FTP username
PasswordAuthentication password (stored encrypted)
Remote PathTarget directory on server
ContextLocal workspace folder to map

Authentication Tab (SFTP Only)

OptionDescription
Private KeyPath to SSH private key file
PassphraseSSH key passphrase
AgentSSH agent socket path
Interactive AuthKeyboard-interactive authentication
Hop (Jump Host)Bastion/tunnel host configuration

Transfer Tab

OptionDescription
Upload on SaveAuto-upload when files saved
Download on OpenAuto-download when files opened
Confirm Before UploadShow confirmation prompt
Confirm Before DownloadShow confirmation prompt

Sync Tab

OptionDescription
DeleteRemove remote files not in local
Skip CreateDon't upload new files
Ignore ExistingDon't overwrite existing files
UpdateOnly upload newer files

Watcher Tab

OptionDescription
Watcher FilesGlob patterns to watch
Auto UploadUpload on file change
Auto DeleteDelete remote on local delete

Ignore Tab

Glob patterns to exclude from operations:

.git/**
node_modules/**
*.log
.DS_Store
vendor/**

Advanced Tab

OptionDescription
Connect TimeoutConnection timeout in milliseconds
Retry AttemptsFailed upload retry count
ConcurrencyParallel transfer limit (default 4, max 100)
AlgorithmsSSH cipher/key exchange preferences

Extension Commands

CommandKeybindingDescription
suma-sftp.uploadCurrentFileCtrl+UUpload active file via Quick Pick or pinned profile
suma-sftp.setCurrentProfilePin a default upload profile
suma-sftp.clearCurrentProfileUnpin current upload profile
suma-sftp.openConfigManagerOpen SFTP Config Manager webview
suma-sftp.createNewProfileCreate new SFTP profile
suma-sftp.duplicateProfileDeep copy existing profile
suma-sftp.testConnectionTest SSH connection to profile
suma-sftp.importJetBrainsImport from JetBrains .idea folder
suma-sftp.uploadFileUpload file (Explorer/SCM context)
suma-sftp.downloadFileDownload file from remote
suma-sftp.syncRemoteSync local folder to remote
suma-sftp.compareWithRemoteDiff local file vs remote
suma-sftp.remoteBrowser.downloadDownload from remote browser
suma-sftp.remoteBrowser.compareCompare from remote browser
suma-sftp.remoteBrowser.editEdit remote file
suma-sftp.remoteBrowser.downloadFolderDownload remote folder recursively
suma-sftp.remoteBrowser.refreshRefresh remote browser tree
suma-sftp.remoteBrowser.disconnectDisconnect from remote
suma-npm.runScriptRun NPM script
suma-gulp.runTaskRun Gulp task
suma-composer.runScriptRun Composer script

Dependencies

PackageVersionPurpose
ssh2^1.17.0SSH/SFTP connections
picomatch^4.0.4Glob pattern matching for ignore rules
xml2js^0.6.2JetBrains 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

  1. Open project in VS Code
  2. Press F5 to launch Extension Development Host
  3. 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

VersionDateChange
0.8.22026-05-21Multi-file upload/download concurrency from Explorer/SCM
0.8.12026-05-20SCM multi-file upload fix (all selected files, not just right-clicked)
0.8.02026-05-13Composer Scripts Manager sidebar
0.7.32026-05-12AES-256-GCM encrypted credential storage (replaced OS store)
0.7.22026-05-08Upload menu shows correct profile names (Quick Pick)
0.7.02026-05-08Quick Upload (Ctrl+U), pin profile, editor context menu
0.6.22026-05-08Duplicate Profile command
0.6.02026-04-28Remote File Browser with download/compare/edit
0.5.42026-04-17Automatic credential prompting
0.5.22026-04-17JetBrains SFTP Import
0.5.12026-04-16Compare with Remote
0.5.02025-07-25Full SFTP upload/download/sync, SSH tunnels, host key verification
0.4.02026-04-16Gulp Tasks Manager
0.3.02026-04-06NPM Scripts Manager
0.2.0SFTP Manager with webview config editor
0.1.0Initial release