command `sg` is in the process of deprecation

Author: bodograumannCreated Sep 23, 2022Updated Aug 20, 2026

command sg is in the process of deprecation

sg is causing more issues. And the deprecation process has been started.


Orignal Issue

The cli command name sg is already taken by a shadow tools command

NAME sg - execute command as different group ID

Cf. https://github.com/shadow-maint/shadow

It is installed by default in /usr/bin/sg at least on arch-linux.

Weirdly npm install -g @ast-grep/cli didn’t even install the cli in ~/.local/bin for me (I have prefix=~/.local configured for npm). Maybe that is also due to the name collision.

I actually like the pattern of .g for grep commands. Pitty that ag is already taken. How about cg for code-grep?