0.1.3 • Published 11 months ago

sg-gui v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

SG GUI

This repo is still in early days, but its goal is to provide a GUI on top of the amazing ast-grep.

Screenshot

It aims to expose as much of the sg scan functionality from AST-GREP as possible but display results in a beautiful web GUI that's easy to use and allow for easy experimentation with rewrites (that can be applied one "chunk" at a time).

Installation and Usage

SG GUI requires AST-GREP to be installed and accessible via sg. You can find installation instructions here, but if you're on a Mac and using homebrew it's as simple as:

brew install ast-grep

Then, assuming you have Node >= 18 installed, you can simply run:

npx sg-gui

from the root of the directory you want to scan. This will start a server on localhost:6169 that you can access in your browser. Use a --port flag to specify a different port, e.g. npx sg-gui --port 3333.

FUTURE IMPROVEMENTS

  • Character diffs, showing which characters in line changed. (E.g. whitespace changes sg seems to randomly pick up)
  • View full file diff – similar code diff logic, just grab whole file contents and do the diff.
  • Infer the language from glob
0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago