{"id":14440143,"url":"https://github.com/darrenldl/docfd","last_synced_at":"2026-02-24T12:17:22.962Z","repository":{"id":66706893,"uuid":"465115558","full_name":"darrenldl/docfd","owner":"darrenldl","description":"TUI multiline fuzzy document finder","archived":false,"fork":false,"pushed_at":"2026-02-22T12:15:27.000Z","size":77972,"stargazers_count":285,"open_issues_count":5,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-22T13:37:20.938Z","etag":null,"topics":["document-management","fuzzy-search","grep-like","indexed-search","search","tui"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darrenldl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-02T01:31:47.000Z","updated_at":"2026-02-22T12:15:21.000Z","dependencies_parsed_at":"2025-12-31T19:08:52.830Z","dependency_job_id":null,"html_url":"https://github.com/darrenldl/docfd","commit_stats":null,"previous_names":[],"tags_count":137,"template":false,"template_full_name":null,"purl":"pkg:github/darrenldl/docfd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenldl%2Fdocfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenldl%2Fdocfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenldl%2Fdocfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenldl%2Fdocfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrenldl","download_url":"https://codeload.github.com/darrenldl/docfd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenldl%2Fdocfd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29781994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document-management","fuzzy-search","grep-like","indexed-search","search","tui"],"created_at":"2024-08-31T17:01:27.805Z","updated_at":"2026-02-24T12:17:22.930Z","avatar_url":"https://github.com/darrenldl.png","language":"OCaml","funding_links":[],"categories":["OCaml","\u003ca name=\"cheatsheet\"\u003e\u003c/a\u003eCommands cheatsheet and snippets"],"sub_categories":[],"readme":"# Docfd\nTUI multiline fuzzy document finder\n\nThink interactive grep for text files, PDFs, DOCXs, etc,\nbut word/token based instead of regex and line based,\nso you can search across lines easily.\n\nDocfd aims to provide good UX via integration with common text editors\nand PDF viewers,\nso you can jump directly to a search result with a single key press.\n\n---\n\nInteractive use\n\n![](demo-vhs-gifs/repo.gif)\n\nNon-interactive use\n\n![](demo-vhs-gifs/repo-non-interactive.gif)\n\n## Features\n\n- Multithreaded indexing and searching\n\n- Multiline fuzzy search of multiple files\n\n- Content view pane that shows the snippet surrounding the search result selected\n\n- Text editor and PDF viewer integration\n\n- Editable command history - rewrite/plan your actions in text editor\n\n- Search scope narrowing - limit scope of next search based on current search results\n\n- Clipboard integration\n\n## Why Docfd?\n\n- You are interested in ad hoc searches and just want to run a command to get going\n\n- You don't want to move everything into a central storage, and want to just keep your current folder structure\n\n- You want a standalone TUI search tool that does not need to spin up a server and is also completely offline\n\n- You want to script your search\n\n## Why not Docfd?\n\n- You don't want indexing\n\n- You only care about simple searches, and grep and similar tools already suffice for you\n\n## Installation\n\nStatically linked binaries for Linux and macOS are available via\n[GitHub releases](https://github.com/darrenldl/docfd/releases).\n\nDocfd is also packaged on the following platforms for Linux:\n\n- [opam](https://ocaml.org/p/docfd/latest)\n- [AUR](https://aur.archlinux.org/packages/docfd-bin) (as `docfd-bin`)\n- Nix (as `docfd`)\n\nThe only way to use Docfd on Windows right now is via WSL.\n\n**Notes for packagers**: Outside of the OCaml toolchain for building (if you are\npackaging from source), Docfd also requires the following\nexternal tools at run time for full functionality:\n\n- `pdftotext` from `poppler-utils` for PDF support\n- `pandoc` for support of `.epub`, `.odt`, `.docx`, `.fb2`, `.ipynb`, `.html`, and `.htm` files\n- `fzf` for some file selection menus\n- `wl-clibpard` for clipboard support on Wayland\n- `xclip` for clipboard support on X11\n\n## Basic usage\n\nThe typical usage of Docfd is to either `cd` into the directory of interest\nand launch `docfd` directly, or specify the paths as arguments:\n\n```\ndocfd [PATH]...\n```\n\nThe list of paths can contain directories.\nEach directory in the list is scanned recursively for\nfiles with the following extensions by default:\n\n- For multiline search mode:\n    - `.txt`,\n      `.md`,\n      `.pdf`,\n      `.epub`,\n      `.odt`,\n      `.docx`,\n      `.fb2`,\n      `.ipynb`,\n      `.html`,\n      `.htm`\n- For single line search mode:\n    - `.log`,\n      `.csv`,\n      `.tsv`\n\nYou can change the file extensions to use via\n`--exts` and `--single-line-exts`,\nor add onto the list of extensions via\n`--add-exts` and `--single-line-add-exts`.\n\nIf the list `PATH`s is empty,\nthen Docfd defaults to scanning the\ncurrent directory `.`\nunless any of the following is used:\n`--paths-from`, `--glob`, `--single-line-glob`.\n\n## Documentation\n\nSee [GitHub Wiki](https://github.com/darrenldl/docfd/wiki) for\nmore examples/cookbook, and technical details.\n\n## Changelog\n\n[CHANGELOG](CHANGELOG.md)\n\n## Limitations\n\n- File auto-reloading is not supported for PDF files,\n  as PDF viewers are invoked in the background via shell.\n  It is possible to support this properly\n  in the ways listed below, but requires\n  a lot of engineering for potentially very little gain:\n\n    - Docfd waits for PDF viewer to terminate fully\n      before resuming, but this\n      prohibits viewing multiple search results\n      simultaneously in different PDF viewer instances.\n\n    - Docfd manages the launched PDF viewers completely,\n      but these viewers are closed when Docfd terminates.\n\n    - Docfd invokes the PDF viewers via shell\n      so they stay open when Docfd terminates.\n      Docfd instead periodically checks if they are still running\n      via the PDF viewers' process IDs,\n      but this requires handling forks.\n\n    - Outside of tracking whether the PDF viewer instances\n      interacting with the files are still running,\n      Docfd also needs to set up file update handling\n      either via `inotify` or via checking\n      file modification times periodically.\n\n## Acknowledgement\n\n- Big thanks to [@lunacookies](https://github.com/lunacookies) and\n  [@jthvai](https://github.com/jthvai) for the many UI/UX discussions and\n  suggestions\n- Demo gifs and some screenshots are made using [vhs](https://github.com/charmbracelet/vhs).\n- [ripgrep-all](https://github.com/phiresky/ripgrep-all) was used as reference\n  for text extraction software choices\n- [Marc Coquand](https://mccd.space) (author of\n  [Stitch](https://git.mccd.space/pub/stitch/)) for discussions and inspiration\n  of results narrowing functionality\n- Part of the search syntax was copied from [fzf](https://github.com/junegunn/fzf)\n- Command history editing workflow was inspired by Git interactive rebase workflow, e.g. `git rebase -i`\n- [PDF corpora](https://github.com/pdf-association/pdf-corpora) from PDF association was used to stress test performance\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrenldl%2Fdocfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrenldl%2Fdocfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrenldl%2Fdocfd/lists"}