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.dev3.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.dev3-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cubething_psync-0.1.0.dev3.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.dev3.tar.gz
Algorithm Hash digest
SHA256 9452a24028b630344e649a457915365c2d9403a91127970666e0691a9416b632
MD5 c860f2b026e29db6f3aafcb0dce081af
BLAKE2b-256 cc0320d835fc5a324f32323b01939b4067579233157535ad132d26cdbccc89c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cubething_psync-0.1.0.dev3-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 7bfc7953100bc9b95ca6d34e9dca82851980069bbb3fd16958eba1db7b63d210
MD5 8f673b892438c92fcb4518344e4a1e7d
BLAKE2b-256 b3274e74a554eb640b45a971b7cb92920ca1ff8f62e0555faf7c22ce0e5810cf

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