rich-tree-cli 0.3.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. rich_tree_cli-0.3.12/.bumpversion.cfg +11 -0
  2. rich_tree_cli-0.3.12/.github/workflows/python-app.yml +41 -0
  3. rich_tree_cli-0.3.12/.gitignore +211 -0
  4. rich_tree_cli-0.3.12/.python-version +1 -0
  5. rich_tree_cli-0.3.12/AGENTS.md +15 -0
  6. rich_tree_cli-0.3.12/PKG-INFO +184 -0
  7. rich_tree_cli-0.3.12/README.md +172 -0
  8. rich_tree_cli-0.3.12/TODO.md +22 -0
  9. rich_tree_cli-0.3.12/directory_structure.txt +62 -0
  10. rich_tree_cli-0.3.12/maskfile.md +61 -0
  11. rich_tree_cli-0.3.12/pyproject.toml +44 -0
  12. rich_tree_cli-0.3.12/src/rich_tree_cli/__init__.py +5 -0
  13. rich_tree_cli-0.3.12/src/rich_tree_cli/_get_console.py +40 -0
  14. rich_tree_cli-0.3.12/src/rich_tree_cli/constants.py +49 -0
  15. rich_tree_cli-0.3.12/src/rich_tree_cli/export/__init__.py +0 -0
  16. rich_tree_cli-0.3.12/src/rich_tree_cli/export/_common.py +34 -0
  17. rich_tree_cli-0.3.12/src/rich_tree_cli/export/as_html.py +132 -0
  18. rich_tree_cli-0.3.12/src/rich_tree_cli/export/as_json.py +49 -0
  19. rich_tree_cli-0.3.12/src/rich_tree_cli/export/as_toml.py +7 -0
  20. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/__init__.py +0 -0
  21. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/css.svg +4 -0
  22. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/db.svg +1 -0
  23. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/env.svg +1 -0
  24. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/file.svg +1 -0
  25. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/folder.svg +1 -0
  26. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/git.svg +1 -0
  27. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/html.svg +1 -0
  28. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/javascript.svg +1 -0
  29. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/json.svg +1 -0
  30. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/log.svg +1 -0
  31. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/markdown.svg +1 -0
  32. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/nix.svg +1 -0
  33. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/python.svg +1 -0
  34. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/settings.svg +1 -0
  35. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/src.svg +1 -0
  36. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/svg.svg +1 -0
  37. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/tests.svg +1 -0
  38. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/toml.svg +1 -0
  39. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/txt.svg +1 -0
  40. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/icons/vscode.svg +1 -0
  41. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/styles.css +66 -0
  42. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/assets/template.jinja2 +10 -0
  43. rich_tree_cli-0.3.12/src/rich_tree_cli/export/html/html_template.py +9 -0
  44. rich_tree_cli-0.3.12/src/rich_tree_cli/export/icons.py +171 -0
  45. rich_tree_cli-0.3.12/src/rich_tree_cli/export/replace_tags.py +37 -0
  46. rich_tree_cli-0.3.12/src/rich_tree_cli/ignore_handler.py +80 -0
  47. rich_tree_cli-0.3.12/src/rich_tree_cli/main.py +256 -0
  48. rich_tree_cli-0.3.12/src/rich_tree_cli/output_manager.py +116 -0
  49. rich_tree_cli-0.3.12/tests/__init__.py +0 -0
  50. rich_tree_cli-0.3.12/tests/output/directory_structure.html +121 -0
  51. rich_tree_cli-0.3.12/tests/output/directory_structure.json +265 -0
  52. rich_tree_cli-0.3.12/tests/output/directory_structure.md +50 -0
  53. rich_tree_cli-0.3.12/tests/output/directory_structure.svg +229 -0
  54. rich_tree_cli-0.3.12/tests/output/directory_structure.toml +210 -0
  55. rich_tree_cli-0.3.12/tests/output/directory_structure.txt +43 -0
  56. rich_tree_cli-0.3.12/tests/test_output_formats.py +54 -0
  57. rich_tree_cli-0.3.12/tests/test_tree.py +75 -0
  58. rich_tree_cli-0.3.12/uv.lock +728 -0
@@ -0,0 +1,11 @@
1
+ [bumpversion]
2
+ current_version = 0.3.12
3
+ commit = True
4
+ tag = True
5
+ tag_name = v{new_version}
6
+
7
+ [bumpversion:file:pyproject.toml]
8
+
9
+ [bumpversion:file:src/rich_tree_cli/__init__.py]
10
+ search = __version__ = "{current_version}"
11
+ replace = __version__ = "{new_version}"
@@ -0,0 +1,41 @@
1
+ name: Lint and Test Python
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main" ]
6
+ pull_request:
7
+ branches: [ "main" ]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v4
19
+ with:
20
+ version: "latest"
21
+ - name: Set up Python 3.12
22
+ run: uv python install 3.12
23
+ - name: Install dependencies
24
+ run: |
25
+ uv sync
26
+ source .venv/bin/activate
27
+ - name: Lint with flake8
28
+ run: |
29
+ uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.venv
30
+ uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.venv
31
+ - name: Sort imports with isort
32
+ run: |
33
+ uv run isort . --check-only --diff --skip .venv --line-length 120
34
+ - name: Format with black
35
+ run: |
36
+ uv run black . --check --diff --exclude=.venv -l 120
37
+ - name: Test with pytest
38
+ run: |
39
+ uv run pytest
40
+
41
+
@@ -0,0 +1,211 @@
1
+ # Created by https://www.toptal.com/developers/gitignore/api/python,macos,shell
2
+ # Edit at https://www.toptal.com/developers/gitignore?templates=python,macos,shell
3
+
4
+ ### macOS ###
5
+ # General
6
+ .DS_Store
7
+ .AppleDouble
8
+ .LSOverride
9
+
10
+ # Icon must end with two \r
11
+ Icon
12
+
13
+
14
+ # Thumbnails
15
+ ._*
16
+
17
+ # Files that might appear in the root of a volume
18
+ .DocumentRevisions-V100
19
+ .fseventsd
20
+ .Spotlight-V100
21
+ .TemporaryItems
22
+ .Trashes
23
+ .VolumeIcon.icns
24
+ .com.apple.timemachine.donotpresent
25
+
26
+ # Directories potentially created on remote AFP share
27
+ .AppleDB
28
+ .AppleDesktop
29
+ Network Trash Folder
30
+ Temporary Items
31
+ .apdisk
32
+
33
+ ### macOS Patch ###
34
+ # iCloud generated files
35
+ *.icloud
36
+
37
+ ### Python ###
38
+ # Byte-compiled / optimized / DLL files
39
+ __pycache__/
40
+ *.py[cod]
41
+ *$py.class
42
+
43
+ # C extensions
44
+ *.so
45
+
46
+ # Distribution / packaging
47
+ .Python
48
+ build/
49
+ develop-eggs/
50
+ dist/
51
+ downloads/
52
+ eggs/
53
+ .eggs/
54
+ lib/
55
+ lib64/
56
+ parts/
57
+ sdist/
58
+ var/
59
+ wheels/
60
+ share/python-wheels/
61
+ *.egg-info/
62
+ .installed.cfg
63
+ *.egg
64
+ MANIFEST
65
+
66
+ # PyInstaller
67
+ # Usually these files are written by a python script from a template
68
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
69
+ *.manifest
70
+ *.spec
71
+
72
+ # Installer logs
73
+ pip-log.txt
74
+ pip-delete-this-directory.txt
75
+
76
+ # Unit test / coverage reports
77
+ htmlcov/
78
+ .tox/
79
+ .nox/
80
+ .coverage
81
+ .coverage.*
82
+ .cache
83
+ nosetests.xml
84
+ coverage.xml
85
+ *.cover
86
+ *.py,cover
87
+ .hypothesis/
88
+ .pytest_cache/
89
+ cover/
90
+
91
+ # Translations
92
+ *.mo
93
+ *.pot
94
+
95
+ # Django stuff:
96
+ *.log
97
+ local_settings.py
98
+ db.sqlite3
99
+ db.sqlite3-journal
100
+
101
+ # Flask stuff:
102
+ instance/
103
+ .webassets-cache
104
+
105
+ # Scrapy stuff:
106
+ .scrapy
107
+
108
+ # Sphinx documentation
109
+ docs/_build/
110
+
111
+ # PyBuilder
112
+ .pybuilder/
113
+ target/
114
+
115
+ # Jupyter Notebook
116
+ .ipynb_checkpoints
117
+
118
+ # IPython
119
+ profile_default/
120
+ ipython_config.py
121
+
122
+ # pyenv
123
+ # For a library or package, you might want to ignore these files since the code is
124
+ # intended to run in multiple environments; otherwise, check them in:
125
+ #.python-version
126
+
127
+ # pipenv
128
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
129
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
130
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
131
+ # install all needed dependencies.
132
+ #Pipfile.lock
133
+
134
+ # poetry
135
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
136
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
137
+ # commonly ignored for libraries.
138
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
139
+ #poetry.lock
140
+
141
+ # pdm
142
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
143
+ #pdm.lock
144
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
145
+ # in version control.
146
+ # https://pdm.fming.dev/#use-with-ide
147
+ .pdm.toml
148
+
149
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
150
+ __pypackages__/
151
+
152
+ # Celery stuff
153
+ celerybeat-schedule
154
+ celerybeat.pid
155
+
156
+ # SageMath parsed files
157
+ *.sage.py
158
+
159
+ # Environments
160
+ .env
161
+ .venv
162
+ env/
163
+ venv/
164
+ ENV/
165
+ env.bak/
166
+ venv.bak/
167
+
168
+ # Spyder project settings
169
+ .spyderproject
170
+ .spyproject
171
+
172
+ # Rope project settings
173
+ .ropeproject
174
+
175
+ # mkdocs documentation
176
+ /site
177
+
178
+ # mypy
179
+ .mypy_cache/
180
+ .dmypy.json
181
+ dmypy.json
182
+
183
+ # Pyre type checker
184
+ .pyre/
185
+
186
+ # pytype static type analyzer
187
+ .pytype/
188
+
189
+ # Cython debug symbols
190
+ cython_debug/
191
+
192
+ # PyCharm
193
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
194
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
195
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
196
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
197
+ .idea/
198
+
199
+ ### Python Patch ###
200
+ # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
201
+ poetry.toml
202
+
203
+ # ruff
204
+ .ruff_cache/
205
+
206
+ # LSP config files
207
+ pyrightconfig.json
208
+
209
+ .vscode/
210
+
211
+ *.db
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,15 @@
1
+ # Contributor Guide for AI Agents
2
+
3
+ ## Dev Environment Guidelines
4
+
5
+ ### Claude Only
6
+
7
+ <antml:thinking_mode>interleaved</antml:thinking_mode><antml:max_thinking_length>16000</antml:max_thinking_length>
8
+
9
+ - Python Version and Typing: Assume Python 3.12 or higher is being used. Because of that we SHOULD use the latest typing features available in Python 3.12 and later. Never use `Optional`, `Union`, or `Dict, List, Tuple` from `typing` module. Instead, use the built-in types directly, e.g., `list`, `dict`, `tuple`, and use `|` for union types. This is not an exhaustive list, so be thoughtful about any potentially deprecated types you might use. If you are not sure about something, ask the user.
10
+ - Type Annotations: Use type annotations as often as possible. If a function has no return value, use `None` as the return type. If a function returns a value, use the appropriate type annotation but don't bend over backwards to make it perfect. If you are not sure about the type, use `Any` as a fallback but use this sparingly, see it as a failure and you should endeavor to avoid using `Any` as much as possible.
11
+ - Docstrings: Use docstrings for most (95%) public functions and classes. The docstring should describe the purpose of the function or class, its parameters, and its return value. Use the Google style for docstrings. Because of this it is highly preferred to not use comments in the code unless absolutely necessary. If you feel like you need to use a comment, consider if the code can be refactored to make it more readable instead.
12
+ - Imports: Use relative imports for everything (beyond the obvious imports for external packages) in this current package. Keep imports clean using `uv run isort src tests` and `uv run black src tests` to format the code in that order.
13
+ - Endeavor to use a TDD approach when writing new code. Write tests first, then write the code to make the tests pass and then refactor the code to make it cleaner and more readable.
14
+ - There is a `directory_structure.txt` file in the root of the repository that describes the directory structure of the project. Use this as a quick way to understand the project structure and where to place new files or modules.
15
+ - While projects might partially use Poetry, UV is generally the preferred tool for managing dependencies and virtual environments. It is taking me some time to get used to it, so please bear with me. If you are not sure about something, ask the user.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: rich-tree-cli
3
+ Version: 0.3.12
4
+ Summary: A command-line interface for visualizing directory trees with rich formatting and various options.
5
+ Author-email: chaz <bright.lid5647@fastmail.com>
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: jinja2>=3.1.6
8
+ Requires-Dist: pathspec>=0.12.1
9
+ Requires-Dist: rich>=14.0.0
10
+ Requires-Dist: tomli-w>=1.2.0
11
+ Description-Content-Type: text/markdown
12
+
13
+ # Rich Tree CLI
14
+
15
+ Rich Tree CLI provides a beautiful, colorful representation of your directory tree using the [rich](https://github.com/Textualize/rich) library. Generate stunning visual directory trees with custom icons, multiple export formats, and intelligent filtering - perfect for documentation, project exploration, and sharing repository structures.
16
+
17
+ ## ✨ Features
18
+
19
+ - 🎨 **Beautiful terminal output** with colors and custom icons
20
+ - 📁 **Multiple export formats**: HTML, JSON, Markdown, SVG, TOML, and plain text
21
+ - 🔍 **Smart filtering** with built-in gitignore support and custom patterns
22
+ - 📊 **Rich metadata** including file sizes, line counts, and file types
23
+ - 🎯 **VS Code integration** with clickable file links in HTML output
24
+ - ⚡ **Fast and lightweight** with sensible defaults
25
+ - 🛠️ **Highly configurable** sorting, depth limits, and display options
26
+
27
+ ## 🚀 Quick Start
28
+
29
+ ### Installation
30
+
31
+ Install the CLI globally so it's available from anywhere:
32
+
33
+ ```bash
34
+ pip install rich-tree-cli
35
+ ```
36
+
37
+ Or with uv:
38
+
39
+ ```bash
40
+ uv pip install rich-tree-cli
41
+ ```
42
+
43
+ ### Basic Usage
44
+
45
+ Generate a tree for the current directory:
46
+
47
+ ```bash
48
+ rtree
49
+ ```
50
+
51
+ Limit recursion depth:
52
+
53
+ ```bash
54
+ rtree --depth 2
55
+ ```
56
+
57
+ Export to multiple formats:
58
+
59
+ ```bash
60
+ rtree --output-format html json markdown --output myproject
61
+ ```
62
+
63
+ Show file metadata:
64
+
65
+ ```bash
66
+ rtree --metadata all --depth 3
67
+ ```
68
+
69
+ ## 📋 Command Options
70
+
71
+ ```bash
72
+ rtree [DIRECTORY] [OPTIONS]
73
+ ```
74
+
75
+ ### Core Options
76
+
77
+ - `--depth, -d`: Maximum depth of recursion (default: unlimited)
78
+ - `--output, -o`: Output file path (extension determined by format)
79
+ - `--output-format, -f`: Export formats: `text`, `html`, `json`, `markdown`, `svg`, `toml`
80
+ - `--metadata, -m`: Show metadata: `none`, `size`, `lines`, `all`
81
+
82
+ ### Filtering Options
83
+
84
+ - `--exclude, -e`: Exclude files/directories matching patterns
85
+ - `--gitignore, -g`: Use custom .gitignore file
86
+ - `--sort-order, -s`: Sort order: `files` (files first) or `dirs` (directories first)
87
+
88
+ ### Display Options
89
+
90
+ - `--icons, -i`: Icon style: `emoji`, `glyphs`, `plain`
91
+ - `--disable-color, -dc`: Disable colored output
92
+ - `--no-console, -no`: Disable console output (export only)
93
+
94
+ ## 🎨 Export Formats
95
+
96
+ ### HTML Export
97
+
98
+ Creates a beautiful web page with VS Code integration:
99
+
100
+ - Clickable file links that open in VS Code
101
+ - Custom CSS styling with terminal aesthetics
102
+ - Professional presentation ready for documentation
103
+
104
+ ### Markdown Export
105
+
106
+ Perfect for README files and documentation:
107
+
108
+ - Clean, readable format
109
+ - Integrates seamlessly with GitHub/GitLab
110
+ - Great for project overviews
111
+
112
+ ### JSON/TOML Export
113
+
114
+ Machine-readable formats for automation:
115
+
116
+ - Complete directory structure data
117
+ - File metadata included
118
+ - Easy integration with other tools
119
+
120
+ ### SVG Export
121
+
122
+ Vector graphics for presentations and documentation:
123
+
124
+ - Scalable visual representation
125
+ - Embeddable in web pages and documents
126
+ - High-quality output for any size
127
+
128
+ ## 💡 Examples
129
+
130
+ ### Documentation Generation
131
+
132
+ ```bash
133
+ # Generate project overview for README
134
+ rtree --output-format markdown --output project-structure --depth 3
135
+
136
+ # Create interactive HTML documentation
137
+ rtree --output-format html --metadata all --output docs/structure
138
+ ```
139
+
140
+ ### Development Workflows
141
+
142
+ ```bash
143
+ # Quick project exploration
144
+ rtree --depth 2 --icons emoji
145
+
146
+ # Share repository structure with team
147
+ rtree --output-format html json --output project-overview --exclude "*.pyc" "__pycache__"
148
+
149
+ # Generate structure for AI assistance
150
+ rtree --output-format text --metadata size --depth 4
151
+ ```
152
+
153
+ ### Advanced Filtering
154
+
155
+ ```bash
156
+ # Exclude build artifacts and dependencies
157
+ rtree --exclude "node_modules" "dist" "build" "*.log"
158
+
159
+ # Use custom gitignore
160
+ rtree --gitignore .gitignore-custom --depth 5
161
+
162
+ # Show only directories
163
+ rtree --sort-order dirs --metadata none
164
+ ```
165
+
166
+ ## 🏗️ Why Rich Tree CLI?
167
+
168
+ - **Developer-focused**: Built by developers, for developers, with real workflow needs in mind
169
+ - **Beautiful output**: No more ugly ASCII trees - get professional, presentation-ready visualizations
170
+ - **Flexible exports**: One command, multiple formats - perfect for documentation, sharing, and automation
171
+ - **Smart defaults**: Works great out of the box with sensible gitignore patterns and file detection
172
+ - **VS Code integration**: Seamlessly integrates with your development environment
173
+
174
+ ---
175
+
176
+ ## 🛠️ Built With
177
+
178
+ - **[Rich](https://github.com/Textualize/rich)** - Beautiful terminal output and formatting
179
+ - **[Jinja2](https://jinja.palletsprojects.com/)** - Powerful HTML template generation
180
+ - **[pathspec](https://github.com/cpburnz/python-pathspec)** - Gitignore pattern matching
181
+
182
+ ---
183
+
184
+ *Rich Tree CLI - Making directory structures beautiful, one tree at a time* 🌳
@@ -0,0 +1,172 @@
1
+ # Rich Tree CLI
2
+
3
+ Rich Tree CLI provides a beautiful, colorful representation of your directory tree using the [rich](https://github.com/Textualize/rich) library. Generate stunning visual directory trees with custom icons, multiple export formats, and intelligent filtering - perfect for documentation, project exploration, and sharing repository structures.
4
+
5
+ ## ✨ Features
6
+
7
+ - 🎨 **Beautiful terminal output** with colors and custom icons
8
+ - 📁 **Multiple export formats**: HTML, JSON, Markdown, SVG, TOML, and plain text
9
+ - 🔍 **Smart filtering** with built-in gitignore support and custom patterns
10
+ - 📊 **Rich metadata** including file sizes, line counts, and file types
11
+ - 🎯 **VS Code integration** with clickable file links in HTML output
12
+ - ⚡ **Fast and lightweight** with sensible defaults
13
+ - 🛠️ **Highly configurable** sorting, depth limits, and display options
14
+
15
+ ## 🚀 Quick Start
16
+
17
+ ### Installation
18
+
19
+ Install the CLI globally so it's available from anywhere:
20
+
21
+ ```bash
22
+ pip install rich-tree-cli
23
+ ```
24
+
25
+ Or with uv:
26
+
27
+ ```bash
28
+ uv pip install rich-tree-cli
29
+ ```
30
+
31
+ ### Basic Usage
32
+
33
+ Generate a tree for the current directory:
34
+
35
+ ```bash
36
+ rtree
37
+ ```
38
+
39
+ Limit recursion depth:
40
+
41
+ ```bash
42
+ rtree --depth 2
43
+ ```
44
+
45
+ Export to multiple formats:
46
+
47
+ ```bash
48
+ rtree --output-format html json markdown --output myproject
49
+ ```
50
+
51
+ Show file metadata:
52
+
53
+ ```bash
54
+ rtree --metadata all --depth 3
55
+ ```
56
+
57
+ ## 📋 Command Options
58
+
59
+ ```bash
60
+ rtree [DIRECTORY] [OPTIONS]
61
+ ```
62
+
63
+ ### Core Options
64
+
65
+ - `--depth, -d`: Maximum depth of recursion (default: unlimited)
66
+ - `--output, -o`: Output file path (extension determined by format)
67
+ - `--output-format, -f`: Export formats: `text`, `html`, `json`, `markdown`, `svg`, `toml`
68
+ - `--metadata, -m`: Show metadata: `none`, `size`, `lines`, `all`
69
+
70
+ ### Filtering Options
71
+
72
+ - `--exclude, -e`: Exclude files/directories matching patterns
73
+ - `--gitignore, -g`: Use custom .gitignore file
74
+ - `--sort-order, -s`: Sort order: `files` (files first) or `dirs` (directories first)
75
+
76
+ ### Display Options
77
+
78
+ - `--icons, -i`: Icon style: `emoji`, `glyphs`, `plain`
79
+ - `--disable-color, -dc`: Disable colored output
80
+ - `--no-console, -no`: Disable console output (export only)
81
+
82
+ ## 🎨 Export Formats
83
+
84
+ ### HTML Export
85
+
86
+ Creates a beautiful web page with VS Code integration:
87
+
88
+ - Clickable file links that open in VS Code
89
+ - Custom CSS styling with terminal aesthetics
90
+ - Professional presentation ready for documentation
91
+
92
+ ### Markdown Export
93
+
94
+ Perfect for README files and documentation:
95
+
96
+ - Clean, readable format
97
+ - Integrates seamlessly with GitHub/GitLab
98
+ - Great for project overviews
99
+
100
+ ### JSON/TOML Export
101
+
102
+ Machine-readable formats for automation:
103
+
104
+ - Complete directory structure data
105
+ - File metadata included
106
+ - Easy integration with other tools
107
+
108
+ ### SVG Export
109
+
110
+ Vector graphics for presentations and documentation:
111
+
112
+ - Scalable visual representation
113
+ - Embeddable in web pages and documents
114
+ - High-quality output for any size
115
+
116
+ ## 💡 Examples
117
+
118
+ ### Documentation Generation
119
+
120
+ ```bash
121
+ # Generate project overview for README
122
+ rtree --output-format markdown --output project-structure --depth 3
123
+
124
+ # Create interactive HTML documentation
125
+ rtree --output-format html --metadata all --output docs/structure
126
+ ```
127
+
128
+ ### Development Workflows
129
+
130
+ ```bash
131
+ # Quick project exploration
132
+ rtree --depth 2 --icons emoji
133
+
134
+ # Share repository structure with team
135
+ rtree --output-format html json --output project-overview --exclude "*.pyc" "__pycache__"
136
+
137
+ # Generate structure for AI assistance
138
+ rtree --output-format text --metadata size --depth 4
139
+ ```
140
+
141
+ ### Advanced Filtering
142
+
143
+ ```bash
144
+ # Exclude build artifacts and dependencies
145
+ rtree --exclude "node_modules" "dist" "build" "*.log"
146
+
147
+ # Use custom gitignore
148
+ rtree --gitignore .gitignore-custom --depth 5
149
+
150
+ # Show only directories
151
+ rtree --sort-order dirs --metadata none
152
+ ```
153
+
154
+ ## 🏗️ Why Rich Tree CLI?
155
+
156
+ - **Developer-focused**: Built by developers, for developers, with real workflow needs in mind
157
+ - **Beautiful output**: No more ugly ASCII trees - get professional, presentation-ready visualizations
158
+ - **Flexible exports**: One command, multiple formats - perfect for documentation, sharing, and automation
159
+ - **Smart defaults**: Works great out of the box with sensible gitignore patterns and file detection
160
+ - **VS Code integration**: Seamlessly integrates with your development environment
161
+
162
+ ---
163
+
164
+ ## 🛠️ Built With
165
+
166
+ - **[Rich](https://github.com/Textualize/rich)** - Beautiful terminal output and formatting
167
+ - **[Jinja2](https://jinja.palletsprojects.com/)** - Powerful HTML template generation
168
+ - **[pathspec](https://github.com/cpburnz/python-pathspec)** - Gitignore pattern matching
169
+
170
+ ---
171
+
172
+ *Rich Tree CLI - Making directory structures beautiful, one tree at a time* 🌳
@@ -0,0 +1,22 @@
1
+ # TODO: List for the project
2
+
3
+ - [x] Add support for passing a `.gitignore` file using custom ignore patterns in the ignore handler.
4
+ - [x] Implement a feature to handle `.gitignore` files in the ignore handler.
5
+ - [x] Add output features beyond just basic plaintext output.
6
+ - [x] Markdown output format
7
+ - [x] HTML output format
8
+ - [x] JSON output format
9
+ - [x] Add SVG output format support
10
+ - [ ] Options to sort by: name,version,size,mtime,ctime
11
+ - [ ] Finish adding icons
12
+ - [ ] Need to add "plain" icons
13
+ - [ ] Clean up the html output, it is very messy but very awesome!
14
+ - [ ] Add XML output format support
15
+ - [ ] Add YAML output format support
16
+ - [ ] Add TOML output format support (Toml support partially added, but needs a lot of work)
17
+ - [ ] Add a Directory only option
18
+ - [ ] Add a `--no-report` option to disable the report at the end of the output
19
+ - [ ] Add a `--file-limit` option to limit the number of files displayed in the output
20
+ - [ ] Add symbolic link following support
21
+ - [ ] Finish adding output replacement support (where content in between tags is replaced with the output of the command)
22
+ - [ ] Improve how outputs are structured (to minimize the amount of places where things need to be updated to add new output formats)