Skip to main content

Create project folder structures from tree-format files

Project description

tree2project

Create complete project directory structures from tree-format text files.

tree2project allows developers, DevOps engineers, and AI agents to quickly scaffold projects using a simple tree representation.


Installation

pip install tree2project

Features

  • Create project structures from tree files
  • Export existing project structures
  • Validate generated structures
  • Dry-run support
  • Interactive target directory selection
  • Cross-platform
  • Lightweight and dependency-friendly

Example Structure File

gitops-agent/
├── pyproject.toml
├── README.md
├── src/
│   ├── main.py
│   └── utils/
│       └── helpers.py
└── tests/

Create Project Structure

tree2project create structure.txt

Specify target directory:

tree2project create structure.txt --target ~/projects

Preview without creating files:

tree2project create structure.txt --dry-run

Export Existing Structure

Export project structure:

tree2project export ./my_project

Save output:

tree2project export ./my_project --output structure.txt

Validate Structure

Validate project against a structure specification:

tree2project validate structure.txt --target ./my_project

Example output:

Structure valid

or

Missing paths:
./my_project/src/main.py

Usage Examples

Generate New Project

tree2project create project_structure.txt

Export Existing Repository

tree2project export ./repository

Verify Generated Project

tree2project validate project_structure.txt --target ./repository

Supported Format

Example:

project/
├── README.md
├── src/
│   ├── main.py
│   └── utils.py
├── tests/
└── requirements.txt

Use Cases

AI Coding Agents

Generate repository skeletons before code generation.

Project Bootstrapping

Create standard project layouts instantly.

Development Teams

Share project templates across teams.

Education

Create exercises and sample projects.


Roadmap

v0.2.0

  • JSON support
  • YAML support
  • Structure diff command
  • Template generation

v0.3.0

  • Automatic __init__.py
  • GitHub repository templates
  • Framework templates

v1.0.0

  • Plugin system
  • Interactive TUI
  • Advanced validation engine

Development

Clone repository:

git clone https://github.com/dineshkumarummaneni/tree2project

Install locally:

pip install -e .

Run tests:

pytest

License

MIT License


PyPI

https://pypi.org/project/tree2project/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree2project-0.1.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tree2project-0.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file tree2project-0.1.2.tar.gz.

File metadata

  • Download URL: tree2project-0.1.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tree2project-0.1.2.tar.gz
Algorithm Hash digest
SHA256 48c682d14543a9536c1e25c04b84261d8939a6e204305c21280bccefb4a07745
MD5 89a1533076d94a1cd2e9f91188989823
BLAKE2b-256 bf58563c5af6817074fffdbff56e0b280a38db0f977086c5d07d6b43eb08b77a

See more details on using hashes here.

File details

Details for the file tree2project-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tree2project-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for tree2project-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 297746fb751a0dbca4903db855df5405b05d768dad46b504ad26c650455f04ef
MD5 db4da658e7043362cf604be6da8029a4
BLAKE2b-256 6be04cee10bf2a2acc3199e09e46efc0e5212d56a974a36b41c76f0225076b48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page