| Crates.io | tree-create |
| lib.rs | tree-create |
| version | 0.3.0 |
| created_at | 2024-10-20 01:04:42.141846+00 |
| updated_at | 2024-10-29 00:44:13.535872+00 |
| description | A utility to create directory structures from a tree-like text input |
| homepage | |
| repository | https://github.com/codyw912/tree-create |
| max_upload_size | |
| id | 1415839 |
| size | 42,212 |
A command-line utility to create directory structures from tree-like text input.
cargo install tree-create
tree-create supports multiple ways to input your directory structure:
Simply run tree-create with no arguments to open your default editor:
tree-create
This will open your system's default editor (defined by $EDITOR) where you can input your directory structure. Save and close the file when you're done, and it will create the structure.
Pass a file containing your directory structure:
tree-create input.txt
Use the -i or --inline flag to input the structure directly in the terminal:
tree-create -i
tree-create supports two input formats:
my-project/
├── src/
│ ├── main.rs
│ └── lib.rs
└── Cargo.toml
You can use any consistent indentation (spaces or tabs):
my-project/
src/
main.rs
lib.rs
Cargo.toml
or
my-project/
src/
main.rs
lib.rs
Cargo.toml
/)Create a simple Rust project structure:
my-project/
src/
main.rs
lib.rs
Cargo.toml
Create a more complex web project:
web-app/
src/
components/
ui/
buttons/
primary.rs
secondary.rs
inputs/
text.rs
number.rs
pages/
home.rs
about.rs
public/
index.html
styles.css
Cargo.toml
By default, tree-create will:
To overwrite existing files and directories, use the --force flag:
tree-create --force input.txt
When using --force:
Note: Be careful with --force as it will overwrite files without confirmation.
The following editors are explicitly supported for interactive mode:
--wait flag)Other editors may work but are not officially supported.