// Name: Perplexity Search in Chrome // Description: Prompts for a query then opens Perplexity search in Google Chrome. // Author: tayiorbeii // GitHub: tayiorbeii import "@johnlindquist/kit" const query = await arg("Enter your Perplexity search") const url = `https://perplexity.ai/search/new?q=${encodeURIComponent(`'${query}'`)}` const candidates = isMac ? ["Google Chrome"] : isWin ? ["chrome", "Google Chrome", "chrome.exe"] : ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"] let opened = false for (const appName of candidates) { try { await openApp(appName, { arguments: [url] }) opened = true break } catch { // try next } } if (!opened) { await open(url) }