› cavi-ai/
GitHub ↗

Make targets

The Makefile is the supported command surface. Run make help for the short list. Every target that touches the machine requires an Apple Silicon Mac.

Setup#

TargetAction
make installInitialize the engine submodule when no engine is configured, create .venv with Python 3.12, install requirements.txt and the engine's requirements-lab.txt, then run the checks
make install-convertReinstall the Python packages into an existing .venv
make install-strataInstall the optional Strata runtime into ~/.cache/mlx-agent/strata
make checkVerify the configured engine checkout has scripts/mlx-agent
make doctormake check, then verify the conversion environment
make pip-auditAudit .venv and every optional backend lock against the OSV database

Run#

TargetAction
make start, make run, make openBuild the Release app and open it
make build-swiftBuild the Release app into .run/swift-build
make prepare-runtime-bundleValidate the pinned engine and package tracked runtime sources with a hash manifest under .run/bundled-runtime
make build-swift-distBuild the distribution app with the prepared runtime source bundle
make run-swiftOpen the built app
make dmgPackage a distribution build as a DMG under .release/; add DEVELOPER_TEAM=<team id> to sign with Developer ID and notarize, DMG_CHANNEL=nightly for a nightly name

Test#

TargetAction
make testPython compatibility and contract tests
make test-swiftXCTest suite for the native app
make test-native-uiUI tests in an isolated macOS VM; NATIVE_UI_BASE_VM names a prepared Tart VM
make test-live-scanOpt-in, read-only check of scanned model sizes against the filesystem
make test-swift-live-scanThe same check through the native app's scan
make render-clients, make render-discover, make render-lmstudio, make render-settingsRender a screen's states into an xcresult bundle
make accept-native-gguf RUNTIME_MANIFEST=/absolute/path/runtime.jsonOpt-in real conversion from an allowlisted local GGUF through to Run; writes per-run evidence
make accept-native-mlx RUNTIME_MANIFEST=/absolute/path/runtime.jsonOpt-in verification, serving and completion request for an existing local MLX model; writes per-run evidence
make accept-native-training RUNTIME_MANIFEST=/absolute/path/runtime.jsonOpt-in one-iteration LoRA training and retained base-versus-adapter evaluation through the native app

The live-scan and acceptance targets are not part of make test. Acceptance may perform a real conversion and runs only with an explicit runtime manifest.

Native UI runs remove temporary source and runtime copies after VM teardown and retain up to five completed runs within a 2 GiB file-size budget. The newest run is always retained; active runs and evidence pinned with a .keep file are protected outside that budget. Preview eligible cleanup without starting a VM using python3 scripts/native_ui_vm.py --prune-only --dry-run; omit --dry-run to apply it. The JSON report lists each run's disposition and file sizes. Unregistered directories, model data and prepared base VMs are untouched.

Run native acceptance inside a prepared Apple Silicon macOS VM with an active desktop session. The MLX target uses the same manifest fields as GGUF acceptance: source_path, model_query, agent_home, config_path, and evidence_root. Its source is an existing model directory with config.json and safetensors weights under explicitly configured mlx_roots; evidence must be outside those roots and the configured host must be loopback. It does not download or convert a model. Set MLX_WORKBENCH_PYTHON to the runtime interpreter when needed. A skipped native test fails acceptance.

Training acceptance uses that same manifest and requires a Hugging Face cache snapshot matching its local refs/main. It runs offline with separate generated training and validation examples, batch size one and one iteration, then retains a matched evaluation. Outputs stay beneath the run's evidence directory. Failure cleanup stops only a running job matching that run's output and repo. This checks the workflow, not adapter quality.

Docs and release#

TargetAction
make docs-testDocumentation contract tests
make docs-buildBuild the versioned docs into docs/mlx-workbench/v<version>/
make docs-verifyVerify the built docs against their manifest
make docs-releaseBuild, verify and package the docs archive and checksum under .release/
make version-bump V=x.y.zBump the version everywhere and promote the changelog's Unreleased section

Clean#

TargetAction
make cleanRemove .run/
make clean-swiftRemove the Swift build directory
make clean-venvRemove .venv