A Bun server for remote control for your PC. Loosely based on my old SiriFlask project.
bun install
To run:
bun run start
config.json
contains configuration for general app use (like files upload folder for Multer)
Each Module may have it's own config for more specific use.
Each functionality is split into modules in, well, /modules
. It's just a TS class extending the IModule
. All are loaded dynamically, so if you want to add something new, just create a new class and export the instance (or copy and adapt Template.ts
).
A module has an emoji
, name
, path
to be invoked on and fn(request: moduleReq): IModuleResponse
performing a task. IModuleResponse
is just a response string and a status code and moduleReq
just an alias for the Express Request.
Some modules have an extra .json
file named same as the module, which contains extra configs. These have to be created manually, as in most cases they include things like tokens, or personal stuff.
Following modules are available when you pull this repo:
- Ping - just responds with "Pong!"
- Shutdown - performs a shutdown in 60s or after specified time
- Also you can reboot and abort the shutdown
- On Linux the seconds are rounded to minutes
- Volume - changes volume to provided value
- Clipboard - sets clipboard to provided string
- Upload - saves uploaded file to folder
- Switch Audio - switches to the audio device of provided name
Most modules will work regardless of the platform, but some may only work on a specific OS.
Also some modules may require extra dependencies to work correctly on certain systems.
Extra dependencies:
Clipboard
requireslibxtst-dev
on a Linux system (simpleapt install
works).Volume
,Switch Audio
andShutdown
use NirCMD to work on Windows.