cPanel OpenA small VS Code extension: connect to cPanel, expand remote folders in the sidebar, and edit existing text files using the cPanel HTTPS API. Install and use
Click the folder/code icon in the Activity Bar to return to cPanel, or run cPanel: Show File Browser. The sidebar header shows the saved server and username. The starting folder appears at the top of the tree; browsing stays beneath it. Folders load one level at a time when expanded. The extension does not recursively download The original cPanel: Open File… command is still available as a keyboard-friendly folder picker. Type a filename to filter the current folder, select Saving to the serverEach changed save checks the server copy against the revision you opened, makes a private local backup of that server copy, checks again, uploads the new bytes, and reads the file back to verify the result. The editor keeps its unsaved state if saving fails. If a connection fails after the upload, a later Save can recognize that the server already has the exact contents. VS Code Auto Save also uploads changes if you have enabled it. To upload only when you press Save, turn Auto Save off using VS Code's normal settings. If the server file changed since you opened it, saving stops. Copy your unsaved edits to a temporary local file, revert the remote tab, reopen it from the cPanel sidebar, and merge your edits into the latest server copy. There is no force-overwrite action in this version. cPanel UAPI does not offer an atomic compare-and-swap for this upload, so the pre-upload checks reduce conflicts but cannot eliminate the small race with simultaneous server writes. Use cPanel: Show Local Backups to open the backups folder in your operating system's file manager. Each Updating from 0.1 or 0.2 (same publisher)Install the new release, then reload your VS Code window. Your existing connection and token are reused. Files now open as editable remote documents. Open the cPanel sidebar or run cPanel: Show File Browser. Expected content hashes are retained in workspace state across restarts to help detect conflicts with restored unsaved editors. Reopen a clean file from the sidebar to load and adopt its latest server revision. Bare hostnames use HTTPS port 2083. You can also enter a full HTTPS address with your provider's port. Enter only the server address; remove any Create a token in cPanel → Security → Manage API Tokens. The hosting provider must enable token access and the Fileman API. The default starting folder is Use cPanel: Connect / Change Connection… to replace the connection or an expired token. Use cPanel: Forget Connection to delete the saved connection and token. Version 0.3 scope
The token is stored using VS Code SecretStorage. The extension also stores connection settings and expected file hashes; previous file contents are kept in the local backups described above. Backup directories use mode DevelopmentOpen this source folder in VS Code and press F5 to launch an Extension Development Host. No build or runtime dependencies are needed. With Node.js 20+:
To package with pnpm:
Publisher: RockYou. Release version: 0.3.0. Migrating from development packages: The Marketplace publisher ID is API references |