BSD Ports

textproc/ast-grep 0.45.3_1 DragonFly

CLI tool for code structural search, lint and rewriting

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
MIT
Categories
devel, textproc
Package size
5248.4 KiB, 51845.9 KiB installed

Description

ast-grep is an abstract syntax tree based tool to search code by pattern code. Think of it as your old-friend grep, but matching AST nodes instead of text. You can write patterns as if you are writing ordinary code. It will match all code that has the same syntactical structure. You can use $ sign + upper case letters as a wildcard, e.g. $MATCH, to match any single AST node. Think of it as regular expression dot ., except it is not textual.

In the other systems

The newest version among them is 0.51.2, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlytextproc/ast-grep0.45.3_1 behind since 2026-10-11none known-[email protected]-
FreeBSDtextproc/ast-grep0.51.2 newestnone known-[email protected]2026-11-12
NetBSDdevel/ast-grep by name0.45.3 behind since 2026-10-11none known-[email protected]2026-11-03
HardenedBSDtextproc/ast-grep0.51.0 behind since 2026-11-02no data-[email protected]-
GhostBSDtextproc/ast-grep0.51.0 behind since 2026-11-02no data-[email protected]-

Compare across BSDs

Version history 1

  1. 0.45.3

Upstream's version as each commit to the port's Makefile set it, or as this site first saw it in the system's packages; the tree's own revisions are not versions here.

Install

Binary package:

pkg install ast-grep

From DPorts:

cd /usr/dports/textproc/ast-grep && make install clean

Dependencies

No port depends on this one.