explaingit

rehanhaider/bush

Analysis updated 2026-05-18

0RustAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Rust command-line tool that prints a project's folder structure as a tree, automatically respecting .gitignore and similar ignore files so the output stays clean.

Mindmap

mindmap
  root((bush))
    What it does
      Tree view of folders
      Respects gitignore rules
      Fast traversal
    Tech stack
      Rust
      Cargo
      ignore crate
    Use cases
      Clean project overview
      JSON or HTML output
    Audience
      Developers
      CLI users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Print a clean view of a project's folder structure without build artifacts or ignored files

USE CASE 2

Generate JSON, HTML, or XML output of a directory tree for scripting or documentation

USE CASE 3

Customize which ignore files and display options apply per project with a config file

What is it built with?

RustCargo

How does it compare?

rehanhaider/bush404-agent/codes-minerbakome-hub/bakome-crypto-quant-engine
Stars000
LanguageRustRustRust
Setup difficultyeasymoderateeasy
Complexity2/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
You can use, modify, and distribute this freely with almost no restrictions, as long as you keep the copyright notice.

In plain English

Bush is a command line tool written in Rust that displays a project's directory structure as a tree, similar to the classic tree command found on most systems. The main difference is that bush understands ignore files: it automatically respects .gitignore.dockerignore.npmignore.eslintignore.prettierignore, and .ignore rules, so what you see matches what actually matters in a project instead of showing every cached file, build artifact, or vendor directory nobody cares about. Under the hood it uses the same ignore handling library, the ignore crate, that powers ripgrep and fd, two well known fast command line tools. That means the ignore rules are parsed correctly and traversal stays fast even on large codebases. Beyond the basic tree view, bush offers a wide range of display options. You can filter to show only directories, limit how many levels deep it goes, show file sizes, modification timestamps, and Unix style permissions, sort results by name, size, or modification time, and filter by filename pattern using globs. Output can be rendered as a tree, or as JSON, HTML, or XML, which makes it easy to pipe results into other tools or scripts. A color palette distinguishes directories, executables, archives, images, source code files, and config files at a glance. Settings can live in a .bush JSON config file, which bush looks for at several locations with a defined order of precedence: command line flags first, then a local config file walked up from the target directory, then user and system config locations, then built in defaults. Unknown keys in a config file produce a clear error, so typos are caught early rather than silently ignored. To install it, you clone the repository, build it with cargo, and symlink or copy the resulting binary into a folder on your path. The project includes around 275 tests. It is licensed under MIT, so you are free to use, modify, and distribute it with minimal restriction.

Copy-paste prompts

Prompt 1
Show me how to install bush and use it to print my project's directory tree.
Prompt 2
Explain how bush decides which ignore files to respect and in what order configs are applied.
Prompt 3
Help me write a .bush config file that hides the target folder and shows file sizes.
Prompt 4
How would I use bush's JSON output format to feed a directory tree into another script?

Frequently asked questions

What is bush?

A Rust command-line tool that prints a project's folder structure as a tree, automatically respecting .gitignore and similar ignore files so the output stays clean.

What language is bush written in?

Mainly Rust. The stack also includes Rust, Cargo.

What license does bush use?

You can use, modify, and distribute this freely with almost no restrictions, as long as you keep the copyright notice.

How hard is bush to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is bush for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.