Skip to main content

gitquarry tree

Print a repository file tree from GitHub without cloning the repository.

Synopsis

gitquarry tree [OPTIONS] <OWNER/REPO>

Behavior

tree fetches the repository tree through the GitHub API. By default it uses the repository default branch. The output can be filtered before rendering:
  • --path accepts simple glob patterns using * and ?
  • --contains keeps paths containing a text fragment
  • --depth limits displayed path depth, where root entries are depth 1

Options

--reference <REF>
--path <GLOB>
--contains <TEXT>
--depth <N>
--format pretty|json|toon|compact|csv
--progress auto|on|off
--path can be repeated. Repeated patterns use OR semantics.

Examples

Print the full tree:
gitquarry tree rust-lang/rust
Show Rust files below src:
gitquarry tree rust-lang/rust --path "src/*.rs"
Limit visible depth:
gitquarry tree rust-lang/rust --depth 2
Use a specific ref and structured output:
gitquarry tree rust-lang/rust --reference master --format json