The Electron runtime for Mochi. It powers the native window, settings UI, chat overlay, and local providers (OpenRouter/Ollama/OpenClaw).
cd desktopnpm installbash scripts/build.shto open the platform menu (defaults to building all targets in parallel). The script writesdist/build.logplus a dedicateddist/build-<target>.logfor Windows/macOS/Linux.- If you only need one platform, choose the corresponding option (
Windows,macOS,Linux) when the menu appears. - Manual alternatives are still available (
npx electron-builder --win,--mac, or--linux) if a scripted build is preferred.
wine64/wine32(and their 32-bit libc dependencies) sorcedit.execan run when building Windows binaries. Example for Ubuntu/WSL:sudo dpkg --add-architecture i386 sudo apt update sudo apt install wine64 wine32 p7zip-full libwine libwine:i386 winbind
curlorwget(needed when the dmg-license fallback downloads pre-built assets).npm(already required) so the build script can installdmg-licenseand its dependencies before runningelectron-builder. These packages make the Windows and macOS pipelines work reliably on Linux hosts. Without them the console/logs will show missing executables (rcedit,wine,crc, etc.).
When the run finishes, confirm the artifacts and log files under desktop/dist/ before continuing.
Set MOCHI_BUILD_TARGET (all, windows, macos, or linux) or pass the desired key (./scripts/build.sh linux) to run a specific workflow without the prompt.
Use ./scripts/publish_release_assets.sh from the repository root to upload the Windows portable exe, Linux AppImage, and extension zips to GitHub Releases. Make sure gh is authenticated first.
- Run
npm startlocally to preview the app in development mode. - Copy the portable exe to a Windows machine (or run via Wine) to confirm the mascots appear, settings open, and chat works.
- Canonical shared assets now live in
../runtime-core/; runnpm run sync-runtime-core(or use./build.sh ...) to refreshrenderer/{characters,personalities,assets}before building. - Desktop binaries should never be committed to git; the release script handles uploads.
- Use the new Start Mochi on system login toggle in settings to keep the desktop client running automatically across Windows, macOS, and Linux logins.