gh api -X PUT user/starred/owner/repo --silent

Category: GitHub CLI

gh api -X PUT user/starred/owner/repo --silent

Star a repository via the API

PUTs the current user's star on owner/repo, the API equivalent of clicking the star button. --silent drops the empty success body. Unstar with -X DELETE on the same endpoint. Starring is a lightweight signal of interest or approval.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.