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 agentsfetlar --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.
| Option | Meaning |
|---|---|
-t, --to | markdown (or md, the default), text (or txt), json, html, docx, xlsx. The last two write a Word or Excel file and need -o |
-o, --output | write to this file instead of the screen. With several inputs: the folder to write into, created if needed |
--md-tables | auto (default), pipe or html |
--normalize | none (default), llm or search |
--images | list embedded pictures as image blocks in JSON, with their part names |
--no-notes | leave out PowerPoint speaker notes |
--slide-numbers | include PowerPoint slide numbers |
--hidden | include hidden slides, sheets, rows, columns and Word hidden text |
--max-cells N | Excel: read at most N non-empty cells. Default 2,000,000 |
--timeout SECS | give up after this many seconds, exit code 75. No limit by default |
--compact | one-line JSON |
See Reading files, Many files at once and Output formats.
fetlar diff
fetlar diff [OPTIONS] <OLD> <NEW>| Option | Meaning |
|---|---|
-f, --format | text (default), markdown (or md), json |
--formatting | also report formatting-only changes |
--hidden | include what the author hid |
--timeout SECS | give up after this many seconds (exit code 2) |
--compact | one-line JSON |
--highlight-xlsx OUT.xlsx | write a copy of the NEW spreadsheet with changes marked |
--report OUT.docx | write 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.
| Option | Meaning |
|---|---|
-o, --output OUT | the output file. - writes to standard output |
--delimiter CHAR | CSV separator: one ASCII character, or tab |
--no-bom | CSV: no byte order mark |
--lf | CSV: end rows with LF instead of CRLF |
--encoding | CSV: utf-8 or utf-16le |
--guard-formulas | CSV: prefix ' to fields that start with =, +, -, @, tab or CR |
--shared-strings | XLSX: one shared string table |
--compression 0-9 | XLSX and DOCX: deflate level. Default 4 |
--large-file | XLSX and DOCX: allow a part over 4 GB (ZIP64) |
--safe | DOCX: 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]| Option | Meaning |
|---|---|
-o, --output OUT | the output file. - writes to standard output. With --each, the folder |
--each PATH | one file per item of the array at PATH |
--name PATTERN | with --each: file names, using {index} and {field}. Default {index} |
--missing | error (default), leave or empty |
--today DATE | the date {{@today}} stands for, YYYY-MM-DD |
--images DIR | allow pictures from files in this folder |
--no-data-uris | refuse pictures given as data: URIs |
--compression 0-9 | deflate level. Default 4 |
--timeout SECS | give up after this many seconds (exit code 75) |
--strip-external | remove or refuse references to anything outside the file |
--overwrite | with --each: replace files already in the folder |
--names | print 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).
| Command | Options |
|---|---|
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
fetlar search [OPTIONS] [QUERY]...| Option | Meaning |
|---|---|
--type TYPES | only these file types, for example docx,xlsx |
--limit N | most files to show. Default 20 |
--per-file N | most places to show per file. Default 3 |
--json | JSON for tools |
--save NAME | save this query (and --type) under NAME, then run it |
--saved NAME | run the search saved as NAME |
--list-saved | show the saved searches |
--delete-saved NAME | delete the search saved as NAME |
--index-dir DIR | where 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.