Skip to content

HoudahSpot

HoudahSpot is a macOS file search app. Protocol Launcher allows you to generate HoudahSpot URL scheme links.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Notes

HoudahSpot's official user guide defines one URL scheme endpoint for starting searches: houdahspot4://search?q=QUERY&location=PATH&template=PATH&s=ATTRIBUTE. This module exposes only that documented endpoint and the documented search attributes.

The payload uses the parameter names from the documented URL format: q for the search string, location for one or more folder paths, template for a template path that includes the .hstemplate extension, and s for the search attribute. It also supports HoudahSpot's documented aliases: query, l, t, and search. The documented s or search values are name, content, and anytext.

Start a HoudahSpot search with any supported combination of the documented parameters.

On-Demand
ts
import { search } from 'protocol-launcher/houdahspot'

const url = search({
  q: 'Houdah Software',
  location: '~/Documents',
})

Search Name

Start a HoudahSpot search with the search attribute set to name.

On-Demand
ts
import { searchName } from 'protocol-launcher/houdahspot'

const url = searchName({
  q: 'invoice',
  location: '~/Documents',
})

Search Content

Start a HoudahSpot search with the search attribute set to content.

On-Demand
ts
import { searchContent } from 'protocol-launcher/houdahspot'

const url = searchContent({
  q: 'project plan',
  location: '~/Documents',
})

Search Any Text

Start a HoudahSpot search with the search attribute set to anytext.

On-Demand
ts
import { searchAnyText } from 'protocol-launcher/houdahspot'

const url = searchAnyText({
  q: 'tag:orange',
})

Generated URLs

ts
search({
  q: 'Houdah Software',
  location: '~/Documents',
})
// => 'houdahspot4://search?q=Houdah%20Software&location=~/Documents'

searchName({
  q: 'invoice',
})
// => 'houdahspot4://search?q=invoice&s=name'

searchContent({
  q: 'project plan',
})
// => 'houdahspot4://search?q=project%20plan&s=content'

searchAnyText({
  q: 'tag:orange',
})
// => 'houdahspot4://search?q=tag:orange&s=anytext'

Official Documentation