Metadata-Version: 2.4
Name: f9-Paste2Project
Version: 1.0.1
Summary: CLI tool to create folder structures from tree input
Author: Forex911
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# f9-Paste2Project

Paste your folder structure and generate the entire project instantly from the terminal.

[![PyPI version](https://badge.fury.io/py/f9-Paste2Project.svg)](https://badge.fury.io/py/f9-Paste2Project)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/)

## Overview

`f9-Paste2Project` is a lightweight, cross-platform CLI utility that converts a pasted folder tree structure (like output from the `tree` command or AI-generated structures) into real files and directories on your system.

Instead of manually creating folders and files one by one, you can simply paste the structure and let `f9` build the project for you automatically.

This is especially useful for quickly setting up new projects, recreating repository structures, testing layouts, and scaffolding your development environments.

## Features

- **Format Agnostic**: Seamlessly handles clean Unix `tree` output, Windows `tree /f` output, and manually typed ASCII trees.
- **Multiple Input Methods**:
  - Interactive paste (stdin)
  - Read from file (`-f structure.txt`)
  - Read from clipboard (`-c`)
- **Safe & Reversible**: Includes a `--dry-run` mode to preview changes before they happen, and an `--undo` flag to quickly remove the last created structure.
- **Cross-Platform**: Works flawlessly on Windows, macOS, and Linux.

## Installation

Install directly from PyPI using `pip` (Recommended):

```bash
pip install f9-Paste2Project
```

Once installed, the `f9` command becomes available globally in your terminal.

## Usage

### Interactive Mode

Run the command:

```bash
f9
```

Paste your folder structure (e.g., from ChatGPT, documentation, or a `tree` command):

```text
my-app/
├── src/
│   ├── index.js
│   └── app.js
├── public/
│   └── index.html
└── package.json
```

**Finish Input:**
- On **Windows**: Press `CTRL + Z` then `ENTER`.
- On **Linux/macOS**: Press `CTRL + D`.

Your project structure is now created instantly!

### Advanced Commands

```text
Usage:
  f9                        # Interactive mode: paste tree from stdin
  f9 -f structure.txt       # Read tree from a text file
  f9 -c                     # Read tree directly from your clipboard
  f9 --dry-run              # Preview the structure without creating anything
  f9 --undo                 # Remove the last created structure
  f9 -o /some/base/dir      # Output the structure to a specific base directory
  f9 -q                     # Quiet mode (no per-item output)
  f9 -v                     # Verbose mode (extra detail)
  f9 --log output.log       # Write execution log to a file
```

## Example Output

```text
DIR:  my-app
DIR:  my-app/src
FILE: my-app/src/index.js
FILE: my-app/src/app.js
DIR:  my-app/public
FILE: my-app/public/index.html
FILE: my-app/package.json
```

## How It Works

The tool:
* Reads text input line by line.
* Detects indentation and nesting levels (supports standard tree-style syntax `├──`, `│`, `└──`).
* Intelligently distinguishes between files and directories.
* Creates the physical folders and touches the files in their correct hierarchical locations.

## License

This project is licensed under the MIT License.
