Melix is a local-first AI runtime for Apple Silicon. The first implementation slice in this repository focuses on:
- generated protocol artifacts from the shared protobuf schema
- a Swift control plane workspace
- a Python worker workspace
- a minimal macOS menu bar workspace
Repository-wide engineering guidance lives in:
AGENTS.mddocs/README.mddocs/engineering-standards.mddocs/plans/2026-03-27-phase-0-thin-path.md
- macOS on Apple Silicon
swiftpython3uvprotocprotoc-gen-swiftfor Swift protobuf generation
make bootstrap
make proto
make swift-test
make py-test
make integration-test
make coverageBring up the deterministic phase-1 stack:
bash scripts/dev_up.sh
curl -sS http://127.0.0.1:11434/v1/models
make phase1-metricsShut it down:
bash scripts/dev_down.shOptional real MLX smoke path:
MELIX_DEV_TEXT_MODEL_PATH="<local path or hf repo>" \
MELIX_SWIFT_TEXT_WORKER_BACKEND_MODE=swift \
bash scripts/dev_up.shdeterministic remains the default integration and repeatability path.
swift is the real Swift MLX runtime path for the text worker and requires
MELIX_DEV_TEXT_MODEL_PATH.
scripts/dev_up.sh now starts three processes:
- the Swift text worker on a dedicated UDS socket
- the Python compatibility worker on a dedicated UDS socket
- the Swift control plane on the local HTTP port
The runtime directory defaults to .runtime/phase1 under the repository root. After startup,
source the emitted env.sh file there if you need the exact socket and port values for local
debugging.
The default phase-1 metrics report compares:
- the direct Swift worker text path
- the direct Python compatibility text path
- the control-plane HTTP/SSE text path
Use JSON output when automation needs a machine-readable report:
make phase1-metrics PHASE1_METRICS_ARGS="--json"Generate a user-scoped local product layout with launch agents, an install manifest, and an environment export file:
python3 scripts/install_local_product.py --jsonValidate the generated install assets without running launchctl:
make phase8-install-smokeThe installer writes:
- launch agents under
~/Library/LaunchAgents - an install manifest under
~/Library/Application Support/Melix/install-manifest.json - an environment export file under
~/Library/Application Support/Melix/melix-product-env.sh
The full operator flow, including bootstrap and uninstall commands, is documented in
docs/runbooks/phase-8-local-install.md.
Run the deterministic Phase 8 release gate before merge or release tagging:
make phase8-release-gate PHASE8_RELEASE_GATE_ARGS="--json"This checks install asset generation, deterministic benchmark thresholds, restart recovery,
and training sanity against the checked-in policy under
infra/release/phase8-release-gate-policy.json.
Generate the final Phase 8 product metrics report:
make phase8-metrics PHASE8_METRICS_ARGS="--json"make proto currently generates:
- Swift protobuf message types into
packages/protocol/swift - Python protobuf and gRPC artifacts into
packages/protocol/python
packages/protocol/schemais the authoritative interface source.- Generated protobuf outputs are committed artifacts and must be regenerated after schema changes.
uv.lockis committed and Python environments should be reproduced withuv sync --frozen.- Executable Swift workspaces should commit
Package.resolvedwhen it exists. docs/product-brief.mdis intentionally ignored and untracked.make coverageis the repository entrypoint for source coverage checks before commit.
The current phase-status and implementation guidance live under:
docs/plans/2026-03-27-phase-0-thin-path.mddocs/plans/2026-03-27-phase-1-swift-text-worker.mddocs/plans/2026-03-28-p1-m6-workflow-integration-metrics.mddocs/runbooks/phase-1-local-stack.mddocs/plans/2026-03-29-p8-m4-packaging-startup-automation.mddocs/plans/2026-03-29-p8-m5-release-gate-automation.mddocs/plans/2026-03-29-p8-m6-release-runbooks-product-acceptance.mddocs/runbooks/phase-8-local-install.mddocs/runbooks/phase-8-release-gates.mddocs/runbooks/phase-8-product-acceptance.md
Melix is licensed under the Apache License, Version 2.0. See LICENSE for the full text.