Arduino-cli board hard reset command

Hello,
reading the arduino-cli help info, I have not seen any board hard reset command disjointed from the upload command. I missed it or arduino-cli really lacks this command that seems fundamental to me.

Thanks,
Fabrizio

Correct.

I wouldn't say so. A hard reset capability is board-specific. Certain boards (e.g., Uno, Mega) do have a hard reset capability, but many others (e.g., Leonardo, MKR, Nano 33 BLE) do not. Even with the ones that do, the reset is triggered by the upload tool AVRDUDE as part of the upload process. AVRDUDE does not provide a reset command.

Arduino CLI is a general purpose tool that can be used with any Arduino boards platform. In order for Arduino CLI to have a reset command, the boards platforms would need to provide a reset "recipe", but they don't and never have. The closest is the use_1200bps_touch property, which is handled by Arduino CLI rather than the upload tool:
https://arduino.github.io/arduino-cli/latest/platform-specification/#1200-bps-bootloader-reset
However, I don't think that can be considered a "hard reset" because, unlike the DTR signal-based reset on the Uno/Mega/etc., this is a software reset

Thanks In0 for your replay. I understand the difficulty to cope with a lot of different boards. Thanks also for the suggestion for a soft reset.

Anyway, I have written a small bash script performing an USB hard reset via RTS. I tested it with arduino nano and nodeMCU v3 esp8266 and it seems to work well.
Since, I think it may be useful for other developers, here it is

#!/bin/bash
# .title      : Arduino board hard reset by USB
# .author : Fabrizio Pollastri <mxgbot@gmail.com>

if [[ ! $1 =~ ^[0-9]+$ ]]
then
    echo "USAGE: ./arduino_reset.sh <TTYUSB_NUMBER_ONLY>"
    exit
fi
SERIALPORT="/dev/ttyUSB$1"
DELAY="1"
echo "
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
main() {
  int port_fd = open(\"${SERIALPORT}\",O_RDWR | O_NOCTTY);
  if (errno)
    printf(\"Error opening %s: %s (%d).\n\",\"${SERIALPORT}\",strerror(errno),errno);
  int modem_ctrl,modem_ctrl_saved;
  if (ioctl(port_fd,TIOCMGET,&modem_ctrl_saved) == -1)
    printf(\"Error getting handshake lines: %s (%d).\n\",strerror(errno),errno);
  modem_ctrl = (modem_ctrl_saved | TIOCM_RTS) & ~TIOCM_DTR;
  if (ioctl(port_fd,TIOCMSET,&modem_ctrl) == -1)
    printf(\"Error setting handshake lines: %s (%d).\n\",strerror(errno),errno);
  sleep (${DELAY});
  if (ioctl(port_fd,TIOCMSET,&modem_ctrl_saved) == -1)
    printf(\"Error setting handshake lines: %s (%d).\n\",strerror(errno),errno);
  close(port_fd);
} " | tcc -run -

#### END ####