Skip to content

Commit 7295c3f

Browse files
doc: add a new blog
1 parent ccfda8a commit 7295c3f

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

website/blog/stars-3000.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
author:
3+
- name: Herrington Darkholme
4+
sidebar: false
5+
search: false
6+
date: 2023-11-02
7+
head:
8+
- - meta
9+
- property: og:type
10+
content: website
11+
- - meta
12+
- property: og:title
13+
content: ast-grep got 3000 stars!
14+
- - meta
15+
- property: og:url
16+
content: https://ast-grep.github.io/blog/typed-napi.html
17+
- - meta
18+
- property: og:description
19+
content: ast-grep has recently reached 3000 stars on GitHub! This is a remarkable achievement for the project and I am deeply grateful for all the support and feedback that I have received from the open source community.
20+
---
21+
22+
# ast-grep got 3000 stars!
23+
24+
![3000 stars](/image/blog/star3k.png)
25+
26+
I am very excited and thankful to share with you that ast-grep, a code search and transformation tool that I have been working on for the past year, has recently reached 3000 stars on GitHub! This is a remarkable achievement for the project and I am deeply grateful for all the support and feedback that I have received from the open source community.
27+
28+
## What is ast-grep?
29+
30+
[ast-grep](https://ast-grep.github.io) is a tool that allows you to search and transform code using abstract syntax trees (ASTs). ASTs are tree-like representations of the structure and meaning of source code. By using ASTs, ast-grep can perform more accurate and powerful operations than regular expressions or plain text search.
31+
32+
ast-grep supports multiple programming languages, such as JavaScript, [TypeScript](/catalog/typescript/), Python, [Ruby](/catalog/ruby/), Java, C#, [Rust](/catalog/rust/), and more. You can write [patterns](/guide/pattern-syntax.html) and rules in [YAML](/guide/rule-config/atomic-rule.html) format to specify what you want to match and how you want to transform it. You can also use the command-line interface (CLI) or the web-based [playground](/playground.html) to run ast-grep on your code.
33+
34+
## Why use ast-grep?
35+
36+
ast-grep can help you with many tasks that involve code search and transformation, such as:
37+
38+
* Finding and fixing bugs, vulnerabilities, or code smells
39+
* Refactoring or migrating code to a new syntax or framework
40+
* Enforcing or checking coding standards or best practices
41+
* Analyzing various code using a uniform interface
42+
43+
> ast-grep can save you time and effort by automating repetitive or tedious tasks that would otherwise require manual editing or complex scripting.
44+
45+
## What’s new in ast-grep?
46+
47+
ast-grep is constantly evolving and improving thanks to the feedback and contributions from the users and sponsors. Here are some of the recent changes and updates of ast-grep:
48+
49+
* ast-grep’s YAML rule now has a new `transform` rule: `conversion`, which can change matches to different cases, such as upper, lower, or camelcase.
50+
* ast-grep’s diff/rewriting now can fix multiple rules at once. See [commit](https://github.com/ast-grep/ast-grep/commit/2b301116996b7b010ed271672d35a3529fb36e56)
51+
* `sg test -f`now accepts regex to selectively run ast-grep’s test case.
52+
* `sg --json` supports multiple formats that powers [telescope-sg](https://github.com/Marskey/telescope-sg), a neovim plugin that integrates ast-grep with telescope.
53+
* ast-grep now prints matches with context like `grep -A -B -C`. See [issue](https://github.com/ast-grep/ast-grep/issues/464)
54+
* JSON schema is added for better YAML rule editing. See [folder](https://github.com/ast-grep/ast-grep/tree/main/schemas)
55+
* ast-grep now has official github action setup! See [action](https://github.com/ast-grep/action)
56+
* New documentation for [rewriting code](/guide/rewrite-code.html), [example catalogs](/catalog/), and [playground](/reference/playground.html).
57+
58+
## What’s next for ast-grep?
59+
60+
ast-grep has many plans and goals for the future to make it more useful and user-friendly. Here are some of the upcoming features and enhancements of ast-grep:
61+
62+
* Add python api support to allow users to write custom scripts using ast-grep. See [issue](https://github.com/ast-grep/ast-grep/issues/389)
63+
* Support global language config to let users specify default options for each language. See [issue](https://github.com/ast-grep/ast-grep/issues/658)
64+
* Improve napi documentation to help users understand how to use the native node module of ast-grep. See [issue](https://github.com/ast-grep/ast-grep/issues/682)
65+
* Add metavar filter to make sg run more powerful by allowing users to filter matches based on metavariable values. See [issue](https://github.com/ast-grep/ast-grep/issues/379)
66+
* Add ast-grep’s pattern/rule tutorial to teach users how to write effective and efficient patterns and rules for ast-grep. See [issue](https://github.com/ast-grep/ast-grep.github.io/issues/154)
67+
* Add examples to ast-grep’s reference page to illustrate the usage and functionality of each option and feature. See [issue](https://github.com/ast-grep/ast-grep.github.io/issues/266)
68+
69+
## How to get involved?
70+
71+
If you are interested in ast-grep and want to try it out, you can install it from [npm](https://www.npmjs.com/package/@ast-grep/cli) or [GitHub](https://github.com/ast-grep/ast-grep). You can also visit the [website](https://ast-grep.github.io/) to learn more about the features, documentation, and examples of ast-grep.
72+
73+
If you want to contribute to the code or documentation of ast-grep, we have prepared a thorough [contribution guide](/contributing/how-to.html) for you! You can also report issues, suggest features, or ask questions on the issue tracker.
74+
75+
## Thank you!
76+
77+
I hope you are as enthusiastic as I am about the progress and future of ast-grep. I sincerely value your feedback, suggestions, and contributions. Please do not hesitate to contact me if you have any questions or comments.
78+
79+
Thank you for your wonderful support. You are making a difference in the open source community and in the lives of many developers who use ast-grep.

website/public/image/blog/star3k.png

213 KB
Loading

0 commit comments

Comments
 (0)