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.

Signing in on a Mac adds it to the account unless you removed it; QR pairing sits at the top of the iPhone account page; the relay is called Cloudflare everywhere; the Mac app's accent is black and white instead of blue

leepokai72323911bc81
diff --git a/Codync.xcodeproj/project.pbxproj b/Codync.xcodeproj/project.pbxproj
index 626bbfd4..81246c0e 100644
--- a/Codync.xcodeproj/project.pbxproj
+++ b/Codync.xcodeproj/project.pbxproj
@@ -838,6 +838,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
COMBINE_HIDPI_IMAGES = YES;
ENABLE_APP_SANDBOX = NO;
ENABLE_HARDENED_RUNTIME = YES;
@@ -1119,6 +1120,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
COMBINE_HIDPI_IMAGES = YES;
ENABLE_APP_SANDBOX = NO;
ENABLE_HARDENED_RUNTIME = YES;
diff --git a/apps/ios/Views/AccountSwitcherView.swift b/apps/ios/Views/AccountSwitcherView.swift
index 7ef38d4e..88dad65e 100644
--- a/apps/ios/Views/AccountSwitcherView.swift
+++ b/apps/ios/Views/AccountSwitcherView.swift
@@ -27,9 +27,24 @@ struct AccountSwitcherView: View {
@State private var showSettings = false
@State private var confirmSignOut = false
@State private var route = ConnectionRoute.current
+ @State private var pairing = false
var body: some View {
CardForm {
+ Button { pairing = true } label: {
+ HStack(spacing: 12) {
+ Image(systemName: "qrcode.viewfinder").font(.system(size: 22))
+ Text("Scan a computer's code").font(.body.weight(.medium))
+ Spacer(minLength: 8)
+ Image(systemName: "chevron.right").font(.caption.weight(.semibold)).foregroundStyle(Palette.tertiary)
+ }
+ .foregroundStyle(Palette.text)
+ .padding(16)
+ .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous))
+ .contentShape(Rectangle())
+ }
+ .buttonStyle(PressScale())
+
profile
.frame(maxWidth: .infinity)
.padding(.vertical, 8)
@@ -78,6 +93,7 @@ struct AccountSwitcherView: View {
.animation(Motion.fade, value: account.errorMessage)
.hidesSystemNavigationBar()
.navigationDestination(isPresented: $showSettings) { SettingsView(pushed: true) }
+ .codyncSheet(isPresented: $pairing) { PairingView(inModal: true) }
.codyncDialog("Sign out of \(account.email ?? "this account")?", isPresented: $confirmSignOut,
message: "This iPhone forgets the account's computers. Your bots stay on them.") {
[DialogAction("Sign out", destructive: true) { Task { await app.signOut() } }]
@@ -176,8 +192,8 @@ private struct RoutePicker: View {
private func info(_ route: ConnectionRoute) -> (icon: String, title: String, detail: String) {
switch route {
case .automatic: ("wand.and.sparkles", "Auto", "Wi-Fi or Tailscale when it answers, Cloudflare otherwise.")
- case .direct: ("point.3.connected.trianglepath.dotted", "Direct", "Wi-Fi and Tailscale only. Nothing goes through the cloud.")
- case .relay: ("cloud", "Cloudflare", "Always through the encrypted relay, from anywhere.")
+ case .direct: ("point.3.connected.trianglepath.dotted", "Wi-Fi · Tailscale", "Direct only. Nothing goes through Cloudflare.")
+ case .relay: ("cloud", "Cloudflare", "Always through Cloudflare, encrypted, from anywhere.")
}
}
diff --git a/apps/ios/Views/SettingsView.swift b/apps/ios/Views/SettingsView.swift
index 00bbc28c..33a4b517 100644
--- a/apps/ios/Views/SettingsView.swift
+++ b/apps/ios/Views/SettingsView.swift
@@ -282,7 +282,7 @@ private struct ComputerRow: View {
let count = store.roster.count
let route = switch store.hostRoute {
case .direct: " · Direct"
- case .relay: " · Relay"
+ case .relay: " · Cloudflare"
default: ""
}
return "\(count) bot\(count == 1 ? "" : "s")\(route)"
diff --git a/apps/macos/App/HostController.swift b/apps/macos/App/HostController.swift
index 574ccb49..e358892c 100644
--- a/apps/macos/App/HostController.swift
+++ b/apps/macos/App/HostController.swift
@@ -136,6 +136,7 @@ final class HostController {
func start() {
refresh()
ssh.connectAll()
+ watchAutoClaim()
}
func refresh() {
@@ -258,6 +259,7 @@ final class HostController {
accounts.lastError = "Sign in first."
return
}
+ Self.setKeptOut(store.computer.id, false, userID: userID)
do {
if store.cloud?.enabled != true { _ = try await enableCloud(client, store: store) }
let challenge = try await cloud.createClaim()
@@ -269,7 +271,44 @@ final class HostController {
}
}
+ /// Signed in, this Mac joins the account on its own, unless the user took it out of that account.
+ private func watchAutoClaim() {
+ let pending = withObservationTracking {
+ autoClaimTarget
+ } onChange: { [weak self] in
+ Task { @MainActor in self?.watchAutoClaim() }
+ }
+ guard let pending, !autoClaiming else { return }
+ autoClaiming = true
+ Task {
+ await claim(pending)
+ autoClaiming = false
+ }
+ }
+
+ private var autoClaiming = false
+
+ /// This Mac's host, online, in no account yet, for a signed-in user who hasn't removed it.
+ private var autoClaimTarget: BotStore? {
+ guard let userID = account.userID, let store, store.connection == .online,
+ let status = store.cloud, status.owner == nil,
+ !Self.keptOut(userID).contains(store.computer.id) else { return nil }
+ return store
+ }
+
+ /// Computers the user removed from an account on this Mac; auto-join leaves them out.
+ private static func keptOut(_ userID: String) -> Set<String> {
+ Set(UserDefaults.standard.stringArray(forKey: "keptOutOfAccount.\(userID)") ?? [])
+ }
+
+ private static func setKeptOut(_ id: String, _ out: Bool, userID: String) {
+ var ids = keptOut(userID)
+ if out { ids.insert(id) } else { ids.remove(id) }
+ UserDefaults.standard.set(Array(ids), forKey: "keptOutOfAccount.\(userID)")
+ }
+
func unclaim(_ store: BotStore) async {
+ if let userID = account.userID { Self.setKeptOut(store.computer.id, true, userID: userID) }
do {
try await store.client?.unclaim()
await accounts.refreshCloud()
diff --git a/apps/macos/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/apps/macos/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 00000000..c5c8730a
--- /dev/null
+++ b/apps/macos/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,8 @@
+{
+ "colors" : [
+ { "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "0.000", "green" : "0.000", "red" : "0.000" } }, "idiom" : "universal" },
+ { "appearances" : [ { "appearance" : "luminosity", "value" : "dark" } ],
+ "color" : { "color-space" : "srgb", "components" : { "alpha" : "1.000", "blue" : "1.000", "green" : "1.000", "red" : "1.000" } }, "idiom" : "universal" }
+ ],
+ "info" : { "author" : "xcode", "version" : 1 }
+}
diff --git a/apps/macos/Views/ComputersView.swift b/apps/macos/Views/ComputersView.swift
index 5996fb7a..a87695f4 100644
--- a/apps/macos/Views/ComputersView.swift
+++ b/apps/macos/Views/ComputersView.swift
@@ -37,7 +37,7 @@ struct RouteLabel: View {
if ssh {
Image(systemName: "terminal").help("Over SSH").accessibilityLabel("Over SSH")
} else if store.connection == .online {
- RouteIcon(route: store.hostRoute).help(store.hostRoute == .relay ? "Through the encrypted relay" : "Direct connection")
+ RouteIcon(route: store.hostRoute).help(store.hostRoute == .relay ? "Through Cloudflare (encrypted)" : "Direct: Wi-Fi or Tailscale")
}
}
}
@@ -373,7 +373,7 @@ private struct ManagedComputerCard: View {
private var cloudLine: String {
guard let cloud, cloud.enabled else { return "Off: only devices on the same network reach it." }
if let error = cloud.lastError { return error }
- return cloud.connected == true ? "Connected to the encrypted relay." : "Connecting to the relay…"
+ return cloud.connected == true ? "Reachable from anywhere through Cloudflare (encrypted)." : "Connecting to Cloudflare…"
}
@ViewBuilder private var accountLine: some View {
diff --git a/project.yml b/project.yml
index 72b0c3fd..2e509317 100644
--- a/project.yml
+++ b/project.yml
@@ -73,6 +73,8 @@ targets:
ENABLE_HARDENED_RUNTIME: YES
ENABLE_APP_SANDBOX: NO
ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon
+ # Black / white instead of the system blue wherever macOS draws the app's accent.
+ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: AccentColor
postBuildScripts:
- name: Codync environment
basedOnDependencyAnalysis: false