FolderMaker
FolderMaker is a free and open-source Python library that creates complete project folder and file structures from a text tree copied from AI assistant.
Instead of manually creating every folder and file, paste the AI-generated structure into a .txt file and run one Python command. FolderForge will create the full structure automatically.
Features
- Creates folders and files from an AI-generated text tree
- Supports nested folders and files
- Understands tree symbols such as
│,├──, and└── - Supports Windows paths such as
D:\MY_AGENT\ - Detects folders with trailing
\or/ - Detects files such as
main.py,README.md, andModelfile - Creates empty folders such as
logs\,workspace\, andvenv\ - Includes a dry-run mode to preview the result
- No external dependencies
- MIT licensed
Installation
Install from source
- Download or clone this repository.
git clone [https://github.com/Anni95-bot/foldermaker.git]
cd foldermaker
- Install the library:
pip install foldermaker
1. Create a structure file
Create a file named structure.txt.
Paste your AI-generated folder tree into it exactly as shown by the AI assistant.
Example:
D:\MY_AGENT\
│
├── Modelfile
├── main.py
├── config\
│ └── settings.py
│
├── core\
│ ├── ollama_client.py
│ ├── agent.py
│ ├── planner.py
│ └── tool_executor.py
│
├── tools\
│ ├── web_search.py
│ ├── browser.py
│ ├── file_manager.py
│ └── code_executor.py
│
├── memory\
│ ├── database.py
│ ├── long_term_memory.py
│ └── feedback.py
│
├── knowledge\
│ └── document_reader.py
│
├── task_manager\
│ └── queue.py
│
├── logs\
├── generated_tools\
├── workspace\
└── venv\
2. Create a Python runner file
Create a file named main.py:
import foldermaker
folderforge.build(
structure_file="structure.txt",
output_dir=r"D:\MY_AGENT"
)
3. Run the script
python main.py
FolderMaker will create this structure:
D:\MY_AGENT\
├── Modelfile
├── main.py
├── config\settings.py
├── core\ollama_client.py
├── core\agent.py
├── core\planner.py
├── core\tool_executor.py
├── tools\web_search.py
├── tools\browser.py
├── tools\file_manager.py
├── tools\code_executor.py
├── memory\database.py
├── memory\long_term_memory.py
├── memory\feedback.py
├── knowledge\document_reader.py
├── task_manager\queue.py
├── logs\
├── generated_tools\
├── workspace\
└── venv\
Command-Line Usage
After installing FolderForge, you can also use it from the terminal:
foldermaker structure.txt -o D:\MY_AGENT
To preview what will be created without creating anything:
foldermaker structure.txt -o D:\MY_AGENT --dry-run
Python API
Create from a .txt file
import foldermaker
folderforge.build(
structure_file="structure.txt",
output_dir=r"D:\MY_AGENT"
)
Create from tree text directly
import foldermaker
tree = """
D:\MY_AGENT\
│
├── main.py
├── config\
│ └── settings.py
├── core\
│ ├── agent.py
│ └── planner.py
"""
foldermaker.build_from_text(
tree_text=tree,
output_dir=r"D:\MY_AGENT"
)
Preview without creating files
import foldermaker
folderforge.build(
structure_file="structure.txt",
output_dir=r"D:\MY_AGENT",
dry_run=True
)
Folder and File Detection
FolderForge uses these rules:
| Example | Created as | Reason |
|---|---|---|
config\ |
Folder | Ends with \ |
tools/ |
Folder | Ends with / |
main.py |
File | Has a file extension |
README.md |
File | Has a file extension |
Modelfile |
File | Has no children |
logs\ |
Folder | Ends with \ |
core |
Folder | Has child files or folders |
Supported Tree Formats
FolderForge supports common AI-generated tree formats, including:
project/
├── main.py
├── config/
│ └── settings.py
└── core/
├── agent.py
└── planner.py
And Windows-style trees:
D:\MY_AGENT\
│
├── main.py
├── config\
│ └── settings.py
└── core\
├── agent.py
└── planner.py
Project Structure
foldermaker/
├── foldermaker/
│ ├── __init__.py
│ ├── parser.py
│ └── builder.py
├── structure.txt
├── generate_project.py
├── README.md
├── LICENSE
└── pyproject.toml
Safety Notes
- FolderMaker creates empty files only; it does not generate file contents.
- Existing files are not overwritten.
- Existing folders are reused safely.
- Use
dry_run=Truefirst if you are unsure where the structure will be created.
Contributing
Contributions are welcome.
- Fork the repository
- Create a new branch
- Make your changes
- Add examples or tests if possible
- Submit a pull request
License
This project is released under the MIT License. See the LICENSE file for details.
Metadata
Release files for foldermaker 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| foldermaker-1.0.1.tar.gz | 7.4 kB | Without provenance | Details for foldermaker-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| foldermaker-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for foldermaker-1.0.1-py3-none-any.whl |
Total release size: 15.6 kB
Release files / foldermaker-1.0.1.tar.gz
| Download URL | foldermaker-1.0.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da9db2787ad930decd6da7f234a2f1477bbe56810f605d0b6d7ab4eb427fa65b
|
|
BLAKE2b-256 checksum How to use checksums |
9d2bd8b3ead700481393977efd3f3cf533f2364905ea8e86f1af545d0b2de622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / foldermaker-1.0.1-py3-none-any.whl
| Download URL | foldermaker-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
219eea0b5d0a9a73eda7cfff15bbc3e2febec49764be34a87e0c044639d05c0b
|
|
BLAKE2b-256 checksum How to use checksums |
adeb57ae30cfd32f0b68a2a39bc5962f01b25b8132f33b89e4a99fedcbf93100
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for foldermaker 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.