Prerequisites
Before building RCLI, ensure you have:- macOS 13+ on Apple Silicon (M1 or later)
- CMake 3.15 or later
- Apple Clang (ships with Xcode or Command Line Tools)
- Git for cloning repositories
RCLI requires Apple Silicon (arm64 architecture) and does not support Intel Macs. The build system uses Metal GPU acceleration and Apple Accelerate framework.
Quick Build
Run setup script
The setup script clones llama.cpp and sherpa-onnx into the This downloads:
deps/ directory:- llama.cpp — LLM + embedding inference with Metal GPU
- sherpa-onnx — STT/TTS/VAD via ONNX Runtime
Download AI models
Download the default model set (~1 GB):This fetches:
- Qwen3 0.6B (LLM)
- Whisper base.en (STT)
- Zipformer (streaming STT)
- Piper Lessac (TTS)
- Silero VAD
- Snowflake Arctic Embed S (embeddings)
Build Types
Release Build (Recommended)
-O3optimization levelNDEBUGdefined (disables assertions)- Link-time optimization (LTO) when supported
- Dead code stripping (
-Wl,-dead_strip) - Native CPU features (
-mcpu=nativefor arm64)
Debug Build
- No optimization
- Debug symbols included
- Assertions enabled
- Useful for development and troubleshooting
Dependencies
All dependencies are vendored or fetched automatically by CMake. No external package manager is required.Core Dependencies
Core Dependencies
| Dependency | Purpose | Integration |
|---|---|---|
| llama.cpp | LLM + embedding inference with Metal GPU | add_subdirectory(deps/llama.cpp) |
| sherpa-onnx | STT/TTS/VAD via ONNX Runtime | add_subdirectory(deps/sherpa-onnx) |
| USearch v2.16.5 | HNSW vector index for RAG | FetchContent (header-only) |
| FTXUI v5.0.0 | Terminal UI library | FetchContent |
macOS System Frameworks
macOS System Frameworks
RCLI links against the following macOS frameworks:
- CoreAudio — Audio input/output
- AudioToolbox — Audio conversion
- AudioUnit — Audio processing
- Foundation — Core Objective-C runtime
- AVFoundation — Media playback
- IOKit — Hardware monitoring (CPU, RAM)
- Metal — GPU acceleration (when
GGML_METAL=ON) - MetalKit — Metal utilities
Build Configuration
CMake Options
Key CMake variables configured inCMakeLists.txt:
Compiler Flags
Release mode:Build Targets
librcli (Static Library)
The core engine compiled as a static library:- Voice pipeline engines (STT, LLM, TTS, VAD, embeddings)
- RAG system (vector index, BM25, hybrid retriever)
- Action system (43 macOS actions)
- Public C API (
rcli_api.h)
rcli (CLI Executable)
The main interactive CLI:rcli_test (Test Executable)
Test harness for the pipeline:Installation
Install to system directories (for Homebrew packaging):- Binary:
/usr/local/bin/rcli - Header:
/usr/local/include/rcli/rcli_api.h - Libraries:
/usr/local/lib/*.dylib
Packaging
Generate a portable tarball:rcli-0.1.5-Darwin.tar.gz
Troubleshooting
CMake version too old
CMake version too old
Xcode Command Line Tools missing
Xcode Command Line Tools missing
deps/ directories not found
deps/ directories not found
Run the setup script first:
Models not found at runtime
Models not found at runtime
Download models:
Build fails on Intel Mac
Build fails on Intel Mac
RCLI requires Apple Silicon (M1 or later). Intel Macs are not supported due to Metal GPU requirements.
Next Steps
Contributing
Learn how to contribute to RCLI
Adding Actions
Extend RCLI with custom macOS actions
Project Structure
Understand the codebase organization