Is there a way to change repository permissions from command line?

I’m trying to find a method to programmatically add permissions to a group for a certain private repository.
I only see documentation on how to do it from the UI.
is there a way I can do it programmatically? or through CLI?