██╗ ██╗ █████╗ ███╗ ███╗ █████╗ ██╗ ██╗██╗███████╗ █████╗ ██████╗ ██████╗
██║ ██║ ██╔══██╗████╗ ████║██╔══██╗██║ ██║██║╚══███╔╝██╔══██╗██╔══██╗██╔══██╗
██║ ██║ ███████║██╔████╔██║███████║██║ █╗ ██║██║ ███╔╝ ███████║██████╔╝██║ ██║
██║ ██║ ██╔══██║██║╚██╔╝██║██╔══██║██║███╗██║██║ ███╔╝ ██╔══██║██╔══██╗██║ ██║
███████╗███████╗██║ ██║██║ ╚═╝ ██║██║ ██║╚███╔███╔╝██║███████╗██║ ██║██║ ██║██████╔╝
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝
A terminal wizard that takes a Mac from zero to a running, hardware-appropriate local LLM stack. It detects your hardware, picks the right model via whichllm, downloads it, builds llama.cpp (Metal-accelerated on Apple Silicon), installs and configures llama-swap, sets up a LaunchAgent for auto-start on boot, and runs a health check before it says "done."
After setup, it doubles as an ongoing management tool: start, stop, restart, status, health checks, log viewing, and model management.
Run local LLMs on macOS with GGUF models, Apple Silicon acceleration, and an OpenAI-compatible API.
Keep your customizations: edit one llama-swap YAML file for aliases, context sizes, and model profiles. Adding a model preserves existing entries; config apply synchronizes shared settings to Pi with backups and a service-readiness check. See Customize local LLM profiles.
Status: actively developed. Commands and file layout may still change between versions.
- Quick start
- Requirements
- Setting up dependencies on a fresh Mac
- Install
- What the wizard does
- Commands
- Shell completion
- Model customization
- Testing
- Architecture
- Files on disk
- Troubleshooting
- License
Already have Go, Homebrew, and Xcode Command Line Tools set up?
go install github.com/eduard-lt/llamawizard/cmd/llamawizard@latest
export PATH="$HOME/go/bin:$PATH" # add to ~/.zshrc if not already there
llamawizardThat launches the setup wizard. If you're on a clean Mac with none of the prerequisites installed, see Setting up dependencies on a fresh Mac first.
- macOS (Apple Silicon or Intel)
- Go 1.26+ (to build from source)
On Apple Silicon, llamawizard builds llama.cpp from source with Metal acceleration. On Intel Macs, it falls back to the Homebrew formula (no Metal build) — expect slower inference.
The wizard also needs these tools and will install them for you when possible:
| Dependency | Purpose | Auto-installed? |
|---|---|---|
| Xcode Command Line Tools | git, make, C/C++ compiler |
No — requires GUI popup |
| Homebrew | macOS package manager | No — must install manually |
| cmake | Build llama.cpp | Yes (via brew install cmake) |
| git | Source checkout | Yes (via brew install git) |
| uv | Run whichllm for model ranking | Yes (via brew install uv) |
| pi | A minimal agent harness - optional. | Yes (via npm install -g @earendil-works/pi-coding-agent; requires npm) |
If you're starting from a clean macOS install, run these in order.
xcode-select --installA GUI dialog will appear. Click "Install", agree to the license, and wait for it to finish. Then verify:
xcode-select -p/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the prompts. After it finishes, Homebrew will print instructions to add it to your PATH. Follow those — typically:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"Verify it's working:
brew --versionbrew install goOr download the installer from go.dev.
4. Add Go tools to your PATH — see Install below.
Once these are done, llamawizard can handle the rest — it will automatically install cmake, git, and uv if they're missing.
Set a HuggingFace token to get authenticated download speeds:
export HF_TOKEN=hf_xxxxxxxxxxxxxxxxxxxxxxxxxxOr use the equivalent HUGGINGFACE_HUB_TOKEN. Without a token, HuggingFace throttles anonymous downloads. Create a token here.
go install github.com/eduard-lt/llamawizard/cmd/llamawizard@latestPuts llamawizard in $GOPATH/bin. If you haven't already, add it to your PATH:
bash — add this to ~/.bashrc or ~/.bash_profile:
export PATH="$HOME/go/bin:$PATH"zsh (macOS default) — add this to ~/.zshrc:
export PATH="$HOME/go/bin:$PATH"Then reload your shell config (source ~/.zshrc or source ~/.bashrc) or open a new terminal.
Verify it's installed correctly:
llamawizard --versiongit clone https://github.com/eduard-lt/llamawizard.git
cd llamawizard
go build -o llamawizard ./cmd/llamawizard/
./llamawizardA Homebrew tap is planned but not yet available. For now, use go install or manual build above.
Running llamawizard with no arguments walks through every step:
- Dependency check (Homebrew, Xcode CLT, cmake, git, uv)
- Hardware detection (chip, RAM, Metal)
- Model selection via whichllm's ranked recommendations
- Download with progress and resume support
- llama.cpp source build (Metal on Apple Silicon) or Homebrew formula
- llama-swap install and configuration
- Port selection with conflict detection
- API key setup (default:
dummy) - LaunchAgent install for auto-start on boot
- Health check against
/v1/models
| Command | Description |
|---|---|
llamawizard |
Launch the setup wizard |
llamawizard status, st |
Show service status and health |
llamawizard start |
Start the llama-swap service |
llamawizard stop |
Stop the llama-swap service |
llamawizard restart, re |
Restart the llama-swap service |
llamawizard warlock, wl |
Live service guardian: rain dashboard (logs, events, RAM) with automatic restart; opens LAN access while open |
llamawizard doctor, dr |
Run a standalone health check |
llamawizard logs, lg |
Show recent service logs (-f follow, -n <N> lines) |
llamawizard models list, m ls |
List configured models |
llamawizard models add, m a |
Add a model (interactive) |
llamawizard models add --link <url> [--name <name>] |
Add a model from a direct download URL |
llamawizard models show, m sh <name> |
Show a model's config and file path |
llamawizard models remove, m rm <name> |
Remove a model from config only — file stays on disk |
llamawizard models delete <name> [--yes] |
Remove a model from config and delete its file (no shorthand) |
llamawizard config apply [--dry-run] [--default ID] |
Apply master model settings to Pi, preserve customizations, and verify service readiness |
llamawizard config show, cfg sh |
Print the active config |
llamawizard config path, cfg p |
Print config file location |
llamawizard pi install |
Install and configure pi coding agent |
llamawizard pi uninstall |
Uninstall pi coding agent |
llamawizard completion <bash|zsh|fish> |
Print shell completion script (setup in Shell completion) |
llamawizard update, up |
Check for and install updates |
llamawizard uninstall |
Stop service and remove LaunchAgent (no shorthand) |
llamawizard version, v |
Show versions of llamawizard, llama.cpp, and llama-swap |
llamawizard help, h [command] |
Show a command reference |
Notes on commands whose behavior isn't obvious from the name alone:
warlockpollslaunchctl printevery 2 s and issues a kickstart/bootstrap restart within ~2 s of detecting death (retry every 5 s until the service is back); the dashboard shows the last 5 log lines, guardian events, RAM metrics, and the machine's LAN IP; keys:qquit,rtoggle auto-restart,arestart now.- LAN access is tied to the
warlocksession: while it is open the proxy listens on0.0.0.0:<port>(shown asLANon the service line), so other devices on the network can connect tohttp://<laptop-ip>:<port>/v1(send the API key asAuthorization: Bearer <key>if one is set); when warlock exits — quit, crash, or any termination signal — the plist is restored to its original listen host and reloaded. Runwarlock --no-lanto keep the loopback-only binding. The first remote connection triggers the macOS firewall prompt for the llama-swap binary; click Allow. The plist reload briefly restarts the service when warlock starts and when it exits — unless the service was stopped while warlock was open (e.g.llamawizard stopin another terminal): then warlock restores the plist on exit but does not restart the service. stopunloads the service from launchd viabootout, not a plainkill. The LaunchAgent plist usesKeepAlivewithSuccessfulExit=false, so a raw kill would just get the process restarted —bootoutis the correct way to actually stop it.doctorpollshttp://127.0.0.1:<port>/v1/modelswith exponential backoff (first attempt immediate, then 2s, 4s, 8s, 16s) and confirms every expected model ID is present. On failure it prints the last 20 lines of the llama-swap error log, and saves the result tostate.json.models removedeletes the entry fromstate.json, regenerates the llama-swap config, and restarts the service — but leaves the model file untouched on disk. Usemodels deleteif you also want the file gone.uninstallis interactive and asks for confirmation before stopping the service, removing the LaunchAgent plist, and deletingstate.json. Model files and the config directory are left in place for manual cleanup.logsprints the last 30 lines of bothllama-swap.logandllama-swap-error.log; add-ffor live following.
Append the completion script for your shell to your shell's rc file. It covers all commands, aliases, subcommands, and flags.
bash — append to ~/.bashrc, then run source ~/.bashrc:
llamawizard completion bash >> ~/.bashrczsh (macOS default) — append to ~/.zshrc, then run exec zsh:
llamawizard completion zsh >> ~/.zshrcfish — append to ~/.config/fish/config.fish:
llamawizard completion fish >> ~/.config/fish/config.fishKeep aliases, different context sizes, and multiple profiles sharing the same GGUF in ~/.local/ai/config/llama-swap.yaml:
$EDITOR ~/.local/ai/config/llama-swap.yaml
llamawizard config apply --dry-run
llamawizard config applyAdding a model merges in its new entry. Existing profiles and Pi-specific settings are preserved. Read the customization and recovery guide for examples and the exact synchronization rules.
Run go test ./... -race -count=1 and go vet ./.... See testing and manual acceptance for isolated CLI end-to-end coverage and optional real launchd checks.
cmd/llamawizard/main.go
|
v
internal/wizard/ Bubble Tea TUI, multiple screens
|
-----+---------+------------+------------+--------+--------+
v v v v v v v
hardware whichllm download build llamaswap launchd state
(chip, (exec (HF file (llama.cpp (config (plist (state.json
RAM, wrapper resolve brew/source templating bootstrap read/write)
Metal) + JSON + resume build) + write) /enable/
parsing) + verify) kickstart/
kill/
print)
|
v
health/
(post-install +
doctor checks)
| Package | Purpose |
|---|---|
internal/hardware |
Chip type, RAM, Metal detection via sysctl |
internal/whichllm |
Exec wrapper around uvx whichllm for model ranking |
internal/download |
HuggingFace file resolution and resumable download |
internal/build |
Dependency detection, brew install, llama.cpp three-tier build |
internal/llamaswap |
llama-swap install, YAML config generation, safe write with diff |
internal/launchd |
Plist generation, modern launchctl wrappers (bootstrap/bootout/enable/kickstart/print) |
internal/health |
Doctor check: polls /v1/models with exponential backoff |
internal/state |
state.json read/write, model entry definitions |
internal/network |
Port probing via bind+close, alternative port suggestions |
internal/wizard |
Bubble Tea TUI orchestrating all packages |
| Path | Purpose |
|---|---|
~/.local/ai/state.json |
Download inventory and service settings: port, chip, binary paths, installed files |
~/.local/ai/config/llama-swap.yaml |
Editable master model configuration, profiles, aliases, and API keys |
~/Library/LaunchAgents/com.local.llama-swap.plist |
LaunchAgent for auto-start |
~/.local/ai/logs/llama-swap.log |
llama-swap stdout log |
~/.local/ai/logs/llama-swap-error.log |
llama-swap stderr log |
~/models/<slug>/ |
Downloaded model files |
~/.local/ai/llama.cpp/ |
Source build tree (reused if present) |
Config YAML looks corrupted after hand-editing (bad indentation, missing fields)
Use spaces for YAML indentation. Run llamawizard config apply --dry-run to validate edits before applying. Existing customizations are preserved when adding models. See the backup recovery instructions.
doctor reports a model missing after a config change
Run llamawizard config apply after editing the master YAML to synchronize Pi and verify the service API. Readiness checks confirm the API listing; test an inference request to verify a model loads within available memory.
MIT — see LICENSE.
If llamawizard is useful to you, consider starring the repository.