feat: add user reset-apikey command
Adds `hf user reset-apikey <username>` to regenerate a user API key. Requires user.manage permission. Returns the new key (shown once only). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -341,6 +341,11 @@ func handleUserCommand(subCmd string, args []string) {
|
||||
output.Error("usage: hf user delete <username>")
|
||||
}
|
||||
commands.RunUserDelete(filtered[0], tokenFlag)
|
||||
case "reset-apikey":
|
||||
if len(filtered) < 1 {
|
||||
output.Error("usage: hf user reset-apikey <username>")
|
||||
}
|
||||
commands.RunUserResetAPIKey(filtered[0], tokenFlag)
|
||||
default:
|
||||
output.Errorf("hf user %s is not implemented yet", subCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user