Design your architecture once, apply it anywhere
Documentation โข Latest Version โข FAQ โข Community
mkarchi (make architecture) is a powerful command-line tool that generates complete project structures from simple tree-format text files. With v0.1.7, you can also reverse-engineer your existing projects back into mkarchi format โ making project scaffolding and documentation effortless.
|
|
pip install mkarchi๐ฆ Alternative Installation Methods
Install from source:
git clone https://github.com/SoufyanRachdi/mkarchi.git
cd mkarchi
pip install -e .Run as module (no installation):
git clone https://github.com/SoufyanRachdi/mkarchi.git
cd mkarchi
python -m mkarchi apply structure.txt1. Create a structure file (structure.txt):
my_project/
โโโ src/
โ โโโ main.py(begincontenu)
โ โ def main():
โ โ print("Hello, World!")
โ โ
โ โ if __name__ == "__main__":
โ โ main()
โ (endcontenu)
โ โโโ utils.py
โโโ 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. Apply the structure:
mkarchi apply structure.txt3. 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: 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!
# Apply a structure file to create project
mkarchi apply structure.txt
# Generate structure file from current directory
mkarchi give
# Generate without file contents
mkarchi give -c
# Save to custom file
mkarchi give myproject.txt
# Get help
mkarchi --help
# Check version
mkarchi --versionGenerate mkarchi syntax from your existing project structure.
mkarchi giveโ
Generates structure.txt
โ
Includes file contents
โ
Respects .gitignore automatically
mkarchi give -cmkarchi give -c myproject.txtmkarchi automatically reads your .gitignore and excludes:
node_modules/,venv/,__pycache__/.git/directories- Build artifacts and cache files
- Binary files and dependencies
Example .gitignore:
node_modules/
*.pyc
__pycache__/
.env
Running mkarchi give automatically skips all these files! ๐
Directories must end with /:
my_folder/
โโโ subfolder/
โโโ another_folder/
Files without content tags are created empty:
my_folder/
โโโ empty_file.txt
โโโ config.json
Use (begincontenu) and (endcontenu):
script.py(begincontenu)
def hello():
print("Hello, World!")
(endcontenu)
Indentation is automatically preserved:
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!")Use # for comments:
project/
โโโ src/ # Source code
โ โโโ main.py # Entry point
โโโ tests/ # Tests
|
Spin up new projects in seconds with predefined templates. |
Perfect for AI-generated project structures and code scaffolding. |
Create once, reuse everywhere. Share templates with your team. |
|
Set up multiple services with consistent structure: mkarchi apply service1.txt
mkarchi apply service2.txt |
Generate clean project documentation: mkarchi give docs.txt |
Create step-by-step project structures for teaching and learning. |
python_project/
โโโ src/
โ โโโ __init__.py
โ โโโ main.py(begincontenu)
โ โ """Main application module."""
โ โ
โ โ def main():
โ โ print("Starting application...")
โ โ return 0
โ โ
โ โ if __name__ == "__main__":
โ โ main()
โ (endcontenu)
โ โโโ config.py(begincontenu)
โ """Configuration module."""
โ
โ DEBUG = True
โ VERSION = "0.1.0"
โ (endcontenu)
โโโ tests/
โ โโโ __init__.py
โ โโโ test_main.py(begincontenu)
โ import pytest
โ from src.main import main
โ
โ def test_main():
โ """Test main function."""
โ assert main() == 0
โ (endcontenu)
โโโ .gitignore(begincontenu)
โ __pycache__/
โ *.pyc
โ .pytest_cache/
โ venv/
โ (endcontenu)
โโโ setup.py(begincontenu)
โ from setuptools import setup, find_packages
โ
โ setup(
โ name="my-project",
โ version="0.1.0",
โ packages=find_packages(),
โ install_requires=[
โ "pytest>=7.0.0",
โ ],
โ )
โ (endcontenu)
โโโ README.md(begincontenu)
# Python Project
A well-structured Python project template.
(endcontenu)
|
Automatically respects |
Faster processing and optimized traversal |
Enhanced error handling and Unicode support |
| Resource | Description |
|---|---|
| ๐ Documentation | Complete guide and tutorials |
| ๐ Version History | All releases and updates |
| ๐ v0.1.7 Guide | Latest version features |
| ๐ v0.1.6 Guide | Previous version features |
| โ FAQ | Frequently asked questions |
| ๐ฅ Community | Join the community |
| ๐ง Contact | Get in touch |
Contributions are welcome! We appreciate your help in making mkarchi better.
- 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
This project is licensed under the MIT License. See the LICENSE file for details.
Found a bug or have a feature request?
- ๐ Report an issue
- ๐ฌ Join our community
- ๐ง Contact us
If you find mkarchi useful, please consider giving it a โญ on GitHub!

