project-tree

Crates.ioproject-tree
lib.rsproject-tree
version0.2.2
sourcesrc
created_at2023-05-12 04:35:58.097795
updated_at2023-05-13 06:36:01.782537
descriptionA command-line utility to display a ascii tree of files and directories.
homepage
repositoryhttps://github.com/conorpo/project-tree
max_upload_size
id862695
size20,819
Conor O'Malley (conorpo)

documentation

README

project-tree

A simple ascii file tree generator. Designed to be used in project root. By default it will print to stdout, and copy to clipboard. By default it will not recurse into node_modules, .git, or .vscode folders.

//! TODO:
//! Make ignore / stop check more elegant, is HashMap<PathBuf> really the best way to do this?

Usage

project-tree [flags] [options]

Flags

Flag Description
--node_modules Include node_modules
--git Include .git
--vscode Include .vscode
-r, --root Include parent directory in tree, and indent all other files
-d, --dirs Prioritize directories over files (default alphabetical)

Options

Option Arg Description
-o, --output path Output file
-i, --ignore path A file/folder to ignore, can be repeated
-s, --stop path A file/folder to not recurse into, can be repeated

Examples

project-tree -i Cargo.lock -s target -r -dirs
project-tree
├── src/
│   └── main.rs
├── target/
├── .gitignore
├── Cargo.toml
└── README.md

On another one of my projects: pt-gpt

project-tree -i .github -i frontend/.expo -i frontend/node_modules -i frontend/web-build/ -s frontend/assets -dirs
config/
│   ├── logger.js
│   ├── mongo_connection.js
│   └── openai_connection.js
controllers/
│   ├── auth.js
│   ├── chat.js
│   └── user.js
frontend/
│   ├── assets/
│   ├── components/
│   │   ├── AlertModal.js
│   │   ├── BackButton.js
│   │   ├── Back_Icon.svg
│   │   ├── icons8-settings.svg
│   │   └── SettingsButton.js
│   ├── contexts/
│   │   └── Main.js
│   ├── dist/
│   │   ├── assets/
│   │   └── bundles/
│   ├── screens/
│   │   ├── unit-testing/
│   │   │   └── chat.test.js
│   │   ├── Chat.js
│   │   ├── Loading.js
│   │   ├── Login.js
│   │   └── Profile.js
│   ├── App.js
│   ├── app.json
│   ├── babel.config.js
│   ├── eas.json
│   ├── package-lock.json
│   └── package.json
helpers/
│   └── emailSender.js
logs/
middlewares/
│   └── jwt_auth.js
models/
│   └── User.js
node_modules/
routes/
│   └── api/
│       ├── protected/
│       │   ├── chat.js
│       │   └── user.js
│       └── auth.js
.babelrc.json
.env
.gitignore
app.js
package-lock.json
package.json
README.md
Commit count: 12

cargo fmt