Custom commands, web search and snippets

Teach Lightspot your own shortcuts: a URL with your search text in it, a Terminal command, a background shell script or an AppleScript, each with an optional prefix. Built-in search prefixes and text snippets work the same way.

Lightspot guide
  1. Overview
  2. Install, update and uninstall
  3. Searching and the app grid
  4. Calculator and conversions
  5. Developer tools
  6. Terminal history and projects
  7. Custom commands, web search and snippets
  8. Browser, clipboard and system
  9. Turning off Apple Spotlight
  10. Menu bar and settings
  11. Privacy
  12. How Lightspot works

Custom commands

Press ⌘⇧C, or choose Custom Commands… in the menu, to open the manager. A new install comes with three commands: Open GitHub (prefix gh), System Info (uname -a && sw_vers in Terminal) and Show Notification (an AppleScript that shows a notification).

The Custom Commands manager: five commands with their type, prefix and target, and buttons to reorder, edit, run and delete

Each row shows the name, the runner, the prefix and the target, with buttons to move it, edit it, run it or delete it. New opens the editor, and Presets adds a ready-made command. You can keep up to 100 commands; new ones are added at the top.

Creating a command

The editor asks for:

Command Type
Open URL, Terminal, AppleScript or Shell Script (see the table below).
Icon
The runner’s icon (your default browser, your terminal or Script Editor), an image or app you choose with Choose File…, or the type’s symbol. Chosen images are scaled down to 128 pixels and stored inside the command, so they survive an export.
Name
What you search for and what the row shows, for example Open GitHub.
Prefix Shortcut (optional)
A word that starts the query, such as gh, yt or npm.
Target
The URL, Terminal command, AppleScript code or shell command to run.
Keywords (optional, comma-separated)
Extra words that should find the command.
TypeHow it runs
Open URLOpens the URL in your default browser. A URL without :// gets https:// in front.
TerminalRuns the command in your chosen terminal (Apple’s Terminal when Warp is chosen), where you see the output.
AppleScriptRuns the code with osascript, in the background.
Shell ScriptRuns the command with /bin/sh -c in the background, with no window. A command containing sudo goes through Touch ID or the password dialog.

Passing what you type

Put {query} (or %s, or %@) in the target where your text should go:

  • URL: the text is URL-encoded. Without a placeholder, it is added as ?q=… (or &q=…).
  • Terminal and shell: the text is inserted exactly as typed, without quoting, so ping -c 4 {query} becomes ping -c 4 example.com. Without a placeholder it is added at the end after a space. Only use commands you would type yourself.
  • AppleScript: quotes and backslashes in the text are escaped. Without a placeholder, the text is not used.
  • With nothing typed, the placeholders are removed.

Prefixes

Type the prefix, a space and your text. The command becomes the Top Hit with your text filled in, and ↵ runs it:

png example.com shows Ping Host for 'example.com' with the command ping -c 4 example.com
c example.com shows Curl Headers for 'example.com', running curl -IL example.com

Typing only the prefix shows the command with its target. Without a prefix, a command is found by its name, its keywords or its target text, like any other result. A command whose name starts with “Open” is shown as “Search …” when used with a prefix, so Open GitHub reads Search GitHub for 'lightspot'.

Presets

Presets in the manager (and Fill from Preset in the editor) add these commands. When the list is empty, Load Default Presets adds the first three.

PrefixNameTypeTarget
ghGitHubURLhttps://github.com/search?q={query}&type=repositories
gGoogleURLhttps://www.google.com/search?q={query}
ytYouTubeURLhttps://www.youtube.com/results?search_query={query}
soStack OverflowURLhttps://stackoverflow.com/search?q={query}
ddgDuckDuckGoURLhttps://duckduckgo.com/?q={query}
wikiWikipediaURLhttps://en.wikipedia.org/w/index.php?search={query}
npmnpmURLhttps://www.npmjs.com/search?q={query}
pngPing HostTerminalping -c 4 {query}
cCurl HeadersTerminalcurl -IL {query}

Custom commands are saved with your settings and included when you export them, with your home folder written as ~ so the file works on another Mac.

Web search

Every query ends with a Web Search row, so ↵ on a query with no other results searches the web in your default browser.

A query with no other matches shows only Search Google for it

Choose the engine in the menu bar icon: Search Engine.

EngineURL
Google (default)https://www.google.com/search?q=…
DuckDuckGohttps://duckduckgo.com/?q=…
Kagihttps://kagi.com/search?q=…
Binghttps://www.bing.com/search?q=…
Brave Searchhttps://search.brave.com/search?q=…
Ecosiahttps://www.ecosia.org/search?q=…

Search prefixes

These prefixes are built in, whatever engine you chose. Type the prefix, a space and your text:

PrefixSearchesOpens
gGooglegoogle.com/search
ddgDuckDuckGoduckduckgo.com
ghGitHub (repositories)github.com/search
ytYouTubeyoutube.com/results
soStack Overflowstackoverflow.com/search
npmnpmnpmjs.com/search
cratescrates.iocrates.io/search
wikiWikipediaen.wikipedia.org
mdnMDN Web Docsdeveloper.mozilla.org/en-US/search
brewHomebrew (opens the formula page)formulae.brew.sh/formula/…
npm astro shows Search npm for 'astro'

A custom command with the same prefix appears too. With the default Open GitHub command, gh lightspot shows both, the custom command first:

gh lightspot shows the Open GitHub custom command as Top Hit and the built-in GitHub prefix under Web Search

Addresses

Type an address and Lightspot offers to open it directly: https://… links, localhost:3000, an IPv4 address with an optional port, or a domain such as example.com. Names that look like files (notes.txt, main.swift) are not treated as domains.

localhost:3000 shows Open localhost:3000 as the Top Hit

Text snippets

Snippets are short texts that ↵ copies to the clipboard, with a few placeholders filled in when you search. Type the keyword:

KeywordNameCopies
dateCurrent DateToday as 2026-10-16
isoISO TimestampThe time in UTC, such as 2026-10-16T07:30:00Z
uuidNew UUIDA new lowercase UUID
shrugShrug Emoji¯\_(ツ)_/¯
flipTable Flip Emoji(╯°□°)╯︵ ┻━┻
shrug shows the Shrug Emoji snippet

A snippet appears when its keyword equals or starts with what you typed, or when its name contains it. The placeholders a snippet can use are {{date}} (yyyy-MM-dd), {{time}} (HH:mm:ss), {{iso}} (ISO 8601 in UTC), {{uuid}} and {{clipboard}} (the current clipboard text).

date shows the Current Date snippet as Top Hit, followed by apps and the Date & Time settings pane

Lightspot has no editor for snippets yet: the five above are the ones you get, and they are not part of the settings export.