# Read remote repository content with GitHub CLI

> Source: <https://github.blog/changelog/2026-06-17-read-remote-repository-content-with-github-cli>
> Published: 2026-06-17 20:03:57+00:00

# Read remote repository content with GitHub CLI

Explore repository content from your terminal without cloning by using two new commands: [ gh repo read-file](https://cli.github.com/manual/gh_repo_read-file) and

[.](https://cli.github.com/manual/gh_repo_read-dir)

`gh repo read-dir`

[What you can do](#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](#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](#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](https://github.com/cli/cli/releases/tag/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](https://github.com/cli/cli#agent-skills).

Learn more or give us feedback on the [ cli/cli repository](https://github.com/cli/cli).
