Skip to content

Contributing

🎉 We are thrilled that you are interested in contributing to the ast-grep project! 🎉

Your help and support are very valuable for us. There are many ways you can help improve the project and make it more useful for everyone.

Let's see some of the things we can do together:

Spreading Your Words ❤️

We appreciate your kind words and support for the project. You can help us grow the ast-grep community and reach more potential users by spreading your kind words. Here are some of the things we can do:

  • Who is using ast-grep: Let us know who is using ast-grep by adding your name or organization to the users page on the documentation website. Feel free to add a logo or a testimonial if you like.

  • Tweet it!: Tweet about ast-grep using the hashtag #ast_grep. Share your feedback, your use cases, your tips and tricks, or your questions and suggestions with the ast-grep community on Twitter.

  • Sharing Podcast: Talk about ast-grep on podcasts or other audio platforms. Introduce ast-grep to new audiences, share your stories and insights, or invite other guests to discuss ast-grep with you.

  • Meetup: Attend meetups or events where you can talk about ast-grep. Meet other ast-grep users or developers, exchange ideas and experiences, learn from each other, or collaborate on projects.

Giving Feedback

We appreciate your feedback on the project. Whether you have a feature request, a bug report, or a general comment, we would love to hear from you. You can use the following channels to provide your feedback:

  • Feature Request: If you have an idea for a new feature or an enhancement for an existing feature, please create an issue on the main repo with the label enhancement. Please describe your idea with examples and explain why it would be useful for the project and the users.

  • Bug Report: If you encounter a bug or an error while using ast-grep, please create an issue on the main repo with the label bug. Please provide as much information as possible to help us reproduce and fix the bug, such as the version of ast-grep, the command or query you used, the expected and actual results, any error messages or screenshots, and preferably a playground link reproducing the issue.

Contributing Code

We welcome your code contributions to the project. Whether you want to fix a bug, implement a feature, improve the documentation, or add a new integration, we are grateful for your help. You can use the following repositories to contribute your code:

  • CLI Main Repo: The main repository for ast-grep command-line interface (CLI). It contains the core logic and functionality of ast-grep. For small features or typo fixes, you can fork this repository and submit pull requests with your changes. This guide may help you set up essential tools for development. For larger features or big changes, please make an issue for discussion before jumping into it.
  • Doc Website: This is the repository for the ast-grep documentation website. It contains the source files for generating the website using vitepress. You can fork this repository and submit pull requests with your changes.

  • CI/CD Integration: ast-grep has a repository for GitHub Action. It allows you to use ast-grep as part of your continuous integration and continuous delivery (CI/CD) workflows on GitHub. You can check this repository and suggest useful features missing now.

  • Editor Integration: These are the repositories for various editor integrations of ast-grep. They allow you to use ast-grep within your favorite editor, such as VS Code, Vim, or Neovim. Please follow the respective guides for each editor integration before submitting your pull requests.

Sharing Knowledge

We encourage you to share your knowledge and experience with ast-grep with others. You can help us spread the word about ast-grep and educate more people about its benefits and features. Here are some of the things we can do:

  • Write introductions to ast-grep: You can write blog posts, articles, or tutorials that introduce ast-grep to new users. You can explain what ast-grep is, how it works, what problems it solves, and how to install and use it. You can also share some examples of how you use ast-grep in your own projects or workflows.

  • Write ast-grep's tutorial: You can write more advanced tutorials that show how to use ast-grep for specific tasks or scenarios. You can demonstrate how to use ast-grep's features and options, how to write complex queries and transformations, how to integrate ast-grep with other tools or platforms, and how to optimize ast-grep's performance and efficiency.

  • Translate documentation: You can help us make ast-grep more accessible to users from different regions and languages by translating its documentation into other languages. Reach out @Shenqingchuan, translation team member of Rollup, Vite and ast-grep, for more ideas about translation!

  • Curate a rule collections: Using ast-grep as linter in your project can showcase the power and versatility of ast-grep! Linting open source projects shows how ast-grep can be used for various purposes and domains. ast-grep/eslint, for example, is a collection of eslint rule implemented in ast-grep YAML.

  • Sharing Rules: Sharing your rules on ast-grep's example catalog can inspire more people to harness the power of AST! Example catalog is a place where users can browse, search, and submit rules. You can use the template to add your example here.

Thank you for your interest in contributing to the ast-grep project. We are grateful for your help and support. We hope you enjoy using and improving ast-grep as much as we do. If you have any questions or issues, please feel free to contact us on GitHub or Discord. We look forward to hearing from you soon! 😊




You don’t have to contribute code

A common misconception about contributing to open source is that you need to contribute code. In fact, it’s often the other parts of a project that are most neglected or overlooked. You’ll do the project a huge favor by offering to pitch in with these types of contributions!

Made with ❤️ with Rust