📁 VS Code Folder Structure Generator
A simple yet powerful Visual Studio Code extension to generate and copy your project’s folder structure in multiple formats — Markdown, JSON, and YAML — directly from your workspace.
🚀 How to Run
1️⃣ Generate Markdown Tree (Default)
- Open your project in Visual Studio Code.
- Press
Ctrl+Shift+P
(or Cmd+Shift+P
on macOS) to open the Command Palette.
- Type
Generate Folder Structure
and select the command.
- The folder structure will be copied to your clipboard in a neat Markdown tree format.
- Paste it into your README.md or documentation.
2️⃣ Export in JSON / YAML / Markdown
- Open the Command Palette (
Ctrl+Shift+P
or Cmd+Shift+P
on macOS).
- Type
Export Folder Structure (JSON/YAML/Markdown)
and select the command.
- Choose your preferred format from the prompt (JSON, YAML, or Markdown).
- The folder structure will be copied to your clipboard in the chosen format.
- Paste it into your docs, config files, APIs, or any tool that accepts structured data.
3️⃣ Generate Structure for a SELECTED FOLDER
- In the Explorer sidebar, right-click on any folder for which you want the structure to be copied.
- Select Generate Structure for This Folder.
- The structure will be copied to your clipboard instantly.
✨ Features
- 📋 Copies folder structure to clipboard in Markdown, JSON, or YAML format
- 🧠 Ignores
node_modules
and hidden folders by default
- 📂 Generate structure for selected folder only (right-click any folder in Explorer → Generate Structure)
- 📑 Copy current file name directly to clipboard
- 🎯 Perfect for README.md, documentation, automation, and integrations
- 🛠️ Lightweight and blazing fast
📸 Example Outputs
JSON
{
"name": "my-app",
"type": "folder",
"children": [
{
"name": "src",
"type": "folder",
"children": [
{
"name": "components",
"type": "folder",
"children": [
{ "name": "Header.tsx", "type": "file" },
{ "name": "Sidebar.tsx", "type": "file" }
]
},
{ "name": "App.tsx", "type": "file" }
]
},
{ "name": "style.css", "type": "file" },
{ "name": "index.html", "type": "file" }
]
}
YAML
name: my-app
type: folder
children:
- name: src
type: folder
children:
- name: components
type: folder
children:
- name: Header.tsx
type: file
- name: Sidebar.tsx
type: file
- name: App.tsx
type: file
- name: style.css
type: file
- name: index.html
type: file
---
💡 Pro Tips
- Use Markdown format for human-readable documentation.
- Use JSON or YAML format for automation, APIs, or configuration files.
- Easily switch between formats via the Export Folder Structure (JSON/YAML/Markdown) command.
🔖 Changelog
v0.0.7
- Added support for copying current file name to clipboard.
- Added ability to generate structure for a selected folder via right-click in Explorer.
🛠️ Author
Created by Firos K — enhancing developer productivity one extension at a time.
💬 Enjoying this extension? Please consider leaving a ⭐ rating and review on the Visual Studio Marketplace to help others discover it!