Skip to main content

Module cli

Module cli 

Source
Expand description

CLI: command → action → Out. Pages come from the cache, local files or the fetch router (fetch.rs); FATS_OFFLINE=1 keeps every command off the network.

Constants§

ASSET_MAX
Pictures fetched on demand (asset): plain only, never a paid tier; an image/* answer of at most ASSET_MAX bytes within ASSET_WAIT (fats config).
ASSET_WAIT
MAX_BYTES
Input cap per page, raised per command with max_bytes: up to the ceiling. Cleaning costs ~15× the input in memory (a 16 MB page peaked at 239 MB, a 53 MB one at 743 MB), so the default keeps a page near 250 MB (fats config shows both).
MAX_BYTES_CEIL
POLL
How often the waiting call reads the run file.
PREFETCH
How many results a search fetches detached (fetch:N).
WAIT
How long a command waits for the network before it answers (wait: 0–300): a fetch then says pending, a search, gh, account, setup give up the calls still running. 30 s: agents read pending as a failure (polled 1-2×, then quit); 14/27 walled runs ended within 30 s, 24/27 within it + one wait:30 poll.

Statics§

FENCE
Directories local files may come from. Unset in the shell (it reads what its user can); fats mcp sets the working directory + the cache, because there the model picks the path.

Functions§

fence
is_gh
fats gh <words>: a GitHub repository search (github), not a web search.
is_search
Free words (or site: alone) without a page id, a local file or a page URL: a web search (fats <words>, fats <host> <words>, fats site:x.com/news since:1d).
outside
Outside the fence by its name alone (.. folded, the disk never read), so under fats mcp no answer tells whether a path out there exists: /x/y words searches and /x/y is refused either way.
path_of
A route as dry:true prints it: plain → bd ∥ oxyjs after 5s, a tier’s second rung bd retry. A race (two providers’ renders) keeps the no-JS rung after plain only after its captcha: → oxy (after a captcha) (fetch::route simulates that wall, so the up to holds it).
plan
dry:true: what the command would read, add and spend; writes and spends nothing.
resume
fats --continue j5.u3: the detached half of a fetch. Runs the router for the run fetch reserved and stores the page in that id, whether or not the call that started it still waits. Exit code for main.
run
Run one invocation: (stdout text, exit code, the picture it asked for: fats mcp attaches it). Never panics on user input.
secret
A key or credential file by its bare name, in any directory: a Words::secret_names name (.env.* = a prefix) or a secret extension (Sites::doc_ext kind secret: .pem). Never read, stored or searched (fenced: secret_file; missing, no_file).
wait_of