How to Run a Command on First Boot?

No, using AUTO_SETUP_AUTOMATED=1 will start whole process automatically without any user input.

Your case is special as you don’t know the IP withing your environment. Therefore, I recommend, to use the fully automatic install process first to get the system up and running. Having a screen attached should show the install process.

Another option you could think of is

This will automatically perform a user login on next reboot (after setup finished) and will show a banner like this

 ─────────────────────────────────────────────────────
 DietPi v8.20.1 : 11:50 - Fri 08/11/23
 ─────────────────────────────────────────────────────
 - Device model : NanoPi R5S/R5C (aarch64)
 - Uptime : up 2 hours, 21 minutes
 - CPU temp : 37 °C / 98 °F : Cool runnings
 - LAN IP : 192.168.x.x (eth0)
 ─────────────────────────────────────────────────────