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.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
README: Mac download link next to Homebrew
leepokai69d33613945b
diff --git a/README.md b/README.mdindex 6b3f2e44..bdea8ee9 100644--- a/README.md+++ b/README.md@@ -29,12 +29,14 @@ UI patterns (roster, character avatars, approval cards, trace sheet, "needs you## Install-**Mac**+**Mac** — [download Codync-macOS.dmg](https://github.com/leepokai/Codync/releases/latest/download/Codync-macOS.dmg) and drag it to Applications, or:```bashbrew install --cask leepokai/codync/codync```+Both install the same signed, notarized app; the host ships inside it.+Open Codync in the menu bar → **Install host**. The chat bubble opens the full Codync window; the QR button pairs your iPhone.**Linux** — native GTK 4 / libadwaita app plus the host:diff --git a/docs/architecture/file-structure.md b/docs/architecture/file-structure.mdindex 5b8259be..d78031a7 100644--- a/docs/architecture/file-structure.md+++ b/docs/architecture/file-structure.md@@ -1,25 +1,105 @@-# Layout & naming+# File structure and naming+This is the map of the current repository. Paths below are repository-relative. Start with the [architecture overview](overview.md) for runtime relationships.++## Top-level layout++```text+Codync/+├── host/ # Rust daemon and terminal client+│ ├── src/ # Runtime modules; tui/ contains terminal UI+│ └── tests/ # Host integration tests and scripted ACP agents+├── kit/ # Shared Swift package+│ ├── Sources/+│ │ ├── CodyncKit/ # Wire models, transports, design; widget-safe+│ │ │ ├── Client/+│ │ │ ├── Models/+│ │ │ ├── Design/+│ │ │ └── Resources/+│ │ └── CodyncUI/ # Stores, shared screens and custom controls+│ │ ├── Store/+│ │ ├── Bots/+│ │ ├── Thread/+│ │ ├── Call/+│ │ ├── Screen/+│ │ ├── Marketplace/+│ │ ├── Usage/+│ │ └── Resources/+│ └── Tests/ # CodyncKitTests and CodyncUITests+├── apps/+│ ├── shared/ # AccountSession, ComputerStatus, Config/{dev,main}.plist+│ ├── ios/ # App/, Views/, Resources/, Widgets/, NotificationService/+│ ├── macos/ # App/, Views/, Resources/, LaunchAgents/+│ ├── linux/ # GTK 4/libadwaita desktop client+│ ├── screen/ # macOS screen helper+│ └── screen-linux/ # Linux portal/GStreamer screen helper+├── cloud/ # Account API + encrypted relay Worker and Durable Object+│ ├── src/+│ ├── migrations/ # D1 migrations+│ └── test/ # workerd tests; e2e/ runs against a real test host+├── relay/ # Separate APNs push Worker; src/ and test/+├── docs/ # Architecture, guides, reference, features, design, archive+├── tools/ # Widget rendering utilities+├── packaging/ # Distribution templates+├── web/ # Website git submodule+├── .github/workflows/ # CI, signing and release automation+├── project.yml # XcodeGen source of truth+└── Codync.xcodeproj/ # Generated Xcode project```-apps/{ios,macos,linux} one folder per client (iOS widgets in apps/ios/Widgets, push decryption in apps/ios/NotificationService)-kit/Sources/CodyncKit/ Models/ Client/ Design/ (no CodyncUI, widget-safe)-kit/Sources/CodyncUI/ Store/ Bots/ Thread/ Call/ Screen/ Marketplace/ Usage/ Resources/, cross-platform glue at root (Platform.swift)-host/ cloud/ relay/ web/ packaging/-```-Remote access ([spec](../reference/remote-relay.md)): host `identity.rs` (keys) · `crypto.rs` (wire crypto) · `devices.rs` (authorized devices, `Caller`) · `channel.rs` (E2E channel, direct or relayed) · `relay.rs` (relay socket) · `cloud.rs` (cloud HTTP client, access requests). Kit `Client/`: `RelayCrypto`, `DeviceIdentity`, `Pairing`, `HostTransport`, `ChannelTransport`, `HostConnector`, `CloudClient`; models `Computer`, `Cloud`; `CodyncUI/Store/AccountStore`. Apps: `apps/shared/{AccountSession,ComputerStatus}.swift`, iOS `AccessRequestView` + `AccountSwitcherView` + `NotificationService/` (decrypts pushes), Mac `App/{HostController,SSHTunnel}.swift` + `Views/ComputersView.swift`. Cloud (`cloud/`, Worker + Durable Objects): `src/{index,auth,api,relay}.ts`, `migrations/` (D1), `test/` (vitest; `test/e2e/` against a live host).+`build/`, `kit/.build/`, Cargo `target/`, `node_modules/` and Wrangler local state are generated working data. They are not source modules and should not become documentation locations. Edit `project.yml` and run `xcodegen generate`; never hand-edit `project.pbxproj`.++## Where to make a change++| Responsibility | Source entry points |+|---|---|+| CLI and background service | `host/src/main.rs`, `service.rs` |+| API, caller permissions, event ordering | `host/src/api.rs`, `devices.rs`, `hub.rs` |+| SQLite transcript, bots, lanes and sessions | `host/src/store.rs` |+| Agent process, ACP, queue and session lifecycle | `host/src/bot.rs`, `acp.rs` |+| Group room turns / bot-to-bot requests | `host/src/group.rs` / `team.rs` |+| Prompt snapshots and memory keeper | `host/src/context.rs`, `memory.rs` |+| Identity, encryption and direct channel | `host/src/identity.rs`, `crypto.rs`, `channel.rs` |+| Host cloud state and relay connection | `host/src/cloud.rs`, `relay.rs` |+| Agent discovery, marketplace, auth terminal | `host/src/backends.rs`, `registry.rs`, `market.rs`, `composio.rs`, `term.rs` |+| Screen bridge and built-in MCP tools | `host/src/screen.rs`, `mcp.rs` |+| Swift transport and cloud API | `kit/Sources/CodyncKit/Client/` |+| Account aggregation / one host mirror | `kit/Sources/CodyncUI/Store/AccountStore.swift` / `BotStore.swift` |+| Chat, replies, composer and trace | `kit/Sources/CodyncUI/Thread/` |+| Reusable Apple UI chrome | `kit/Sources/CodyncUI/Chrome.swift`, `Controls.swift`, `Platform.swift` |+| iOS navigation, pairing, account settings | `apps/ios/Views/RootView.swift`, `BotListView.swift`, `PairingView.swift`, `AccountSwitcherView.swift`, `SettingsView.swift` |+| Apple account sessions / public environment config | `apps/shared/AccountSession.swift`, `apps/shared/Config/` |+| Mac local host / SSH lifecycle | `apps/macos/App/HostController.swift`, `SSHTunnel.swift` |+| Cloud routes / authentication / relay | `cloud/src/index.ts`, `api.ts`, `auth.ts`, `relay.ts` |+| Push encryption / APNs delivery / decryption | `host/src/push.rs`, `relay/src/`, `apps/ios/NotificationService/` |+| Widget and activity rendering | `kit/Sources/CodyncKit/Design/`, `apps/ios/Widgets/` |++## Dependency rules++- `CodyncKit` owns serializable models, clients and rendering primitives shared with widgets. It must not import `CodyncUI` or ClerkKit.+- `CodyncUI` owns observable stores and shared application screens. App-specific lifecycle, OAuth configuration and device hooks belong in `apps/`.+- Each `BotStore` talks to one computer. `AccountStore` aggregates stores and routes by `BotReference`; bare bot IDs are not globally unique.+- The host owns routing, reply counts, permissions and group turn scheduling. Clients render these results; they do not reimplement host policy.+- `cloud/` transports encrypted chat traffic and manages account metadata. `relay/` delivers APNs pushes. The two Workers have separate configuration and tests.+- `web/` is its own git repository; website changes require working in that submodule explicitly.-Bot memory & teams ([context-and-memory](../features/context-and-memory.md), [bot-collaboration](../features/bot-collaboration.md)): host `memory.rs`, `context.rs`, `team.rs` (+ `tests/team_e2e.rs`); kit `CodyncUI/Bots/MemoryView.swift`. Widgets ([design](../design/mobile-widgets.md)): shared cards in `CodyncKit/Design/WidgetCards.swift`, iOS `Widgets/WidgetPreviews.swift` + `Views/WidgetGalleryView.swift`.+## Names-- Directories: lowercase for repo-level roles (`apps/`, `kit/`, `host/`); PascalCase inside Swift targets (`Views/`, `Thread/`). Apple app folders are `App/` (entry point, app-wide services), `Views/`, `Resources/` (Info.plist, entitlements, xcprivacy, xcassets).-- Files follow their language: Swift `UpperCamelCase.swift` named after the file's main type; Rust/TS `snake_case.rs` / `kebab-case.ts`.-- One main type per file. Small private helpers of that type stay in it; a file of several small siblings takes the plural role (`ChatRows.swift`, `UsageViews.swift`, `Dialogs.swift`).-- Type suffixes by role: full screen / sheet → `…View`; list item → `…Row`; card → `…Card`; chat bubble → `…Bubble`; window scene → `…Window`; `@Observable` state → `…Store` / `…Controller`; `ButtonStyle` → describes the effect (`PressScale`).-- One word per concept across Swift, Rust host and Linux: **bot** (the persona you message), **agent** (the harness it runs, `Backend` in code), **chat** (the endless conversation with a bot or group; not conversation/session), **thread** (replies on one chat message), **group** (a chat with several bots), **lane** (a chat or thread a turn talks in), **session** (the ACP session only), **trace** (full conversation sheet), **marketplace** for UI / **market** for its data, **computer** (a paired host, user-facing) vs **host** (code).-- Linux mirrors the Swift feature names in its module names (`thread`, `editor`, `trace`, `settings`) when a file is split; don't invent new terms there.+| Term | Meaning |+|---|---|+| bot | Named agent persona; a group is also a roster entry with `kind: group` |+| agent / backend | Coding harness and its ACP adapter |+| chat | Main, persistent conversation with a bot or group |+| thread | Replies under a main-chat root message |+| group | Chat with several bots and the user; no agent process of its own |+| lane | `(chat, thread)` destination of a turn |+| session | Harness-owned ACP model context; distinct from stored chat history |+| trace | Full conversation, including intermediate/tool events |+| computer / host | User-facing paired environment / the daemon that serves it |+| cloud / relay | Account + E2E service / context-dependent transport or APNs Worker; always name the directory when ambiguous |-## iPhone navigation chrome+Use lowercase repository folders; PascalCase folders inside Swift targets. Swift files follow their main type (`UpperCamelCase.swift`), Rust uses `snake_case.rs`, and TypeScript uses `kebab-case.ts`. Prefer one main type per file; small related view siblings can share a plural file such as `ChatRows.swift`.-The bot list and conversation use the native `NavigationStack` toolbar: account and action buttons are `ToolbarItem`s, and the conversation uses the system back button. iOS supplies their Liquid Glass, sizing, grouping and press feedback. Do not add glass backgrounds or `IconButtonStyle` to these toolbar buttons. Other screens continue to use Codync's custom chrome.+Role suffixes: `View`, `Row`, `Card`, `Window`, `Store`, `Controller`; button styles describe the effect (`PressScale`). Keep feature vocabulary aligned across Swift, Rust, Linux and the terminal client.-Transient connection status appears in the toolbar center and remains visible for at least 0.7 seconds. It does not insert a connecting banner into the bot list or conversation content.+UI-specific rules, including the native iPhone toolbar exception, live in [UI conventions](../design/ui-conventions.md).diff --git a/docs/archive/bot-computer-ssh-plan-2026-09-25.md b/docs/archive/bot-computer-ssh-plan-2026-09-25.mdindex 50e9c965..9e8380ae 100644--- a/docs/archive/bot-computer-ssh-plan-2026-09-25.md+++ b/docs/archive/bot-computer-ssh-plan-2026-09-25.md@@ -1,5 +1,7 @@# Bot、computer、帳號切換與 SSH 遠端執行計畫+> Archived 2026-09-25 record. Statements below describe the original plan/audit, not current implementation or verification. See the [archive index](README.md) for current replacements.+日期:2026-09-25狀態:規劃;**多 computer 是未來方向,目前不是優先事項**:產品先以單一 computer 為主,已實作的多 computer 結構保留(中繼、帳號、SSH 建在其上,單台時照常運作),但暫不擴充或打磨多 computer 功能。補充 [Cloudflare 帳號與裝置管理計畫](cloudflare-account-device-plan-2026-09-25.md)。實作細節(SSH tunnel、多 computer store、中繼)以 [遠端連線實作規格](../reference/remote-relay.md) 為準。diff --git a/docs/archive/cloudflare-account-device-plan-2026-09-25.md b/docs/archive/cloudflare-account-device-plan-2026-09-25.mdindex 74de8da1..e80eb922 100644--- a/docs/archive/cloudflare-account-device-plan-2026-09-25.md+++ b/docs/archive/cloudflare-account-device-plan-2026-09-25.md@@ -1,5 +1,7 @@# Codync 帳號、裝置管理與 Cloudflare 架構計畫+> Archived 2026-09-25 record. Statements below describe the original plan/audit, not current implementation or verification. See the [archive index](README.md) for current replacements.+日期:2026-09-25狀態:雲端、逐裝置授權與 SSH 為規劃,尚未部署;手機帳號入口與本機資料分區已實作,詳見補充計畫的落地範圍。文中的時間、容量與保留期限是建議產品設定,不是服務商限制。diff --git a/docs/archive/ui-audit-2026-09-25.md b/docs/archive/ui-audit-2026-09-25.mdindex 1ba70e2f..a4704c9f 100644--- a/docs/archive/ui-audit-2026-09-25.md+++ b/docs/archive/ui-audit-2026-09-25.md@@ -1,5 +1,7 @@# UI audit — 2026-09-25+> Archived 2026-09-25 record. Statements below describe the original plan/audit, not current implementation or verification. See the [archive index](README.md) for current replacements.+Checked against the `apple-design` skill (emilkowalski/skills), plus the iOS/macOS HIG and GNOME HIG. Paths use the new layout. Line numbers are from the commit that did the restructure.## Shared (kit/)