Skip to content

Supported Languages — 17 Languages via AST & Tree-sitter

vfs supports 17 languages using a combination of Go’s native AST parser, tree-sitter grammars, and line-based heuristics.

LanguageExtensionsParser
Go.gogo/ast
JavaScript.js, .mjs, .cjs, .jsxtree-sitter
TypeScript.ts, .mts, .cts, .tsxtree-sitter
Python.pytree-sitter
Rust.rstree-sitter
Java.javatree-sitter
C#.cstree-sitter
Dart.darttree-sitter
Kotlin.kt, .ktstree-sitter
Swift.swifttree-sitter
Ruby.rbtree-sitter
Solidity.soltree-sitter
HCL / Terraform.tf, .hcltree-sitter
DockerfileDockerfile, Dockerfile.*line-based
Protobuf.protoline-based
SQL.sqlline-based
YAML.yml, .yamlline-based

Go files are parsed using Go’s built-in go/ast package. This provides the most accurate extraction since it uses the same parser as the Go compiler.

JavaScript, TypeScript, Python, Rust, Java, C#, Dart, Kotlin, Swift, Ruby, Solidity, and HCL / Terraform are parsed using tree-sitter grammars. Tree-sitter produces concrete syntax trees that vfs traverses to extract exported declarations.

Dockerfiles, Protobuf, SQL, and YAML use pattern-based heuristics. These formats have simple enough structure that AST parsing is unnecessary.

vfs extracts exported signatures — the public API surface of your code:

  • Functions and methods (exported/public)
  • Classes and interfaces
  • Type declarations (structs, enums, type aliases)
  • Constants and variables (exported)

Function bodies, imports, and comments are stripped from the output.

For languages not in the table above, use grep or rg directly. You can check at any time with:

Terminal window
vfs mcp
# Then call the list_languages MCP tool