← 返回命令列表

Linux command

treemd 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Generate markdown tree

treemd

For specific directory

treemd [path/to/directory]

Exclude patterns

treemd -e "[node_modules,*.log]"

Limit depth

treemd -d [2]

Output to file

treemd > [tree.md]

说明

treemd generates directory tree representations formatted as markdown, making it easy to include project structure documentation in README files and other markdown documents. The output uses markdown-compatible indentation and formatting that renders correctly on platforms like GitHub. Patterns can be excluded to skip directories like node_modules or build artifacts that clutter the tree output. Depth limiting controls how many levels deep the tree displays, keeping documentation focused on the relevant structure. The output can be redirected to a file or piped into other commands for integration into documentation workflows.

参数

-e _PATTERNS_
Exclude patterns.
-d _DEPTH_
Maximum depth.
-f
Include files.
--help
Show help.

FAQ

What is the treemd command used for?

treemd generates directory tree representations formatted as markdown, making it easy to include project structure documentation in README files and other markdown documents. The output uses markdown-compatible indentation and formatting that renders correctly on platforms like GitHub. Patterns can be excluded to skip directories like node_modules or build artifacts that clutter the tree output. Depth limiting controls how many levels deep the tree displays, keeping documentation focused on the relevant structure. The output can be redirected to a file or piped into other commands for integration into documentation workflows.

How do I run a basic treemd example?

Run `treemd` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e _PATTERNS_ do in treemd?

Exclude patterns.