DeTree is a small native command-line tool that turns an indented text list or JSON tree into directories and Markdown files. It is the Rust successor to the original Python implementation.
- Single native executable (about 200 KB on Windows)
- No runtime dependencies
- Works with text lists and JSON
- Generates Markdown front matter and body content
- Builds for Windows, Linux, macOS, and Linux ARM64
Download the binary for your platform from GitHub Releases, or install the current source with Cargo:
cargo install --git https://github.com/morganross/detree3 --bin detreedetree <input_file> <output_dir> [OPTIONS]
Options:
--format <auto|text|json> Input format (default: auto)
--remove-digits Remove leading digits from generated names
--allow-empty-folders Create folders for leaf nodes
Documentation
Getting Started
Installation
Quick Start
Reference
Command Line
detree structure.txt ./docsNodes with children become directories containing index.md. Leaf nodes
become Markdown files. A line containing ** is written as body content for
the current node instead of becoming another file.
[
{
"name": "Documentation",
"type": "directory",
"children": [
{"name": "Getting Started", "type": "file", "body": "Welcome."}
]
}
]detree structure.json ./docs --format jsonDeTree requires Rust 1.81 or newer.
cargo fmt --check
cargo test --locked
cargo clippy --all-targets --all-features -- -D warnings
cargo build --release --lockedGenerated Cargo output belongs in target/ and is not committed.
DeTree processes local files and does not use the network. Generated names are sanitized before files are created. Use a new or backed-up output directory if you need to preserve existing files with colliding names.
Security reports should follow SECURITY.md.
MIT. See LICENSE.