gh-environment
manage deployment environments and protection rules
TLDR
List environments
$ gh environment list
View environment details$ gh environment view [env_name]
SYNOPSIS
gh environment command [options]
DESCRIPTION
gh environment manages GitHub repository environments used in deployment workflows. Environments represent deployment targets like production, staging, or development with configurable protection rules and environment-specific secrets.
Protection rules can require manual approvals, enforce wait timers, or restrict deployments to specific branches. Environment secrets provide secure storage for credentials and configuration needed for deployments without exposing them in workflow files.
Managing environments through the CLI enables automation of deployment infrastructure setup and configuration.
PARAMETERS
-R, --repo owner/repo
Repository.
SUBCOMMANDS
list
List environments.view
View environment details.
