GH-REPO-READ-FILE(1) GitHub CLI manual GH-REPO-READ-FILE(1) (NAME) gh-repo-read-file - () (SYNOPSIS) gh repo read-file [flags] (DESCRIPTION) . . . --ref (tag) . TTY () (pager) . stdout . --output . (escape sequences) . --allow-escape-sequences . --output --allow-escape-sequences . (OPTIONS) --allow-escape-sequences --clobber -q, --jq JSON jq --json JSON -o, --output (stdout) --ref -R, --repo <[HOST/]OWNER/REPO> [HOST/]OWNER/REPO -t, --template JSON Go "gh help formatting" JSON (JSON FIELDS) content, downloadUrl, encoding, gitSHA, gitUrl, htmlUrl, name, path, size, type, url (EXIT CODES) 0: 1: 2: 4: : . . (EXAMPLE) # $ gh repo read-file README.md --repo cli/cli # ref $ gh repo read-file README.md --repo cli/cli --ref v2.50.0 # $ gh repo read-file README.md --repo cli/cli --output download/README.md # JSON $ gh repo read-file README.md --repo cli/cli --json name,path,size,type # $ gh repo read-file path/to/file --repo OWNER/REPO --allow-escape-sequences (SEE ALSO) gh-repo(1) Sep 2026 GH-REPO-READ-FILE(1)