once you have downloaded it from this repo, your directory should look something like this
next right click on ArduinoCompiler.py
then click send to
then select Desktop (create shortcut)
to send this file to your desktop as a shortcut that way its easier work with.
Next select the path to your arduino sketch file.
everything should look like this
it should compile successfully.
it works on only Windows and Linux
for any other platform goto This Path
select your platform and download it
Add the executable to path then run this.
arduino-cli compile --fqbn arduino:avr:uno --output-dir "output_dir" "sketch_file"