Explore repository content from your terminal without cloning by using two new commands: gh repo read-file and gh repo read-dir.

What you can do

Use gh repo read-file to read an individual file from a remote repository

Use gh repo read-dir to browse a directory’s contents from a remote repository

These commands work across public and private repositories you have access to, making it faster to inspect code, documentation, and configuration files from any repository.