This page documents every public type and method declared inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jasonkneen/openclicky/llms.txt
Use this file to discover all available pages before exploring further.
cursor-buddy/OpenClickySDK.swift. These are the only types your host app needs to interact with directly.
OpenClickySDKMode
OpenClickySDKSession.init(mode:).
Cases
Keep the existing menu-bar runtime. Use this if you want
CompanionManager to behave exactly as the default OpenClicky app — with the global push-to-talk monitor, overlay auto-show, and onboarding tied to menu-bar state.Run OpenClicky in an in-window runtime suitable for SDK embedding. In this mode the global push-to-talk shortcut monitor is not started, the cursor overlay does not auto-show, and onboarding is not tied to menu-bar state. This is the recommended mode for SDK hosts.
OpenClickySDKPanelActions
OpenClickySDKPanel. All callbacks default to no-ops — only wire the ones your app needs to handle.
Initializer
Callbacks
Called when the close affordance in the panel UI is activated. Use this to set your presentation binding to
false or close your host window.Called when the user taps the “Quit OpenClicky” action inside the panel. In an embedded context this usually has the same effect as
onPanelDismiss — dismiss the panel rather than terminate your host app.Opens the OpenClicky HUD surface in the host environment. Route this to whichever surface in your app displays the agent session list or Codex HUD.
Opens the OpenClicky memory window in the host environment. Route this to your memory/knowledge viewer.
Opens the OpenClicky visual intelligence workspace in the host environment. Route this to your visual analysis surface or camera workspace.
Opens the OpenClicky feedback / inbox link. Route this to your preferred feedback URL or form.
Opens the settings surface in the host environment. Route this to your app’s settings window or sheet.
OpenClickySDKSession
ObservableObject so it can be used directly with @StateObject or @ObservedObject in SwiftUI.
All methods and properties must be accessed on the main actor.
Initializer
The execution mode for this session. Use
.embeddedWindow for SwiftUI integrations where you want a local, app-owned OpenClicky surface. Use .menuBar only if you want the exact menu-bar companion behavior.Published Properties
@Published — true after start() succeeds, false after stop(). Observe this in SwiftUI or via Combine to react to runtime lifecycle changes.Lifecycle
Starts the OpenClicky runtime. Loads the bundled knowledge index, refreshes all permissions, warms TTS clients, and shows the cursor overlay if permitted. Safe to call multiple times — exits immediately if already started.Call this in
.onAppear or from your scene’s onAppear modifier.Stops the OpenClicky runtime. Cancels all in-flight voice responses, TTS playback, agent sessions, and external control servers. Safe to call multiple times — exits immediately if already stopped.Call this in
.onDisappear or on app termination.Convenience method that calls
stop() followed by start(). Useful for re-initializing the runtime after configuration changes.Prompt and Voice Entry Points
Submit a raw text prompt through the standard text-mode voice response path. The prompt is routed through the same pipeline as a push-to-talk voice transcript — it may open apps, trigger computer use, start agent tasks, or generate a Claude response depending on the content.
The text prompt to submit. Leading and trailing whitespace is trimmed internally.
Submit a prompt directly into Agent Mode from a panel or HUD-like input. Unlike
submitTextPrompt, this bypasses voice routing and goes straight to the active Codex agent session.The agent instruction to submit.
Begin microphone voice capture for follow-up input. This triggers the same dictation pipeline as pushing the microphone button in the panel. Use this to implement a custom push-to-talk button in your host app.
End microphone voice capture early. The dictation pipeline will finalize the current transcript and submit it. Call this when your custom PTT button is released.
API Key Configuration
All key setters update OpenClicky’s internal configuration and persist the keys the same way the native app does. You do not need to restart the session after setting keys.Set the Anthropic API key used for Claude voice responses and Claude-powered computer use. Persisted to
UserDefaults under OpenClicky’s key namespace.The Anthropic API key (
sk-ant-...). Pass an empty string to clear.Set the Codex / OpenAI-compatible API key used for agent mode and OpenAI voice responses. OpenClicky routes this through the same API client path as the OpenAI key.
The Codex or OpenAI API key. Pass an empty string to clear.
Set the ElevenLabs API key used for ElevenLabs TTS voice playback.
The ElevenLabs API key. Pass an empty string to clear.
Set the Cartesia API key used for Cartesia TTS voice playback.
The Cartesia API key. Pass an empty string to clear.
Panel Construction
Build an embedded panel view pre-wired to this session. Returns an
OpenClickySDKPanel — a SwiftUI View you can embed in a .sheet, NSHostingView, or any SwiftUI container.This is the primary overload. Use it when you want to handle all seven panel callbacks.The initial pinned state of the panel. When
true, the panel renders in a pinned/docked layout. Pass your app’s pinned state binding here.The callbacks struct controlling how panel affordances route into your host app. See
OpenClickySDKPanelActions above.Called whenever the panel’s pin state changes. Use this to sync the pin state back into your host app’s state.
Convenience overload of
makePanelView that uses OpenClickySDKPanelActions() with all no-op defaults. Use this when you don’t need to handle panel callbacks.OpenClickySDKPanel
View wrapping CompanionPanelView that is safe to embed inside any host NSWindow, NSPanel, or SwiftUI .sheet. You do not construct this type directly — obtain it from OpenClickySDKSession.makePanelView(...).
Usage
OpenClickySDKPanel conforms to View and can be used anywhere a SwiftUI view is accepted:
Minimum Recommended Frame Size
The panel renders correctly at a minimum width of 356 pt and a minimum height of 720 pt. Constraining the frame smaller than this will cause layout clipping in the conversation UI.Panel State
OpenClickySDKPanel observes CompanionManager (the internal state object owned by OpenClickySDKSession) and re-renders reactively as voice state, agent status, and conversation entries change. You do not need to manage any panel-internal state in your host app.