Skip to content

Bun and Node.js bindings for the golang fzf fuzzy finder

License

Notifications You must be signed in to change notification settings

theurgi/fzf-ecma

Repository files navigation

fzf-ecma

fzf-ecma is a monorepo containing JavaScript bindings (with TypeScript support) for the popular golang fzf fuzzy finder. It currently includes implementations for Bun and Node.js.

Why wrap a golang library? Why not rewrite it in JavaScript?

  1. That would take a lot of work
  2. fzf is Blazingly fast ™️
  3. fzf is very well maintained

Note: All packages in this repository require fzf to be installed on your system and available in your PATH.

Packages

See each package's README for specific installation and usage details.

Package Latest Changelog
fzf-node Changelog
fzf-bun Changelog
fzf-deno TODO

Basic usage

Simply provide fzf with an array of strings and an array of fzf options. When this script is executed, it will spawn fzf as a child process in your SHELL. For all available fzf options see the fzf docs.

import { fzf } from 'fzf-bun'

// Run `man fzf` in your shell to see all available fzf options
const fzfOptions = ['--multi', '--preview-window=up', '--preview', 'echo {}']

const selections = ['Pen ✒️', 'Pineapple 🍍', 'Apple 🍎', 'Pen ✒️']

const selection = await fzf(selections, fzfOptions)

// Do something with selection
console.log(selection)

Contributing

Contributions are welcome! Please read the contributing guidelines before submitting pull requests or opening issues.

License

MIT

About

Bun and Node.js bindings for the golang fzf fuzzy finder

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published