Skip to content

Command-line interface and headless mode #75

Closed

Description

@TMHSDigital

Why it matters

Power users, testers and people writing small automations want to start a known configuration without touching the GUI: from a shortcut, Task Scheduler, a script, or a Stream Deck button. A CLI also makes the engine easier to test end to end and opens the door to sharing one-line setups in docs.

Rationale

  • The architecture is already split for this: AutoclickerController validates and starts the engine independently of Tk, and SettingsManager.validate_all_settings parses string inputs exactly like a CLI would.
  • pyproject.toml already exposes an autoclicker console script; it just takes no arguments.

Suggested approach

  • argparse in autoclicker/main.py:
    • --profile NAME (pairs with the profiles issue) or explicit flags: --at X,Y | --cursor, --interval 100ms|2s, --button, --double, --clicks N, --minutes N, --burst N:MS.
    • --start to begin immediately (still honoring a start delay), --minimized to start in the tray.
    • --headless to run without a window, with the hotkeys and the failsafe still active, and exit when the run ends; exit code reflects the stop reason (0 completed, non-zero for safety, error or emergency).
  • Respect the single-instance guard: a second invocation with arguments could hand them to the running instance instead of exiting.

Done when

  • autoclicker --cursor --interval 50ms --clicks 200 --start --headless clicks 200 times and exits 0, Esc stops it with a non-zero code, and invalid flags print the same validation messages the GUI shows.
  • --help is documented in the README.

Activity

  1. added
    enhancement
    priority: low
    feature
    on Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeaturepriority: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions