Code search.

Search and replace source code with structured queries. Fast, reliable and free of AST magic.


syng inside VS Code

Right in your favorite IDE.
Power at your fingertips.

A powerful command-line interface,
ready to integrate with your favorite tooling.
Windows, Mac and Linux.

syng on the command-line

A private web sandbox.
Load code from disk – no upload required.
Great for learning.

Express with precision

Describe exactly what you’re looking for and receive far less noise and fewer false positives.

Investigate with confidence

Miss less in your search and stop worrying about a quote, a newline, a comment, or some syntactic element you don’t care about.

Save time and energy

Because searching with SYNG yields finer results, you get to focus on exactly what you’re looking for.

Modernize your Toolkit

Incorporate more parameters in your search to access more parts of your program — easily and reliably.

ParameterText-based Search (e.g. grep)Structure-based Search (e.g. syng)
TextYes, subject to the way the text is formatted (e.g. quotes, newlines, etc.)Yes, and unhindered by formatting
Type (of statement)NoYes, e.g. a function declaration will not be confused with a variable declaration
Value (of expression)NoYes, e.g. a value of a string literal will not be confused with that same string in a function’s name
PositionMaybe – it depends on the format, the position you’re after, and how good your regular expression isYes, e.g. the argument a function was called with can be targeted based on its position
HierarchyMaybe, see aboveYes, an object nested inside another can be targeted explicitly and with no ambiguity
Lexical scopeNoYes, the scope in which a declaration is made is targetable and can be used, for example, to find statements made in the global module’s scope
Indirection (e.g. references)NoMaybe – unless the indirection crosses file boundaries or requires evaluation to recognize, SYNG can follow references to a value

Gain an Edge

Easier Refactoring

Wondering whether a function signature can be safely changed, or just how much work it would take to rename that particular data model? Make daily decisions faster and better with SYNG.

Accessible Analysis

Wondering what kind of arguments a function is ever called with? You don’t need to be an expert in compilers and ASTs – or a wizard – to find out.

Better Discovery

Explore a new codebase, or perhaps darker areas of an old one, with free-form “span” queries. All you need is a word or term to start with, and SYNG will start your discovery trail.

Built for Power

A plethora of features for near-maximum control.
By programmers for programmers.

Extensive Language Support

Match most JavaScript statements, from variable declarations to function calls and JSX attributes.

Simple Query Language

Learn a minimal syntax and gain access to dozens of selectors and operators – functions that match the syntactic elements of the language and control the scanner:

(id) (str) (num) (bool) (regex) (null) (fun) (var) (call) (mem) (arr) (el) (obj) (prop) (jsx) (attr) (child) (:and) (:or) (:not) (:into) (:ref) (:at) (:under)

Combine those functions and many more to form elaborate queries.

Stable, Clear API

If you’re used to writing your own AST programs, you no longer have to consult dry manuals or worry about missing part of the spec.

Selection Refinement

Display precise portions of matching statements, like the value of a JSX element attribute, or the first argument to a function call.

Selection Confinement

Find statements at or under a specific lexical scope, like the global module’s.

Value Dereferencing

Follow a literal value through any of its bindings. If you’re looking for the number 4, and somewhere declares that `let x = 4`, SYNG will show you both `4` and `x`.

Pattern Matching

Use regular expressions to match wider sets of values. Ideal for when your target is not clear or difficult to enumerate.

Free-Form Selection

Search literal source code for a word or pattern. Unlike a text-based search, formatting and insignificant tokens (e.g. comments) are disregarded. Can be used as a last resort for when your target is unknown.

Super-type Selection

Search for values that may appear across different types, like a word in String or Template literals, or an object property of a certain name.


Form unions, intersections and negations of selectors to describe your target with the utmost precision.

ES Module Selection

Follow imported identifiers to find their use in other statements, like a function call.


SYNG is fast. It’s written in Rust and uses a highly-tuned algorithm. On a modern MacBook, it can scan a mixture of JavaScript and TypeScript files at a rate of 3000 files or 200,000 LOC per second.