Skip to content

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

Package listing

@kody/stash

src/index.ts

26 lines · 705 B · TypeScript
import { run } from './lib/run.ts'
export { run }
export {
	addNote,
	archiveNote,
	getNote,
	listNotesByTag,
	listRecent,
	overview,
	retrieve,
	searchNotes,
	updateNote,
} from './lib/notes.ts'

/**
 * Dispatch stash operations by `action`, or infer add vs search from `text`/`query`.
 * With no input, returns setup overview (zero-auth, dryRun-capable mutations).
 *
 * @param input.action - `add`, `search`, `recent`, `by-tag`, `archive`, `get`, `update`, or `overview`.
 * @example
 * import runStash from 'kody:@kody/stash'
 * const found = await runStash({ action: 'search', query: 'garage code', limit: 5 })
 */
export default async function runStash(input?: unknown) {
	return await run(input)
}