-
Notifications
You must be signed in to change notification settings - Fork 2
Installation
The easiest way to install Apex on macOS is using Homebrew:
brew tap ttscoff/thelab
brew install ttscoff/thelab/apexApex can also be built from source. This guide covers building on macOS, Linux, and other Unix-like systems.
- CMake 3.10 or later
- C compiler (GCC or Clang)
- Make
- Git (for cloning the repository)
git clone https://github.com/ttscoff/apex.git
cd apex
git submodule update --init --recursivecmake -S . -B buildThis will:
- Detect your compiler
- Configure the build system
- Generate the build cache
Important: You must run the configuration step first. If you get a "could not load cache" error, it means this step hasn't been run yet.
cmake --build buildThis compiles the project using the configured build system.
cmake --install buildThis installs:
-
apexbinary to/usr/local/bin - Libraries to
/usr/local/lib - Headers to
/usr/local/include/apex
After building, you'll find in the build/ directory:
-
apex- Command-line binary -
libapex.dylib(macOS) orlibapex.so(Linux) - Shared library -
libapex.a- Static library -
Apex.framework(macOS only) - Framework for Xcode integration
To build the macOS framework for Xcode integration:
cmake -G Xcode -S . -B build
cmake --build build --target ApexOr open and build in Xcode directly:
cmake -G Xcode -S . -B build
open build/Apex.xcodeprojThen build the "Apex" target in Xcode.
Install CMake:
- macOS:
brew install cmake - Ubuntu/Debian:
sudo apt-get install cmake - Fedora:
sudo dnf install cmake
Ensure you have a C99-compatible compiler:
- macOS: Xcode Command Line Tools (
xcode-select --install) - Linux:
sudo apt-get install build-essential
Make sure all dependencies are installed. Apex uses cmark-gfm which is included as a submodule and built automatically.
Test your installation:
./apex --version
echo "# Test" | ./apexYou should see version information and HTML output.
- See Usage for basic usage examples
- Check Xcode Integration for macOS development
- Review C API for programmatic use
Copyright 2025 Brett Terpstra, All Rights Reserved | MIT License
- Getting Started - Your first steps with Apex
- Installation - How to build and install Apex
- Usage - Basic usage examples
- Syntax - Complete syntax reference for unified mode
- Modes - Understanding processor modes
- Command Line Options - All CLI flags explained
- Header IDs - How header IDs are generated
- C API - Programmatic API documentation
- Xcode Integration - Using Apex in Xcode projects
- Examples - Practical usage examples
- Troubleshooting - Common issues and solutions
- Credits - Acknowledgments and links to related projects