Skip to main content

Sync code to a remote machine

Project description

code_sync

code_sync auto-syncs your code changes in a local directory to a remote machine, so that you can edit your code in your local editor and instantly run those change on a remote machine.

Under the hood, code_sync is running an rsync command whenever watchdog notices changes to the code.

Installation

pip install code_sync

After installing this package, the code_sync tool will be available from the command line.

Usage

Register a project

code_sync --register <project>

This will prompt you to enter the local directory to sync, the remote machines to sync to, and the destination path on the remote to sync the files to.

Once you register a project with code_sync, it will remember that configuration.

code_sync a registered project

code_sync <project>

This command will use the configuration you set for the project when you registered it.

List all projects registered to code_sync

code_sync --list

Run code_sync with specific parameters

code_sync --local_dir <mylocaldir/> --remote_dir <myremotedir/> --target <ssh_remote> --port 2222\n

Edit or delete a registered project

code_sync --edit <project>
code_sync --delete <project>

Notes

Starting

  • In order to run code_sync, you must have an ssh connection open in another window. Once you've entered your password there, code_sync uses that connection.
  • The destination dir must exist already, but need not be empty.

Stopping

  • You can safely quit code_sync with control-c.

About code_sync + git

  • code_sync does not sync files that are excluded by .gitignore, if present in the local directory. It also does not sync .git and .ipynb files.
  • The destination directory should not be treated as an active git repo.
  • Do not run git commands from the destination terminal on the destination directory. The destination dir will have its contents synced to exactly match the local dir, including when you checkout a different branch on local.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code_sync-0.3.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

code_sync-0.3.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file code_sync-0.3.0.tar.gz.

File metadata

  • Download URL: code_sync-0.3.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for code_sync-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c960ec008940d5e149b98a9e71e68f3379b8a639e5397c01bccaf66f9d150114
MD5 d5ce7b42812c2ce8123dcdbe1b2b2175
BLAKE2b-256 8446dcc73439e0cff3bb212f3b53d5485fd388f73a5431122d44e18a38c8f07c

See more details on using hashes here.

File details

Details for the file code_sync-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: code_sync-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for code_sync-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6340a132daa22a2624f299e56791ee62dd0b514a7f7669b9caa087aba2771274
MD5 6e6f75a4b56ae3874e20f79a36ca2750
BLAKE2b-256 617bf743ae2d33402a8c735c63cde2b4c71bf52f57f89e8fae8db9c322762e74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page