cd /news/developer-tools/read-remote-repository-content-with-… · home topics developer-tools article
[ARTICLE · art-31705] src=github.blog ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

Read remote repository content with GitHub CLI

GitHub released two new CLI commands, gh repo read-file and gh repo read-dir, enabling users to read remote repository content without cloning. Available in GitHub CLI v2.95.0, the commands work across public and private repositories for faster code inspection and automation.

read1 min views1 publishedJun 17, 2026

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.

Use cases With gh repo read-file

and gh repo read-dir

, you can:

  • Quickly inspect README files or documentation without leaving your terminal.
  • Check configuration files across multiple repositories.
  • Build scripts and automation that read repository content.
  • Integrate repository exploration into AI agents and workflows.

Availability gh repo read-file

and gh repo read-dir

are available to all GitHub users, including those on GitHub Enterprise Server (GHES), after installing or upgrading to GitHub CLI v2.95.0 or later. You can also teach your agents how to leverage new GitHub CLI features by installing or updating the gh skill.

Learn more or give us feedback on the cli/cli repository.

── more in #developer-tools 4 stories · sorted by recency
── more on @github 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/read-remote-reposito…] indexed:0 read:1min 2026-06-17 ·