As mentioned in the following [page] Personal access tokens | GitLab) I’m looking for creating the PAT through CLI (programmatically) and having the expiry date of the token set to as min as possible (eg., less than or equal to 6 hour).
I am no expert, anything but, more to save my own experience here for when I google it again in the future. 6 hours works and you do not set the token yourself, it generates on save.