Story

Show HN: SmartClip – fix multi-line shell commands before they hit your terminal

akshaydeshraj Thursday, March 12, 2026

I kept copying multi-line commands from ChatGPT/Claude/READMEs and getting `command not found` errors when pasting into my terminal. Bracketed paste mode doesn't help — it prevents line-by-line execution, but the content itself still arrives broken (stray `$` prompts, split continuations, operators across lines).

SmartClip hooks into your shell's paste widget (zsh, bash, fish) and silently fixes multi-line commands before the shell sees them. You paste with Cmd+V as usual — no new keybindings, no daemon, no background process.

It uses score-based heuristics to detect shell commands (so it won't mangle your JSON or prose), joins lines intelligently (backslash continuations, pipes, `&&`), strips prompt characters, and validates everything with `bash -n` before inserting. If it's not confident or the fix has invalid syntax, it passes through unchanged.

~150 lines of bash. Zero dependencies.

`brew install akshaydeshraj/smartclip` or `npm install -g smartclip-cli`

Summary
SmartClip is an open-source AI-powered video indexing and enhancement tool that can automatically generate intelligent video summaries, extract key information, and enable advanced search and navigation capabilities within video content.
2 0
Summary
github.com
Visit article Read on Hacker News