Skip to main content

Simple project synchronization tool.

Project description

psync is a simple tool to sync your project over SSH. It consists of a client and server.

Features

  • Project syncing with rsync (requires ssh)
  • Execute project binary on daemon host
  • Real-time logging based on websockets
  • Natural Ctrl-C / SIGINT handling on client and server
  • SSL authentication
  • Containerized for easy deployment

Example usecase

I am working on a game project. Compiling a game written in Rust requires a lot of CPU power, but I want to be able to build from my low-end laptop. I already have my machines hooked up to SSH into each other. So, I set up the client on my laptop, use my editor to SSH into my desktop server, and sync the build assets from the desktop to the laptop using psync. Note that while the desktop is the server for the editor, it is the client for psync. Similar for the laptop.

Usage

When you want to run the project, you must build it and then execute the psync client. The client will sync the files and send a start message to the server. This starts up the synced executable on the server machine. The server will send logs and listen for events, e.g. shutdown messages (sent with SIGINT).

Server

The server should be set up on the machine which is to recieve the files. This corresponds to the laptop in the example usecase.

Ideally you should run the server as a daemon, for example using the systemd config included in this repository.

Client

The client should be invoked on the machine which is to send the files. This corresponds to the desktop in the example usecase. After every build, the client should be run. The client will then sync the files. Once this is done, recieve logs from the server.

Security

Please generate an SSL certificate. You can use the following one-line if you'd like.

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3650 -nodes \
    -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" \
    -addext "subjectAltName=DNS:localhost,DNS:psync-server,IP:127.0.0.1"

Note that this sets an alternate name as psync-server. This will be useful when deploying to docker.

I recommend that you do not expose this over the wire. I am only using it over my local network. If you intend on serving this over the WAN, you should use something like ZeroTier to secure your connection.

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

cubething_psync-0.1.0.dev2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cubething_psync-0.1.0.dev2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file cubething_psync-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: cubething_psync-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cubething_psync-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 45b8fe8b49ed2db297e0bd54e37c93298277e95d92c9136cf8d023a414d280f8
MD5 d3e7284f73bd4cfdaa9f6168b98d28d5
BLAKE2b-256 1870a6dc58942f9037710a88c87e15dff14d2656feac393e436f57da31851364

See more details on using hashes here.

File details

Details for the file cubething_psync-0.1.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: cubething_psync-0.1.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cubething_psync-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 e32253220619d3e27a600da06eff899e259799e6fc0f7510d28a2871fc20bfdb
MD5 2f54157ff38b83eb20721aab05e257e4
BLAKE2b-256 479bb3fc24e66de997643d097a95c90297fdcf81f56763053d000f959e930640

See more details on using hashes here.

Supported by

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