Grab the latest tre.exe from releases, drop it in a folder on PATH.
Bidirectional CLI for the .tre format. Companion to my create.tre VS Code extension.(in dev)
OR
scoop install https://raw.githubusercontent.com/polygonstew/read.tre/main/read.tre.json
winget install polygonstew.read.tre <--IN REVIEW-->
tre . # current dir -> <foldername>.tre
tre <folder> # that folder -> <foldername>.tre
tre <file.tre> # build folder structure from a .tre
tre --hidden <folder> # include hidden folders (.git, .vscode, etc)
tre -h # help
The reverse mode also reads Windows tree /F /A output, so this works:
tree /F /A > sample.txt
tre sample.txt
Simple 2-space indent. Folders end with /. Files don't.
demo/
readme.md
src/
main.py
utils/
helper.py
tests/
test_main.py
- output lands in the current working directory
- skips folders starting with
.unless--hiddenis passed bin/objare NOT skipped — edit Program.cs to add- materialize creates empty files (names only, no content)
- no overwrite protection — if the target folder exists, it gets merged
If you redirect tree /F through PowerShell's >, older versions write UTF-16 without a BOM and the parser misreads it. Workaround:
tree /F /A | Out-File -Encoding utf8 sample.txt
cmd's > writes ANSI/UTF-8 and works fine.
dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
Drop the exe somewhere on PATH (C:\tools\ works) and call it from any terminal.