How do their APIs compare?
How do their APIs compare?
About p0deje/maccy · 2 messages · last activity 9/7/2026
I should clarify: neither of these two projects exposes a conventional public "API" (like REST endpoints or a client library) — they're both native macOS desktop apps. So "API" here really means their internal code interfaces / architecture for how components interact. Let me compare what's visible from the retrieved source.
p0deje/maccy
Maccy's internal structure is organized around a few focused classes with narrow, single-purpose interfaces:
Searchexposes one public entry point,search(string:within:), which dispatches to private strategies (simpleSearch,fuzzySearch,mixedSearch) based on aDefaults[.searchMode]setting, returning[SearchResult][Maccy/Search.swift:L36-L52]. TheModeenum (exact,fuzzy,regexp,mixed) is the whole "API surface" a caller needs to know about [Maccy/Search.swift:L6-L24].Notifieris a static-method utility (authorize(),notify(body:sound:)) wrappingUNUserNotificationCenter, with no instance state — a simple procedural API [Maccy/Notifier.swift:L4-L34].ApplicationImageandHistoryItemuse Combine-style reactive properties (lastChecked,image) and file-system event sources (DispatchSource) rather than request/response calls — icons update themselves via.write/.deletefilesystem events [Maccy/ApplicationImage.swift:L36-L75].HistoryItemalso exposes computed properties likefromMaccy,universalClipboardthat inspect pasteboard content types, plus a private Vision-framework OCR pipeline (performTextRecognition,recognizeTextHandler) [Maccy/Models/HistoryItem.swift:L211-L262].
Overall Maccy's internal "API" style leans toward small, stateless/static utility classes and computed properties, with search behavior configured via a global Defaults settings enum rather than constructor parameters.
runjuu/inputsourcepro
Input Source Pro's internals are built heavily around Core Data (NSPersistentContainer, NSFetchRequest, NSFetchedResultsController) as its primary data-access layer, which is a very different paradigm from Maccy's plain Swift objects:
MainStoragewraps a persistent container and exposes reactive state via CombineCurrentValueSubject(e.g.,keyboardConfigs), refreshed through aNSFetchedResultsControllerdelegate pattern (refresh()) [Input Source Pro/Persistence/MainStorage.swift:L1-L40].SettingsBackupexposes a set offetch*()throwing methods (fetchAppRules,fetchBrowserRules,fetchKeyboardConfigs,fetchHotKeyGroups) that each build anNSFetchRequestwith sort descriptors and return typed arrays, plus a transactionalrestore-style method that deletes and reinserts objects inside ado/catchwithcontext.rollback()on failure [Input Source Pro/Persistence/SettingsBackup.swift:L561-L635].PreferencesVM+BrowserRuleandPreferencesVM+AppCustomizationfollow a consistent mutate-then-notify pattern: methods likeupdateBrowserRule(...)andtoggleBrowserRule(...)wrap changes insaveContext { ... }closures and, on success, callnotifyRuntimeRulesChanged()to propagate updates [Input Source Pro/Models/PreferencesVM+BrowserRule.swift:L36-L71]. SimilarlygetAppCustomization(bundleId:)andcleanRemovedAppCustomizationIfNeed()useNSPredicate-based fetch requests [Input Source Pro/Models/PreferencesVM+AppCustomization.swift:L106-L129].- Naming/style conventions are explicitly documented in AGENTS.md: UpperCamelCase types,
Type+Feature.swiftextension files, 4-space indentation [AGENTS.md:L18-L25] — Input Source Pro is more deliberately documented for contributors than what's shown from Maccy.
Want to ask your own question?
Open chat for p0deje/maccyPublic Q&A. Generated by RepoPilot from the actual source of p0deje/maccy. AI answers can be incomplete or stale — verify before relying on them.