← Back to Tools
Command Trimmer
Flatten multi-line shell snippets so they paste and run
Aggressiveness
How it works
This tool is inspired by Trimmy by Peter Steinberger and focuses on pasted shell snippets. It looks for command-like signals such as continuations, pipes, flags, prompts, and paths before collapsing line breaks.
- Optionally removes terminal box-drawing gutters like │.
- Optionally strips leading shell prompts such as $ and #.
- Repairs single wrapped URLs and quotes single paths with spaces.
- Scores the remaining text with low, normal, or high aggressiveness.
- Flattens only short command-shaped snippets and leaves lists or source code alone when possible.
Good for: README commands, multi-line kubectl or docker snippets, wrapped URLs, and terminal copies that include prompts or gutters.
Safety valves: skips very long copies, tries not to collapse markdown-style lists, and avoids flattening source code unless you switch to high mode.