A lightweight manager for VSCode Remote SSH sessions that automatically cleans up server-side processes and optimizes resource usage.
- Automatic cleanup of stale VSCode server processes
- Resource throttling to prevent VSCode from consuming excessive system resources
- Extension profiles for different project types (Python, Web, etc.)
- Auto-suspend functionality for idle sessions with session state preservation
- Session resumption to continue where you left off
- Minimal extension loading
- Session monitoring and management
- Automatic service installation
- Logging for troubleshooting
curl -o vscode-minimal-manager.sh https://raw.githubusercontent.com/yourusername/vscode-minimal-manager/main/vscode-minimal-manager.sh
chmod +x vscode-minimal-manager.sh
./vscode-minimal-manager.sh --install- Clone the repository:
git clone https://github.com/yourusername/vscode-minimal-manager.git- Enter the directory and install:
cd vscode-minimal-manager
chmod +x vscode-minimal-manager.sh
./vscode-minimal-manager.sh --installThe installation will create the following files:
~/.vscode-minimal/settings.json- Primary VSCode settings~/.vscode-minimal/profiles.json- Extension profiles for different project types
You can modify the settings.json file to adjust behavior:
{
"vscode-minimal-manager.idleTimeout": 3600, // Idle time in seconds before suspending (default: 1 hour)
"vscode-minimal-manager.enableAutoSuspend": true, // Enable/disable auto-suspend
"vscode-minimal-manager.enableResourceLimits": true, // Enable/disable resource limiting
"vscode-minimal-manager.activeProfile": "default" // Set the active profile
}Configure different sets of extensions for different project types in profiles.json:
{
"profiles": {
"python": {
"extensions": ["ms-vscode.remote-ssh", "ms-python.python"],
"resourceLimits": {
"cpuPriority": 5,
"memoryLimit": "2G"
}
}
}
}The script installs as a systemd service and runs automatically.
Check service status:
systemctl status vscode-session-managerView logs:
tail -f ~/.vscode-minimal/vscode-minimal.logList suspended sessions:
~/.vscode-minimal/vscode-minimal-manager.sh --list-sessionsResume a suspended session:
~/.vscode-minimal/resume-session.sh <session-id>Apply resource limits:
~/.vscode-minimal/vscode-minimal-manager.sh --resource-limitsManually trigger auto-suspend check:
~/.vscode-minimal/vscode-minimal-manager.sh --auto-suspendMIT License