gh secret set API_KEY --body 'myvalue'

Category: GitHub CLI

gh secret set API_KEY --body 'myvalue'

Set an Actions secret with the value inline

Creates or updates a GitHub Actions repository secret (prompts you to type the value securely).
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.