Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat(macos): open the window at launch and install the host on request

leepokaib1eeab008eed
diff --git a/README.md b/README.md
index d58de12c..c98d1e1c 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ brew install --cask leepokai/codync/codync
All three install the same signed, notarized app.
-Open Codync: it sets up the host on first launch. **Open Codync** opens the full window; **Pair iPhone…** shows the QR code.
+Open Codync: its window asks you to **Install host** on first launch. The menu bar icon stays for quick access: **Pair iPhone…** shows the QR code.
**iPhone** — [get Codync on the App Store](https://apps.apple.com/app/codync/id6760984418) (iOS 18+, free), then scan the QR code from **Pair iPhone…** on the Mac, the Linux app or `codync-host pair`.
diff --git a/apps/ios/Views/PairingView.swift b/apps/ios/Views/PairingView.swift
index a02c358b..1abe0a4b 100644
--- a/apps/ios/Views/PairingView.swift
+++ b/apps/ios/Views/PairingView.swift
@@ -122,7 +122,7 @@ private struct InstallPage: View {
CommandBlock("brew install leepokai/codync/codync-host\ncodync-host install")
}
Text(os == .mac
- ? "Open Codync and it sets up the host on its own."
+ ? "Open Codync and click Install host in its window."
: "codync-host install keeps it running in the background.")
.font(.subheadline)
.foregroundStyle(Palette.secondary)
diff --git a/apps/macos/App/CodyncMacApp.swift b/apps/macos/App/CodyncMacApp.swift
index b256f824..34fe5145 100644
--- a/apps/macos/App/CodyncMacApp.swift
+++ b/apps/macos/App/CodyncMacApp.swift
@@ -17,7 +17,27 @@ struct CodyncMacApp: App {
_host = State(initialValue: HostController(account: account))
}
+ /// From both the window and the menu bar icon: macOS can hide the icon (no room, or not allowed in
+ /// the menu bar), and its view then never appears. Both starts are no-ops after the first.
+ private func launch() {
+ host.start()
+ appDelegate.updates = updates
+ updates.start(host: host)
+ }
+
var body: some Scene {
+ // First scene: the one SwiftUI opens at launch and when the Dock icon is clicked.
+ Window("Codync", id: "chat") {
+ ChatWindow()
+ .task { launch() }
+ .modalHost()
+ .environment(host)
+ .environment(account)
+ .environment(updates)
+ }
+ .defaultSize(width: 1100, height: 760)
+ .windowStyle(.hiddenTitleBar)
+
MenuBarExtra {
MenuView()
// The macOS 27 SDK drops menu item images unless the label asks for them.
@@ -28,12 +48,7 @@ struct CodyncMacApp: App {
} label: {
// The Codync mark; a dot joins it when a bot needs you.
Image(host.needsAttention ? "MenuBarIconAlert" : "MenuBarIcon")
- .task {
- host.start()
- appDelegate.updates = updates
- updates.start(host: host)
- openWindow(id: "chat")
- }
+ .task { launch() }
.onChange(of: account.userID) { _, userID in host.switchAccount(to: userID) }
// A device asking for access: bring up the window that holds the approval sheet.
.onChange(of: host.currentApproval?.id) { _, id in
@@ -58,16 +73,6 @@ struct CodyncMacApp: App {
.environment(host)
}
.windowResizability(.contentSize)
-
- Window("Codync", id: "chat") {
- ChatWindow()
- .modalHost()
- .environment(host)
- .environment(account)
- .environment(updates)
- }
- .defaultSize(width: 1100, height: 760)
- .windowStyle(.hiddenTitleBar)
}
}
diff --git a/apps/macos/App/HostController.swift b/apps/macos/App/HostController.swift
index a2a9a90b..2b21fb59 100644
--- a/apps/macos/App/HostController.swift
+++ b/apps/macos/App/HostController.swift
@@ -151,6 +151,7 @@ final class HostController {
func requestPairing() { pairingRequest += 1 }
func start() {
+ guard appearanceObservation == nil else { return }
menuIsDark = NSApp.effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) == .darkAqua
appearanceObservation = NSApp.observe(\.effectiveAppearance) { [weak self] app, _ in
let dark = app.effectiveAppearance.bestMatch(from: [.aqua, .darkAqua]) == .darkAqua
@@ -220,15 +221,13 @@ final class HostController {
return
}
guard Self.devPort != nil || FileManager.default.fileExists(atPath: plistURL.path) else {
- // The app is the way to run the host on a Mac: set it up right away, unless the user took it out.
- if UserDefaults.standard.bool(forKey: Self.uninstalledKey) { state = .notInstalled } else { install() }
+ // Installing is the user's call: the window shows the button.
+ state = .notInstalled
return
}
connect()
}
- /// Set by "Uninstall host service", so the next launch doesn't put the host back.
- private static let uninstalledKey = "hostUninstalled"
private static let updateRestartKey = "hostRestartAfterAppUpdate"
/// `codync-host install` also routes Claude Code's status line through the host.
@@ -236,7 +235,6 @@ final class HostController {
guard !preparingForUpdate, !installingHost, let bin = binaryURL else { return }
installingHost = true
streamTask?.cancel()
- UserDefaults.standard.set(false, forKey: Self.uninstalledKey)
state = .starting
Task {
defer { installingHost = false }
@@ -264,7 +262,6 @@ final class HostController {
func uninstall() {
guard let bin = binaryURL else { return }
streamTask?.cancel()
- UserDefaults.standard.set(true, forKey: Self.uninstalledKey)
Task {
_ = await Self.run(bin, ["uninstall"])
if let local { accounts.detach(local.id) }
diff --git a/web/app/components/features.tsx b/web/app/components/features.tsx
index 0a5deda0..94fbfa9a 100644
--- a/web/app/components/features.tsx
+++ b/web/app/components/features.tsx
@@ -5,7 +5,7 @@ import Reveal from "./reveal";
const agents = ["Claude Code", "Codex", "Cursor", "Gemini", "Copilot", "OpenCode", "Pi", "Grok Build"];
const platforms = [
- { icon: AppleLogo, title: "Mac", body: "A menu bar app with a native chat window. Pairs your phone and installs the host itself." },
+ { icon: AppleLogo, title: "Mac", body: "A native chat window plus a menu bar icon. Installs the host in one click and pairs your phone." },
{ icon: LinuxLogo, title: "Linux", body: "A GTK 4 / libadwaita app for the desktop, or just the host on a headless server or cloud VM." },
{ icon: Terminal, title: "Terminal", body: "A full terminal UI in the same binary, for SSH sessions and machines with no display." },
];