So if by that you mean that the script itself will recognize if there are, for example, more than 7 backups in one day then it will run the
prune commands applying your policies, I haven’t seen any script like this for Restic. It’s not the same but I use this script. You can add a custom “policy” for when you want to run
prune according to your choice. Author says it is 7 days by default but you can change it. So if you run the script hourly, for example, then it will run hourly and keep all snapshots. Then at the exact 7th day after your last “cleanup” run it will run
prune again and reset the date for another 7 days. It is not as smart as the duplicati script you mention but for me it works. Besides it has a couple of interesting options.
By the way, using this same example to keep 7 snapshots daily and running your script hourly will make the forget a prune process to run every day to forget snapshots from the day before and that is why I prefer to do it weekly because right now the
prune process could take a lot of time if you have a lot of data or your destination is a remote location. I think they’re trying to improve this but it could take a while.