MENU
Systems & Tools

Project Structure

Repository

Project Structure generates ASCII directory trees from the command line, respecting .gitignore rules so that build artifacts and dependency folders are excluded automatically. On large repositories it completes in under 50ms, and output can be written directly to a Markdown file for use in README documentation.

#Rust

Modular CLI Architecture

The interface is defined with the clap crate using a derived Parser struct. Flags cover the common use cases: showing hidden files, capping recursion depth, and redirecting output to a Markdown file. Separating the CLI definition from the walker and renderer means each module can be tested and extended independently.

Git-Aware Directory Walking

The walker parses .gitignore at the root and applies those patterns during traversal, so directories like target/ and node_modules/ are excluded before any tree data is built. This keeps the internal node list accurate without requiring a post-processing filter step.

Custom Rendering Engine

The ASCII renderer is recursive, computing vertical bar connectors and branch prefixes as it descends the tree. It supports both standard ASCII characters and UTF-8 box-drawing symbols. The same renderer produces the Markdown-wrapped output when the --output flag is used, keeping formatting logic in one place.

High-Performance Execution

Processing large repositories with tens of thousands of files completes in under 50ms. The speed comes from Rust's zero-cost file system abstractions and the single-pass walker design, which avoids storing intermediate results beyond the node list needed for the tree build step.