Project Hierarchy Explorer
Project Hierarchy Explorer provides commands that output a text version of your open project's hierarchy. You can output to either a file or the output console depending on your configuration. Easily share and discuss your project structure with other contributors, or give it to your favorite AI for greatly improved clarity in your prompts.
- Generate a full project hierarchy that includes all files and directories, excluding those specified in the
- Generate a subtree hierarchy of just the directory you care about.
- Commands can be run as Tasks
- Output is generated in a tree-like format, providing a clear view of the project's structure that can easily be copy/pasted.
- Open the command palette with
- Search for and run the Command that you want
- View the output file at the root of your project, or check the console output (depending on your configuration).
- Generates a hierarchy for your entire project starting at the root of the project.
Generate Subtree ->
All configurations are prepended with
project-hierarchy-explorer, for example:
ignorePatterns setting can be added to your workspace or user settings to ignore specific files or directories when generating the project hierarchy. It uses the glob pattern syntax.
"project-hierarchy-explorer.ignorePatterns": [".git", "node_modules", "*.js.map"]
This will ignore any .git directories and node_modules directories when generating the project hierarchy.
Represents where you would like to output the project hierarchy to.
Valid values are:
suppressNotification setting is useful when generating the project hierarchy in a build pipeline or as a task.
This will prevent the notification from appearing after the project hierarchy is generated.
Running Commands As Tasks
To run the Generate command as a task create a
"label": "Generate Project Hierarchy",
This can be very powerful when used for validation with something like ChatGPT.
If you plan to run the
Generate Subtree command as a task, you will need to supply the
relativePath parameter in your
tasks.json instead of relying on the input popup. Use the below example as a reference:
"label": "Generate Subtree Project Hierarchy",
This project uses the MIT License. Please review the MIT License for details.