Skip to content

TRC-Loop/boilgen

Repository files navigation

🚀 Boilgen - The Ultimate Boilerplate Generator

Create New Projects the fast way


Boilgen GIF

GitHub Release GitHub Repo stars GitHub code size GitHub License

Boilgen is a powerful and easy-to-use CLI tool that instantly generates project boilerplates for multiple languages and frameworks. Whether you're building a Flask app, a React project, or a simple C++ program, Boilgen has you covered!

🎯 Features

  • ✅ Supports multiple languages: Python, C, C++, Go, JavaScript, Java, C#, and more!
  • ✅ Instant setup with predefined templates
  • ✅ Simple, fast, and lightweight
  • ✅ Fully customizable

Future features (TODO)

  • Templates using JSON (or other formats)
  • Commands running before/after execution (eg. Create Python Venv, Init Git Repo, ...) per os
  • More Arguments (Silent, Path, ...)
  • Complex Templates
  • Progressbar/Loader
  • Template Package Manager (boilpack install ...)

Note: Open an Issue for Ideas! (Greatly Appreciated)


📥 Installation

1️⃣ Install via Script

Linux & macOS

curl -sSL https://raw.githubusercontent.com/TRC-Loop/boilgen/main/install.sh | bash

Windows (PowerShell)

iwr -useb https://raw.githubusercontent.com/TRC-Loop/boilgen/main/install.ps1 | iex

2️⃣ Manual Installation

git clone https://github.com/TRC-Loop/boilgen.git ~/.boilgen
ln -s ~/.boilgen/src/boilgen.py ~/.local/bin/boilgen
chmod +x ~/.local/bin/boilgen

Note: Ensure ~/.local/bin is in your PATH.

Updating Re-Run the Installation Script. (The old Installation will be deleted and boilgen will then be installed)


🚀 Usage

Once installed, you can run boilgen from anywhere in your terminal.

Show Available Templates

boilgen help

Generate a Project

boilgen <language> <type>

Example:

boilgen python flask

This creates a Flask project structure in your current directory! 🎉


🔥 Supported Languages & Frameworks

Language Type
Python Flask, Django, Typer, Basic
JavaScript Node, React
C Basic
C++ Basic
Go Basic
Java Basic
C# Console, ASP.NET
Website HTML+CSS+JS

🛠 Uninstall

If you ever need to remove Boilgen, simply run:

rm -rf ~/.boilgen ~/.local/bin/boilgen

💡 Contributing

Want to add more templates or improve the script? Feel free to fork the repo and submit a pull request!

The Template format

"python": {
  "flask": {
      "templates/": "dir",
      "static/": "dir",
      "app.py": "from flask import Flask\napp = Flask(__name__)\n@app.route('/')\ndef index():\n\treturn 'Hello World!'\nif __name__ == '__main__':\n\tapp.run(debug=True)"
  },

Use the Key as the file/folder name.

Use dir (lowercase) as a value for folders, else, a file with that content will be created.

Use \nfor New Lines in code and \t for Tabs.

Note: Template (Language and Type) Names should always be lowercase. Else it might not work!


📜 License

MIT License - Free to use and modify.