Skip to Content
Fetlar
Reference

CLI reference

Every Fetlar command and option.

fetlar [OPTIONS] <INPUT>...        read files
fetlar diff [OPTIONS] <OLD> <NEW>  compare two files
fetlar write [OPTIONS] -o OUT INPUT.json
fetlar fill [OPTIONS] TEMPLATE [DATA.json]
fetlar index <COMMAND>             keep files searchable
fetlar search [OPTIONS] [QUERY]...
fetlar mcp                         MCP server for AI agents

fetlar --version prints the version. fetlar --help and fetlar COMMAND --help print help.

To read a file that is named like a command (for example write), put -- first: fetlar -- write.

fetlar INPUT (read)

fetlar [OPTIONS] <INPUT>...

INPUT is a file, several files, or a folder. - reads standard input. With several inputs or a folder, -o is the output folder.

OptionMeaning
-t, --tomarkdown (or md, the default), text (or txt), json, html, docx, xlsx. The last two write a Word or Excel file and need -o
-o, --outputwrite to this file instead of the screen. With several inputs: the folder to write into, created if needed
--md-tablesauto (default), pipe or html
--normalizenone (default), llm or search
--imageslist embedded pictures as image blocks in JSON, with their part names
--no-notesleave out PowerPoint speaker notes
--slide-numbersinclude PowerPoint slide numbers
--hiddeninclude hidden slides, sheets, rows, columns and Word hidden text
--max-cells NExcel: read at most N non-empty cells. Default 2,000,000
--timeout SECSgive up after this many seconds, exit code 75. No limit by default
--compactone-line JSON

See Reading files, Many files at once and Output formats.

fetlar diff

fetlar diff [OPTIONS] <OLD> <NEW>
OptionMeaning
-f, --formattext (default), markdown (or md), json
--formattingalso report formatting-only changes
--hiddeninclude what the author hid
--timeout SECSgive up after this many seconds (exit code 2)
--compactone-line JSON
--highlight-xlsx OUT.xlsxwrite a copy of the NEW spreadsheet with changes marked
--report OUT.docxwrite the comparison as a Word report

Exit codes: 0 identical, 1 different, 2 error. See Comparing files.

fetlar write

fetlar write [OPTIONS] --output <OUT> <INPUT.json>

INPUT.json is a JSON file. - reads standard input.

OptionMeaning
-o, --output OUTthe output file. - writes to standard output
--delimiter CHARCSV separator: one ASCII character, or tab
--no-bomCSV: no byte order mark
--lfCSV: end rows with LF instead of CRLF
--encodingCSV: utf-8 or utf-16le
--guard-formulasCSV: prefix ' to fields that start with =, +, -, @, tab or CR
--shared-stringsXLSX: one shared string table
--compression 0-9XLSX and DOCX: deflate level. Default 4
--large-fileXLSX and DOCX: allow a part over 4 GB (ZIP64)
--safeDOCX: only safe fields and http, https and mailto links

Exit codes: 0, 2 bad command line, 3 a kind or feature not supported yet (including a key the writer does not know), 65 the input is not valid, 66 the input cannot be opened, 74 the output cannot be written. See Writing files.

fetlar fill

fetlar fill [OPTIONS] <TEMPLATE> [DATA.json]
OptionMeaning
-o, --output OUTthe output file. - writes to standard output. With --each, the folder
--each PATHone file per item of the array at PATH
--name PATTERNwith --each: file names, using {index} and {field}. Default {index}
--missingerror (default), leave or empty
--today DATEthe date {{@today}} stands for, YYYY-MM-DD
--images DIRallow pictures from files in this folder
--no-data-urisrefuse pictures given as data: URIs
--compression 0-9deflate level. Default 4
--timeout SECSgive up after this many seconds (exit code 75)
--strip-externalremove or refuse references to anything outside the file
--overwritewith --each: replace files already in the folder
--namesprint the names the template reads, and stop

Exit codes: 0, 2 bad command line, 3 the template uses something not supported (macros, Strict XML), 65 the template or data is not valid or a value is missing, 66 an input cannot be opened, 74 the output cannot be written, 75 over a safety limit or --timeout. See Templates.

fetlar index

fetlar index [--index-dir DIR] <COMMAND>

Every index command takes --index-dir DIR (default: your user data folder, or FETLAR_INDEX_DIR).

CommandOptions
add FOLDER--name NAME, --types T,..., --no-update, --hidden, --timeout SECS (default 120), --max-mb MB (default 200)
update [FOLDER]--json, --hidden, --timeout SECS, --max-mb MB
watch--wait SECS (default 2), --hidden, --timeout SECS, --max-mb MB
list--json
status--json
skipped--json
exclude [GLOB...]--remove, --folder FOLDER
remove FOLDER
forget [FOLDER]
rebuild--hidden, --timeout SECS, --max-mb MB
schedule on--at HH:MM (24-hour, default 02:30)
schedule off
schedule status--json
mcp-allow [PATH]--list, --remove PATH, --json

See Search.

fetlar search [OPTIONS] [QUERY]...
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 (and --type) under NAME, then run it
--saved NAMErun the search saved as NAME
--list-savedshow the saved searches
--delete-saved NAMEdelete the search saved as NAME
--index-dir DIRwhere the index is kept

All words must be in the same sheet, slide or section. "quotes" match a phrase. -word leaves a word out; put -- before a query that has one, for example fetlar search -- "net 30" -late. Options go before the --.

fetlar mcp

Runs the MCP server on standard input and output. It takes no options; it is configured with environment variables. See MCP server overview and Environment variables.

On this page