{"slug": "read-remote-repository-content-with-github-cli", "title": "Read remote repository content with GitHub CLI", "summary": "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.", "body_md": "# Read remote repository content with GitHub CLI\n\nExplore 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\n\n[.](https://cli.github.com/manual/gh_repo_read-dir)\n\n`gh repo read-dir`\n\n[What you can do](#what-you-can-do)\n\n- Use\n`gh repo read-file`\n\nto read an individual file from a remote repository - Use\n`gh repo read-dir`\n\nto browse a directory’s contents from a remote repository\n\nThese commands work across public and private repositories you have access to, making it faster to inspect code, documentation, and configuration files from any repository.\n\n[Use cases](#use-cases)\n\nWith `gh repo read-file`\n\nand `gh repo read-dir`\n\n, you can:\n\n- Quickly inspect README files or documentation without leaving your terminal.\n- Check configuration files across multiple repositories.\n- Build scripts and automation that read repository content.\n- Integrate repository exploration into AI agents and workflows.\n\n[Availability](#availability)\n\n`gh repo read-file`\n\nand `gh repo read-dir`\n\nare 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).\n\nLearn more or give us feedback on the [ cli/cli repository](https://github.com/cli/cli).", "url": "https://wpnews.pro/news/read-remote-repository-content-with-github-cli", "canonical_source": "https://github.blog/changelog/2026-06-17-read-remote-repository-content-with-github-cli", "published_at": "2026-06-17 20:03:57+00:00", "updated_at": "2026-06-17 20:26:31.694117+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["GitHub", "GitHub CLI"], "alternates": {"html": "https://wpnews.pro/news/read-remote-repository-content-with-github-cli", "markdown": "https://wpnews.pro/news/read-remote-repository-content-with-github-cli.md", "text": "https://wpnews.pro/news/read-remote-repository-content-with-github-cli.txt", "jsonld": "https://wpnews.pro/news/read-remote-repository-content-with-github-cli.jsonld"}}