A keyboard-first launcher for your entire site — the same ⌘K experience people know from Linear, Vercel, Raycast and GitHub. Press Cmd/Ctrl+K, type a few letters, and jump to any page or run any action without touching the mouse.
Double-click snippet.html, then press Cmd‑K (Mac) or Ctrl‑K (Windows) — or just tap /. It’s plain HTML, CSS & JavaScript: no install, build, or server, and no external libraries.
Keep this folder inside your website project (or anywhere Claude Code can read it), then ask Claude something like:
CMDK_COMMANDS with one command per page in my nav.”snippet.html from the Command-Palette folder” — so it copies the exact component (the #cmdk-css styles, the #cmdk markup, and the #cmdk-js script).Everything the palette shows lives in one array near the top of the script, CMDK_COMMANDS. Each entry is a single command:
name / hint — the title and grey subtitle (both are fuzzy-searchable).group — the heading it appears under (e.g. Pages, Actions, Links).icon — pick a ready-made icon from the I set (I.page, I.mail, I.moon…) or pass your own inline SVG.run — what happens on Enter/click. Use the built-in helpers below.Three helpers are available inside run:
go('#section') smooth-scrolls to an element; go('page.html') navigates to another page.copy('text') copies text to the clipboard.toast('Saved!') shows a small confirmation message.Cmd/Ctrl‑K and / by default — change the keys in the keydown handler.localStorage and shown when the box is empty.#cmdk-css block — the accent uses your orange, the icons your blue.data-cmdk-open opens the palette, so you can add a search button in your header too.