gh-environment
manage deployment environments via gh-environments extension
TLDR
SYNOPSIS
gh environments subcommand [options]
DESCRIPTION
gh-environments is a GitHub CLI extension for managing repository deployment environments in bulk. It is not a built-in `gh` command; install it with `gh extension install katiem0/gh-environments`.Environments represent deployment targets (production, staging, etc.) with optional protection rules and environment-specific secrets and variables. The extension reads and writes CSV files, making it suitable for auditing or replicating environment configuration across many repositories.For inspecting the environment variables that control the `gh` CLI itself, run `gh help environment`.
PARAMETERS
-t, --token token
GitHub Personal Access Token (overrides `gh auth`).--hostname host
GitHub Enterprise Server hostname.-o, --output-file file
Output CSV filename for list commands.-f, --from-file file
Path to CSV file used by create commands.-d, --debug
Enable debug logging.--help
Show help information.
SUBCOMMANDS
list
Generate a CSV report of environments and metadata for a repository or owner.create
Create environments and metadata from a CSV file.secrets list
Generate a CSV report of environment secrets.secrets create
Create environment secrets from a CSV file.variables list
Generate a CSV report of environment variables.variables create
Create environment variables from a CSV file.
CAVEATS
This is a third-party extension, not a core `gh` subcommand. Protection rules (required reviewers, wait timer, branch restrictions) are not fully manageable via this extension — use the web UI or the REST API for advanced configuration.
