I believe it should be possible using our API, but not documented, and possibly not doable via CLI - not entirely sure if you can run non-documented API calls via the CLI? However, you can do it . Following the workflow here:
…I reverse engineered what our UI does and this seems to be the API call in question (for the site):
HTTP PUT https://api.netlify.com/api/v1/sites/SITE_ID
with payload:
{jwt_secret:"the secret"}
Try that out (preferably on a non-production site), and let me know how it goes!