Software Alternatives, Accelerators & Startups

ast-grep VS Sourcegraph

Compare ast-grep VS Sourcegraph and see what are their differences

ast-grep logo ast-grep

⚡A polyglot tool for code searching, linting, rewriting!

Sourcegraph logo Sourcegraph

Sourcegraph is a free, self-hosted code search and intelligence server that helps developers find, review, understand, and debug code. Use it with any Git code host for teams from 1 to 10,000+.
  • ast-grep Landing page
    Landing page //
    2023-05-10
  • Sourcegraph Landing page
    Landing page //
    2023-08-06

ast-grep features and specs

No features have been listed yet.

Sourcegraph features and specs

  • Code Search
    Sourcegraph offers powerful, fast, and precise code search across large codebases, which helps developers quickly find references, definitions, or implementations.
  • Cross-Repository Search
    Allows searching across multiple repositories within the same interface, enhancing discoverability and productivity.
  • Integrations
    Sourcegraph integrates with popular code hosting platforms like GitHub, GitLab, Bitbucket, and more, providing a seamless experience.
  • Code Intelligence
    Supports advanced code intelligence features like hover tooltips, go-to-definition, and find-references, making code navigation easier.
  • Extensibility
    Developers can extend Sourcegraph's functionality with custom extensions, adapting it to their specific needs.
  • Data Privacy
    Sourcegraph can be self-hosted, giving organizations control over their code and data privacy.
  • Multi-Language Support
    Supports a wide range of programming languages and continuously adds more, catering to diverse development environments.

Possible disadvantages of Sourcegraph

  • Complex Setup
    Setting up Sourcegraph, especially self-hosted versions, can be complicated and time-consuming, requiring a good understanding of DevOps practices.
  • Resource Intensive
    Sourcegraph can be resource-heavy, necessitating significant computational power and memory, especially for large codebases.
  • Cost
    While there is a free tier, advanced features and self-hosted options can be expensive for small teams or individual developers.
  • Learning Curve
    The myriad of features and customizations can result in a steep learning curve for new users, potentially slowing down initial adoption.
  • Limited Offline Support
    While Sourcegraph provides robust online features, its functionality is limited when offline, which can impact productivity in environments with restricted internet access.
  • Dependency on Code Hosts
    Sourcegraph's heavy reliance on integrations with external code hosting platforms can introduce friction if there are changes or issues with those services.

ast-grep videos

No ast-grep videos yet. You could help us improve this page by suggesting one.

Add video

Sourcegraph videos

Code review with IDE powers: Sourcegraph Chrome extension

More videos:

  • Review - Better code reviews on GitHub with the Sourcegraph browser extension
  • Review - Sourcegraph's new GitLab native integration

Category Popularity

0-100% (relative to ast-grep and Sourcegraph)
Productivity
100 100%
0% 0
Developer Tools
12 12%
88% 88
Git
0 0%
100% 100
Hiring And Recruitment
100 100%
0% 0

User comments

Share your experience with using ast-grep and Sourcegraph. For example, how are they different and which one is better?
Log in or Post with

Social recommendations and mentions

Based on our record, Sourcegraph should be more popular than ast-grep. It has been mentiond 33 times since March 2021. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

ast-grep mentions (17)

  • Developer Philosophy
    One useful tool beyond regular grep for counting the number of times a pattern appears is ast-grep [1], which allows for more sophisticated rules. [1] https://ast-grep.github.io/. - Source: Hacker News / 3 months ago
  • Using ast-grep with a vue project
    The amazing ast-grep tool does not support vue and scss by default but can be configured to do so. - Source: dev.to / 4 months ago
  • Mergiraf: a syntax-aware merge driver for Git
    Hi! ast-grep[1] author here. It is a tree-sitter based syntax tool to search tool. I wonder how you transition from tree-sitter to other builtin parsers? Tree-sitter gave a unified interface to all languages. Using language native parsers will require significant work for various FFI if I am not wrong. [1]: https://ast-grep.github.io/. - Source: Hacker News / 6 months ago
  • Refactoring Python with Tree-sitter and Jedi
    I’ve been looking at codemod tools recently, just as a way to extend my editing toolbox. I came across https://ast-grep.github.io/, which looks like it might address part of this problem. My initial test case was to locate all calls to a method where a specific argument was ‘true’, and it handled that well - that’s the kind of thing an IDE seems to struggle with. I’m not yet sure whether it could handle renaming a... - Source: Hacker News / 8 months ago
  • Greppability is an underrated code metric
    Astgrep is a very useful tool. https://ast-grep.github.io/ It's not as easy to use as grep but I think one can script it to be nearly so. It has huge power but without learning it all one can do searches that grep finds difficult. e.g. Finding all the locations where a method is called and showing the parameters even if they are on multiple lines. Ultragrep - I don't love this quite as much but it does have a way... - Source: Hacker News / 8 months ago
View more

Sourcegraph mentions (33)

  • Ask HN: Who is hiring? (April 2025)
    Sourcegraph | San Francisco / Remote | Full-Time | SWE, Database Platform Eng, Forward Deployed Eng, Solutions Eng, Dev Advocate (all roles write code) | https://sourcegraph.com Sourcegraph is how enterprises industrialize software development with AI. We accelerate and automate how software is built in the world's most important companies, including 7/10 top software companies by market cap and 4/6 top US banks.... - Source: Hacker News / about 1 month ago
  • Quickly build UI components with AI
    Cody by Sourcegraph can transform how you build UI components, from basic buttons to complex, dynamic systems. It handles the heavy lifting so you can focus on crafting good UI/UX designs. Whether you’re customising components or managing complex UI systems, Cody provides the tools to make the process faster and more efficient. - Source: dev.to / about 2 months ago
  • 22 Unique Developer Resources You Should Explore
    URL: https://sourcegraph.com What it does: A universal code search tool for navigating large codebases. Why it's great: Quickly locate what you need in vast repositories — ideal for collaboration! - Source: dev.to / 4 months ago
  • Copilot vs. Cody: All you need to know
    What is Sourcegraph Cody? Cody, introduced by Sourcegraph, is an AI-powered coding assistant designed to use advanced search and codebase context to help you understand, write, and fix code faster. Launched in 2023, Cody aims to provide deeper context and more accurate code suggestions, particularly for complex and large-scale projects. - Source: dev.to / 5 months ago
  • Ask HN: Is there a good reason many product docs and blogs lack homepage links?
    I've seem to come across this a lot. I'll be assessing some product or service and follow a link to the documentation page, only to find there is no obvious way to get back to the actual product page to check pricing, etc. The same thing when I end up on a product's blog. Here's an example: https://sourcegraph.com/docs Where's the link back to https://sourcegraph.com/ ? Is this intentional? - Source: Hacker News / 5 months ago
View more

What are some alternatives?

When comparing ast-grep and Sourcegraph, you can also consider the following products

bloop - Code-search engine for developers

OpenGrok - OpenGrok is a fast and usable source code search and cross reference engine.

Simplify Jobs - Simplify is a common application for jobs & internships. Autofill job applications anywhere on the web, get notified when new jobs open, & seamlessly track your applications.

Atlassian Fisheye - With FishEye you can search code, visualize and report on activity and find for commits, files, revisions, or teammates across SVN, Git, Mercurial, CVS and Perforce.

Productivity Power Tools - Extension for Visual Studio - A set of extensions to Visual Studio 2012 Professional (and above) which improves developer productivity.

GitHub - Originally founded as a project to simplify sharing code, GitHub has grown into an application used by over a million people to store over two million code repositories, making GitHub the largest code host in the world.