A Visual Studio Code extension that generates a text representation of your folder structure and copies it to your clipboard.
- Generate a visual tree representation of any folder structure
- Right-click on any folder in the VS Code explorer to generate its tree
- Automatically copies the tree to your clipboard
- Configurable ignored patterns and depth settings
- Automatically ignores common system folders (.git, node_modules, .DS_Store)
- Right-click on any folder in the VS Code explorer
- Select "Generate File Tree" from the context menu
- The folder structure will be copied to your clipboard
├── .env
├── .env.local
├── .env.local.sample
├── .env.sample
├── .gitignore
├── README.md
├── app.ts
├── bun.lockb
├── bunfig.toml
├── data
│ └── card-list.json
├── handlers
│ ├── auth.ts
│ ├── example.ts
│ └── onePiece.ts
├── index.ts
├── out
│ └── index.js
├── package-lock.json
├── package.json
├── routes
��� ├── example.ts
│ └── onePiece.ts
├── schemas
│ ├── example.ts
│ └── onePiece.ts
├── scratchpad.ts
├── scripts
│ ├── generateCardList.ts
│ └── identify-image.js
├── types.ts
└── utils
├── index.ts
└── pagination
└── numbered.tsx
This extension contributes the following settings:
filetreeGenerator.ignoredPatterns
: Additional patterns to ignore when generating the file treefiletreeGenerator.maxDepth
: Maximum depth to traverse when generating the file tree (default: 10)
Example settings.json:
{
"filetreeGenerator.ignoredPatterns": ["dist", "coverage", ".env"],
"filetreeGenerator.maxDepth": 15
}
- Node.js
- npm
- Visual Studio Code
- Clone the repository
git clone https://github.com/benjaminmodayil/file-tree-extension.git
cd file-tree-extension
- Install dependencies
npm install
- Open in VS Code
code .
npm run compile
: Compile the TypeScript codenpm run watch
: Watch for changes and recompilenpm run lint
: Run ESLint
- Press F5 in VS Code to launch the extension in debug mode
- In the new VS Code window that opens, right-click on any folder
- Select "Generate File Tree" from the context menu
- Update version in package.json
- Run
vsce package
to create .vsix file - Run
vsce publish
to publish to marketplace
Contributions are welcome! Please feel free to submit a Pull Request.
This extension is licensed under the MIT License - see the LICENSE file for details.