#!/usr/bin/env python3

import time

import pyautogui
import click


@click.command()
@click.argument("SLEEP_TIME", type=int, default=1)
def main(sleep_time: int) -> None:
    """
    clicks the mouse (cross-platform) every few seconds
    """
    click.echo(
        f"Clicking the mouse every {sleep_time} second{'s' if sleep_time != 1 else ''}..."
    )
    while True:
        pyautogui.click()
        time.sleep(sleep_time)


if __name__ == "__main__":
    main()
