Note that most of this functionality is available in the huggingface-cli command and normative huggingface workflows.