Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GitHub CLI 2.95.0

Choose a tag to compare

@github-actions github-actions released this 17 Jun 19:55
Immutable release. Only release title and notes can be modified.
70bb306

Read repository files and directories with gh repo read-file and gh repo read-dir

Two new preview commands read repository contents without cloning:

# Read a single file to stdout
gh repo read-file README.md --repo cli/cli

# Read from a specific branch, tag, or commit
gh repo read-file go.mod --ref v2.94.0 --repo cli/cli

# Write a file to disk (use --clobber to overwrite)
gh repo read-file README.md --output ./README.md --repo cli/cli

# List the entries in a directory
gh repo read-dir script --repo cli/cli

Both commands default to the repository's default branch, accept --ref to target any branch, tag, or commit, and support --json, --jq, and --template for scripting. This makes it easy for agents and automation to inspect a repo without a full checkout.

Note

gh repo read-file and gh repo read-dir are in preview and subject to change without notice.

What's Changed

✨ Features

🐛 Fixes

📚 Docs & Chores

:dependabot: Dependencies

  • chore(deps): bump golang.org/x/text from 0.37.0 to 0.38.0 by @dependabot[bot] in #13640
  • chore(deps): bump charm.land/lipgloss/v2 from 2.0.3 to 2.0.4 by @dependabot[bot] in #13663
  • chore(deps): bump golang.org/x/term from 0.43.0 to 0.44.0 by @dependabot[bot] in #13661
  • chore(deps): bump github/codeql-action from 4.36.1 to 4.36.2 by @dependabot[bot] in #13619
  • chore(deps): bump github.com/sigstore/sigstore-go from 1.1.4 to 1.2.1 by @dependabot[bot] in #13662
  • chore(deps): bump golang.org/x/crypto from 0.52.0 to 0.53.0 by @dependabot[bot] in #13641

Full Changelog: v2.94.0...v2.95.0

Morty Proxy This is a proxified and sanitized view of the page, visit original site.