Skip to content
Glossary

Tree-sitter / AST

An AST is the parsed structure of source code; tree-sitter is the open-source parser library Graphify runs entirely locally to extract it.

Graphify glossary

An AST (abstract syntax tree) is the parsed structure of source code: not the characters, but the grammar behind them. Where text sees 'processPayment(order)' as a string, the AST sees a call expression with a callee and an argument. Tree-sitter is an open-source parser library that produces these trees fast and reliably; it was built for text editors, which is why it's quick enough to run constantly and forgiving enough to handle code that doesn't fully compile.

The open-source Graphify CLI supports about 40 languages, mostly with tree-sitter, and runs that parsing entirely on your machine. Hosted Graphify lists 63 grammars. Most CLI grammars ship with the package; some, such as SQL and Terraform, are optional extras. Code edges come from walking these ASTs: real parsing, not model output. A relationship written in the source is tagged EXTRACTED; when Graphify has to resolve the target itself, for example a call that no import proves, the edge is tagged INFERRED with a confidence score. This is the deterministic backbone of the graph. A model is only used for docs, PDFs, images and media, in an optional pass.

Local parsing is also a privacy property, not just an engineering choice. Because the AST work happens on-device, Graphify can map your entire codebase without a single API call to read your code. Your source never leaves your machine unless you explicitly point Graphify at a hosted model for the non-code inference step, and even then you choose the provider, or run Ollama and keep everything local. There's no telemetry in either case.

Related terms

  • Code graph: A knowledge graph built from a codebase: functions, classes, config, and docs become nodes; calls, imports, and references become edges.
  • Confidence tags: Graphify's provenance labels (EXTRACTED, INFERRED, AMBIGUOUS) attached to every edge, so you always know what was read from the source and what was worked out.
  • Node: A single entity in the graph (a function, class, file, table, or doc page) carrying attributes like name, path, and kind.

Go deeper

From the blog

← All glossary terms

Try Graphify now.

Try for free