The macOS application is an Apple Silicon launcher containing uv, a
shell entry point, and optionally a wheel from this checkout. On first
launch, it downloads Python 3.12 and installs KíLín's dependencies.
Model downloads are separate, user-initiated operations. The runtime
and project data are not bundled into the disk image.
The Python package is distributed separately through PyPI. Each v*
release tag also starts .github/workflows/native_release.yml, which
builds the corresponding macOS DMG and Windows installer from that exact
tag and attaches both to its GitHub Release after native CI checks pass.
These experimental installers are not signed public-production builds:
macOS uses ad-hoc signing rather than Developer ID signing and is not
notarized; Windows is unsigned. Gatekeeper or SmartScreen may block
ordinary installation. No signing credentials are used by this workflow.
The release sequence is 0.1.0b1 → 0.1.0rc1 → 0.1.0, with Git tags
v0.1.0b1, v0.1.0rc1, and v0.1.0. Installer specs must match the
exact PyPI version. On macOS, CFBundleShortVersionString uses the numeric
base (0.1.0 for all three), while CFBundleVersion distinguishes beta,
RC, and stable builds using numeric release stages: 0.1.1001, 0.1.2001,
and 0.1.3000, respectively. Later patch numbers occupy higher ranges.
On Windows, update comparisons use the semantic order beta < RC < stable.
To build from the published PyPI version or from a checkout wheel:
bash setup/macos/build_app.sh
bash setup/macos/build_app.sh --wheelBoth commands write dist/KíLín.app and dist/KíLín.dmg. They
preserve previous outputs until the replacement succeeds. Use
KILIN_SKIP_FINDER_LAYOUT=1 in unattended builds to avoid Finder
permission prompts; the resulting DMG has the standard layout.
On an Apple Silicon Mac with Xcode command-line tools, uv, and Python
3.12:
python -m pytest -q
python -m tests
KILIN_SKIP_FINDER_LAYOUT=1 bash setup/macos/build_app.sh --wheel
bash tests/setup/check_macos_app.shThe checker examines the generated application and disk image: bundled
uv architecture, expanded launcher, Info.plist, ad-hoc code signature,
DMG integrity, and the application and Applications shortcut in the
mounted image. It does not install Python packages, exercise the
real GUI, or establish Gatekeeper acceptance.
The .github/workflows/macos_app.yml workflow performs this native
build and inspection on an Apple Silicon runner, plus the deterministic
launcher, updater, backend-repair and builder tests. It uses no Apple
Developer credentials and does not notarize or publish on its own.
Branch/PR runs remain path-filtered; manual execution remains available.
Tag releases reuse these checks without path filtering. Because skipped
path-filtered jobs may remain pending as required checks, do not make
this workflow an unconditional branch-protection requirement.
A manually downloaded CI image is a development artifact, not a
validated public release.
Test a locally built DMG on a real Apple Silicon Mac, preferably from a fresh user account. macOS may block the app because it is not Developer ID signed or notarized. If the source is trusted, open the app once, close the warning, then click Open Anyway for KíLín in System Settings → Privacy & Security and confirm; this allows only that app. Never advise disabling Gatekeeper or removing quarantine indiscriminately. The Windows equivalent, More info → Run anyway, is described under Windows installer.
The public beta still includes the desktop's invitation-passkey prompt. Before distributing a native build, confirm its behavior on a fresh user account and communicate passkeys separately to the intended testers. The prompt is local to the client; it is not an access restriction for public Python source code or a security boundary.
Before sharing with trusted testers:
- Check the package version, authors, and licence with the release metadata tests and installed-wheel verification in Development.
- Verify the copied
.appand mounted DMG against the native checker. Record the macOS version, architecture, build command, and hash of the supplied artifact. - On a fresh user account, check the GUI passkey prompt before the main window. Incorrect input must stay in the dialog; Quit must close the application. Correct input must open the GUI and persist across restarts. Then check first-launch installation, network failures, and the welcome dialog's terms acceptance and retry behavior.
- Test the explicitly confirmed projects folder, synchronization warning, alternative folders, and discovery of earlier projects. Confirm no existing data is moved without user action.
- Verify MLX and PyTorch repair guidance in the app-managed runtime,
including when
pipis unavailable. Test an explicit model download and a basic model answer when hardware and weights are available. - Upgrade from an earlier build; check activation of the new runtime, preservation of the previous one, interrupted installation recovery, and that failed updates do not silently run an old release.
- Stop and reopen a saved project; verify conversations, checkpoints, traces, and project files survive the upgrade.
These remain manual checks until real GUI and backend integration tests are available in the native environment. Passing the CI smoke check does not guarantee that an unnotarized app will open without a macOS security prompt on other machines.
setup/windows/kilin.iss is an Inno Setup script for 64-bit Windows; on
Windows, with uv 0.8 or later and Inno Setup 6, build it with:
powershell -NoProfile -ExecutionPolicy Bypass -File setup\windows\build_installer.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File setup\windows\build_installer.ps1 -WheelBoth write dist\KiLin-Setup-<version>.exe. The first installs the
matching version from PyPI; -Wheel bundles a wheel of this checkout.
The installer holds only uv, an icon and the optional wheel:
- It installs for the current user, without administrator rights, into
%LOCALAPPDATA%\Programs\KiLin. - Before copying any file, uv downloads Python 3.12 and installs
kilin[app]into%LOCALAPPDATA%\kilin\runtime\<version>, with--torch-backend auto: the CUDA build of PyTorch for an NVIDIA GPU, the CPU build otherwise (PyPI alone has only the CPU build on Windows). A failure stops Setup with a message and the log%LOCALAPPDATA%\kilin\runtime\install.log; an earlier version is untouched. After an update, other versions' runtimes are removed. - There is no licence page. As on macOS, the welcome dialog shows the terms of use on first launch and records their acceptance.
- The Start-menu shortcut opens
kilin-gui.exewithout a console window. KILIN_APP_UVandKILIN_APP_SPECare set in the user environment so the application's backend-repair commands use the same uv and build, as the macOS launcher does.- Uninstalling removes the program and the runtime, and keeps projects and preferences.
If KíLín is already installed, Setup first compares versions and offers to upgrade (a newer installer), reinstall (the same version, for example to repair it) or install the older version, or to remove KíLín.
While uv installs, a progress page shows the percentage, the size downloaded and an estimate of the time left, above a list of the large downloads, such as PyTorch, each marked downloading or downloaded, newest first. uv only reports when a file starts and ends, so the progress follows the bytes the busiest network interface receives; other traffic at the same time makes it run slightly ahead. The first install takes several minutes.
On the last page, Show the install log opens install.log. It lists
each large download as Downloaded torch (2.4 GiB), then the installed
packages and their versions as lines starting with +.
The installer is not code-signed. Windows SmartScreen shows "Windows protected your PC" for it; testers who trust the build choose More info → Run anyway. Signing for public release needs a code-signing certificate (or a signing service such as Azure Trusted Signing), a separate decision like Apple notarization.
The .github/workflows/windows_app.yml workflow builds the installer with
a checkout wheel on a Windows runner, installs it silently, checks the
runtime, the shortcut and the repair variables, and uninstalls it. Every
run uploads the unsigned installer as an Actions artifact. Release-tag
runs additionally use this validated artifact in the GitHub Release.
Before relying on a build, also test on a real Windows PC: first install,
update over an earlier version, an NVIDIA computer, a model download and
a basic answer.
Push an annotated tag matching the version in pyproject.toml, such as
v0.1.0b1, after validating the tagged commit. The tag workflow checks
the generated PyPI README and calls both reusable platform workflows.
It packages KiLin-<version>-macos-arm64.dmg,
KiLin-Setup-<version>.exe, and SHA256SUMS.txt for that same tag.
Beta (b) and release-candidate (rc) tags create GitHub prereleases;
stable tags create ordinary releases. The publisher creates the GitHub
Release only after both platform jobs succeed, or attaches to a
pre-existing release without replacing any asset. Existing assets must
be dealt with explicitly; reruns do not silently replace binaries.
The publishing job alone receives contents: write permission. Native
build/test jobs run read-only and upload temporary Actions artifacts.
No PyPI publication, Apple Developer signing or Windows code signing is
performed. If either native workflow fails, no new GitHub Release is
created. Push tags using a maintainer credential rather than from another
workflow using GITHUB_TOKEN, as GitHub does not trigger new workflows
from most such token-authenticated events. If the release already exists
as a draft, attaching assets does not automatically publish that draft.
Published immutable releases cannot accept further assets; create the
tag before publishing a release manually. See the
public prerelease procedure.
We are deliberately not implementing notarization or a credentialed Developer ID release process. Public distribution with the usual Gatekeeper experience would require separate decisions and access to an Apple Developer Program account. No developer credentials or notarization commands are needed for the documented build and verification workflow.
Before publishing a source/PyPI release, validate the generated
README.pypi.md against README.md and pyproject.toml. The repository
README uses relative paths; the PyPI version must link to the same
immutable release tag, including raw logo images. Validate the exact
tagged source and artwork rights before upload. Follow the
README publication contract and the
release checklist.
Development, README publication, GUI architecture, Configuration, Security.