map_files
Apply one instruction across many files with a local model, returning per-file reports or staged diffs that stay off disk until committed.
Instructions
Run one instruction over many files with the local model (batch job). output='report': get per-file results. output='stage_writes': the model rewrites each file and every change is staged as a diff for your review — NOTHING hits disk until you commit_write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | Yes | Glob pattern, e.g. 'src/**/*.test.ts' | |
| seed | No | Fixed seed for reproducible output. | |
| stop | No | Stop sequences. | |
| model | No | ||
| think | No | Chain-of-thought control (ollama `think`; best-effort on openai-compatible servers). think:false keeps the whole max_tokens budget for the answer. | |
| top_p | No | Nucleus sampling threshold. | |
| output | No | report | |
| num_ctx | No | ||
| options | No | Provider-native overrides merged into the request (ollama `options` keys like top_k/repeat_penalty; openai-compatible body fields). Wins over named params. | |
| provider | No | ||
| max_files | No | ||
| concurrency | No | Parallel local-LLM requests (default 2) | |
| instruction | Yes | Instruction applied to each file. For stage_writes the model must return the COMPLETE new file content. | |
| temperature | No |