>_ DevTrendsen

Language

Home

Languages

Sections

Frontend Backend Mobile DevOps AI / ML GameDev Blockchain Embedded Security
Rust

Serpl — VS Code-like Search and Replace Right in the Terminal

Imagine this situation: you're working on a large project and need to rename a variable across dozens of files. Open each file in an editor? Use cumbersome sed scripts? Now there's an elegant solution — serpl.

What is Serpl?

Serpl is a terminal application written in Rust that brings the convenience of VS Code's search and replace right to your terminal. It's not just a grep/sed utility, but a full-featured TUI (Text User Interface) with interactive preview and flexible configuration.

Why try it?

  • Full-featured interface — not just console output, but convenient panel-based navigation
  • Handles large projects — integrated with ripgrep for fast searching
  • AST search — ast-grep support for precise syntax tree queries
  • Flexible configuration — supports JSON/TOML/YAML
  • Integration — works with Neovim and Helix

Install in a minute

For Rust users:

cargo install serpl

Or via package managers:

  • Homebrew: brew install serpl
  • Arch Linux: pacman -S serpl
  • NixOS: nix profile install nixpkgs#serpl

Key features

1. Interactive search with preview

Serpl shows search results in real time with match highlighting. You can navigate between files and view context without leaving the terminal.

2. Smart replace

Supports multiple replacement modes:

  • Simple replace
  • Preserve case
  • AST-based (via ast-grep)

3. Flexible search modes

  • Plain text
  • Case-sensitive
  • Whole word
  • Regular expressions
  • AST search (for programming languages)

4. Full integration with terminal editors

Neovim has a ready-to-use configuration:

return {
  "akinsho/toggleterm.nvim",
  cmd = { "ToggleTerm", "TermExec" },
  -- ... конфигурация ...
}

And for Helix, just add:

[keys.normal.ret]
t = [":write-all", ":insert-output serpl >/dev/tty", ":redraw", ":reload-all"]

When is it especially useful?

  1. Code refactoring — bulk renaming of variables/functions
  2. Migrations — API changes, dependency updates
  3. Working on remote servers — when there's no GUI but you need convenient search
  4. Quick code exploration — finding all function usages

Under the hood

  • Built with Rust for maximum performance
  • Uses ratatui.rs for the UI
  • Integrates with ripgrep and ast-grep
  • Supports configuration in 5 formats (JSON, JSON5, YAML, TOML, INI)

Serpl is more than just a replacement for grep/sed, but a serious tool for developers who work extensively in the terminal. If you:

  • Love CLI tools
  • Frequently work on remote servers
  • Value speed and convenience

then serpl definitely deserves a spot in your toolkit. The project is actively developed (700+ stars on GitHub) and welcomes contributors.

As a bonus — try the combination Ctrl+o for bulk replacement across all files. Time savings guaranteed!

Related projects