Command-line tool
sd
brew/sd
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Intuitive find & replace CLI rust cli terminal command-line regex sd text-processing
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id chmln.sd -e scoop install sd cargo install sd
macOS
brew install sd cargo install sd
Linux
brew install sd cargo install sd
Trim some whitespace using a `regex` (output stream: `stdout`)
echo 'lorem ipsum 23 ' | sd '\s+$' ''
Replace words using capture groups (output stream: `stdout`)
echo 'cargo +nightly watch' | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'
Find and replace in a specific file (output stream: `stdout`)
sd -p 'window.fetch' 'fetch' path/to/file.js
Browse
Related command-line tools
- micro
Modern and intuitive terminal-based text editor cross-platform cli text-editor open-source command-line terminal-app… - grex
Command-line tool for generating regular expressions - fastmod
Fast, partial replacement for codemod (find/replace tool for programmers) - aki-gsub
substitude text command, replace via regex. - lazygit
Simple terminal UI for git commands cross-platform cli git open-source git-client terminal-app - logkitty
Display pretty Android and iOS logs without Android Studio or Console.app, with intuitive Command Line Interface.… - ansi-escape-sequences
High-performance Rust library for detecting, matching, and processing ANSI escape sequences in terminal text with… - repgrep
An interactive replacer for ripgrep that makes it easy to find and replace across files on the command line.
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents