Skip to content

Examples

Simple: i18n Locales

Show code
yaml
```tree
- name: locales
  children:
    - name: pages
      children:
        - name: index
          children:
            - en.json
            - fr.json
            - ar.json
        - name: about
          children:
            - en.json
            - fr.json
            - ar.json
    - en.json
    - fr.json
    - ar.json
```
        • JSONen.json
        • JSONfr.json
        • JSONar.json
        • JSONen.json
        • JSONfr.json
        • JSONar.json
    • JSONen.json
    • JSONfr.json
    • JSONar.json

Vue Project

Show code
yaml
```tree
- name: my-app
  children:
    - name: src
      children:
        - name: components
          children:
            - name: ui
              children:
                - Button.vue
                - Modal.vue
                - Input.vue
            - Header.vue
            - Footer.vue
        - name: composables
          children:
            - useAuth.ts
            - useFetch.ts
        - name: pages
          children:
            - index.vue
            - about.vue
            - name: blog
              children:
                - index.vue
                - "[slug].vue"
        - App.vue
        - main.ts
    - name: public
      children:
        - favicon.ico
    - .gitignore
    - package.json
    - tsconfig.json
    - vite.config.ts
```
          • VUEButton.vue
          • VUEModal.vue
          • VUEInput.vue
        • VUEHeader.vue
        • VUEFooter.vue
        • TSuseAuth.ts
        • TSuseFetch.ts
        • VUEindex.vue
        • VUEabout.vue
          • VUEindex.vue
          • VUE[slug].vue
      • VUEApp.vue
      • TSmain.ts
      • ICOfavicon.ico
    • GIT.gitignore
    • JSONpackage.json
    • JSONtsconfig.json
    • TSvite.config.ts

Rich Metadata

Use description, note, highlight, icon, open, locked:

Show code
yaml
```tree
- name: api-server
  icon: "\U0001F680"
  description: "Backend"
  note: "v2.4.1"
  children:
    - name: src
      children:
        - name: routes
          description: "HTTP handlers"
          note: "3 endpoints"
          children:
            - name: auth.ts
              highlight: true
              description: "needs review"
              note: "PR #42"
            - users.ts
            - posts.ts
        - name: middleware
          children:
            - cors.ts
            - auth.ts
            - logger.ts
        - name: models
          open: false
          children:
            - User.ts
            - Post.ts
            - Comment.ts
        - name: db
          locked: true
          children:
            - name: connection.ts
              highlight: true
              description: "TODO: pool"
            - migrations.ts
        - index.ts
    - name: tests
      open: false
      description: "Tests"
      note: "87% coverage"
      children:
        - auth.test.ts
        - users.test.ts
        - posts.test.ts
    - name: dist
      type: folder
      locked: true
      description: "Build output"
    - package.json
    - tsconfig.json
    - name: .env
      icon: "\U0001F510"
      note: "Do not commit!"
    - Dockerfile
    - name: README.md
      note: "updated 2 days ago"
```
        • TSauth.tsneeds reviewPR #42
        • TSusers.ts
        • TSposts.ts
        • TScors.ts
        • TSauth.ts
        • TSlogger.ts
        • TSUser.ts
        • TSPost.ts
        • TSComment.ts
        • TSconnection.tsTODO: pool
        • TSmigrations.ts
      • TSindex.ts
      • TSauth.test.ts
      • TSusers.test.ts
      • TSposts.test.ts
    • JSONpackage.json
    • JSONtsconfig.json
    • 🔐.envDo not commit!
    • DOCKDockerfile
    • MDREADME.mdupdated 2 days ago

Items with href become clickable — useful for linking to documentation pages:

Show code
yaml
```tree
- name: project
  children:
    - name: src
      children:
        - name: index.ts
          href: "https://github.com/s00d/vitepress-plugin-folder-tree"
          description: "entrypoint"
        - name: config.ts
          href: "https://github.com/..."
          note: "types"
    - name: README.md
      href: "https://github.com/..."
      icon: "\U0001F4D6"
    - name: package.json
      href: "https://www.npmjs.com/..."
```

ASCII Format

You can paste standard ASCII tree output directly — the plugin auto-detects the format:

Show code
text
```tree
my-project/
├── src/
│   ├── components/
│   │   ├── Button.vue
│   │   ├── Modal.vue
│   │   └── Input.vue
│   ├── composables/
│   │   ├── useAuth.ts
│   │   └── useFetch.ts
│   ├── App.vue
│   └── main.ts
├── public/
│   └── favicon.ico
├── .gitignore
├── package.json
├── tsconfig.json
└── vite.config.ts
```
        • VUEButton.vue
        • VUEModal.vue
        • VUEInput.vue
        • TSuseAuth.ts
        • TSuseFetch.ts
      • VUEApp.vue
      • TSmain.ts
      • ICOfavicon.ico
    • GIT.gitignore
    • JSONpackage.json
    • JSONtsconfig.json
    • TSvite.config.ts

Without a root:

Show code
text
```tree
├── src
│   ├── index.ts
│   └── utils.ts
├── tests
│   └── index.test.ts
├── package.json
└── README.md
```
    • TSindex.ts
    • TSutils.ts
    • TSindex.test.ts
  • JSONpackage.json
  • MDREADME.md

Diff / Git Status

Show file changes with Git-style decorations. Use status: added, status: modified, status: deleted (or status: removed):

  • added — green text + A badge
  • modified — amber text + M badge
  • deleted / removed — red text + D badge + strikethrough
Show code
yaml
```tree
- name: my-app
  note: "v2.0 release"
  children:
    - name: src
      children:
        - name: components
          children:
            - name: Button.vue
              status: modified
              note: "updated props"
            - name: Modal.vue
              status: deleted
              note: "deprecated"
            - name: Drawer.vue
              status: added
              note: "new component"
            - name: Input.vue
              status: modified
        - name: pages
          children:
            - index.vue
            - name: settings.vue
              status: added
              description: "new page"
        - name: utils
          children:
            - name: helpers.ts
              status: modified
            - name: legacy.ts
              status: deleted
            - name: validators.ts
              status: added
        - App.vue
        - main.ts
    - name: package.json
      status: modified
      note: "new deps"
    - name: CHANGELOG.md
      status: added
    - tsconfig.json
```
        • VUEMButton.vueupdated props
        • VUEDModal.vuedeprecated
        • VUEADrawer.vuenew component
        • VUEMInput.vue
        • VUEindex.vue
        • VUEAsettings.vuenew page
        • TSMhelpers.ts
        • TSDlegacy.ts
        • TSAvalidators.ts
      • VUEApp.vue
      • TSmain.ts
    • JSONMpackage.jsonnew deps
    • MDACHANGELOG.md
    • JSONtsconfig.json

Minimal example:

Show code
yaml
```tree
- name: config.ts
  status: modified
- name: new-feature.ts
  status: added
- name: old-module.ts
  status: deleted
```
  • TSMconfig.ts
  • TSAnew-feature.ts
  • TSDold-module.ts

Locked Folders

Folders with locked: true cannot be toggled by the user — the chevron is dimmed and a lock icon is shown. Expand all / Collapse all also respect the lock. Try clicking on db or dist below — they won't toggle.

Show code
yaml
```tree
- name: backend
  children:
    - name: src
      children:
        - name: db
          locked: true
          description: "Do not touch"
          children:
            - connection.ts
            - migrations.ts
            - seeds.ts
        - name: services
          children:
            - auth.service.ts
            - user.service.ts
    - name: dist
      locked: true
      description: "Auto-generated"
      children:
        - index.js
        - index.d.ts
    - name: config
      children:
        - database.yml
        - app.yml
    - package.json
```
        • TSconnection.ts
        • TSmigrations.ts
        • TSseeds.ts
        • TSauth.service.ts
        • TSuser.service.ts
      • JSindex.js
      • TSindex.d.ts
      • YMLdatabase.yml
      • YMLapp.yml
    • JSONpackage.json

Collapsed by Default

All folders start collapsed. Click to expand manually.

Use options.defaultOpen: false inside the YAML body:

yaml
```tree
options:
  defaultOpen: false
tree:
  - name: src
    children:
      - index.ts
```
Show code
yaml
```tree
options:
  defaultOpen: false
tree:
  - name: monorepo
    note: "pnpm workspace"
    children:
      - name: packages
        children:
          - name: core
            ...
```
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
            • TSXButton.tsx
            • TSXCard.tsx
            • TSindex.ts
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
          • TSXmain.tsx
        • JSONpackage.json
          • MDindex.md
        • JSONpackage.json
    • JSONpackage.json
    • YAMLpnpm-workspace.yaml
    • JSONturbo.json
    • MDREADME.md

Hidden Toolbar

No toolbar — no expand/collapse buttons, no copy, no search.

Show code
yaml
```tree
options:
  showToolbar: false
tree:
  - name: my-lib
    children:
      - name: src
        children:
          - index.ts
          - utils.ts
          - types.ts
      - name: tests
        children:
          - index.test.ts
          - utils.test.ts
      - package.json
      - tsconfig.json
      - README.md
```
      • TSindex.ts
      • TSutils.ts
      • TStypes.ts
      • TSindex.test.ts
      • TSutils.test.ts
    • JSONpackage.json
    • JSONtsconfig.json
    • MDREADME.md

Static Mode (non-interactive)

Fully static tree — no toggling, no toolbar. Pure snapshot.

Show code
yaml
```tree
options:
  interactive: false
tree:
  - name: snapshot
    children:
      - name: src
        children:
          - main.rs
          - lib.rs
          - name: modules
            children:
              - parser.rs
              - compiler.rs
      - Cargo.toml
      - Cargo.lock
      - README.md
```
      • RSmain.rs
      • RSlib.rs
        • RSparser.rs
        • RScompiler.rs
    • TOMLCargo.toml
    • LOCKCargo.lock
    • MDREADME.md

Combined Options

Combine multiple options at once:

Show code
yaml
```tree
options:
  defaultOpen: false
  showBadges: false
tree:
  - name: app
    children:
      - name: frontend
        children:
          - name: src
            children:
              - App.vue
              - main.ts
          - package.json
      - name: backend
        children:
          - name: src
            children:
              - index.ts
              - server.ts
          - package.json
      - docker-compose.yml
      - README.md
```
        • VUEApp.vue
        • TSmain.ts
      • JSONpackage.json
        • TSindex.ts
        • TSserver.ts
      • JSONpackage.json
    • DOCKdocker-compose.yml
    • MDREADME.md

Load from URL

Load the tree from an external file — supports YAML, JSON, and JS modules.

YAML file

yaml
```tree
url: /trees/vue-project.yaml
```
          • VUEButton.vue
          • VUEModal.vue
          • VUEInput.vue
          • VUEDropdown.vue
          • VUEHeader.vue
          • VUEFooter.vue
          • VUESidebar.vue
        • VUEAppLogo.vue
        • TSuseAuth.ts
        • TSuseFetch.ts
        • TSuseTheme.ts
        • VUEindex.vue
        • VUEabout.vue
          • VUEindex.vue
          • VUE[slug].vue
        • TSauth.ts
        • TSapp.ts
      • VUEApp.vue
      • TSmain.ts
      • TSrouter.ts
      • ICOfavicon.ico
      • TXTrobots.txt
        • TSButton.test.ts
        • TSuseAuth.test.ts
        • TSlogin.spec.ts
        • TSnavigation.spec.ts
    • GIT.gitignore
    • ENV.env.example
    • JSONpackage.json
    • JSONtsconfig.json
    • TSvite.config.ts
    • 📖README.md

JS module (local file)

JS files use export default — supports arrays, objects, and functions. The module is executed at build time in Node.js, so you can use fs, path, and other Node APIs.

This example reads a local JSON file and builds the tree from it:

Show vue-project.js
js
// public/trees/vue-project.js
import { readFileSync } from 'fs';
import { dirname, join } from 'path';
import { fileURLToPath } from 'url';

export default function () {
  const __dir = dirname(fileURLToPath(import.meta.url));
  const data = JSON.parse(readFileSync(join(__dir, 'vue-project-data.json'), 'utf-8'));

  return [
    {
      name: 'vue-app',
      description: data.framework,
      note: `v${data.version}`,
      children: [
        { name: 'src', children: [
          { name: 'components', children: [
            { name: 'ui', children: data.components },
            'Header.vue',
          ]},
          { name: 'composables', children: data.composables },
          // ...
        ]},
      ],
    },
  ];
}
yaml
```tree
url: /trees/vue-project.js
```
          • VUEButton.vue
          • VUEModal.vue
          • VUEInput.vue
        • VUEHeader.vue
        • VUEFooter.vue
        • TSuseAuth.ts
        • TSuseFetch.ts
        • TSuseTheme.ts
        • VUEindex.vue
        • VUEabout.vue
          • VUEindex.vue
          • VUE[slug].vue
      • VUEApp.vue
      • TSmain.ts
      • TSrouter.ts
      • ICOfavicon.ico
      • TXTrobots.txt
        • TSButton.test.ts
        • TSuseAuth.test.ts
        • TSlogin.spec.ts
        • TSnavigation.spec.ts
    • GIT.gitignore
    • ENV.env.example
    • JSONpackage.json
    • JSONtsconfig.json
    • TSvite.config.ts
    • 📖README.md

JS module (fetch)

You can also use fetch() to load data from an HTTP URL. The function can be async:

Show example
js
// public/trees/remote-project.js
export default async function () {
  const res = await fetch('https://api.example.com/project-structure.json');
  const data = await res.json();

  return [
    {
      name: data.name,
      children: data.files.map(f => ({ name: f })),
    },
  ];
}
yaml
```tree
url: /trees/remote-project.js
```

URL + options

Show code
yaml
```tree
url: /trees/vue-project.yaml
options:
  defaultOpen: false
  showBadges: false
```
          • VUEButton.vue
          • VUEModal.vue
          • VUEInput.vue
          • VUEDropdown.vue
          • VUEHeader.vue
          • VUEFooter.vue
          • VUESidebar.vue
        • VUEAppLogo.vue
        • TSuseAuth.ts
        • TSuseFetch.ts
        • TSuseTheme.ts
        • VUEindex.vue
        • VUEabout.vue
          • VUEindex.vue
          • VUE[slug].vue
        • TSauth.ts
        • TSapp.ts
      • VUEApp.vue
      • TSmain.ts
      • TSrouter.ts
      • ICOfavicon.ico
      • TXTrobots.txt
        • TSButton.test.ts
        • TSuseAuth.test.ts
        • TSlogin.spec.ts
        • TSnavigation.spec.ts
    • GIT.gitignore
    • ENV.env.example
    • JSONpackage.json
    • JSONtsconfig.json
    • TSvite.config.ts
    • 📖README.md

Use the search field in the toolbar to filter files by name:

Show code
yaml
```tree
- name: monorepo
  note: "pnpm workspace"
  children:
    - name: packages
      children:
        - name: core
          note: "v1.0.0"
          children:
            - name: src
              children:
                - index.ts
            - package.json
            - tsconfig.json
        - name: ui
          note: "v0.8.2"
          children:
            - name: src
              children:
                - name: components
                  children:
                    - Button.tsx
                    - Card.tsx
                    - index.ts
                - index.ts
            - package.json
            - tsconfig.json
        - name: utils
          note: "v1.2.0"
          children:
            - name: src
              children:
                - index.ts
            - package.json
            - tsconfig.json
    - name: apps
      children:
        - name: web
          children:
            - name: src
              children:
                - main.tsx
            - package.json
        - name: docs
          children:
            - name: src
              children:
                - index.md
            - package.json
    - name: .github
      open: false
      children:
        - name: workflows
          children:
            - ci.yml
            - release.yml
    - package.json
    - pnpm-workspace.yaml
    - turbo.json
    - README.md
```
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
            • TSXButton.tsx
            • TSXCard.tsx
            • TSindex.ts
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
          • TSindex.ts
        • JSONpackage.json
        • JSONtsconfig.json
          • TSXmain.tsx
        • JSONpackage.json
          • MDindex.md
        • JSONpackage.json
        • YMLci.yml
        • YMLrelease.yml
    • JSONpackage.json
    • YAMLpnpm-workspace.yaml
    • JSONturbo.json
    • MDREADME.md

Auto-generate from Filesystem

Scan a real directory at build time — no manual YAML needed:

yaml
```tree
from: ./src
depth: 3
```
      • VUEFileIcon.vue
      • VUEFileNode.vue
      • VUEFloatingPanel.vue
      • VUEFolderIcon.vue
      • VUEFolderNode.vue
      • VUENodeBadge.vue
      • VUENodeNote.vue
      • VUENodeStatusBadge.vue
      • VUETreeContextMenu.vue
      • VUETreeDownloadMenu.vue
      • VUETreeFooter.vue
      • VUETreeSearch.vue
      • VUETreeTabs.vue
      • VUETreeToolbar.vue
      • VUETreeTooltip.vue
      • TSuseClickOutside.ts
      • TSuseClipboard.ts
      • TSuseEventListener.ts
      • TSuseTreeClipboard.ts
      • TSuseTreeContextMenu.ts
      • TSuseTreeDeepLink.ts
      • TSuseTreeExpand.ts
      • TSuseTreeKeyboard.ts
      • TSuseTreeSearch.ts
      • TSuseTreeTabs.ts
      • TSuseTreeTooltip.ts
      • TSindex.ts
      • TSparser.ts
      • TSresolver.ts
      • TSscanner.ts
      • TSvalidation.ts
      • CSStailwind.css
      • TSconstants.ts
      • TSicons.ts
      • TSsearch-helpers.ts
      • TStree-helpers.ts
      • TStree-parser.ts
      • TStree-validator.ts
      • TStypes.ts
    • TSclient.ts
    • TSconfig.ts
    • TSfolder-tree-plugin.ts
    • TSindex.ts
    • TSshims-vue.d.ts
    • VUEVpFolderTree.vue

With filtering — only .ts files:

Show code
yaml
```tree
from: ../src
name: "TypeScript source"
include:
  - "*.ts"
options:
  defaultOpen: false
```
      • TSuseClickOutside.ts
      • TSuseClipboard.ts
      • TSuseEventListener.ts
      • TSuseTreeClipboard.ts
      • TSuseTreeContextMenu.ts
      • TSuseTreeDeepLink.ts
      • TSuseTreeExpand.ts
      • TSuseTreeKeyboard.ts
      • TSuseTreeSearch.ts
      • TSuseTreeTabs.ts
      • TSuseTreeTooltip.ts
      • TSindex.ts
      • TSparser.ts
      • TSresolver.ts
      • TSscanner.ts
      • TSvalidation.ts
      • TSconstants.ts
      • TSicons.ts
      • TSsearch-helpers.ts
      • TStree-helpers.ts
      • TStree-parser.ts
      • TStree-validator.ts
      • TStypes.ts
    • TSclient.ts
    • TSconfig.ts
    • TSfolder-tree-plugin.ts
    • TSindex.ts
    • TSshims-vue.d.ts

Without root wrapper:

Show code
yaml
```tree
from: ../src
showRoot: false
exclude:
  - "*.vue"
```
    • TSuseClickOutside.ts
    • TSuseClipboard.ts
    • TSuseEventListener.ts
    • TSuseTreeClipboard.ts
    • TSuseTreeContextMenu.ts
    • TSuseTreeDeepLink.ts
    • TSuseTreeExpand.ts
    • TSuseTreeKeyboard.ts
    • TSuseTreeSearch.ts
    • TSuseTreeTabs.ts
    • TSuseTreeTooltip.ts
    • TSindex.ts
    • TSparser.ts
    • TSresolver.ts
    • TSscanner.ts
    • TSvalidation.ts
    • CSStailwind.css
    • TSconstants.ts
    • TSicons.ts
    • TSsearch-helpers.ts
    • TStree-helpers.ts
    • TStree-parser.ts
    • TStree-validator.ts
    • TStypes.ts
  • TSclient.ts
  • TSconfig.ts
  • TSfolder-tree-plugin.ts
  • TSindex.ts
  • TSshims-vue.d.ts

With file content preview

Enable preview: true to read file contents at build time. Hover any file to see its content, click to copy:

Show code
yaml
```tree
from: ../src/composables
preview: true
depth: 2
```
    • TSuseClickOutside.ts
    • TSuseClipboard.ts
    • TSuseEventListener.ts
    • TSuseTreeClipboard.ts
    • TSuseTreeContextMenu.ts
    • TSuseTreeDeepLink.ts
    • TSuseTreeExpand.ts
    • TSuseTreeKeyboard.ts
    • TSuseTreeSearch.ts
    • TSuseTreeTabs.ts
    • TSuseTreeTooltip.ts

With limits

Control preview size and open depth:

OptionTypeDefaultDescription
previewbooleanfalseRead file contents into tooltip
maxPreviewSizenumber4096Max file size in bytes for preview
previewExtensionsstring[]common text extsWhich extensions to read
openDepthnumber-1 (all)Max depth to auto-open (0 = all closed, 1 = only root, etc.)
Show code
yaml
```tree
from: ../src/utils
preview: true
maxPreviewSize: 2048
openDepth: 1
```
    • TSconstants.ts
    • TSicons.ts
    • TSsearch-helpers.ts
    • TStree-helpers.ts
    • TStree-parser.ts
    • TStree-validator.ts
    • TStypes.ts

Open depth only

Use openDepth without preview to control how many levels are expanded:

Show code
yaml
```tree
from: ../src
openDepth: 0
depth: 3
```
      • VUEFileIcon.vue
      • VUEFileNode.vue
      • VUEFloatingPanel.vue
      • VUEFolderIcon.vue
      • VUEFolderNode.vue
      • VUENodeBadge.vue
      • VUENodeNote.vue
      • VUENodeStatusBadge.vue
      • VUETreeContextMenu.vue
      • VUETreeDownloadMenu.vue
      • VUETreeFooter.vue
      • VUETreeSearch.vue
      • VUETreeTabs.vue
      • VUETreeToolbar.vue
      • VUETreeTooltip.vue
      • TSuseClickOutside.ts
      • TSuseClipboard.ts
      • TSuseEventListener.ts
      • TSuseTreeClipboard.ts
      • TSuseTreeContextMenu.ts
      • TSuseTreeDeepLink.ts
      • TSuseTreeExpand.ts
      • TSuseTreeKeyboard.ts
      • TSuseTreeSearch.ts
      • TSuseTreeTabs.ts
      • TSuseTreeTooltip.ts
      • TSindex.ts
      • TSparser.ts
      • TSresolver.ts
      • TSscanner.ts
      • TSvalidation.ts
      • CSStailwind.css
      • TSconstants.ts
      • TSicons.ts
      • TSsearch-helpers.ts
      • TStree-helpers.ts
      • TStree-parser.ts
      • TStree-validator.ts
      • TStypes.ts
    • TSclient.ts
    • TSconfig.ts
    • TSfolder-tree-plugin.ts
    • TSindex.ts
    • TSshims-vue.d.ts
    • VUEVpFolderTree.vue

Preview & File Content

Add preview to any file node to attach its content. This enables three features:

ActionBehavior
HoverInstantly shows a tooltip with the file content
ClickCopies the content to clipboard
Right-click → Copy ContentCopies via context menu
Shell script (>_)Uses cat << 'EOF' instead of touch
Show code
yaml
```tree
- name: src
  children:
    - name: index.ts
      preview: "import { createApp } from 'vue'\nimport App from './App.vue'\n\ncreateApp(App).mount('#app')"
      description: "entrypoint"
    - name: utils.ts
      preview: "export function formatDate(d: Date) {\n  return d.toISOString().split('T')[0];\n}"
    - name: config.ts
      preview: "export interface Config {\n  port: number;\n  host: string;\n  debug: boolean;\n}"
      note: "types"
    - name: App.vue
      preview: "<template>\n  <div id=\"app\">\n    <router-view />\n  </div>\n</template>"
    - name: .env
      preview: "VITE_API_URL=http://localhost:3000\nVITE_APP_TITLE=My App\nVITE_DEBUG=true"
      note: "Do not commit!"
    - main.css
```
    • TSindex.tsentrypoint
    • TSutils.ts
    • TSconfig.tstypes
    • VUEApp.vue
    • ENV.envDo not commit!
    • CSSmain.css

Tip: Hover over any file above to see the tooltip. Click to copy its content. Right-click for the "Copy Content" menu item. Files without preview (like main.css) behave normally. Try the >_ shell button — files with content use cat << 'EOF' instead of touch.

Context Menu

Open the context menu on any node using one of these methods:

MethodHow
Right-clickStandard right mouse button on a node
Ctrl + ClickHold Ctrl (or Cmd on Mac) and left-click a node
Shift + F10Focus a row with arrow keys, then press Shift + F10

The context menu provides:

  • Copy Name — copies just the file/folder name (e.g. Button.vue)
  • Copy Path — copies the full tree path (e.g. src/components/Button.vue)

Press Escape to close the menu.

Try all three methods on the tree below:

Show code
yaml
```tree
- name: project
  children:
    - name: src
      children:
        - name: components
          children:
            - name: Button.vue
              description: "right-click me!"
            - Modal.vue
            - Input.vue
        - name: utils
          children:
            - helpers.ts
            - format.ts
        - App.vue
        - main.ts
    - package.json
    - tsconfig.json
```
        • VUEButton.vueright-click me!
        • VUEModal.vue
        • VUEInput.vue
        • TShelpers.ts
        • TSformat.ts
      • VUEApp.vue
      • TSmain.ts
    • JSONpackage.json
    • JSONtsconfig.json

Shell Script Generation

Click the >_ (terminal) button in any toolbar to copy a shell script that recreates the folder structure. The generated script uses mkdir -p for folders and touch for files. Paste it into your terminal to scaffold the project instantly.

Try it on any tree above!

Deep Linking (Focus via URL)

Append a #path to the page URL to auto-expand and focus a specific node. The tree will:

  1. Expand all ancestor folders
  2. Scroll to the target node
  3. Highlight it with a pulse animation

Example: add #my-app/src/components/ui/Button.vue to the URL hash and the Vue Project tree will expand and highlight that file.

Tabs Mode

Use the tab field on root-level items to create switchable tabs — perfect for comparing "Before vs After" or "Client vs Server" structures:

Show code
yaml
```tree
- tab: "Frontend"
  children:
    - name: src
      children:
        - name: components
          children:
            - Button.vue
            - Modal.vue
        - App.vue
        - main.ts
    - package.json
    - vite.config.ts
- tab: "Backend"
  children:
    - name: src
      children:
        - name: routes
          children:
            - auth.ts
            - users.ts
        - name: middleware
          children:
            - cors.ts
            - logger.ts
        - index.ts
    - package.json
    - tsconfig.json
- tab: "Shared"
  children:
    - name: packages
      children:
        - name: types
          children:
            - index.d.ts
            - api.d.ts
        - name: utils
          children:
            - format.ts
            - validate.ts
    - pnpm-workspace.yaml
```
      • VUEButton.vue
      • VUEModal.vue
    • VUEApp.vue
    • TSmain.ts
  • JSONpackage.json
  • TSvite.config.ts

Tabs with diff statuses:

Show code
yaml
```tree
- tab: "Before"
  children:
    - name: src
      children:
        - name: utils.ts
          note: "old helpers"
        - name: legacy.ts
          note: "will be removed"
        - main.ts
- tab: "After"
  children:
    - name: src
      children:
        - name: utils.ts
          status: modified
          note: "refactored"
        - name: legacy.ts
          status: deleted
        - main.ts
        - name: validators.ts
          status: added
          note: "new module"
```
    • TSutils.tsold helpers
    • TSlegacy.tswill be removed
    • TSmain.ts

Keyboard Navigation

Click on any tree or press Tab to focus it, then use:

KeyAction
Arrow DownMove focus to next row
Arrow UpMove focus to previous row
Arrow RightExpand focused folder
Arrow LeftCollapse focused folder
Enter / SpaceToggle folder open/close
Shift + F10Open context menu for focused row
EscapeClose context menu or tooltip
TabEnter / exit tree area

Modifier keys

ModifierAction
Ctrl + Click (Win/Linux)Open context menu on clicked node
Cmd + Click (Mac)Open context menu on clicked node

File Icon Colors (all extensions)

Visual test of all supported file extensions grouped by color:

Show code
yaml
```tree
- name: "all-extensions"
  children:
    - name: "JavaScript (amber)"
      children:
        - app.js
        - module.mjs
        - legacy.cjs
        - component.jsx
        - .env
        - .npmrc
        - .nvmrc
        - main.nim
        - template.ejs
    - name: "TypeScript (blue)"
      children:
        - app.ts
        - module.mts
        - legacy.cts
        - component.tsx
        - types.d_ts
    - name: "Vue / Nunjucks (emerald)"
      children:
        - App.vue
        - layout.njk
        - config.vim
    - name: "HTML / Svelte / Rust (orange)"
      children:
        - index.html
        - page.htm
        - logo.svg
        - App.svelte
        - main.rs
        - lib.zig
        - template.hbs
        - page.pug
    - name: "Java / Gradle (red)"
      children:
        - Main.java
        - app.jar
        - build.gradle
    - name: "Git (orange)"
      children:
        - .git
        - .gitignore
        - .gitattributes
        - .gitmodules
    - name: "JSON / Data (teal)"
      children:
        - data.json
        - config.json5
        - settings.jsonc
        - stream.jsonl
        - events.ndjson
    - name: "YAML / TOML (lime)"
      children:
        - config.yaml
        - ci.yml
        - settings.toml
    - name: "XML / CSV (orange / green)"
      children:
        - feed.xml
        - data.csv
        - data.tsv
    - name: "Config (gray)"
      children:
        - settings.ini
        - app.cfg
        - server.conf
        - db.properties
        - package-lock.lock
        - bun.lockb
        - LICENSE.lic
        - LICENSE.license
        - .editorconfig
        - .prettierrc
        - .eslintrc
        - .babelrc
        - .browserslistrc
        - schema.proto
        - service.thrift
    - name: "Fonts (gray)"
      children:
        - font.woff
        - font.woff2
        - font.ttf
        - font.otf
        - font.eot
    - name: "Markdown / Docs (sky)"
      children:
        - README.md
        - docs.mdx
        - guide.rst
        - manual.adoc
        - paper.tex
        - thesis.latex
    - name: "Docker (sky)"
      children:
        - Dockerfile.dockerfile
        - .dockerignore
    - name: "Dart (sky)"
      children:
        - main.dart
    - name: "CSS (indigo)"
      children:
        - style.css
        - theme.less
        - base.styl
        - main.stylus
    - name: "SCSS / Sass (pink)"
      children:
        - theme.scss
        - base.sass
    - name: "GraphQL (fuchsia)"
      children:
        - schema.graphql
        - query.gql
    - name: "Python (cyan)"
      children:
        - app.py
        - types.pyi
        - fast.pyx
        - gui.pyw
        - notebook.ipynb
    - name: "Go (cyan)"
      children:
        - main.go
        - go.mod
        - go.sum
    - name: "SQL / DB (cyan)"
      children:
        - query.sql
        - data.sqlite
        - app.db
        - schema.prisma
    - name: "Ruby / Perl (red)"
      children:
        - app.rb
        - tasks.rake
        - gem.gemspec
        - layout.erb
        - script.pl
        - module.pm
        - app.perl
    - name: "Kotlin / C# / F# / Scala / Elixir (violet)"
      children:
        - Main.kt
        - build.kts
        - Program.cs
        - script.csx
        - App.fs
        - script.fsx
        - repl.fsi
        - Main.scala
        - build.sbt
        - app.ex
        - test.exs
        - init.el
    - name: "Terraform / HCL (violet)"
      children:
        - main.tf
        - config.hcl
    - name: "Swift / Objective-C (rose)"
      children:
        - App.swift
        - ViewController.m
        - Bridge.mm
    - name: "PHP (slate)"
      children:
        - index.php
        - view.phtml
        - layout.blade
        - template.twig
    - name: "C / C++ (slate)"
      children:
        - main.c
        - app.cpp
        - module.cc
        - lib.cxx
        - main.h
        - app.hpp
        - lib.hxx
    - name: "R (blue)"
      children:
        - analysis.r
        - report.rmd
    - name: "Lua / V (blue)"
      children:
        - init.lua
        - main.v
    - name: "Shell / Make (stone)"
      children:
        - install.sh
        - setup.bash
        - config.zsh
        - init.fish
        - script.ps1
        - module.psm1
        - run.bat
        - build.cmd
        - Makefile.make
        - Makefile.makefile
    - name: "Images (green)"
      children:
        - photo.png
        - photo.jpg
        - photo.jpeg
        - anim.gif
        - image.webp
        - image.avif
        - favicon.ico
        - image.bmp
        - scan.tiff
        - scan.tif
    - name: "Video / Audio (rose)"
      children:
        - video.mp4
        - clip.webm
        - movie.mov
        - clip.avi
        - song.mp3
        - audio.wav
        - track.ogg
        - music.flac
    - name: "Archives (stone)"
      children:
        - archive.zip
        - backup.tar
        - data.gz
        - data.bz2
        - data.xz
        - archive.rar
        - archive.7z
    - name: "Documents (branded)"
      children:
        - report.pdf
        - letter.doc
        - letter.docx
        - budget.xls
        - budget.xlsx
        - slides.ppt
        - slides.pptx
    - name: "Binaries (neutral)"
      children:
        - module.wasm
        - data.bin
        - app.exe
        - lib.dll
        - lib.so
    - name: "Plain text (neutral)"
      children:
        - notes.txt
        - output.log
        - changes.diff
        - fix.patch
```
      • JSapp.js
      • MJSmodule.mjs
      • CJSlegacy.cjs
      • JSXcomponent.jsx
      • ENV.env
      • .npmrc
      • .nvmrc
      • NIMmain.nim
      • EJStemplate.ejs
      • TSapp.ts
      • MTSmodule.mts
      • CTSlegacy.cts
      • TSXcomponent.tsx
      • D_TStypes.d_ts
      • VUEApp.vue
      • NJKlayout.njk
      • VIMconfig.vim
      • HTMLindex.html
      • HTMpage.htm
      • SVGlogo.svg
      • SVELTEApp.svelte
      • RSmain.rs
      • ZIGlib.zig
      • HBStemplate.hbs
      • PUGpage.pug
      • JAVAMain.java
      • JARapp.jar
      • GRADLEbuild.gradle
      • GIT.git
      • GIT.gitignore
      • GIT.gitattributes
      • GIT.gitmodules
      • JSONdata.json
      • JSON5config.json5
      • JSONCsettings.jsonc
      • JSONLstream.jsonl
      • NDJSONevents.ndjson
      • YAMLconfig.yaml
      • YMLci.yml
      • TOMLsettings.toml
      • XMLfeed.xml
      • CSVdata.csv
      • TSVdata.tsv
      • INIsettings.ini
      • CFGapp.cfg
      • CONFserver.conf
      • PROPERTIESdb.properties
      • LOCKpackage-lock.lock
      • LOCKBbun.lockb
      • LICLICENSE.lic
      • LICENSELICENSE.license
      • .editorconfig
      • .prettierrc
      • .eslintrc
      • .babelrc
      • .browserslistrc
      • PROTOschema.proto
      • THRIFTservice.thrift
      • WOFFfont.woff
      • WOFF2font.woff2
      • TTFfont.ttf
      • OTFfont.otf
      • EOTfont.eot
      • MDREADME.md
      • MDXdocs.mdx
      • RSTguide.rst
      • ADOCmanual.adoc
      • TEXpaper.tex
      • LATEXthesis.latex
      • DOCKERFILEDockerfile.dockerfile
      • .dockerignore
      • DARTmain.dart
      • CSSstyle.css
      • LESStheme.less
      • STYLbase.styl
      • STYLUSmain.stylus
      • SCSStheme.scss
      • SASSbase.sass
      • GRAPHQLschema.graphql
      • GQLquery.gql
      • PYapp.py
      • PYItypes.pyi
      • PYXfast.pyx
      • PYWgui.pyw
      • IPYNBnotebook.ipynb
      • GOmain.go
      • MODgo.mod
      • SUMgo.sum
      • SQLquery.sql
      • SQLITEdata.sqlite
      • DBapp.db
      • PRISMAschema.prisma
      • RBapp.rb
      • RAKEtasks.rake
      • GEMSPECgem.gemspec
      • ERBlayout.erb
      • PLscript.pl
      • PMmodule.pm
      • PERLapp.perl
      • KTMain.kt
      • KTSbuild.kts
      • CSProgram.cs
      • CSXscript.csx
      • FSApp.fs
      • FSXscript.fsx
      • FSIrepl.fsi
      • SCALAMain.scala
      • SBTbuild.sbt
      • EXapp.ex
      • EXStest.exs
      • ELinit.el
      • TFmain.tf
      • HCLconfig.hcl
      • SWIFTApp.swift
      • MViewController.m
      • MMBridge.mm
      • PHPindex.php
      • PHTMLview.phtml
      • BLADElayout.blade
      • TWIGtemplate.twig
      • Cmain.c
      • CPPapp.cpp
      • CCmodule.cc
      • CXXlib.cxx
      • Hmain.h
      • HPPapp.hpp
      • HXXlib.hxx
      • Ranalysis.r
      • RMDreport.rmd
      • LUAinit.lua
      • Vmain.v
      • SHinstall.sh
      • BASHsetup.bash
      • ZSHconfig.zsh
      • FISHinit.fish
      • PS1script.ps1
      • PSM1module.psm1
      • BATrun.bat
      • CMDbuild.cmd
      • MAKEMakefile.make
      • MAKEFILEMakefile.makefile
      • PNGphoto.png
      • JPGphoto.jpg
      • JPEGphoto.jpeg
      • GIFanim.gif
      • WEBPimage.webp
      • AVIFimage.avif
      • ICOfavicon.ico
      • BMPimage.bmp
      • TIFFscan.tiff
      • TIFscan.tif
      • MP4video.mp4
      • WEBMclip.webm
      • MOVmovie.mov
      • AVIclip.avi
      • MP3song.mp3
      • WAVaudio.wav
      • OGGtrack.ogg
      • FLACmusic.flac
      • ZIParchive.zip
      • TARbackup.tar
      • GZdata.gz
      • BZ2data.bz2
      • XZdata.xz
      • RARarchive.rar
      • 7Zarchive.7z
      • PDFreport.pdf
      • DOCletter.doc
      • DOCXletter.docx
      • XLSbudget.xls
      • XLSXbudget.xlsx
      • PPTslides.ppt
      • PPTXslides.pptx
      • WASMmodule.wasm
      • BINdata.bin
      • EXEapp.exe
      • DLLlib.dll
      • SOlib.so
      • TXTnotes.txt
      • LOGoutput.log
      • DIFFchanges.diff
      • PATCHfix.patch

Released under the MIT License