Skip to main content

f9-Paste2Project

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

PyPI version License: MIT Python 3.6+

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):

pip install f9-Paste2Project

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

Usage

Interactive Mode

Run the command:

f9

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

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

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

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.

Metadata

Release files for f9-Paste2Project 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for f9-Paste2Project 1.0.1
File Size Uploaded Provenance Actions
f9_paste2project-1.0.1.tar.gz 9.7 kB Without provenance Details for f9_paste2project-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for f9-Paste2Project 1.0.1
File Interpreter ABI Platform Actions
f9_paste2project-1.0.1-py3-none-any.whl Python 3 none any Details for f9_paste2project-1.0.1-py3-none-any.whl

Total release size: 19.1 kB

Release files / f9_paste2project-1.0.1.tar.gz

Download URL f9_paste2project-1.0.1.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1941711a092c7c1189aee93f0169d7bb9e281fa80e3d80c3b2a812bac779092b
BLAKE2b-256 checksum
How to use checksums
87834af300c7c1ea33b5d1fa6e7d52c032e64715110e03e2a02ab3f1f3db0874
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Release files / f9_paste2project-1.0.1-py3-none-any.whl

Download URL f9_paste2project-1.0.1-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cc8e1a14fa7f5d6e76184dc70fd274d28403d4d519acd8679f55ac1ced7aadc
BLAKE2b-256 checksum
How to use checksums
e86bf80a85f9f655342a113cd6dde5026434be5b5182a124ddb2ebe77143c0b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.11

Security for f9-Paste2Project 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page