Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.
TypeScript ai-photo-editorcomfyui-alternativegenerative-fillimage-editingimage-generationinpaintinglinuxlocal-aimacosmcpmcp-servernano-banana-alternativeofflinephoto-editorprivacyqwen-imageqwen-image-2-1stable-diffusion-cppvulkanwindows
#!/usr/bin/env bash
# Builds the macOS release on an Apple Silicon Mac: kokon-service, kokon-mcp, kokon-engine-mac, Kokon.app and
# the disk image ("Kokon_<version>_aarch64.dmg"), copied to dist-release/.
#
# bash scripts/build-release-mac.sh
#
# Same prerequisites as scripts/dev/mac-dev.sh (run it with --check). Takes ~5-15 minutes on
# the first run (optimized Rust build). Signed ad hoc (no Apple Developer ID): users open it
# the first time through System Settings → Privacy & Security → Open Anyway.
set -euo pipefail
cd "$(dirname "$0")/.."
TRIPLE=aarch64-apple-darwin
bash scripts/dev/mac-dev.sh --check
echo "1/5 Packages"
npm ci --no-audit --no-fund
(cd mcp && npm ci --no-audit --no-fund)
echo "2/5 Tests (Rust core + frontend)"
cargo test -p qls-core -p qls-service --release --quiet
# kokon-service embeds the built UI (dist/) for browsers on other devices: build it first.
npm run build
# The MCP protocol test runs the newest target/*/kokon-service, which Tauri overwrites with the
# bundled sidecar of the previous release: build this version's service first.
cargo build -p qls-service --release
npx vitest run
echo "3/5 kokon-service (release)"
cargo build -p qls-service --release
mkdir -p src-tauri/binaries
cp target/release/kokon-service "src-tauri/binaries/kokon-service-$TRIPLE"
# Kokon's Mac engine: its tests compile and run the kernels on this Mac's GPU (~15 s), then it goes into the app.
(cd engine-mac && swift test 2>&1 | grep -E "Executed [0-9]+ tests" | tail -1)
bash engine-mac/tools/stage-app.sh
echo "4/5 kokon-mcp + MCP tests (they drive the bundle and the service built above)"
(cd mcp && npm run build:exe && npx vitest run)
echo "5/5 Kokon.app + disk image (signed for the in-app updater)"
# Updates are verified against the public key in tauri.conf.json. Copy the private key from
# the PC that made it (~/.tauri/kokon-updater.key) once; see docs/releasing.md.
if [ -z "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then
KEY="$HOME/.tauri/kokon-updater.key"
[ -f "$KEY" ] || { echo "✗ Updater signing key not found: $KEY (see docs/releasing.md)"; exit 1; }
export TAURI_SIGNING_PRIVATE_KEY="$KEY"
fi
npx tauri build --target "$TRIPLE"
DMG="$(ls -t target/$TRIPLE/release/bundle/dmg/*.dmg | head -1)"
mkdir -p dist-release
cp "$DMG" dist-release/
node scripts/release/updater.mjs fragment darwin-aarch64 "target/$TRIPLE/release/bundle/macos/Kokon.app.tar.gz"
codesign --verify --deep --strict "target/$TRIPLE/release/bundle/macos/Kokon.app" && echo "✓ signature (ad hoc) valid"
ls -lh dist-release/*.dmg
echo "Disk image: $(pwd)/dist-release/$(basename "$DMG")"