project-structure

Crates.ioproject-structure
lib.rsproject-structure
version0.1.1
created_at2026-01-09 13:49:03.393048+00
updated_at2026-01-15 13:31:27.330693+00
descriptionGenerate an ASCII Representation of a project youre working on.
homepage
repositoryhttps://github.com/HardBoss07/project-structure
max_upload_size
id2032117
size23,277
M4tt3o (HardBoss07)

documentation

README

Project Structure CLI

A Rust-based command-line tool to generate an ASCII tree of a project directory.
Supports filtering, sorting, .gitignore rules, and output to Markdown files.


Usage

project-structure.exe [OPTIONS] [PATH]
  • [PATH]: Root path of the project. Defaults to the current directory (.) if not specified.

Options

Option Description Default / Base Value Notes
--include-hidden Include hidden files and directories false By default, hidden files are skipped
--no-git Do not use .gitignore rules false By default, .gitignore is respected
--exclude <EXCLUDE> Space-separated exclude patterns (gitignore-style) None Patterns like target *.log
--depth <DEPTH> Filter depth (number of nested levels) None Unlimited depth by default
--sort <SORT> Sort results name Possible values: name, type (type sorts directories first)
--filter <FILTER> Filter for files or directories all Possible values: all, files, dirs
-o, --output[=<OUTPUT>] Write output to a file instead of terminal None If flag is provided without a value, defaults to Project Structure.md
-h, --help Show help message - -

Examples

Print the full project tree in the terminal:

project-structure.exe

Include hidden files:

project-structure.exe --include-hidden

Ignore .gitignore rules:

project-structure.exe --no-git

Exclude specific files and directories:

project-structure.exe --exclude "target *.log"

Limit depth to 2 levels:

project-structure.exe --depth 2

Sort directories first:

project-structure.exe --sort type

Show only directories:

project-structure.exe --filter dirs

Write tree to Markdown (default path):

project-structure.exe -o
# Output: Project Structure.md

Write tree to a custom Markdown file:

project-structure.exe -o=MyProjectTree.md

Write tree to a nested path:

project-structure.exe -o=./docs/ProjectTree.md

Notes

  • The tool respects .gitignore by default unless --no-git is passed.
  • Hidden files (.*) are ignored by default unless --include-hidden is passed.
  • The Markdown output wraps the tree in a code block with a # Project Structure header.

License

This project is licensed under the MIT License.

Commit count: 22

cargo fmt