Code Monkey home page Code Monkey logo

vscode-sftp's Introduction

sftp sync extension for VS Code

Very simple, requires just three lines of config! Very fast, finished in a blink.

Features

  • Remote explorer
  • Multiple configs
  • Switchable profiles
  • Browser remote files
  • Compare a local file with remote file
  • Sync directory to remote
  • Sync directory to local
  • Download file/directory to local
  • Upload file/directory to remote
  • Upload to remote on save
  • Dual authentication
  • Watch project directory for external changes and automatically update remote

Usage

  1. Ctrl+Shift+P on Windows/Linux open command palette, run SFTP: config command.
  2. Enjoy.

Note :Sync commands will only be available to a directory. Try not to bind shortcuts to those commands because there is no way to figure out the target directory.

Main Commands

Command Description Detailed description
SFTP: Config create a new config file at workspace root see below for an explained config file
SFTP: Upload upload file/directory copies selected files from the local to the remote directory, overwriting the remote ones. Files that are only present on the remote side won't be affected. Files that are only present on the local side will be created remotely
SFTP: Download download file/directory same as above, but in the opposite direction
SFTP: Sync To Remote sync local directory to remote only available for directories. Copies common files (that exist on both sides) from local dir to remote, overwriting destination. If syncMode is set to full, files that exist only on the local side will be created remotely, and files that exist only on the remote side will be deleted
SFTP: Sync To Local sync remote directory to local same as above, but in the opposite direction

Config

Example

Password Free!

{
  "host": "host",
  "username": "username",
  "remotePath": "/remote/workspace", 
}

Profiles

{ 
  "context": "/workspace/a",
  "username": "username",
  "password": "password",
  "remotePath": "/remote/workspace/a", 
  "watcher": {
    "files": "dist/*.{js,css}",
    "autoUpload": false,
    "autoDelete": false,
  },
  "profiles" : {
    "dev" : {
      "host": "dev-host",
      "remotePath" : "/dev",
      "uploadOnSave": true
    },
    "prod" : {
      "host": "prod-host",
      "remotePath" : "/prod"
    }
  }
}

Note: context and watcher are only avaliable at root level.

Use SFTP: Set Profile to swtich profile.

multiple context.

[
  {
    "name": "server1",
    "context": "/workspace/a",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/workspace/a", 
  },
  {
    "name": "server2",
    "context": "/workspace/b",
    "host": "host",
    "username": "username",
    "password": "password",
    "remotePath": "/remote/workspace/b", 
  }
]

Note: name is required in this mode.

You can see the full config here.

Remote Explorer

remote-explorer-preview

Remote Explorer let you explore files in remote. You can open Remote Explorer by:

  1. View: Show SFTP.
  2. Click SFTP view in Activity Bar.

You can only view files content with Remote Explorer. Run command SFTP: Edit in Local to edit it in local.

Note: You need manually refresh the parent folder after delete a file to make the explorer updated.


Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Alipay

Alipay

Wechat

Wechat

PayPal

PayPal

vscode-sftp's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.