# Read remote repository content with GitHub CLI

DevFeed: [Read remote repository content with GitHub CLI](<https://devfeed.tech/articles/read-remote-repository-content-with-github-cli-71690.md>)

Original publisher: [Read original article](<https://github.blog/changelog/2026-06-17-read-remote-repository-content-with-github-cli>)

Author: Allison

Published: 2026-06-17T20:03:57Z

Content type: release

Language: en

Sources: [GitHub Changelog](<https://devfeed.tech/sources/github-changelog.md>)

Topics: [GitHub CLI extension](<https://devfeed.tech/topics/gh-extension.md>), [Repository](<https://devfeed.tech/topics/repository.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [automation](<https://devfeed.tech/tags/automation.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [directory](<https://devfeed.tech/tags/directory.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [ghes](<https://devfeed.tech/tags/ghes.md>), [github-cli](<https://devfeed.tech/tags/github-cli.md>), [remote](<https://devfeed.tech/tags/remote.md>), [repository](<https://devfeed.tech/tags/repository.md>)

## AI overview

GitHub CLI v2.95.0 or later adds `gh repo read-file` for reading an individual remote repository file and `gh repo read-dir` for browsing a remote directory, without cloning. The text says both work with public repositories and private repositories the user can access, and are available to GitHub users, including GitHub Enterprise Server users. It describes uses such as inspecting documentation or configuration and building scripts or AI agent workflows.

## Source excerpt

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...