🏗️ mkarchi
mkarchi (make architecture) is a command-line tool that generates complete project structures from simple tree-format text files — and now, with v0.1.6, it can also generate mkarchi syntax from an existing project.
Design your architecture once, apply it anywhere, or reverse-engineer your folders back into mkarchi format.
✨ Features
📁 Create directories from a tree structure 📄 Create empty files automatically ✍️ Create files with content using (begincontenu) / (endcontenu) 🎯 Preserve indentation (perfect for Python, YAML, JSON…) 💬 Support comments inside structure files 🔄 Generate mkarchi structure from existing folders (NEW in v0.1.6) 🚀 Fast, simple, and AI-friendly
📦 Installation
✅ Recommended (via pip)
pip install mkarchi
Option 2: Install from source
git clone https://github.com/yourusername/mkarchi.git
cd mkarchi
pip install -e .
Option 3: Run as module (no installation)
git clone https://github.com/yourusername/mkarchi.git
cd mkarchi
python -m mkarchi apply structure.txt
🚀 Quick Start
1️⃣ Create a structure file
Create a file called structure.txt:
my_project/
├── src/
│ ├── main.py(begincontenu)
│ │ def main():
│ │ print("Hello, World!")
│ │
│ │ if __name__ == "__main__":
│ │ main()
│ (endcontenu)
│ └── utils.py(begincontenu)
│ def helper():
│ return "Helper function"
│ (endcontenu)
├── tests/
│ └── test_main.py
├── README.md(begincontenu)
│ # My Project
│
│ This is an awesome project!
│ (endcontenu)
└── requirements.txt(begincontenu)
pytest>=7.0.0
requests>=2.28.0
(endcontenu)
2️⃣ Run mkarchi
mkarchi apply structure.txt
3️⃣ See the magic ✨
🚀 Creating structure from structure.txt...
📁 Created directory: my_project
📁 Created directory: my_project/src
📄 Created file with content: my_project/src/main.py
📄 Created file with content: my_project/src/utils.py
📁 Created directory: my_project/tests
📄 Created file: my_project/tests/test_main.py
📄 Created file with content: my_project/README.md
📄 Created file with content: my_project/requirements.txt
✅ Architecture created successfully!
📖 Usage
mkarchi apply structure.txt
mkarchi give [options] [output_file]
mkarchi --help
mkarchi --version
mkarchi -v
🔄 NEW: mkarchi give (v0.1.6)
Generate mkarchi syntax from your current directory.
Default behavior
mkarchi give
➡️ Generates structure.txt ➡️ Includes file contents
Generate structure without file contents
mkarchi give -c
or
mkarchi give -c myproject.txt
📄 Structure File Format
📁 Create Directories
Directories must end with /:
my_folder/
├── subfolder/
└── another_folder/
📄 Create Empty Files
Files without (begincontenu) / (endcontenu) are created empty:
my_folder/
├── empty_file.txt
└── config.json
✍️ Create Files with Content
Use (begincontenu) and (endcontenu) to define file content:
script.py(begincontenu)
print("Hello!")
print("This is Python code")
(endcontenu)
🎯 Indentation Preservation
mkarchi automatically preserves indentation:
utils.py(begincontenu)
def greet(name):
if name:
print(f"Hello, {name}!")
else:
print("Hello, World!")
(endcontenu)
Result (utils.py):
def greet(name):
if name:
print(f"Hello, {name}!")
else:
print("Hello, World!")
💬 Comments Support
Use # for comments in your structure file:
project/
├── src/ # Source code
│ └── main.py # Entry point
└── tests/ # Tests
🎯 Use Cases
⚡ Rapid project scaffolding
📦 Reusable templates
🤖 AI-generated architectures
📘 Documentation & tutorials
🧩 Microservices setup
mkarchi apply service1.txt
mkarchi apply service2.txt
🔧 Advanced Example (Python Project)
python_project/
├── src/
│ ├── __init__.py
│ └── main.py(begincontenu)
│ """Main module."""
│
│ def main():
│ print("Starting application...")
│ (endcontenu)
├── tests/
│ ├── __init__.py
│ └── test_main.py(begincontenu)
│ import pytest
│ from src.main import main
│
│ def test_main():
│ assert main() is None
│ (endcontenu)
├── setup.py(begincontenu)
│ from setuptools import setup, find_packages
│
│ setup(
│ name="my-project",
│ version="0.1.0",
│ packages=find_packages(),
│ )
│ (endcontenu)
└── README.md
🤝 Contributing
Contributions are welcome! 🚀
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-feature
Commit your changes:
git commit -m "Add amazing feature"
Push to your branch:
git push origin feature/amazing-feature
Open a Pull Request
📝 License
This project is licensed under the MIT License. See the LICENSE file for details.
🐛 Issues & Feedback
Found a bug or have a feature request? Please open an issue on GitHub Issues.
⭐ Support the Project
If you find mkarchi useful, please consider giving it a ⭐ on GitHub!
❤️ Made with passion by Soufyan Rachdi
📦 Installation
✅ Recommended (via pip)
pip install mkarchi
Option 2: Install from source
git clone https://github.com/yourusername/mkarchi.git
cd mkarchi
pip install -e .
Option 3: Run as module (no installation)
git clone https://github.com/yourusername/mkarchi.git
cd mkarchi
python -m mkarchi apply structure.txt
🚀 Quick Start
1️⃣ Create a structure file
Create a file called structure.txt:
my_project/
├── src/
│ ├── main.py(begincontenu)
│ │ def main():
│ │ print("Hello, World!")
│ │
│ │ if __name__ == "__main__":
│ │ main()
│ (endcontenu)
│ └── utils.py(begincontenu)
│ def helper():
│ return "Helper function"
│ (endcontenu)
├── tests/
│ └── test_main.py
├── README.md(begincontenu)
│ # My Project
│
│ This is an awesome project!
│ (endcontenu)
└── requirements.txt(begincontenu)
pytest>=7.0.0
requests>=2.28.0
(endcontenu)
2️⃣ Run mkarchi
mkarchi apply structure.txt
3️⃣ See the magic ✨
🚀 Creating structure from structure.txt...
📁 Created directory: my_project
📁 Created directory: my_project/src
📄 Created file with content: my_project/src/main.py
📄 Created file with content: my_project/src/utils.py
📁 Created directory: my_project/tests
📄 Created file: my_project/tests/test_main.py
📄 Created file with content: my_project/README.md
📄 Created file with content: my_project/requirements.txt
✅ Architecture created successfully!
📖 Usage
mkarchi apply structure.txt
mkarchi give [options] [output_file]
mkarchi --help
mkarchi --version
mkarchi -v
🔄 NEW: mkarchi give (v0.1.6)
Generate mkarchi syntax from your current directory.
Default behavior
mkarchi give
➡️ Generates structure.txt ➡️ Includes file contents
Generate structure without file contents
mkarchi give -c
or
mkarchi give -c myproject.txt
📄 Structure File Format
📁 Create Directories
Directories must end with /:
my_folder/
├── subfolder/
└── another_folder/
📄 Create Empty Files
Files without (begincontenu) / (endcontenu) are created empty:
my_folder/
├── empty_file.txt
└── config.json
✍️ Create Files with Content
Use (begincontenu) and (endcontenu) to define file content:
script.py(begincontenu)
print("Hello!")
print("This is Python code")
(endcontenu)
🎯 Indentation Preservation
mkarchi automatically preserves indentation:
utils.py(begincontenu)
def greet(name):
if name:
print(f"Hello, {name}!")
else:
print("Hello, World!")
(endcontenu)
Result (utils.py):
def greet(name):
if name:
print(f"Hello, {name}!")
else:
print("Hello, World!")
💬 Comments Support
Use # for comments in your structure file:
project/
├── src/ # Source code
│ └── main.py # Entry point
└── tests/ # Tests
🎯 Use Cases
⚡ Rapid project scaffolding
📦 Reusable templates
🤖 AI-generated architectures
📘 Documentation & tutorials
🧩 Microservices setup
mkarchi apply service1.txt
mkarchi apply service2.txt
🔧 Advanced Example (Python Project)
python_project/
├── src/
│ ├── __init__.py
│ └── main.py(begincontenu)
│ """Main module."""
│
│ def main():
│ print("Starting application...")
│ (endcontenu)
├── tests/
│ ├── __init__.py
│ └── test_main.py(begincontenu)
│ import pytest
│ from src.main import main
│
│ def test_main():
│ assert main() is None
│ (endcontenu)
├── setup.py(begincontenu)
│ from setuptools import setup, find_packages
│
│ setup(
│ name="my-project",
│ version="0.1.0",
│ packages=find_packages(),
│ )
│ (endcontenu)
└── README.md
🤝 Contributing
Contributions are welcome! 🚀
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-feature
Commit your changes:
git commit -m "Add amazing feature"
Push to your branch:
git push origin feature/amazing-feature
Open a Pull Request
📝 License
This project is licensed under the MIT License. See the LICENSE file for details.
🐛 Issues & Feedback
Found a bug or have a feature request? Please open an issue on GitHub Issues.
⭐ Support the Project
If you find mkarchi useful, please consider giving it a ⭐ on GitHub!
❤️ Made with passion by Soufyan Rachdi
Metadata
Release files for mkarchi 0.1.7
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 | |
|---|---|---|---|---|
| mkarchi-0.1.7.tar.gz | 14.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkarchi-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / mkarchi-0.1.7.tar.gz
| Download URL | mkarchi-0.1.7.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c39c7fcbe073d0c1c29b3c4bef7cb2761274277d270e0d361104748fe7521d75
|
|
BLAKE2b-256 checksum How to use checksums |
ef57615bc5f1b05621a55887ceae617126062f9b1dc1fcd6069cb92c07b78d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / mkarchi-0.1.7-py3-none-any.whl
| Download URL | mkarchi-0.1.7-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5773037cca0e05943c19c195dc67749570358f5cbe4a47719efe271c0158755b
|
|
BLAKE2b-256 checksum How to use checksums |
39b014a09da1ad12246de9810918a715be71bc3f1310c0f16ff467be84ebbfa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for mkarchi 0.1.7
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.