Text-Stream CLI
A high-speed CLI text pipeline that ingests raw input, calculates structural text metrics, normalizes whitespace formatting, and streams sanitized data directly back to the system clipboard.
THE PROBLEM
Dealing with messy, poorly formatted text (extra tabs, duplicate spaces, broken line breaks) requires manual cleanup. Developers and writers need a fast way to get structural metrics and sanitize strings instantly without leaving the terminal.
THE PRODUCT
Text-Stream CLI is a dependency-free Python tool that calculates structural text metrics (word count, reading time) and normalizes formatting, instantly copying the cleaned result to the Windows or macOS system clipboard.
ENGINEERING DECISIONS
- 01
Zero dependencies: built entirely with native Python core modules so no pip install is required
- 02
Auto-clipboard sync using native OS pipelines (clip on Windows, pbcopy on macOS) for immediate utility
- 03
Interactive multi-line terminal input via EOF signals (Ctrl+Z or Ctrl+D) for easy pasting
CHALLENGES
- ›
Handling multi-line input streams elegantly across different operating systems
- ›
Writing robust regex and parsing logic to handle all edge cases of messy whitespace
- ›
Interfacing natively with the clipboard without external libraries like pyperclip
RESULTS
- ✓
Available open-source on GitHub
- ✓
Instantly sanitizes large blocks of text
- ✓
Cross-platform support for Windows and macOS clipboards
WHAT I WOULD IMPROVE
- →
Add support for Linux xclip/xsel clipboards
- →
Implement markdown parsing to strip or convert formatting
- →
Add a file input flag to process entire text documents directly