MCPcopy Index your code
hub / github.com/codeaashu/claude-code / registerProtocolHandler

Function registerProtocolHandler

src/utils/deepLink/registerProtocol.ts:215–233  ·  view source on GitHub ↗
(
  claudePath?: string,
)

Source from the content-addressed store, hash-verified

213 * After registration, clicking a `claude-cli://` link will invoke claude.
214 */
215export async function registerProtocolHandler(
216 claudePath?: string,
217): Promise<void> {
218 const resolved = claudePath ?? (await resolveClaudePath())
219
220 switch (process.platform) {
221 case 'darwin':
222 await registerMacos(resolved)
223 break
224 case 'linux':
225 await registerLinux(resolved)
226 break
227 case 'win32':
228 await registerWindows(resolved)
229 break
230 default:
231 throw new Error(`Unsupported platform: ${process.platform}`)
232 }
233}
234
235/**
236 * Resolve the claude binary path for protocol registration. Prefers the

Callers 1

Calls 4

resolveClaudePathFunction · 0.85
registerMacosFunction · 0.85
registerLinuxFunction · 0.85
registerWindowsFunction · 0.85

Tested by

no test coverage detected