All Projects → mkloubert → Vscode Remote Workspace

mkloubert / Vscode Remote Workspace

Licence: other
Multi protocol support for handling remote files like local ones in Visual Studio Code.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Vscode Remote Workspace

Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (-34.52%)
Mutual labels:  dropbox, vscode-extension, slack, ftp, sftp
Unifile
Unified access to cloud storage services through a simple web API.
Stars: ✭ 105 (-46.7%)
Mutual labels:  dropbox, ftp, sftp, webdav
Cyberduck
Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
Stars: ✭ 1,080 (+448.22%)
Mutual labels:  dropbox, ftp, sftp, webdav
Vs Deploy
Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
Stars: ✭ 123 (-37.56%)
Mutual labels:  dropbox, vscode-extension, ftp, sftp
Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+15403.05%)
Mutual labels:  dropbox, ftp, sftp, webdav
Filestash
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Stars: ✭ 5,231 (+2555.33%)
Mutual labels:  dropbox, ftp, sftp, webdav
Vscode Sftp
Super fast sftp/ftp extension for VS Code
Stars: ✭ 1,121 (+469.04%)
Mutual labels:  vscode-extension, ftp, sftp
anyfs
Portable file system for Node
Stars: ✭ 17 (-91.37%)
Mutual labels:  dropbox, filesystem, ftp
Sftpgo
Fully featured and highly configurable SFTP server with optional HTTP, FTP/S and WebDAV support - S3, Google Cloud Storage, Azure Blob
Stars: ✭ 3,534 (+1693.91%)
Mutual labels:  ftp, sftp, webdav
Sync
syncs your local folder with remote folder using scp
Stars: ✭ 293 (+48.73%)
Mutual labels:  ftp, sftp, remote
Raidrive.translation
RaiDrive Translation
Stars: ✭ 518 (+162.94%)
Mutual labels:  ftp, sftp, webdav
Fileprovider
FileManager replacement for Local, iCloud and Remote (WebDAV/FTP/Dropbox/OneDrive) files -- Swift
Stars: ✭ 724 (+267.51%)
Mutual labels:  dropbox, ftp, webdav
Winscp
WinSCP is a popular free SFTP and FTP client for Windows, a powerful file manager that will improve your productivity. It supports also Amazon S3, FTPS, SCP and WebDAV protocols. Power users can automate WinSCP using .NET assembly.
Stars: ✭ 794 (+303.05%)
Mutual labels:  ftp, sftp, webdav
Webdav Fs
Node fs wrapper for WebDAV
Stars: ✭ 72 (-63.45%)
Mutual labels:  webdav, filesystem
Metasearch
Search aggregator for Slack, Google Docs, GitHub, and more 🔍
Stars: ✭ 81 (-58.88%)
Mutual labels:  dropbox, slack
Gdrivedownloader
Just enter the direct URL of the file and it will upload it to Google Drive and print download link of it.
Stars: ✭ 60 (-69.54%)
Mutual labels:  url, remote
Downloads
AD Health Check, Send HTML Email, Ping machines, Encrypt Password,Bulk Password,Microsoft Teams,Monitor Certificate expiry, Monitor cert expiry, AD attributes, IP to Hostname, Export AD group, CSV to SQL,Shutdown, Restart, Local Admin, Disk Space, Account expiry,Restore Permissions, Backup permissions, Delete Files Older Than X-Days, export DHCP options,Read Registry,Distribution group AD attributes,Monitor Windows Services,Export Reverse DNS,Task Monitor,Monitor and alert, Exchange Health check,Get Network Info, Export AD Attributes,AD group members, Office 365 Group member, SQL to CSV, Outlook save send attachments, Upload files to FTP,Exchange – Total Messages Sent Received, Set Teams Only Mode, Intune Duplicate Device,Intune Cleanup Not Evaluated, Ownership and Grant Permissions, Write Create Modify Registry , Organization Hierarchy from AD,Azure AD Privileged Identity Management,Intune – Export MAM Devices,Intune Marking devices as Corporate, Dynamic to Static Distribution Group,Monitor Alert Office 365 services,Group Member Count,Bulk Addition external users sharepoint, ADD to Exchange online License Group,All in One Office 365 Powershell,Bulk Addition of Secondary Email, Automate move mailboxes to o365, Addition Modification Termination Exchange users, Monitoring Unified Messaging port,Unified Messaging Extensions Report, Set Default Quota for SharePoint,Bulk Contact Creation and Forwarding, Uploading and Downloading files sftp, Monitoring Sftp file and download, Office 365 groups Write back, CSV parser, Email address update, Email address modify, MDM enrollment, Welcome Email, Intune Welcome Email, remove messages, remove email, SKOB to AD, SKOB to group, PowerApps report, Powerautomate Report, Flow report, Server QA, Server Check List, O365 IP range, IP range Monitor, o365 Admin Roles, memberof extraction, CSV to Excel, Skype Policy, UPN Flip, Rooms Report, License Reconciliation,Intune Bulk Device Removal, Device Removal, Clear Activesync, Lync Account Termination,Lync Account Removal, Enable office 365 services, Enable o365 Services, Export PST, Site collection Report, Office 365 Group Sites, System Admin,ActiveSync Report,White Space,Active Directory attributes, outlook automation, Intune Detect App, Distribution list Fix, Legacy DN, start service, stop service, disable service, Message tracking, Distribution lists report,Distribution groups report,Quota Report, Auto reply, out of office, robocopy multi session, Home Folder, local admin, Database, UPN SIP Mismatch, Recoverable deleted, teams number, Number assignment, teams phone, AD Group Hierarchy, Hierarchy membership, Sync Groups
Stars: ✭ 75 (-61.93%)
Mutual labels:  ftp, sftp
Pyfilesystem2
Python's Filesystem abstraction layer
Stars: ✭ 1,256 (+537.56%)
Mutual labels:  ftp, filesystem
File Storage
File storage abstraction for Yii2
Stars: ✭ 116 (-41.12%)
Mutual labels:  sftp, filesystem
Team Time Zone
Distributed teams are awesome. Time zones are awful.
Stars: ✭ 21 (-89.34%)
Mutual labels:  slack, remote

vscode-remote-workspace

Share via Facebook Share via Twitter Share via Pinterest Share via Reddit Share via LinkedIn Share via Wordpress Share via Email

Latest Release Installs Rating

Multi protocol support of new Visual Studio Code FileSystem API, especially for handling remote files like local ones.

Demo 1

Table of contents

  1. Install
  2. How to use
  3. Commands
  4. Logs
  5. Support and contribute
  6. Related projects

Install []

Launch VS Code Quick Open (Ctrl + P), paste the following command, and press enter:

ext install vscode-remote-workspace

Or search for things like vscode-remote-workspace in your editor.

How to use []

Create (or update) a .code-workspace file and open it by using File >> Open Workspace... in the GUI:

{
    "folders": [{
        "uri": "sftp://my-user:[email protected]?debug=1",
        "name": "My SFTP folder"
    }]
}

If you've never created a .code-workspace file, you might start with a new folder in your home directory, for instance you could name it "VSCodeWorkspace" or "MyApp". Copy the example configuration (shown above) into a new file, and make sure you edit the URI to be specific to your desired protocol and path. Save the file, ensuring the file name ends with .code-workspace. Then, in the VS Code GUI, open that file using File >> Open Workspace...; after a few moments you'll be connected to the URI you specified.

About parameters []

A parameter is a key-value-pair, which has to be setup in the URI and NOT in the settings section of a .code-workspace file.

If you want to set the debug parameter to 1 for a SFTP connection, e.g.:

{
    "folders": [{
        "uri": "sftp://myUser:[email protected]?debug=1",
        "name": "My SFTP folder"
    }]
}

Import parameters []

Any URI / protocol supports a general parameter, called params, which can load / import parameters from an external file, that contains a JSON object.

For example, you can create a file, lets say sftp_server1_uri_params.json, inside your home directory with the following content:

{
    "debug": 1,
    "mode": 664,
    "key": "id_rsa",
    "phrase": "My Key Passphrase",
    "noPhraseFile": 1
}

In the URI, inside your .code-workspace file, you have to define the params parameter and set it to the path / name of that JSON file:

{
    "folders": [{
        "uri": "sftp://myUser:[email protected]?params=sftp_server1_uri_params.json",
        "name": "My SFTP folder"
    }]
}

Relative paths will be mapped to the user's home directory.

Explicit URI parameters, which are also defined in such an external file, will be overwritten by the values of the file.

Placeholders []

An URI parameter can store placeholders, which are replaced by the values of an external file.

For example, you can create a file, like my_values.json, inside your home directory with the following content:

{
    "importEnvVars": true,
    "exclude": [
        "fooParam"
    ],
    "values": {
        "ENC": {
            "code": " ('UTF' + '8').toLowerCase() ",
            "type": "code"
        },
        "FOO": "bar",
        "SSL": {
            "value": 1
        }
    }
}

You can now place them into the values of parameters, by using the format ${VAR_NAME}:

{
    "folders": [{
        "uri": "webdav://myUser:[email protected]/?values=my_values.json&ssl=${SSL}&encoding=${ENC}&binEncoding=${ENC}&fooParam=${FOO}",
        "name": "My WebDAV folder"
    }]
}

If importEnvVars is set to (true), all environment variables of the current process will be imported automatically. The default value is (false).

Parameters, where placeholders DO NOT work:

  • params
  • values
Code []
{
    "values": {
        "FOO": {
            "code": " $h.normalizeString('b' + 'AR') ",
            "type": "code"
        }
    }
}

Code execution allows you to access the following constants, which contain modules, functions and special values:

Name Description
_ lodash module
$fs fs-extra module
$h vscode-helpers module
$l Logger object (s. Logs)
$m Moment.js module, with timezone support
$os os module
$p path module
$r Extened require() function, which also allows to use the modules of that extension.
$v An object with variables, like $v['cache'], which stores an object for caching values for later executions.

Keep in mind: Code is always executed synchronous and NOT via things like promises!

Environment variables []
{
    "values": {
        "FOO": {
            "name": "SSH_AUTH_SOCK",
            "type": "env"
        }
    }
}
Static []
{
    "values": {
        "foo1": "bar1",
        "Foo2": {
            "value": 2
        }
    }
}

Azure []

URL Format: azure://[account:[email protected]][container][/path/to/file/or/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "azure://my-account:[email protected]/",
        "name": "My Azure folder"
    }]
}

For accessing local storage emulator, use something like that:

{
    "folders": [{
        "uri": "azure://mycontainer/",
        "name": "My local Azure folder"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the credentials). Relative paths will be mapped to the user's home directory. auth=my_azure_account
host The custom host address. host=azure.example.com
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=azure_uri_params.json
values The name of an external file, which contains placeholders values=my_values.json

Remarks []

If you create a new folder, a file called .vscode-remote-workspace with 0 size is created there, to keep sure to detect that new folder later. Before you delete that file, you should store another file there, otherwise the directory will disappear.

Dropbox []

URL Format: dropbox://token[/path/to/file/or/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "dropbox://<API-TOKEN>/",
        "name": "My Dropbox folder"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the API token). Relative paths will be mapped to the user's home directory. auth=dropbox_token
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=dropbox_uri_params.json
values The name of an external file, which contains placeholders values=my_values.json

FTP []

URL Format: ftp://[user:[email protected]]host[:port][/path/to/a/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "ftp://my-user:[email protected]/",
        "name": "My FTP folder"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the credentials). Relative paths will be mapped to the user's home directory. auth=ftp_server1
follow Follow symbolic links or not. Default: 1 follow=0
keepAlive Defines a time interval, in seconds, that sends a NOOP command automatically to keep the connection alive. keepAlive=15
noop The custom FTP command to execute to check if connection is still alive. Default: NOOP noop=SYST
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=ftp_uri_params.json
queue Use a queue for each action inside the connection. Default: 1 queue=0
queueSize Maximum number of actions to execute at once inside a connection. Default: 1 queueSize=3
values The name of an external file, which contains placeholders values=my_values.json

FTPs []

URL Format: ftps://[user:[email protected]]host[:port][/path/to/a/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "ftps://my-user:[email protected]/",
        "name": "My (secure) FTP folder"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the credentials). Relative paths will be mapped to the user's home directory. auth=ftps_server1
follow Follow symbolic links or not. Default: 1 follow=0
keepAlive Defines a time interval, in seconds, that sends a NOOP command automatically to keep the connection alive. Default 10 keepAlive=45
legacy Use ftp module instead of forked @icetee/ftp, if you have problems. Default: 0 legacy=1
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=ftps_uri_params.json
queue Use a queue for each action inside the connection. Default: 1 queue=0
queueSize Maximum number of actions to execute at once inside a connection. Default: 1 queueSize=3
rejectUnauthorized Reject unauthorized server certificates or not. Default: 0 rejectUnauthorized=1
secure Use secure (1) or plain (0) FTP connection. Default: 1 secure=0
values The name of an external file, which contains placeholders values=my_values.json

S3 Buckets []

URL Format: s3://[[email protected]]bucket[/path/to/file/or/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "s3://my-bucket/?acl=public-read",
        "name": "My S3 Bucket"
    }]
}

credential_type []

Default value: shared

Name Description Class in AWS SDK
environment Represents credentials from the environment. EnvironmentCredentials
file Represents credentials from a JSON file on disk. FileSystemCredentials
shared Represents credentials loaded from shared credentials file. SharedIniFileCredentials
values The name of an external file, which contains placeholders values=my_values.json

Parameters []

Name Description Example
api A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify latest to use the latest possible version. api=latest
acl The ACL for new or updated files to use. Default: private acl=public-read
debug Set to 1, to debug a connection, by writing all messages to log files. Default: 0 debug=1
endpoint The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like https://{service}.{region}.amazonaws.com. endpoint=https%3A%2F%2Ffoo.bar.amazonaws.com
file If credential type is set to file, this defines the path to the .json file, which should be used. Relative paths will be mapped to the .aws sub folder inside the user's home directory. file=aws.json
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=s3_uri_params.json
profile If credential type is set to shared, this defines the name of the section inside the .ini file, which should be used. Default: default profile=mkloubert
values The name of an external file, which contains placeholders values=my_values.json
varPrefix If credential type is set to environment, this defines the custom prefix for the environment variables (without _ suffix!), which contain the credentials. Default: AWS varPrefix=MY_AWS_PREFIX

SFTP []

URL Format: sftp://[user:[email protected]]host[:port][/path/to/a/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "sftp://my-user:[email protected]/",
        "name": "My SFTP folder"
    }]
}

Parameters []

Name Description Example
agent Name or path to ssh-agent for ssh-agent-based user authentication. agent=myAgent
agentForward Set to 1, to use OpenSSH agent forwarding ([email protected]) for the life of the connection. Default: 0 agentForward=1
allowedHashes Comma-separated list of hashes to verify. allowedHashes=md5,sha-1
auth A path to a file, that contains the part left to @ (the credentials). Relative paths will be mapped to the user's home directory. auth=ftp_server1
debug Set to 1, to debug a connection, by writing all messages to log files. Default: 0 debug=1
dirMode Defines a special chmod access permission value for the folders on server. This can be an octal number or the path to a JSON file, that contains a "mapper" object. If not defined, the value of mode parameter is used. s. mode for more information. dirMode=755
follow Follow symbolic links or not. Default: 1 follow=0
hash The algorithm to use to verify the fingerprint of a host. Possible values are md5 and sha-1 Default: md5 hash=sha-1
keepAlive Defines a time interval, in seconds, that sends "keep alive packages" automatically. keepAlive=15
keepMode Tries to detect the current chmod access permission value of an existing file on server and tries to apply it when saving. Default: 1 keepMode=0
key The path to the key file or the Base64 string with its content. Relative paths will be mapped to the sub folder .ssh inside the user's home directory. key=id_rsa
mode Defines the chmod access permission value for the files / folders on server. This can be an octal number or the path to a JSON file, that contains a "mapper" object. s. mode for more information. mode=644
noop By default, a list operation is done for the root directory of the server, to check if a connection is alive. You can change this by executing a fast command on the server, which does not produce much response, e.g. noop=uname
noPhraseFile 1 indicates, that phrase parameter will NEVER handled as file path. Default: 0 noPhraseFile=1
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=sftp_uri_params.json
phrase The passphrase (or path to a file with it) for the key file, if needed. To prevent conflicts, you should additionally set noPhraseFile to 1, if that value is explicitly a passphrase value and NO path to an external file. Relative file paths will be mapped to the user's home directory. phrase=myPassphrase
queue Use a queue for each action inside the connection. Default: 1 queue=0
queueSize Maximum number of actions to execute at once inside a connection. Default: 1 queueSize=3
timeout How long (in milliseconds) to wait for the SSH handshake to complete. Default: 20000 timeout=60000
tryKeyboard Try keyboard-interactive user authentication if primary user authentication method fails. Can be 0 or 1. Default: 0 tryKeyboard=1
values The name of an external file, which contains placeholders values=my_values.json
mode []

For the parameters dirMode and mode, you can define an octal number, which will be applied to all files and folders, which are created or changed.

You also can define a path to a JSON file, which contains a mapper object:

{
    "644": [
        "**/*.php",
        "**/*.phtml"
    ],
    "777": "/*.txt"
}

Save the content to a file, like sftp_modes.json, inside your user directory, e.g., and save your mapping in the format as described by the upper JSON snippet.

To use the mappings, setup the mode parameter with the path of that file (in that example to sftp_modes.json). Relative paths will be mapped to the user's home directory.

Glob patterns are handled by minimatch.

Using ssh-agent []

If you use ssh-agent for ssh login, you will likely need to use an environment variable to get the path for the agent parameter. To do this, you'll need to create a values json file to pull the appropriate variable. For instance, in MacOS X, the default ssh-agent path is in $SSH_AUTH_SOCK:

$ ssh-agent
SSH_AUTH_SOCK=/var/folders/w9/mq8x8g87880wn99v2pdx77vr0000gn/T//ssh-VCVBAx48ZEXj/agent.37705; export SSH_AUTH_SOCK;
...

Make a json file to get this value. For instance:

{
    "values": {
        "SSHSOCK": {
            "name": "SSH_AUTH_SOCK",
            "type": "env"
        }
    }
}

Finally, in your .code-workspace file, reference the values json file, and the agent. For instance, if your values json file is named remotessh.json in ~/VSCodeworkspace, your .code-workspace file might have

{
    "folders": [{
        "uri": "sftp://my-user:[email protected]/?values=VSCodeworkspace/remotessh.json&agent=${SSHSOCK}",
        "name": "My SFTP folder"
    }]
}

Slack []

URL Format: slack://[email protected][/][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "slack://<API-TOKEN>@<CHANNEL-ID>",
        "name": "My Slack channel"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the API token). Relative paths will be mapped to the user's home directory. auth=slack_token
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=slack_uri_params.json
values The name of an external file, which contains placeholders values=my_values.json

Remarks []

The protocol only supports read and list operations.

WebDAV []

URL Format: webdav://[user:[email protected]]host[:port][/path/to/file/or/folder][?param1=value1&param2=value2]

{
    "folders": [{
        "uri": "webdav://myUser:[email protected]/?ssl=1",
        "name": "My WebDAV server"
    }]
}

Parameters []

Name Description Example
auth A path to a file, that contains the part left to @ (the credentials). Relative paths will be mapped to the user's home directory. auth=webdav_server1
base The base path, that is used as prefix for all requests. base=nextcloud/remote.php/webdav/
binEncoding The encoding for reading and writing binary files to use. Default: binary binEncoding=utf8
encoding The encoding for reading and writing text files to use. Default: binary encoding=utf8
authType Kind of authentication to use if at least a username and/or password is defined (s. authType. Default: basic authType=digest
params The name of an external file, which contains other parameters for the URI. s. Import parameters params=webdav_uri_params.json
ssl Use secure HTTP or not. Can be 0 or 1. Default: 0 ssl=1
values The name of an external file, which contains placeholders values=my_values.json

authType []

Defines, what type of authentication should be used, if at least a username and/or password is defined. Possible values are:

Name Alternatives Description
basic b Basic access authentication
digest d Digest access authentication

Commands []

Press F1 and enter one of the following commands:

Name Description ID
Remote Workspace: Execute 'git' Command ... Executes git CLI tool on a remote workspace. extension.remote.workspace.executeGit
Remote Workspace: Execute Remote Command ... Executes a command on a remote workspace. extension.remote.workspace.executeRemoteCommmand
Remote Workspace: Open URI ... Adds / opens a new workspace folder with a supported URI. extension.remote.workspace.openURI
Remote Workspace: Receive Remote URI ... Receives a remote URI from another editor. extension.remote.workspace.receiveWorkspaceURI
Remote Workspace: Reset Remote Command History ... Resets all values of last executed remote commands. extension.remote.workspace.resetRemoteCommandHistory
Remote Workspace: Share Remote URI ... Shares a remote URI with another editor. extension.remote.workspace.sendWorkspaceURI

If you want to define shortcuts for one or more command(s), have a look at the article Key Bindings for Visual Studio Code.

Logs []

Log files are stored inside the .vscode-remote-workspace/.logs subfolder of the user's home directory, separated by day.

Support and contribute []

If you like the extension, you can support the project by sending a donation via PayPal to me.

To contribute, you can open an issue and/or fork this repository.

To work with the code:

  • clone this repository
  • create and change to a new branch, like git checkout -b my_new_feature
  • run npm install from your project folder
  • open that project folder in Visual Studio Code
  • now you can edit and debug there
  • commit your changes to your new branch and sync it with your forked GitHub repo
  • make a pull request

Contributors []

Related projects []

node-simple-socket []

node-simple-socket is a simple socket class, which supports automatic RSA encryption and compression for two connected endpoints and runs in Node.js.

vscode-helpers []

vscode-helpers is a NPM module, which you can use in your own VSCode extension and contains a lot of helpful classes and functions.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].