Are these alternatives to semgrep?
At work, we use it for enforcing a bunch of custom lint rules configured as a yaml file committed directly to our repo, entirely cloud-free.
(I may be overreading your comment as suggesting that these were reasons to use ast-grep over semgrep.)
I have used `ast-grep` to devise my own linters with crushing success.