amber, a code search & replace tool

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ast-grep

    ⚡A CLI tool for code structural search, lint and rewriting. Written in Rust

    ast-grep is based on tree-sitter parsers and most of the time is spent on parsing.

    There is some optimization to [skip parsing](https://github.com/ast-grep/ast-grep/blob/9f8ed5fb2abf35d928...) but generally I don't expect ast-grep can beat ripgrep or amber. (but sometimes ast-grep can beat grep due to parallel processing)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • amber

    A code search / replace tool (by dalance)

  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • goreplace

    command line tool for search and replace

    I used to use https://comby.dev/ but I kept having issues where it wouldn't accept my input or it'd error during processing. It was very flakey. So I've resorted to using https://github.com/piranha/goreplace as backup which is much simpler but reliable.

    I'll check this one out...

  • sd

    Intuitive find & replace CLI (sed alternative)

    Feels similar to `sd` (https://github.com/chmln/sd)

    which in my mind was the first “replace” version of ripgrep

    grep -> ripgrep

  • srgn

    A grep-like tool which understands source code syntax and allows for manipulation in addition to search

    The tool you are describing is what I am trying to build at https://github.com/alexpovel/srgn . The idea is a compromise between regex (think ripgrep) and grammar awareness (through tree-sitter).

  • agr

    ag + sed

    this is cool! i do the same thing[1], wanted ag/rg to be able to search and replace.

    1. https://github.com/nathants/agr

  • gritql

    GritQL is a query language for searching, linting, and modifying code.

    Yeah it doesn't look like this is AST-aware at all.

    If you want to do queries that understand the grammar, https://github.com/getgrit/gritql is closer to what you're looking for.

    Ex. here's how you would search for your example of looking for a string unless it's inside a string constant. [0]

    grit apply '"this_string" => `new_string` where { $match <: not within string() }'

    [0] https://app.grit.io/studio?key=v8iA8zIbHs2uCykNpSF_G

  • amber

    💎 Amber the programming language compiled to Bash

    Not to be confused with this Amber

    https://amber-lang.com/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Search Multi-language Documents in ast-grep

    7 projects | dev.to | 23 Jul 2024
  • Ugrep – a more powerful, ultra fast, user-friendly, compatible grep

    27 projects | news.ycombinator.com | 30 Dec 2023
  • Potencializando Sua Experiência no Linux: Conheça as Ferramentas em Rust para um Desenvolvimento Eficiente

    5 projects | dev.to | 12 Dec 2023
  • Ripgrep 14 Released

    10 projects | news.ycombinator.com | 26 Nov 2023
  • fd - A simple, fast and user-friendly alternative to 'find'

    2 projects | news.ycombinator.com | 24 Sep 2024