sad
command-line search and replace with a diff preview before writing changes
sad is a command-line tool for finding and replacing text across files, in the spirit of sed. It is aimed at developers and people who work in a terminal and want to make bulk edits to code or config files without writing a script.
The tool shows the proposed changes as a diff so they can be reviewed before anything is written. It works with fzf for picking which hunks to apply. It is written in Rust, distributed under the MIT license, and the source code is public on GitHub.
Alternatives to sad
Products that do a similar job in Developer Tools.
Windows Terminal
Command-line terminal app and console host for Windows
fzf
Command-line fuzzy finder for lists of files, history and any text
lazygit
Terminal UI for running git commands with keyboard shortcuts
Alacritty
GPU-accelerated terminal emulator for Linux, macOS, Windows and BSD
bat
command-line file viewer with syntax highlighting and git integration
GitHub CLI
Command line tool for working with GitHub from the terminal
delta
syntax-highlighting pager for git, diff, blame and grep output
Termux
Terminal emulator for Android with installable packages