-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmarttree.1
More file actions
145 lines (145 loc) · 3.35 KB
/
Copy pathsmarttree.1
File metadata and controls
145 lines (145 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
.TH SMARTTREE 1 "January 2025" "smarttree 0.2.0" "User Commands"
.SH NAME
smarttree \- modern cross-platform directory tree viewer
.SH SYNOPSIS
.B smarttree
[\fIOPTIONS\fR] [\fIPATH\fR]
.SH DESCRIPTION
.B SmartTree
is a modern, cross-platform CLI tool to visualize directory structures like the Unix tree command
with enhanced features such as emoji support, Markdown export, colorized output, depth control,
\&.treeignore filtering, and summary statistics. Built with Python, ideal for automation,
documentation, and DevOps workflows.
.SH OPTIONS
.TP
.BR \-h ", " \-\-help
Show help message and exit
.TP
.BR \-d ", " \-\-depth " " \fIDEPTH\fR
Limit recursion depth (like 'tree -L N')
.TP
.BR \-o ", " \-\-output " " \fIFILE\fR
Output to file (e.g. 'tree.txt' or 'tree.md').
If the file ends with .md, output is wrapped in a Markdown code block.
.TP
.BR \-c ", " \-\-color
Enable color for folders (blue)
.TP
.BR \-s ", " \-\-summary
Show total file and folder count after listing
.TP
.BR \-\-log " " \fIFILE\fR
Save output to an additional .log file (plain text)
.TP
.BR \-\-emoji
Enable emoji icons (📁, 📄) in output.
This is enabled by default for Markdown output.
.TP
.BR \-\-no\-emoji
Disable emoji icons
.TP
.BR \-v ", " \-\-version
Show version number and exit
.TP
.I PATH
Directory path to scan (default: current directory)
.SH TREEIGNORE FILE
If a
.B .treeignore
file exists in the target directory, SmartTree will exclude matching entries from the output.
The format supports wildcards and patterns similar to .gitignore:
.PP
.RS
# Comments start with hash
.br
# Ignore specific files
.br
.DS_Store
.br
*.log
.br
.br
# Ignore file patterns
.br
*.pyc
.br
*.swp
.br
.br
# Ignore directories (use trailing slash)
.br
__pycache__/
.br
node_modules/
.br
.venv/
.br
.br
# Wildcard patterns
.br
build*/
.br
*.egg-info/
.RE
.PP
Pattern matching rules:
.RS
.IP \(bu 2
* matches any number of characters
.IP \(bu 2
? matches a single character
.IP \(bu 2
[seq] matches any character in seq
.IP \(bu 2
[!seq] matches any character not in seq
.IP \(bu 2
Patterns ending with / only match directories
.IP \(bu 2
Patterns without / match both files and directories
.RE
.SH EXAMPLES
.TP
.B smarttree
Display tree of current directory
.TP
.B smarttree /var/log \-d 2
Display /var/log with maximum depth of 2
.TP
.B smarttree \-\-color \-\-summary
Display current directory with colored folders and summary statistics
.TP
.B smarttree \-o project\-tree.md \-\-emoji
Export tree to Markdown file with emoji icons
.TP
.B smarttree ~/projects \-\-depth 3 \-\-log output.log
Display ~/projects (max depth 3) and save to log file
.SH EXIT STATUS
.TP
.B 0
Success
.TP
.B 1
General error (e.g., invalid arguments, I/O error)
.SH FILES
.TP
.I .treeignore
Patterns of files and directories to exclude from tree output
.SH ENVIRONMENT
SmartTree uses UTF-8 encoding for proper emoji and unicode support.
.SH AUTHOR
Written by Johan Sörell
.SH REPORTING BUGS
Report bugs at: <https://github.com/development-toolbox/development-toolbox-smarttree/issues>
.SH COPYRIGHT
Copyright © 2025 Johan Sörell. License: MIT
.br
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH SEE ALSO
.BR tree (1),
.BR ls (1),
.BR find (1)
.PP
Full documentation at: <https://github.com/development-toolbox/development-toolbox-smarttree>
.br
Blog: <https://automationblueprint.site>