{"_id":"@burneikis/pi-fzfp","_rev":"8-98f54fbc68dcd153bd521bb9b02709e3","name":"@burneikis/pi-fzfp","dist-tags":{"latest":"2.4.0"},"versions":{"2.0.0":{"name":"@burneikis/pi-fzfp","version":"2.0.0","keywords":["pi-package"],"_id":"@burneikis/pi-fzfp@2.0.0","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"0888a4f64616f89e1fed885b73569fa5e215d79d","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.0.0.tgz","fileCount":4,"integrity":"sha512-GcZU3QXBjYOVvH2XXHQ4RyzFQcosfYwfU0j4hPzqLeBtvfO0CrqX3MhawPNuz2/EK/7XLRMXXP0l8+PnZT6V3w==","signatures":[{"sig":"MEUCIAYPiryUA4v36X1RZlFgwFoMC2wRbhLD0987dY+4bF7JAiEAt1PiSCxbUYakyCyrgmsOGjhUfiMC2OEWpp9PNs7ld9w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15917},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"470dce7df40b080adad8c2e39897643c8dc89fc5","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – weighted dual-key matching for @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.0.0_1774516570566_0.944726425238746","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.0.1":{"name":"@burneikis/pi-fzfp","version":"2.0.1","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.0.1","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"7e599bfdc2a9a690baadcc50ba1de81d5b21c0b7","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.0.1.tgz","fileCount":5,"integrity":"sha512-XV9TatLwZXbik42Cz+4S0m8TI+mzpCwMCQsB3nSzMkX7LP8NorU+Jg1Dq5nQ0oYOp+JPj/023k4NqbZ9iXGkbg==","signatures":[{"sig":"MEQCIFYwIGab4GR4ZmmPM2/vdLeL1G5prlhccPIGP+99Nx/6AiB93m3TVCT3vl//mMqcvItm9t/olyWFPd7m1QJYatkAYg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17193},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"470dce7df40b080adad8c2e39897643c8dc89fc5","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – weighted dual-key matching for @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.0.1_1774516756217_0.5087416929951942","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.0.2":{"name":"@burneikis/pi-fzfp","version":"2.0.2","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.0.2","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"f843bcd83d8759b00efa33fe080cf2b87a737a1f","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.0.2.tgz","fileCount":5,"integrity":"sha512-VOBBevXoF3oyaGjTP4Hn35Twa0UIE01rzRFL5aSzkd0ZWHMnqM5HgE6jC4W+zVuBY/s6uIvmzWWmIl4NVlrk2Q==","signatures":[{"sig":"MEUCIQCgkzNRCempn5j1im9bb1UQiEvKeNY76qih+5QXgivMiQIgMVKa+rZ8kJLjZ6n17DXdzyHTceFxr2RZbGMAEh+atPo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17066},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"8c3c87b9f6af44c3e83e616f8ecd2d0a88fc1a16","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – weighted dual-key matching for @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.0.2_1774552243801_0.7956002744496737","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.1.0":{"name":"@burneikis/pi-fzfp","version":"2.1.0","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.1.0","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"beacf3e3e0a6642af58a54085aae185dbfd98ee8","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.1.0.tgz","fileCount":5,"integrity":"sha512-oC16NsAWBkaYKyx9qF3Qx/iJwSyQZWIqbVOdDPL9QHk3TjpwVoYpNTSrvhsEo2bUxYkkdXfqNcrf/HQ1JdHzJg==","signatures":[{"sig":"MEUCIC+QH8XRBwZiuJ1+kz+OfHOUPIa/n6c1151oXQiBNrqsAiEA43ELXKeSlwrs6DgvKq/f7IgYvGcql4js3H2hKPQsY4E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18137},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"4e63f5c80cd6667ce5a860b638c78c492de1755c","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – weighted dual-key matching for @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.1.0_1774612501131_0.10553507628289527","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.2.0":{"name":"@burneikis/pi-fzfp","version":"2.2.0","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.2.0","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"402087d83993a0898f20b12854d6fa478235614d","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.2.0.tgz","fileCount":5,"integrity":"sha512-3tOxQ50z98IWJzDVrOgl/ApW/UrTuLGvPv6bv/EzC/0j+iEFXD6uVBj1HlP15GzV0sb5nMf+QOI28OPF9RSHGA==","signatures":[{"sig":"MEUCIQDh6XLnhQ9Euam4fxlAkl8IBwwyB/25LMsgwYTXChyL7QIgdszyvxZ1DSPGxhG/57aAAMi7KLCDXrlPzXnoE1yjoHw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11649},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"88bbd227a2c9cb35da5681567a48afbb0131626e","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – fzf-powered @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.2.0_1774742143498_0.8430860601025121","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.3.0":{"name":"@burneikis/pi-fzfp","version":"2.3.0","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.3.0","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"cbbf2af86accb943dd111548c9ef236d69974d42","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.3.0.tgz","fileCount":5,"integrity":"sha512-ETZlCDmRsFeAtb9DDXN+wRSrP8mqEWhHFXhAavZ/gS8ySZ1S0lfCk3Yl2Rxzr1lMa72hYa1TSKcGpXcPqDdxJA==","signatures":[{"sig":"MEUCIDDX+p/ZrJ+UkCkcRC9J9M2cBtN8CFdRFXJ9pnGARBmyAiEA8vlY2CtJR5Jmu7gKWZIJNUoc9hehfqW9FfPyIDXrg+w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13899},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"12a3ce48a6a273ca8be59076df42709a5646c7a0","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – fzf-powered @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.3.0_1774944576759_0.3292421044869993","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"},"2.4.0":{"name":"@burneikis/pi-fzfp","version":"2.4.0","keywords":["pi-package"],"author":{"name":"burneikis"},"license":"MIT","_id":"@burneikis/pi-fzfp@2.4.0","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"homepage":"https://github.com/burneikis/pi-fzfp#readme","bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"pi":{"extensions":["./index.ts"]},"dist":{"shasum":"29970fc6f179dcbe5657571d7f39c8432d54bb59","tarball":"https://registry.npmjs.org/@burneikis/pi-fzfp/-/pi-fzfp-2.4.0.tgz","fileCount":5,"integrity":"sha512-Fck5w8Nh6zbpu1mx+X/kTx8pA4i6P7WmNF7+yRvuG4RDBDOyJ55w6U+4uCRAzsc1fxwVCzBMOwO7D9uO5AQ6tw==","signatures":[{"sig":"MEQCIB4GeBwP0We8F9WXW/H+vqVyevCAEgw1INm4DEBNFOvXAiBKk29FdH9uT1ul0bBz1jgGcGSon+rhduzuIvcmdiRDFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16501},"exports":{".":"./index.ts","./provider":"./provider.ts"},"gitHead":"e15b8494bde1e907628b935145594dc511efeabe","_npmUser":{"name":"burneikis","email":"alexburneikis@gmail.com"},"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"_npmVersion":"11.8.0","description":"Fuzzy file picker for pi – fzf-powered @file autocomplete","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"peerDependencies":{"@mariozechner/pi-tui":"*","@mariozechner/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-fzfp_2.4.0_1777586264204_0.4604019673477111","host":"s3://npm-registry-packages-npm-production"},"deprecated":"moved to pi-fzfp (rather than @burneikis/pi-fzfp)"}},"time":{"created":"2026-03-26T09:16:10.406Z","modified":"2026-06-18T21:20:10.245Z","2.0.0":"2026-03-26T09:16:10.708Z","2.0.1":"2026-03-26T09:19:16.362Z","2.0.2":"2026-03-26T19:10:43.991Z","2.1.0":"2026-03-27T11:55:01.282Z","2.2.0":"2026-03-28T23:55:43.674Z","2.3.0":"2026-03-31T08:09:36.929Z","2.4.0":"2026-04-30T21:57:44.348Z"},"bugs":{"url":"https://github.com/burneikis/pi-fzfp/issues"},"author":{"name":"burneikis"},"license":"MIT","homepage":"https://github.com/burneikis/pi-fzfp#readme","keywords":["pi-package"],"repository":{"url":"git+https://github.com/burneikis/pi-fzfp.git","type":"git"},"description":"Fuzzy file picker for pi – fzf-powered @file autocomplete","maintainers":[{"name":"burneikis","email":"alexburneikis@gmail.com"}],"readme":"# pi-fzfp\n\nFuzzy file picker for [pi](https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent). Replaces the built-in `@` file autocomplete with fzf-powered fuzzy matching.\n\n## The Problem\n\nPi's built-in `@file` autocomplete uses `fd` with a regex pattern and substring scoring. Typing `@inxts` won't find `index.ts` because the characters aren't contiguous.\n\n## The Fix\n\npi-fzfp pipes `fd` output through `fzf --filter` for true subsequence fuzzy matching, scored and sorted by fzf's battle-tested algorithm.\n\n## Requirements\n\n- [`fd`](https://github.com/sharkdp/fd) must be installed and on `PATH`\n- [`fzf`](https://github.com/junegunn/fzf) must be installed and on `PATH`\n\n## Install\n\n### Standalone (default editor)\n\n```bash\npi install npm:@burneikis/pi-fzfp\n```\n\npi-fzfp installs its own `FuzzyFileEditor` as the active editor component.\n\n### With pi-vim (or another compatible custom editor)\n\nInstall both as separate pi packages:\n\n```bash\npi install npm:@burneikis/pi-vim\npi install npm:@burneikis/pi-fzfp\n```\n\npi-fzfp detects the other editor at startup via `pi.events` and skips installing its own editor component. It hands off `wrapWithFuzzyFiles` to the other editor instead.\n\n## How It Works\n\n### Autocomplete\n\n1. Intercepts `@` queries in the autocomplete provider\n2. Runs `fd` to list all project files (respects `.gitignore`, excludes `.git`)\n3. Pipes the file list through `fzf --filter=<query>` for fuzzy matching and scoring\n4. Returns all matches sorted by fzf's score (no artificial limit)\n5. Builds autocomplete suggestions with proper `@` prefix and quoting\n6. Non-`@` queries pass through to the original provider unchanged\n\n### Integration Protocol\n\npi-fzfp uses `pi.events` to coordinate with custom editor extensions so neither package needs to know about or depend on the other.\n\n**During the factory function** (runs once at load time):\n- Emits `\"pi-fzfp:provider\"` with `wrapWithFuzzyFiles` — caught by any editor extension that loaded before pi-fzfp and is already listening.\n\n**During `session_start`** (runs after all extension factories have completed):\n- Re-emits `\"pi-fzfp:provider\"` — caught by editor extensions that loaded after pi-fzfp and set up their listener during their own factory.\n- Emits `\"pi-fzfp:check-editor\"` with an ack callback — if any other extension acks, pi-fzfp skips `setEditorComponent` and lets that extension own the editor.\n\nThis double-emit pattern means the load order of pi-fzfp relative to another editor extension doesn't matter.\n\n### Implementing the protocol in your editor extension\n\nRegister both listeners during your factory (before `session_start`), so they are always in place when pi-fzfp's `session_start` fires:\n\n```typescript\nimport type { ExtensionAPI } from \"@mariozechner/pi-coding-agent\";\nimport type { AutocompleteProvider } from \"@mariozechner/pi-tui\";\n\nexport default function (pi: ExtensionAPI) {\n  let wrapAutocomplete: ((provider: AutocompleteProvider) => AutocompleteProvider) | undefined;\n\n  // Prevent pi-fzfp from setting its own editor component.\n  pi.events.on(\"pi-fzfp:check-editor\", (ack: () => void) => { ack(); });\n\n  // Receive the provider — pi-fzfp emits this from both its factory and its\n  // session_start to cover both possible load orderings.\n  pi.events.on(\"pi-fzfp:provider\", (fn: (provider: AutocompleteProvider) => AutocompleteProvider) => {\n    wrapAutocomplete = fn;\n  });\n\n  pi.on(\"session_start\", (_event, ctx) => {\n    ctx.ui.setEditorComponent((tui, theme, keybindings) =>\n      new MyEditor(tui, theme, keybindings, wrapAutocomplete)\n    );\n  });\n}\n```\n\nApply `wrapAutocomplete` in your editor's `setAutocompleteProvider`:\n\n```typescript\noverride setAutocompleteProvider(provider: AutocompleteProvider): void {\n  super.setAutocompleteProvider(this.wrapAutocomplete ? this.wrapAutocomplete(provider) : provider);\n}\n```\n\n## API\n\n### `wrapWithFuzzyFiles(provider, basePath?)`\n\nWraps any `AutocompleteProvider` with fzf-powered fuzzy file matching for `@` queries. Returns the provider unchanged if `fd` or `fzf` is not available.\n\n### `FzfFileAutocompleteProvider`\n\nThe wrapper class, if you need more control.\n","readmeFilename":"README.md"}