{"id":25129539,"url":"https://github.com/xarantolus/mysti","last_synced_at":"2025-06-29T06:07:27.514Z","repository":{"id":214858562,"uuid":"728771496","full_name":"xarantolus/mysti","owner":"xarantolus","description":"Self-hosted clipboard sync and remote command runner for Linux and Windows","archived":false,"fork":false,"pushed_at":"2024-07-17T08:43:49.000Z","size":308,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T21:43:59.787Z","etag":null,"topics":["clipboard-sync","cross-platform","remote-command-execution","wake-on-lan"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xarantolus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-07T16:54:06.000Z","updated_at":"2025-01-04T02:00:59.000Z","dependencies_parsed_at":"2023-12-31T13:20:25.584Z","dependency_job_id":"c5890dbb-ae5e-485e-963d-46243b09fb4d","html_url":"https://github.com/xarantolus/mysti","commit_stats":null,"previous_names":["xarantolus/mysti"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/xarantolus/mysti","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarantolus%2Fmysti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarantolus%2Fmysti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarantolus%2Fmysti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarantolus%2Fmysti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xarantolus","download_url":"https://codeload.github.com/xarantolus/mysti/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xarantolus%2Fmysti/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545037,"owners_count":23326660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard-sync","cross-platform","remote-command-execution","wake-on-lan"],"created_at":"2025-02-08T12:17:55.996Z","updated_at":"2025-06-29T06:07:27.497Z","avatar_url":"https://github.com/xarantolus.png","language":"Rust","readme":"# Mysti\nMysti is a cross-platform event synchronization software. It can be used to sync clipboard events between different devices, turn computers on and off via the network and other features.\n\nCurrent features:\n- Copy text and images between different computers (e.g. copy between a Windows PC and Linux Laptop)\n- Turn on a computer via Wake on LAN (if on the same network as your server and configured correctly)\n- Any other user-defined shell command: turn off, log off, reboot a computer remotely, etc.\n\n## Overview\nMysti has three components:\n- A **server** that clients can connect to for exchanging events\n- A **daemon** that runs in the background on client PCs to process events (runs commands and sends clipboard changes to the server)\n- A **CLI** that can be used to send commands interactively\n\n![Architecture Diagram](.github/img/architecture.png)\n\n- Table of contents\n  - [Overview](#overview)\n  - [Build from source](#build-from-source)\n  - [Server](#server)\n    - [Server Setup](#server-setup)\n  - [Daemon and CLI Setup](#daemon-and-cli-setup)\n    - [Client Configuration](#client-configuration)\n    - [Automatically start the daemon on boot](#automatically-start-the-daemon-on-boot)\n      - [Windows](#windows)\n      - [Fedora Linux (39)](#fedora-linux-39)\n    - [Sending commands](#sending-commands)\n  - [Limitations](#limitations)\n\n\u003cdetails\u003e\n\n\u003csummary\u003eInstruction for building from source\u003c/summary\u003e\n\n### Build from source\nThis section describes how to build the software from source.\n\nYou can build both the server, daemon and CLI from source using `cargo build` in their directories (or `make` in the main directory to install CLI/Daemon).\n\nFor the daemon, you might need to install additional libraries, which you can find listed in [the CI config file](.github/workflows/build-client.yml).\n\n## Server\nThe server is built in Docker. Feel free to contribute additional common configurations.\n\n\u003c/details\u003e\n\n\n### Server Setup\nBefore using the daemon/CLI, you need to have a working server setup. You need to install Docker on your system to run the server.\n\nFor your setup, you can copy one of the directories in the [deployment](deployment) directory.\n\n```shell\ndeployment/arm64v8-namecheap$ tree -aA\n.\n├── Caddyfile\n├── config.toml\n├── docker-compose.yml\n├── Dockerfile\n├── Dockerfile.caddy\n└── .env\n\n1 directory, 6 files\n```\n\nFirst of all, make sure to edit the Caddyfile to add your own E-Mail and other host information. You might need to edit the `Dockerfile.caddy` to add custom Caddy modules to support your DNS provider.\n\nThen make sure to edit `config.toml` with the actual settings of the Mysti server:\n\n```toml\n# the HTTP port the server should listen on\nweb_port = 43853\n\n# a custom token to use for authentication - you can e.g. generate one with\n#    xxd -l 30 -p /dev/urandom\ntoken = \"your custom token to use as password\"\n\n[wake_on_lan]\n# The target address is the MAC address of the PC you want to wake up.\n# The mysti server must be on the same network as the PC.\ntarget_addr = \"AA:AA:AA:AA:AA:AA\"\nrouter_addr = \"255.255.255.255\"\n```\n\nOnce all the information has been added, you can build your setup:\n\n\tdocker compose build --pull\n\nMake sure the correct ports are exposed and then try running the daemon.\n\nYou can also add custom clipboard actions, which are commands that are executed when the clipboard matches a regex:\n\n```toml\n[[clipboard_action]]\nregex = '(http(?:.*?)music\\.youtube\\.com(?:\\S+))'\ncommand = \"curl 'http://sensiblehub-server:128/add?format=json' -X POST --data-raw '{\\\"searchTerm\\\":\\\"$1\\\"}'\"\n```\n\nIn this example, every time we find a YouTube Music URL, it gets sent to [a server](https://github.com/xarantolus/sensibleHub) via a cURL command. You can execute almost any command. Note that these commands run in the container, however, since we mount the host at `/host`, we can still run commands kind of on the host. This means that many commands will work, except for scripts that expect fixed paths (e.g. in a shebang). For Python scripts, instead of directly executing them (thus using the shebang), run `python script.py` or `python -m my_module` instead of `./script.py` or a typical wrapper that has a shebang.\n\n## Daemon and CLI Setup\nThe daemon should run in the background of your devices and connect to the server, syncing events (like clipboard changes) as they happen. It is available for many Windows and Linux-based operating systems. The CLI is an additional helper for sending remote commands to other connected clients.\n\nFirst of all, you can download the daemon and CLI binaries for your client(s) from [the latest release here on GitHub](http://github.com/xarantolus/mysti/releases/latest). For Windows, you would download and unzip `mysti-windows.zip`. Then you can unzip it into a directory that is available on your `$PATH`. The same goes for Linux.\n\n### Client Configuration\nFirst of all, we need to tell the daemon which server to connect to. You can do this by creating a configuration file with [this content](deployment/daemon/daemon-config.toml):\n\n```toml\n# This is the mysti daemon configuration file.\n# Depending on the operation system, it is expected in the following locations:\n#   Linux/Mac: $XDG_CONFIG_HOME/mysti.toml, $HOME/.config/mysti.toml or working directory\n#   Windows: %USERPROFILE%\\.config\\mysti.toml or working directory\n\n# The daemon connects to the server specified\n# If you use Caddy or some other reverse proxy,\n# make sure to specify the correct port (the output port of Caddy)\nserver_host = \"https://my.host.com:1234\"\n\n# The token is used to authenticate the client with the server.\n# When you set up the server, you should have generated a token\n# that is also specified in the servers' configuration file.\ntoken = \"my cool token\"\n\n# How to send a wake on lan request to the PC specified on the server\n# E.g. if set to \"on\", you run \"mysti on\" on your command line, otherwise the second part is whatever you specify here\nwol_shortcut = \"on\"\n\n# Here you can define any number of actions that are possible on this client device. Only the configuration used for the current OS is used (e.g. linux on Linux).\n# You do not need to specify all possible options, e.g. you can omit the windows one on Linux\n[[action]]\nname = \"Shutdown\"\nlinux = \"shutdown -h now\"\nwindows = \"shutdown /s /f /t 0\"\n\n# Just copy and edit this section as many times as you want:\n[[action]]\nname = \"Reboot\"\nlinux = \"shutdown -r now\"\nwindows = \"shutdown /r /f /t 0\"\n```\n\nYou can add any number of actions, as long as they have a different name.\n\nIt is recommended to put the configuration file into `~/.config/mysti.toml` on both Linux and `%USERPROFILE%\\.config\\mysti.toml` on Windows (you might have to create the `.config` directory yourself). That way, both the CLI and daemon can find the same configuration file.\n\n### Automatically start the daemon on boot\nThis section shows how to set up the daemon to start on user login. This is sadly very different between operating systems, so make sure to look for additional guides for your specific setup.\n\n#### Windows\nFirst of all, create a directory where you unzip `mysti.exe` and `mysti-daemon.exe`. Add that directory to the `PATH` environment variable.\n\nSince we want to start the daemon without a console window visible, we need to create a wrapper script that starts the daemon. Create `mysti.vbs` with the following content:\n\n```vbs\nSet objShell = CreateObject(\"WScript.Shell\")\nobjShell.Run \"mysti-daemon\", 0\nSet objShell = Nothing\n```\n\nThen you can add a shortcut to `mysti.vbs` to your startup folder (open it with `Win+R` and `shell:startup`). Now when you start your machine, the script will be run, which runs the daemon.\n\n#### Fedora Linux (39)\nAgain unzip the release file for Fedora into some directory, run `chmod +x *` in that directory and add it to your `$PATH`.\n\nThen, to create an autostart entry, edit the autostart file:\n\n```\nnano ~/.config/autostart/mysti-daemon.desktop\n```\n\nPaste in the following content and save the file:\n\n```desktop\n[Desktop Entry]\nName=Mysti daemon\nExec=mysti-daemon\nType=Application\n```\n\nNow upon a reboot, the daemon should run in the background. Check using `pidof mysti-daemon-fedora`.\n\n\n### Sending commands\nAfter defining commands and setting up daemons on at least one device, you can now run `mysti` in your terminal to control other devices:\n\n```\n$ mysti\nSelect a client to run an action |\n\u003e phili on Philipp-PC (Microsoft Windows 11 Pro), connected 442s ago\n  philipp on philipp (Fedora Linux 39 (Workstation Edition)), connected 459s ago\n```\n\nSelect the device you want to run a command on. By default, the first device that is not the device you ran `mysti` on will be selected (but you can also send commands to yourself). If only one device is available, it's selected by default and the menu will not be shown.\n\nNow we see the device action menu:\n\n```\n$ mysti\nSelect a client to run an action: phili on Philipp-PC (Microsoft Windows 11 Pro), connected 442s ago\nWhich action do you want to run? |\n\u003e Shutdown\n  Reboot\n```\n\nSelect the action you want to run and press enter.\n\n```\nRunning action Shutdown on client phili on Philipp-PC (Microsoft Windows 11 Pro)\nSent action.\n```\n\nThis sends the action to the server. Note that we don't get feedback of whether the action worked correctly.\n\n### Limitations\n- On Linux, clipboard sync support depends on your setup (X11 vs. Wayland). In theory all options are supported, but I can't really test it. On my Fedora 39 machine with Wayland (and `Xwayland`), clipboard events works\n- Some image copy operations might not be synced. However, the daemon tries its best to convert between different formats and uses a common format to sync between all platforms\n\n### [License](LICENSE)\nThis is free as in freedom software. Do whatever you like with it.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarantolus%2Fmysti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxarantolus%2Fmysti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxarantolus%2Fmysti/lists"}