Skip to content

aidankmcalister/file-tree-grabber

Repository files navigation

File Tree Grabber

File Tree Grabber

Generate and copy file tree structures from VS Code.

Usage

Right-click on any file or folder in the explorer:

  • Copy File Tree – copies the tree to clipboard
  • Preview File Tree – opens a live preview with options
  • Copy Tree + Contents (AI) – copies tree + file contents for AI prompts

Keyboard shortcut:

  • Cmd+Option+C (Mac) / Ctrl+Alt+C (Windows) – copy entire project tree

Output Formats

  • ASCII (default)
  • JSON
  • YAML
  • XML

Options

Setting Description
maxDepth Limit tree depth (-1 = unlimited)
sortOrder type (folders first) or alphabetical
useEmoji Add 📂 📄 icons
showFileSize Display file sizes
showHiddenFiles Include dotfiles
directoryOnly Show only folders

Example Output

Output for Copy File Tree:

my-project/
├── src/
│   ├── index.ts
│   └── utils.ts
├── package.json
└── README.md

Output for Copy Tree + Contents (AI):

# File Tree

```
my-project/
├── src/
│   ├── index.ts
│   └── utils.ts
├── package.json
└── README.md
```

# File Contents

## src/index.ts

```typescript
import { greet } from "./utils";

console.log(greet("World"));
```

## src/utils.ts

```typescript
export function greet(name: string): string {
  return `Hello, ${name}!`;
}
```

License

MIT

About

Generate and copy file tree structures from VS Code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published