fmt
Reflow paragraphs to a target character width while preserving blank-line separated paragraph boundaries. Read-only, returns JSON or plain text.
Instructions
Reflow paragraphs to a target character width, preserving paragraph boundaries (blank-line separated). Read-only, no side effects. Returns JSON with reflowed text by default; use --raw for plain output. Use to reformat prose without breaking paragraph structure. Not for hard line wrapping — use 'fold' to break at exact character positions without paragraph awareness. See also 'fold'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| encoding | No | Text encoding. | utf-8 |
| max_lines | No | Maximum JSON lines to emit. | |
| paths | No | Files to format, or '-' for stdin. Defaults to stdin. | |
| raw | No | Write formatted text without a JSON envelope. | |
| width | No | Maximum output line width. |