Alternatives to sd

Replace text with a focused command-line tool. The listings below can replace it for an important use case. Each note says what changes if you switch.

The original

Replacements

Listings that take over the same core job as sd.

  • GNU sed

    The GNU stream editor for filtering and transforming text from files or pipelines.

    GNU sed is the standard stream editor on almost every Linux system and covers far more text transformations than sd, but its terse syntax takes longer to learn.

  • sad

    A command-line batch search and replace tool that shows a diff before changes are applied.

    sad adds a diff preview before changes and selective replacement through fzf, but it lists only macOS and Linux and needs fzf for interactive selection.

  • fastmod

    A fast command-line tool for interactive regex search and replace across a large codebase.

    fastmod focuses on interactive regex search and replace across a codebase with review of each change, rather than quick one-shot replacements.

  • Serpl

    A terminal interface for searching and replacing text across a whole project folder.

    Serpl moves replacement into a terminal interface with project-wide preview and case preservation, and requires ripgrep to be installed.

Similar software

Related functionality, not a direct replacement.