macOS · 10 languages
Turn any folder of code into a .app. One command.
cd into a folder of source code and run ezc.
Pick a language from the menu, name your app, and it builds a double-clickable
.app right there in the folder. No project setup, no build flags to remember.
curl -fsSL https://tommfr38.com/ezcompiler/install.sh | bash
Needs macOS and python3. You also need the toolchain for the language you pick;
ezc flags any that are missing and shows the install command.
What it looks like
Languages with source files in the folder are listed first. Arrow keys and enter, or type a number. Then three quick questions and it builds.
~/projects/notes $ ezc ezc — compile anything into a .app Which language do you want to compile? (↑/↓ + enter) ❯ Swift ● files found Python C++ … App name [notes]: Notes Is this a GUI app (no Terminal window)? [Y/n] y Icon: file name in this folder, or a path like ~/dir/icon.icns ('none' to skip) [none]: icon.png Building Swift… $ swiftc -O -o /var/folders/…/Notes main.swift ✓ Built ~/projects/notes/Notes.app open with: open 'Notes.app'
Illustrative session. The prompts and messages follow the real CLI; the menu is shortened and the build path is abbreviated.
Ten languages, one flow
ezc doesn't reinvent compilers. It runs the real toolchain for your language, then wraps the result in a signed .app bundle.
Python PyInstaller
Bundles your script and the Python runtime into one executable. Pick the entry file if there are several.
C clang
Compiles every
.cfile in the folder together.C++ clang++
Compiles every
.cpp/.ccfile together as C++20.Objective-C clang
Links Foundation and AppKit with ARC enabled.
Swift swiftc
Compiles all
.swiftfiles in the folder. Handy for AppKit GUI apps.Rust cargo / rustc
Uses
cargo build --releasefor Cargo projects, orrustcfor a single file.C# dotnet
Self-contained single-file publish for your Mac's architecture. Works with a
.csprojor loose.csfiles.Go go build
Builds the module, or the loose
.gofiles.Java javac + jar
Packages a runnable jar. The app launches it with
java, so needs Java installed on the Mac that runs it.JavaScript Node
Copies your files into the app and runs them with
node, so needs Node installed on the Mac that runs it.
- Missing toolchains are flagged. In the menu, a language whose compiler isn't installed is marked with the install command (for example
brew install go). - Broken SDK? It retries. If your default Command Line Tools SDK fails to link, ezc retries clang and swiftc with the other installed SDKs.
- Custom icons. Give it a png, jpg or icns. It converts it to an app icon for you.
Good to know
Apps are ad-hoc signed, not notarized, so another Mac may warn about an unidentified developer. Console apps open in a Terminal window when double-clicked; GUI apps launch directly. It's macOS only, and it has been tested on Apple Silicon. Every language build above was run from the command line; double-click launching hasn't been tested across every language.
How it works
Three steps. No config files, no account.
-
Install
Run the one-line installer. It puts
ezcin the first writable folder on your PATH.curl -fsSL https://tommfr38.com/ezcompiler/install.sh | bash -
Run it in your code folder
Any folder with source files. Pick a language, name the app, say if it's a GUI app, optionally add an icon.
cd ~/projects/notes && ezc -
Open your app
A
.appappears in the same folder, ready to double-click or drag to Applications.open Notes.app
FAQ
Does it install compilers for me?
No. It uses the toolchain already on your Mac, and tells you which ones are missing along with the command to install them. Its own installer only needs python3.
Why do the Java and JavaScript apps need Java or Node?
Those apps are launchers: they run your jar with java or your script with node. They don't bundle a runtime, so the Mac running them needs it installed.
Can I send the app to someone else?
You can, but it's ad-hoc signed and not notarized, so macOS may block it until they allow it in System Settings. Compiled apps are built for your Mac's architecture.
What does the GUI question do?
If you say it's not a GUI app, double-clicking opens a Terminal window and runs it there so you can see its output. If it is a GUI app, it launches directly with no Terminal. ezc guesses the answer from your source (for example SwiftUI, AppKit or tkinter) and pre-selects it.
How do I pick an icon?
Type a file name from the current folder, or a full path like ~/icons/icon.icns. A bare icon.png, icon.icns or logo.png in the folder is picked up by default. If the path doesn't exist, ezc asks again before building.
How do I update or remove it?
Update by running the install command again. To remove it, delete the ezc file from the folder it was installed to, usually /opt/homebrew/bin or ~/.local/bin.