github: Read remote repository content with GitHub CLI

· Sujith Quintelier · June 18, 2026, 7:05 a.m.
Summary
The GitHub CLI has introduced two new commands, `gh repo read-file` and `gh repo read-dir`, that allow users to read file contents and directory listings of remote repositories directly in the terminal, eliminating the need to clone repositories to inspect their content.
AUTHOR
Sponsored
Zulip logo Zulip
Organized team chat for people who take work seriously. Topic-based threading keeps conversations focused.
Try Zulip
Become a sponsor →