# Tree Maker CLI
[![codecov](https://codecov.io/gh/tecz/tree_maker_cli/graph/badge.svg?token=3MCL0EZ179)](https://codecov.io/gh/tecz/tree_maker_cli)
A command-line tool to generate a tree structure of a folder and its contents, useful for when you need to add context to your GPT prompts.
## Features
- Generates a visual representation of a directory's structure
- Supports customizable depth limiting
- Allows excluding specific files and directories
- Provides options to include or exclude hidden files
- Output can be saved to a file or copied to the clipboard
## Usage
### Installation
Install via `pip`:
```sh
pip install tree-maker-cli
```
### Using this tool
Once installed, you can call the tool with the command
```sh
tree-maker [options] [directory]
```
If called without arguments, it will print the tree structure from the current folder. If called with a valid folder path, it will print the tree structure from that location.
```sh
tree-maker /path/to/folder
```
#### Arguments
The following arguments are available:
+ `--depth`: Sets the depth of the tree structure to print
+ `--clipboard` (or `-c`): Copy the tree to the clipboard
+ `--output` (or `-o`): Set the output file path
+ `--exclude`: Files and/or folders to exclude from the tree
+ `--show-hidden`: Show hidden files in the tree structure
+ `--show-excluded`: Show a list of the files/folders excluded from the tree by default
+ `--add-excluded`: Add files or folders to the list of files and folders excluded by default
+ `--remove-excluded`: Remove files or folders from the list of files/folders excluded by default
For example, to print a tree of depth two with hidden files and excluding the folders `public`, `tmp`, and `log` and then copy it to the clipboard:
```sh
tree-maker --depth=2 -c --show-hidden /path/to/your/app --exclude public tmp log
```
To save to a text file:
```sh
tree-maker [arguments] --output path/to/output.txt
```
## License
This project is licensed under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/tecz/tree_maker_cli",
"name": "tree-maker-cli",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "tree tree-maker cli folder structure",
"author": "Timothy Czerniec",
"author_email": "teczerniec@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/16/3e/9deb91df3637c30d8a9cb0101a9ca092015fa2ba6fdb35254cda9a968e28/tree_maker_cli-1.0.2.tar.gz",
"platform": null,
"description": "# Tree Maker CLI\n\n[![codecov](https://codecov.io/gh/tecz/tree_maker_cli/graph/badge.svg?token=3MCL0EZ179)](https://codecov.io/gh/tecz/tree_maker_cli)\n\nA command-line tool to generate a tree structure of a folder and its contents, useful for when you need to add context to your GPT prompts.\n\n## Features\n\n- Generates a visual representation of a directory's structure\n- Supports customizable depth limiting\n- Allows excluding specific files and directories\n- Provides options to include or exclude hidden files\n- Output can be saved to a file or copied to the clipboard\n\n## Usage\n\n### Installation\n\nInstall via `pip`:\n\n```sh\npip install tree-maker-cli\n```\n\n### Using this tool\n\nOnce installed, you can call the tool with the command\n\n```sh\ntree-maker [options] [directory]\n```\n\nIf called without arguments, it will print the tree structure from the current folder. If called with a valid folder path, it will print the tree structure from that location.\n\n```sh\ntree-maker /path/to/folder\n```\n\n#### Arguments\n\nThe following arguments are available:\n + `--depth`: Sets the depth of the tree structure to print\n + `--clipboard` (or `-c`): Copy the tree to the clipboard\n + `--output` (or `-o`): Set the output file path\n + `--exclude`: Files and/or folders to exclude from the tree\n + `--show-hidden`: Show hidden files in the tree structure\n + `--show-excluded`: Show a list of the files/folders excluded from the tree by default\n + `--add-excluded`: Add files or folders to the list of files and folders excluded by default\n + `--remove-excluded`: Remove files or folders from the list of files/folders excluded by default\n\nFor example, to print a tree of depth two with hidden files and excluding the folders `public`, `tmp`, and `log` and then copy it to the clipboard:\n\n```sh\ntree-maker --depth=2 -c --show-hidden /path/to/your/app --exclude public tmp log\n```\n\nTo save to a text file:\n\n```sh\ntree-maker [arguments] --output path/to/output.txt\n```\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A command-line tool to generate a tree structure of a folder and its contents, useful for when you need to add context to your GPT prompts.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/tecz/tree_maker_cli"
},
"split_keywords": [
"tree",
"tree-maker",
"cli",
"folder",
"structure"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "80f67be0c72c8aebebddf8e790645e7014ba41392e5a4fc64fc7af0759dde4a8",
"md5": "cf64915cc3b838488abf2f2f2a7d255e",
"sha256": "a5a928a2bd2d49474f1e41c71ec3df35501561781bdf5355277d1cbcb3a88981"
},
"downloads": -1,
"filename": "tree_maker_cli-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf64915cc3b838488abf2f2f2a7d255e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5862,
"upload_time": "2024-06-18T17:44:24",
"upload_time_iso_8601": "2024-06-18T17:44:24.264771Z",
"url": "https://files.pythonhosted.org/packages/80/f6/7be0c72c8aebebddf8e790645e7014ba41392e5a4fc64fc7af0759dde4a8/tree_maker_cli-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "163e9deb91df3637c30d8a9cb0101a9ca092015fa2ba6fdb35254cda9a968e28",
"md5": "88f189b21ceaf8cd92e69c60b692bec0",
"sha256": "ca79930a30573d6e8bd45bd8329d77d5dedc9e44aa83b007b73ff8b32efb558c"
},
"downloads": -1,
"filename": "tree_maker_cli-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "88f189b21ceaf8cd92e69c60b692bec0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7401,
"upload_time": "2024-06-18T17:44:27",
"upload_time_iso_8601": "2024-06-18T17:44:27.606949Z",
"url": "https://files.pythonhosted.org/packages/16/3e/9deb91df3637c30d8a9cb0101a9ca092015fa2ba6fdb35254cda9a968e28/tree_maker_cli-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-18 17:44:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tecz",
"github_project": "tree_maker_cli",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "tree-maker-cli"
}