Skip to Content
Fetlar
Using Fetlar

Search

Index a folder once, then find any word, number or phrase across all your Word, Excel, PowerPoint, CSV and HTML files. Offline, with Arabic spelling handled.

fetlar index keeps a local full-text index of your files. fetlar search finds every word in them in an instant. It works offline and nothing leaves your computer.

fetlar index add ~/Documents/Contracts --name contracts
fetlar search "مدة العقد"
fetlar search payment --type docx,xlsx --limit 10
fetlar search احمد --json

Fetlar reads the files exactly as fetlar FILE does. Hidden sheets, slides, rows and text are not indexed unless you ask.

Results

/Users/me/Documents/Contracts/contract-v1.docx
  docx · 5.7 KB · modified 2026-11-29
    4.2 Payment terms: 4.2 «Payment» terms

Each result names the place that matched:

  • Word and HTML: the nearest heading (4.2 Payment terms),
  • Excel: the sheet and the cell,
  • PowerPoint: the slide (Slide 3: Plan).

The matching words are marked with «», or in bold on a terminal.

A search for rent in a workbook:

/Users/me/Documents/Contracts/budget-v1.xlsx
  xlsx · 3.2 KB · modified 2026-11-29
    Sheet: Budget 2027 ['Budget 2027'!A3]: «Rent» | 125,000.00

The cell address, 'Budget 2027'!A3, says where the match is. If other cells on the same sheet match too, the line says how many.

Search syntax

  • Several words must all be in the same section, sheet or slide.
  • "quotes" match a phrase.
  • -word leaves a word out.
fetlar search payment termination
fetlar search -- "net 30" -late

Put -- before a query that has a -word in it. Otherwise the command line reads -late as an option and stops with an error. Options such as --type and --limit go before the --.

Arabic

The same analysis runs when indexing and when searching, so you do not have to type a word the way it was written.

You typeIt finds
احمدأحمد (the alef variants أ إ آ ٱ are one letter)
مدةمدّة and مدة (diacritics, tatweel, ة and ه, ى and ي are folded)
٦٠ or ۶۰60
المدةمدة
ومدةمدة (a search word starting with و ب ل ك ف is also tried without it)
fetlar search احمد
/Users/me/Documents/Contracts/supply-ar.docx
  docx · 4.9 KB · modified 2026-11-29
    4.2 مدّة العقد: مدّة العقد ٦٠ يوماً من تاريخ التوقيع. «أحمد» هو المسؤول.

Stemming is cautious on purpose. The article (ال وال بال كال فال لل) is cut only when written with a bare ا, and at least three letters must remain. The endings ان ين ون ات are cut only when at least four letters remain. So لبنان, تأمين, السودان and تمرين stay apart from لبن, تام, سود and تمر.

Fetlar indexes both the exact and the stemmed spelling, and the exact one ranks higher. Numbers keep their separators: 12.500, 1,200 (which also matches 1200), ٣٠٫٥ and 2026-11-27. Latin text is lowercased. Results show the file's own spelling.

Managing the index

CommandWhat it does
fetlar index add FOLDER [--name N] [--types T,...] [--no-update]Add a folder and index it
fetlar index update [FOLDER]Read new and changed files, forget deleted ones
fetlar index watch [--wait SECS]Stay running and update a moment after files change. Ctrl-C stops
fetlar index listThe folders being indexed
fetlar index statusFiles searchable and skipped, last update, size and location
fetlar index skippedFiles that could not be indexed, and why
fetlar index exclude GLOB...Leave files out. --remove takes them back. --folder limits to one folder. With no glob, it lists the rules
fetlar index remove FOLDERStop indexing a folder. The files themselves are never touched
fetlar index forget [FOLDER]Delete everything in the index, or one folder's entries. The folder list stays
fetlar index rebuildStart again from nothing
fetlar index schedule on --at HH:MMUpdate every night
fetlar index schedule offStop the nightly update
fetlar index schedule statusWhether it is on, and when it runs
fetlar index mcp-allow FOLDERLet AI tools add folders inside this one. --list, --remove PATH

update, add and rebuild take --hidden, --timeout SECS (per file, default 120) and --max-mb MB (default 200). update, list, status and skipped also take --json.

Example output:

$ fetlar index add docs --name contracts
Added contracts (/Users/me/docs)
4 new, 0 changed, 0 removed, 0 unchanged, 0 skipped (0.2 s)

$ fetlar index status
Index: /Users/me/Library/Application Support/Fetlar/index
4 files searchable in 7 places, 0 skipped, 18.2 KB on disk
Last update: 2026-11-29 02:06 UTC
  contracts  /Users/me/docs  (all types; 4 files, 0 skipped)

Keeping it current

Three ways, and you can combine them:

  • Run fetlar index update by hand. Unchanged files are not read again.
  • Run fetlar index watch. Saves, copies, renames and deletes are noticed, and the index updates after a quiet moment (2 seconds by default, --wait changes it).
  • Turn on a nightly update: fetlar index schedule on --at 02:30. It is off by default. It installs one task for your user only: launchd on macOS, Task Scheduler on Windows, or a systemd user timer on Linux.

Files that cannot be read

A damaged, password-protected or oversized file goes to the skipped list and never stops the run. fetlar index skipped gives the reason: password-protected, damaged, too large, timed out, unsupported or unreadable. Files that were too large or timed out are tried again when you raise the limit.

A folder that cannot be found (a disconnected drive) keeps its files in the index.

What is left out

Built in: ~$* lock files, .git, .svn, .hg, node_modules, *.tmp, .DS_Store, Thumbs.db, .Trash and $RECYCLE.BIN. Add your own:

fetlar index exclude "*.bak" Archive/2019

A glob matches a file or folder name, or a path inside the folder. * does not cross /.

Saved searches

fetlar search --save pay payment      # keep a search, then run it
fetlar search --saved pay             # run it again
fetlar search --list-saved
fetlar search --delete-saved pay

--save keeps the query with its --type. Saving again under the same name replaces it.

Where the index lives

SystemFolder
macOS~/Library/Application Support/Fetlar/index
Linux$XDG_DATA_HOME/fetlar/index, by default ~/.local/share/fetlar/index
Windows%LOCALAPPDATA%\Fetlar\index

Choose another place with --index-dir DIR or the FETLAR_INDEX_DIR variable.

The folder is readable by you only. It holds the search index, a catalog of each file's time, size and content hash (so updates are incremental), a .fetlar-index marker, and fetlar-index.toml, which lists the folders, types and exclusions and which you may edit by hand.

The index holds your text

The index stores the text of your files. Treat its folder like the files themselves.

Fetlar never changes or empties a folder that does not carry its marker. It refuses a non-empty one. An index made by a newer Fetlar is refused and left alone. An older one is rebuilt when you update it.

JSON for scripts

--json gives files, places, snippets and highlight ranges. Every --json output is stable for scripts.

fetlar search rent --json
{
  "query": "rent",
  "files": [
    {
      "path": "/Users/me/docs/budget-v1.xlsx",
      "kind": "xlsx",
      "folder": "contracts",
      "hits": [
        {
          "location": "Sheet: Budget 2027",
          "snippet": "Rent | 125,000.00",
          "highlights": [[0, 4]]
        }
      ]
    }
  ]
}

(Shortened. A real result has more fields, such as modified_ms, size and score.)

OptionMeaning
--type TYPESonly these file types, for example docx,xlsx
--limit Nmost files to show (default 20)
--per-file Nmost places to show per file (default 3)
--jsonJSON for tools
--save NAMEsave this query under NAME, then run it
--saved NAMErun a saved search
--list-savedshow saved searches
--delete-saved NAMEdelete a saved search
--index-dir DIRwhere the index is kept

From an AI assistant

search_office_files, index_status and index_add_folder give assistants the same search. An assistant can add a folder only inside one you allowed with fetlar index mcp-allow. See MCP tools.

On this page