Repository navigation
Description
What you're trying to do
I'm trying to manage the Kiri engine lifecycle entirely from the CLI without having to open the GUI.
I ran into this limitation while debugging a networking conflict between Kiri and Cloudflare WARP on macOS.
When Kiri's engine is running, macOS's mDNSResponder binds UDP port 53 while the VM network (bridge100 / vmenet0) is active. This prevents WARP from connecting in its default DNS Proxy mode.
WARP reports the following error:
Ports potentially in conflict: [mDNSResponder -> 0.0.0.0:53]
UdpAddressNotAvailable {
bound_processes: Some(["mDNSResponder"])
}
Turning off the engine through Settings → Resources → Turn off engine resolves the conflict immediately. The VM network interfaces disappear, port 53 becomes available, and WARP connects successfully.
However, there doesn't appear to be an equivalent CLI command.
kiri stoponly stops containers.- Killing the daemon causes launchd to restart it due to its
KeepAliveconfiguration. - Using
launchctl bootoutis not persistent, as launching the Kiri application re-registers the LaunchAgent.
The GUI already handles this correctly, stopping the VM while keeping the daemon alive and preserving the engine-off state until explicitly started again.
Beyond this particular networking conflict, being able to manage the engine from the CLI would be useful for automation, headless workflows and third-party integrations.
Environment: Kiri 0.2.2, macOS 26.4 (25E246), Apple silicon (arm64).
What you'd like Kiri to do
Expose the existing engine lifecycle controls through dedicated CLI commands, for example:
kiri engine start
kiri engine stop
kiri engine restart
kiri engine statusAlternatively, these could be exposed under kiri daemon, depending on the preferred CLI structure.
Ideally, these commands should:
- Use the same underlying mechanism as the existing GUI engine controls.
- Gracefully stop running containers and the VM without terminating the daemon.
- Preserve the engine-off state until explicitly started again.
- Keep the GUI and CLI engine states synchronised.
- Return meaningful exit codes for scripting and automation.
- Optionally support
--jsonoutput for programmatic status checks.
Docker Desktop provides a similar interface through its docker desktop start, docker desktop stop, docker desktop restart and docker desktop status commands.
Since Kiri already supports engine lifecycle management through the GUI, exposing the same functionality through the CLI would be a welcome addition, particularly for users who prefer terminal-based workflows or want to integrate Kiri into other tools.
Would you like to build it?
Yes, once we've agreed on the approach
Activity
vorlaxen commentedon Nov 26, 2026
I'm working on this and almost have a PR ready for
kiri engine start|stop|restart|status(with--jsonoutput, scripting exit codes, and reusing the existing GUI engine lifecycle controls). Let me know if you'd prefer a different subcommand layout (e.g. underkiri daemon) or have any extra details you'd like included—I plan to open the PR within a few hours.Engine & CLI: restore missing unpacked layers, fix macOS k8s idle CPU (…
libracoder commentedon Nov 27, 2026
Implemented in #996 (
31cca962):Added
kiri engineacross macOS, Linux, and Windows (keepingkiri startas a compatible alias):kiri engine start— starts Kiri's engine and wakes the VM + held restart-policy containerskiri engine stop— gracefully stops running containers and powers off Kiri's engine/VM untilkiri engine start(synchronizing the Kiri window, menu bar / system tray, and dedicatedkiriWSL distro on Windows)kiri engine restart— restarts Kiri's engine/VM cleanly (applying updated resource/network settings)kiri engine status [--json]— inspects engine state (running,asleep,stopped,not_running) using background probes so a sleeping VM or stopped WSL distro is never woken; exits0whenrunningorasleepand1whenstoppedornot_runningThis will ship in the upcoming
0.2.3release.vorlaxen commentedon Nov 27, 2026
I had already completed the implementation after leaving my comment above, so it's a bit disappointing to see it implemented separately without a heads-up, though glad the feature made it in.
Engine & CLI: restore missing unpacked layers, fix macOS k8s idle CPU (…