Metadata-Version: 2.4
Name: project-tree-cli
Version: 0.1.2
Summary: A CLI tool for printing a tree structure of a project.
Author: VanirSama
License: MIT
Project-URL: Homepage, https://github.com/VanirSama/project-tree-cli
Project-URL: Repository, https://github.com/VanirSama/project-tree-cli
Project-URL: Issues, https://github.com/VanirSama/project-tree-cli/issues
Keywords: tree,cli,project,structure,filesystem
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# project-tree-cli

A small, dependency-free Python CLI util that prints a recursive tree structure of a project – like a lightweight **tree** with sensible Python-flavoerd defaults.

## Features

* Recursively prints tree of any given directory.
* Ignores `__pycache__`, `.venv*`, `.idea*`, `.env`, `.env.*`, `.env-*`, `.git`, `*.pyc`, `*.pyo`, `*.pyd` by default.
* `-i / --ignore` to add extra ignored files/folders (space- or comma-separated).
* `-e / --excludefile [FILE]` to load a `.gitignore`-like file with extra patterns.
* `-s / --size` to include human-readable file sizes.
* `-o / --output [FILE]` to write the output to custom path (`project-tree.txt` by default). 

## Installation

### From PyPi (via pip or uv):
```pip install project-tree-cli```

```uv tool install project-tree-cli```
### From GitHub:
```pip install git+https://github.com/VanirSama/project-tree-cli.git```

## Usage

| CLI-command usage example                                                                                    | Description                                                                                    |
|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|
| `project-tree-cli`                                                                                           | Tree of current directory.                                                                     |
| `project-tree-cli .\my-project`                                                                              | Tree of `.\my-project`                                                                         |
| `project-tree-cli -s`                                                                                        | Tree with files size displayed                                                                 |
| `project-tree-cli -i dist`<br>`project-tree-cli -i dist docs *.tmp`<br>`project-tree-cli -i dist,docs,*.tmp` | Add ignored files/folders<br>*(either space- or comma- separated sequences work equally fine)* |
| `project-tree-cli -e exclude.txt`                                                                            | Load patterns from `.gitignore`-like file.                                                     |
| `project-tree-cli -o`<br>`project-tree-cli -o .\tree\output.txt`                                             | Write output tree into custom file or into `project-tree.txt` by default.                      |

## Example output

`project-tree-cli -s -i tests -o`

```txt
src/
└── project_tree_cli/
    ├── __init__.py  (86B)
    ├── __main__.py  (132B)
    ├── cli.py  (3.5KB)
    ├── core.py  (4.6KB)
    └── utils.py  (665B)
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

