Skip to content
Glossary

Tree-sitter / AST

Graphify glossary

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

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 robustly; 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.

Graphify bundles tree-sitter grammars for 36 languages and runs them entirely on your machine. Every call, import, and definition edge in the graph comes from walking these ASTs — real parsing, not pattern matching and not model output. That's why those edges are tagged EXTRACTED: the parser either found the call or it didn't. This is the deterministic backbone of the graph; models are only involved for non-code sources like docs, SQL, and Terraform, and their contributions are tagged INFERRED so you can always tell the two apart.

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 graphA knowledge graph built from a codebase: functions, classes, config, and docs become nodes; calls, imports, and references become edges.
  • Confidence tagsGraphify's provenance labels — EXTRACTED, INFERRED, AMBIGUOUS — attached to every edge so you always know what was found versus what was guessed.
  • NodeA single entity in the graph — a function, class, file, table, or doc page — carrying attributes like name, path, and kind.

Go deeper

← All glossary terms