Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

tree2files πŸ—οΈ

Convert an AI-generated tree structure into real files & directories.

πŸš€ Features

βœ… Parses tree format from AI output (e.g., ChatGPT, Copilot). βœ… Creates files & folders without overwriting existing files. βœ… Optionally skips the root folder (perfect for pre-existing repos).

πŸ“¦ Installation

Clone this repo and move the script somewhere in your $PATH:

git clone https://github.com/bline/tree2files.git
cd tree2files
chmod +x tree2files
mv tree2files ~/.local/bin/  # Or /usr/local/bin/ for global usage

πŸ”§ Usage

  1. Save your AI-generated project structure in structure.txt:

    myproject/
    β”œβ”€β”€ Cargo.toml
    β”œβ”€β”€ package.json
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ lib.rs
    β”‚   └── ts/
    β”‚       β”œβ”€β”€ index.ts
    β”‚       β”œβ”€β”€ validator.ts
    β”‚       └── types.ts
    β”œβ”€β”€ examples/
    β”‚   β”œβ”€β”€ browser.html
    β”‚   └── node.js
    └── tests/
        β”œβ”€β”€ validator.test.ts
        └── schemas/
    
  2. Run:

    tree2files structure.txt

    This creates the full directory structure.

  3. If you already cloned a Git repo and want files inside it:

    tree2files structure.txt --strip-root
  4. Open in VS Code:

    code .

🎯 Why Use This?

  • Saves time: No need to manually create files after AI-generated output.
  • Safe: Doesn't overwrite existing files.
  • Lightweight: No dependencies, just a single script!

πŸ“„ License

MIT License. Contributions welcome!

About

Convert an AI-generated tree structure into real files & directories.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages