| Crates.io | tree2fs-rs |
| lib.rs | tree2fs-rs |
| version | 0.1.0 |
| created_at | 2025-11-26 15:37:16.459939+00 |
| updated_at | 2025-11-26 15:37:16.459939+00 |
| description | Convert tree-formatted text into filesystem structures. |
| homepage | |
| repository | https://github.com/fasilmveloor/tree2fs-rs |
| max_upload_size | |
| id | 1951568 |
| size | 42,983 |
tree2fs-rs is a blazing fast command-line tool written in Rust that converts tree-formatted text into actual filesystem structures (directories and files).
It is the Rust port of the original Python tree2fs tool, offering improved performance, safety, and a single-binary distribution.
tree command).--dry-run) lets you see exactly what will be created.│, ├, └, ─) and indentation automatically.The easiest way to install is via our shell script:
curl -fsSL https://raw.githubusercontent.com/fasilmveloor/tree2fs-rs/main/install.sh | bash
If you have Rust installed:
cargo install tree2fs-rs
git clone https://github.com/fasilmveloor/tree2fs-rs.git
cd tree2fs-rs
cargo install --path .
Create a text file (e.g., structure.txt) describing your directory layout:
my-project/
├── src/
│ ├── main.rs
│ └── lib.rs
├── Cargo.toml
└── README.md
Run the tool to create the structure:
tree2fs-rs structure.txt
| Option | Description |
|---|---|
--dry-run |
Preview changes without creating any files. |
-v, --verbose |
Enable detailed logging of operations. |
-b, --base-dir <DIR> |
Specify the target directory (default: current dir). |
--no-skip-root |
Create the root directory itself (e.g., my-project/) instead of just its contents. |
Example:
# Preview creation in a specific folder
tree2fs-rs structure.txt --base-dir ./output --dry-run --verbose
/.# or text after # are treated as comments.Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature).git commit -m 'Add some amazing feature').git push origin feature/amazing-feature).This project is licensed under the MIT License - see the LICENSE file for details.