Maki is a small CLI tool for bootstrapping modern C++ projects on macOS and Linux.
It was created to make starting a terminal-first C++ project feel closer to tools such as Angular's ng new: choose a project name, generate a sensible starting structure, and then continue using the standard C++ toolchain directly.
Maki does not replace CMake, Ninja, Clang, or Git. It creates the project structure and configuration needed to get started quickly and then gets out of the way.
Maki supports:
- Creating new C++ projects with
maki new <name> - Project name validation
- Dry-run previews without writing files
- Optional Git repository initialization
- CMake project generation
- CMake presets configured for Clang and Ninja
- C++23 by default
- Debug build preset
compile_commands.jsongeneration for tools such asclangd- macOS and Linux
Running:
maki new MyProjectcreates:
MyProject/
├── .gitignore
├── CMakeLists.txt
├── CMakePresets.json
├── include/
└── src/
└── main.cpp
The generated project uses:
- Clang / Clang++
- CMake
- Ninja
- C++23
The generated CMakePresets.json includes a debug preset and enables CMAKE_EXPORT_COMPILE_COMMANDS.
Homebrew is the recommended installation method on macOS.
Install Maki directly from the PixelBrewer tap:
brew install PixelBrewer/tap/makiVerify the installation:
maki --helpHomebrew can then be used to upgrade Maki when a new version is published:
brew update
brew upgrade makiComing soon: Maki will be available through the Arch User Repository (AUR).
Once the AUR package is published, installation instructions will be added here.
Prebuilt self-contained binaries are also available from the GitHub Releases page.
Release builds are available for:
- Linux x64
- macOS Apple Silicon
- macOS Intel
Because Maki is published as a self-contained .NET application, the .NET runtime or SDK is not required to use a release build.
Download the linux-x64 archive from the latest GitHub release.
For example, for v0.1.0:
tar -xzf maki-v0.1.0-linux-x64.tar.gzMove the executable somewhere on your PATH:
sudo mv maki /usr/local/bin/makiVerify the installation:
maki --helpDownload the osx-arm64 archive from the latest GitHub release.
For example, for v0.1.0:
tar -xzf maki-v0.1.0-osx-arm64.tar.gzMove the executable somewhere on your PATH:
sudo mv maki /usr/local/bin/makiVerify the installation:
maki --helpDownload the osx-x64 archive from the latest GitHub release.
For example, for v0.1.0:
tar -xzf maki-v0.1.0-osx-x64.tar.gzMove the executable somewhere on your PATH:
sudo mv maki /usr/local/bin/makiVerify the installation:
maki --helpMaki is not currently notarized with Apple. macOS may therefore prevent a manually downloaded release from opening.
If macOS reports that it cannot verify Maki, remove the quarantine attribute from the extracted executable:
xattr -d com.apple.quarantine makiThen move it onto your PATH:
sudo mv maki /usr/local/bin/makiand verify:
maki --helpMaki itself does not require the .NET SDK when installed through Homebrew or from a GitHub Release.
The C++ projects generated by Maki expect the following tools to be available on your PATH:
- Clang
- CMake
- Ninja
Git is optional and is only required when using the --git option.
Install the C++ toolchain with:
sudo pacman -S clang cmake ninja gitGit can be omitted if you do not intend to use --git.
Using Homebrew:
brew install llvm cmake ninjaGit is available through the Xcode Command Line Tools and can also be installed through Homebrew.
Make sure clang, clang++, cmake, and ninja are available on your PATH before configuring a generated project.
Create a new project:
maki new MyProjectMaki will generate the project and display the commands needed to configure and build it.
Preview the project without writing anything to disk:
maki new MyProject --dry-runFor example:
Project: MyProject
Directories
/home/user/projects/MyProject
/home/user/projects/MyProject/src
/home/user/projects/MyProject/include
Files
/home/user/projects/MyProject/CMakeLists.txt
/home/user/projects/MyProject/CMakePresets.json
/home/user/projects/MyProject/.gitignore
/home/user/projects/MyProject/src/main.cpp
No files were written.
Maki can initialize a Git repository after generating the project:
maki new MyProject --gitGit initialization is optional. Without --git, Maki will not create a Git repository.
Display the available commands:
maki --helpDisplay help for maki new:
maki new --helpOnce Maki creates a project:
cd MyProjectConfigure it using the generated debug preset:
cmake --preset debugBuild it:
cmake --build --preset debugRun the resulting executable:
./build/debug/MyProjectA newly generated application prints:
Hello, World!
Maki's responsibility ends after project generation. Building and managing the project remains the responsibility of standard C++ tooling such as CMake and Ninja.
The generated debug preset enables:
CMAKE_EXPORT_COMPILE_COMMANDSAfter configuring the project:
cmake --preset debugCMake generates:
build/debug/compile_commands.json
This provides compilation information that can be consumed by tools such as clangd and editors that integrate with it.
Building Maki itself from source requires the .NET 10 SDK.
Clone the repository:
git clone https://github.com/PixelBrewer/Maki.git
cd MakiRestore dependencies:
dotnet restore Maki.slnxBuild:
dotnet build Maki.slnxRun the tests:
dotnet test Maki.slnxRun Maki directly:
dotnet run --project src/Maki.Cli -- new MyProject --dry-runMaki itself is organized into a CLI, a Core library, and a test project:
Maki/
├── src/
│ ├── Maki.Cli/
│ └── Maki.Core/
└── tests/
└── Maki.Tests/
Contains the command-line interface, Spectre.Console integration, command definitions, and terminal rendering.
Contains the core project-generation functionality, including project planning, validation, templates, filesystem writing, and Git initialization.
Contains the NUnit test suite for Maki's core behavior.
Maki deliberately has a narrow scope.
Starting a small C++ project from a terminal-based development environment can involve a surprising amount of repetitive setup: creating the directory structure, writing the initial CMake configuration, configuring a generator and compiler, enabling compile commands, and creating the initial source files.
Maki handles that initial setup and then gets out of the way.
maki new MyProject
│
▼
C++ project scaffold
│
▼
Clang + CMake + Ninja
Maki is not intended to replace:
- CMake
- Ninja
- a C++ package manager
- a compiler
- an IDE or editor
- Git
Instead, it provides an opinionated starting point for those tools.
Maki v0.1.0 intentionally focuses on a small set of defaults:
- C++23
- Clang
- CMake
- Ninja
- Executable projects
- Debug CMake preset
- macOS
- Linux
Additional templates and configuration options may be considered in future releases, but Maki's goal is to remain focused on quickly creating useful C++ project scaffolds.
Maki is currently distributed through:
- GitHub Releases
- Homebrew via
PixelBrewer/tap
Arch Linux distribution through the AUR is in progress.
Maki is built with:
- C#
- .NET 10
- Spectre.Console
- Spectre.Console.Cli
- NUnit
- AwesomeAssertions
- GitHub Actions
Maki is a small project, but contributions, bug reports, and suggestions are welcome.
If you encounter a problem or have an idea for improving the project, open an issue on GitHub.
For code contributions, fork the repository, create a branch, make your changes, and open a pull request.
Please make sure the test suite passes before submitting changes:
dotnet test Maki.slnxMaki is licensed under the MIT License. See LICENSE for details.