Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/stash

src/search.ts

15 lines · 507 B · TypeScript
import { searchNotes } from './lib/notes.ts'
export { searchNotes }

/**
 * Search stash notes by text, tags, and extracted entities.
 *
 * @returns Ranked matches from the newest 500 notes.
 * @example
 * import searchNotes from 'kody:@kody/stash/search'
 * const result = await searchNotes({ query: 'garage code', limit: 5 })
 * // => { query: 'garage code', matches: [{ note: {...}, score: 0.8 }] }
 */
export default async function searchStashNotes(input?: unknown) {
	return await searchNotes(input)
}