- Open Visual Studio Code
- Go to the Extensions Marketplace
- Search for Tree Hugger
- Click Install
You can also learn more at Visual Studio Code Marketplace
Write your project structure using ASCII tree formatting.
Example:
apps/mobile/
├── App.tsx
├── app.json
└── src/
├── screens/
│ ├── LoginScreen.tsx
└── utils/
└── format.ts
Highlight the entire tree structure inside the editor.
Open the Command Palette:
Ctrl + Shift + P
Cmd + Shift + P
Search for:
Tree Hugger: Generate Tree
Then press Enter.
Tree Hugger will:
- Create all folders automatically
- Create all files automatically
- Preserve the structure exactly as written
- Generate everything inside your current workspace
If no workspace is open, the extension will ask you to choose a folder.
The example tree above becomes:
apps/
└── mobile/
├── App.tsx
├── app.json
└── src/
├── screens/
│ └── LoginScreen.tsx
└── utils/
└── format.ts
- Folder names should end with
/ - Files should not end with
/ - Use proper tree characters (
├──,└──,│) - Empty files are created automatically
- Existing files are skipped unless overwritten by the extension logic
- React projects
- Node.js apps
- Monorepos
- Backend APIs
- Quick prototyping
- Coding tutorials
Try:
- Reloading VS Code
- Reinstalling the extension
- Checking that the extension is enabled
Make sure:
- The tree formatting is valid
- The text is fully selected
- You have write permissions for the workspace folder
- Paste a project tree into a new file
- Select the tree
- Run
Tree Hugger: Generate Tree - Start coding immediately