Yes, there is an install script.
https://dietpi.com/docs/hardware/#make-your-own-distribution
But read the notes carefully!
e.g.:
- All existing software (APT) and user data will be deleted.
- The script will convert any ‘bloated’ Debian/Raspbian installation into a lightweight DietPi system.
- The script will NOT support converting existing installed software (e.g. Nextcloud, Plex Media Server) over to the DietPi system.
So if you are running already on a customized environment it will likely break stuff, I guess.