DEV Community

ALSOPS
ALSOPS

Posted on

metaForge: A Multi-Language Build & Automation Compiler

I’m excited to share metaForge, a multi-language MFG compiler that makes building, running, and managing code files across languages easy.
MetaForge parses .mfg files containing groups, blocks, arguments, and raw commands, expands variables, writes code files, and executes commands automatically. It’s designed for developers who want a flexible, multi-language build system.
📌 Key Features
Parse .mfg files into:
Groups: collections of blocks with variables
Blocks: named code files with optional run commands
Args blocks: conditional blocks triggered by CLI arguments
Raw variables & commands: global scope
Variable Expansion: $var:name, $arg, $block:name, $group:name
Automatic File Creation & Execution
Verbose Logging (-v or --verbose)
⚙️ Supported Languages
C++ (default, compiled, fastest)
JavaScript (Node.js based, easy to modify)
Python (widely accessible)
🚀 Quick Start
Create a .mfg file:
group js {
var greeting = "Hello World!"

block hello.js {
    code {
        console.log("$var:greeting");
    }
    run "node $block:hello.js"
}
Enter fullscreen mode Exit fullscreen mode

}

run "rm -rf $group:js"
Run metaForge:
metaForge example.mfg
MetaForge will create hello.js with expanded variables, run it, and clean up automatically.
Example CLI:
metaForge build.mfg build # Builds and runs everything
metaForge build.mfg clean # Removes generated files
📖 Documentation
Full guides, syntax reference, and advanced examples: metaforge.alsopss.com/docs
🛠 Installation

Build C++ version (default)

make build

Build JS or Python versions

make build LANG=js
make build LANG=py

Install

sudo make install LANG=cpp
Custom installation paths and packaging are supported via PREFIX and DESTDIR.
🤝 Contributing
Contributions are welcome! Submit Pull Requests or open Discussions on GitHub: https://github.com/ALSOPSS/metaForge

Top comments (0)