-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
QuadClicker is a single binary that serves both GUI and CLI roles. CLI mode is triggered when any flag other than --minimized, --no-update-check, or --post-update is present on the command line. No GUI window is created.
quadclicker [OPTIONS]
| Flag | Type | Default | Description |
|---|---|---|---|
--rate <value> |
string | required | Click rate. See Click-Rate-Formats for every accepted format. |
--button <left|right|middle> |
enum | left |
Mouse button to click. |
--type <single|double> |
enum | single |
Single click or double click (double uses OS double-click interval). |
--location <x,y> |
int,int | cursor position | Fixed screen coordinate. Example: --location 500,300. Omit to click wherever the cursor currently is. |
--stop-after-clicks <n> |
integer |
0 (unlimited) |
Stop after exactly N clicks. |
--stop-after-seconds <n> |
float |
0 (unlimited) |
Stop after N seconds. Accepts decimals: --stop-after-seconds 0.5. |
--idle-wait <n> |
float |
0 (disabled) |
Wait until the system has been idle for N seconds before starting. |
--no-gui |
flag | — | Explicitly force headless mode. Redundant when other CLI flags are present, but accepted. |
--minimized |
flag | — | Launch the GUI minimized to the system tray. Does not trigger CLI mode. |
--no-update-check |
flag | — | Skip the launch-time GitHub update check. GUI-compatible; does not trigger CLI mode. (Windows only) |
--check-update |
flag | — | Check for an update, print the result, and exit 0 on success or exit 2 on failure. Does not launch the GUI or run any clicks. (Windows only) |
--version / -v
|
flag | — | Print version string (QuadClicker X.Y.Z) and exit 0. |
--help / -h
|
flag | — | Print usage text and exit 0. |
--post-update [version] |
flag | — | Internal flag used by the self-update staging script after a successful update. Accepts an optional version argument. GUI-compatible. |
| Code | Meaning |
|---|---|
0 |
Success or clean stop (including --help, --version, --check-update on success) |
1 |
Invalid argument — error message printed to stderr |
2 |
Runtime error — e.g. OS refused input injection; error message printed to stderr |
130 |
Interrupted by Ctrl+C (SIGINT) |
Click at the current cursor position, 10 times per second, until Ctrl+C:
quadclicker --rate 10/s
Right-click at coordinate (500, 300), stop after 100 clicks:
quadclicker --rate 10/s --location 500,300 --button right --stop-after-clicks 100
Double-click every 500 ms for 30 seconds:
quadclicker --rate 500ms --type double --stop-after-seconds 30
Middle-click as fast as possible (1 ms delay), 50 times:
quadclicker --rate 1ms --button middle --stop-after-clicks 50
Click once every 5 minutes, 10 times total:
quadclicker --rate 5min --stop-after-clicks 10
Click once per hour for an hour (3600 s):
quadclicker --rate 60/h --stop-after-seconds 3600
Wait for 10 seconds of system idle, then click 1000 times at 10/s:
quadclicker --rate 10/s --idle-wait 10 --stop-after-clicks 1000
Launch GUI minimized to tray (not CLI mode):
quadclicker --minimized
Check for an update and print the result:
quadclicker --check-update
-
Windows case sensitivity: Session flags (
--rate,--button,--type,--location, etc.) are matched viaarg.ToLowerInvariant(), so--Rateor--RATEwork. However,--help/-h,--version/-v, and--check-updateare matched by earlier exact-string comparisons and must be exact lowercase. Additionally,--helpand--versionshort-circuit only when passed as the sole argument; combined with other flags they are treated as unknown arguments and produce an error (exit 1). -
Linux case sensitivity: All flags are matched by exact string comparison — the Linux implementation is fully case-sensitive throughout. Unlike Windows, Linux pre-scans all arguments for
--help/-h/--version/-vbefore parsing, so they print and exit 0 even when combined with other flags. -
--rateis required in CLI mode. Omitting it produces:Error: --rate is required in CLI mode.(exit 1). - Unknown flags produce:
Error: Unknown argument: '--foo'.(exit 1). On Linux, passing any Windows-only flag (--no-update-check,--check-update,--post-update) exits 1 with "Unknown argument" — omit those flags in cross-platform scripts. -
--locationspaces: Both platforms accept spaces around the comma. WindowsTrim()s both sides and parses strictly (500abcis rejected). Linuxstd::stoiskips leading whitespace and stops at the first non-digit character without erroring — more permissive, not less (500 ,300,500, 300, even500abc,300all parse to 500,300). The only Linux failures are a missing comma or a non-numeric leading portion (e.g.abc,300). -
--stop-after-secondsand--idle-waitaccept decimal values using the invariant locale (.as decimal separator regardless of system locale).
The Linux CLI has the same flags and exit codes except:
-
--no-update-check,--check-update, and--post-updateare not implemented (no self-update on Linux). Passing any of these flags exits 1 withError: Unknown argument: '--no-update-check'(or the respective flag). Omit them in cross-platform scripts. -
--versionprintsQuadClicker 1.0.0(hardcoded in the current build — not yet reading from a build-time constant).
The Linux help text (--help) accurately reflects what is implemented.