From Text to Directories in One Command

The simplest way to safely materialize AI-generated directory structures

Input Tree Structure

project/
  ├── src/
  │   ├── components/
  │   └── utils/
  ├── tests/
  └── README.md

Generated Script

mkdir -p project/src/components
mkdir -p project/src/utils
mkdir -p project/tests
touch project/README.md

Quick Start

pip install tree-to-script

# Try it out with an example
echo 'project/
  ├── src/
  │   ├── components/
  │   └── utils/
  ├── tests/
  └── README.md
' | python3 -m tree_to_script.main

Dry-run mode enabled by default – safe by design

Common Use Cases
LLM-Powered Scaffolding
echo "Generate Python pipeline" | llm | tree-to-script

Transform AI suggestions into filesystem structures

Clipboard Workflow
pbpaste | tree-to-script --no-dry

Create structures directly from clipboard

Template Library
tree-to-script --template basic --output my_project

Quickly create standardized project templates

Why It's Needed?
Instant Execution

Create complex structures in milliseconds

Agent-Ready Foundation

Bridges the gap between autonomous systems and traditional file-based environments

Universal Primitive

Environment-independent core works anywhere where clipboard exists

Getting Started

Features

  • Cross-platform support: Python 3.10
  • Clipboard integration: Accepts input from std
  • Template management: Accepts input from .tree files
  • Safety First: Dry-run mode enabled by default
pip install tree-to-script