vscode extension. write a tree like this:
demo/
readme.md
src/
main.py
utils/
helper.py
tests/
test_main.py
right-click → those folders and files exist on disk. empty.
works on .tre files in the explorer, or on selected text in any file (handy for trees inside markdown and design docs).
companion to read.tre, the CLI that scaffolds the same format from a terminal and also goes the other direction (folder → .tre).
writing trees in readmes and design docs and then manually mkdir/ touching every line is tedious. one right-click should fix that.
not on the marketplace yet. clone and run from source:
git clone https://github.com/polygonstew/create.tre
cd create.tre
npm install
npm run compile
then either:
- press
F5inside VS Code with the project open — launches an Extension Development Host with create.tre loaded - or
vsce packageandcode --install-extension create-tre-0.0.1.vsixto install it for real
| command | invoke from | what it does |
|---|---|---|
create.tre: Create From File |
right-click a .tre file in explorer |
materializes the tree from that file |
create.tre: Create From Selection |
right-click a text selection | materializes the tree from the selected text |
create.tre: Preview From Selection |
right-click a text selection | shows what would be created, writes nothing |
2-space indent. folders end with /. files don't. blank lines fine. # starts a comment and is stripped.
demo/
readme.md # this is a comment
src/
main.py
utils/
helper.py
tests/
test_main.py
also parses tree-drawing characters, so this works:
demo/
├── readme.md
├── src/
│ ├── main.py
│ └── utils/
│ └── helper.py
└── tests/
└── test_main.py
and Windows tree /F /A output — paste it into a selection and scaffold.
read.tre is the CLI for the same .tre format. install via winget:
winget install polygonstew.read.tre
use create.tre when you're in the editor. use read.tre when you're in a terminal, or when you want to capture an existing folder as a .tre.
search vscode extensions for "create.tre"