enjarai/clickrtraining
2
0
Fork
You've already forked clickrtraining
3
No description
  • Rust 42.8%
  • JavaScript 27%
  • Nix 10.3%
  • HTML 10.2%
  • CSS 7.8%
  • Other 1.9%
Find a file
2026年05月02日 11:51:06 +02:00
src Temporary disconnect "fix" 2026年02月05日 21:57:21 +01:00
static Logic error fix 2026年02月12日 16:31:05 +01:00
.gitignore It works :3 2025年07月22日 22:30:37 -04:00
Cargo.lock waff 2026年01月26日 11:57:32 +01:00
Cargo.toml waff 2026年01月26日 11:57:32 +01:00
docker-compose.yml hm 2025年04月04日 23:06:22 +02:00
Dockerfile meow! 2026年05月02日 11:51:06 +02:00
flake.lock locke 2025年08月13日 14:14:25 +02:00
flake.nix unstable meow 2025年08月13日 14:11:34 +02:00
module.nix meowmeowm meow *commits all over your git* 2025年08月13日 20:46:44 +02:00
package.nix meowmeowmeowmeowmewo 2025年08月13日 14:09:26 +02:00
README.md mraow 2026年01月31日 21:36:45 +01:00
shell.nix awa 2025年07月22日 21:57:20 -04:00

Clickrtraining

This repository contains the source code for https://clickertrain.ing, a simple internet clicker. :3

API

This application has a simple API you can use to automate clicking and listening.

GET /api/{room}/click

Clicks any creature listening on that room. Returns 200 on success or 404 if nothing is listening.

GET /api/{room}/listen

This endpoint expects to be connected to as a websocket. It will then send clicks and other events over the socket.

Websocket

Websocket messages are strings. Currently the following values are possible:

  • c - A click has occured and should be played.
  • h - A keep-alive heartbeat message. May be ignored.

Local client

This application can be installed locally to serve as a command line client. From there you can, for example, create a systemd service to run it in the background.

The local client is currently only known to work on linux, and does not have a GUI.

You will need to have Cargo and the Rust toolchain installed.

cargo install --git https://codeberg.org/enjarai/clickrtraining
clickrtraining --help

Running in the background

Want to be able to be clicked at any time without having to keep the client running? That's what systemd is for!

You can make a simple service file in ~/.config/systemd/user/clickrtraining.service that contains something like this:

[Unit]
Description = Clickrtraining
After = network.target
[Service]
WorkingDirectory = %h/
ExecStart = %h/.cargo/bin/clickrtraining listen --id <YOUR ID HERE> --volume 1
Restart = always
[Install]
WantedBy = default.target

Then run:

systemctl --user daemon-reload
systemctl --user enable --now clickrtraining

This will keep the clicker service running while you are logged in, across restarts.

Self-hosting

Want to host clickertraining yourself? Sure can do. Either use the provided Nix flake, or install it as you would the local client, and use the host option.

When installing on a server via Cargo, be sure to explicitly omit the audio feature. Otherwise the app won't compile on most headless servers.