synapse-ast

command
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Command synapse-ast parses a source tree with language-aware (tree-sitter) grammars and emits structural facts as JSON on stdout. Its first capability is accurate per-language function counts (`synapse-ast functions <dir>`). It isolates the CGO tree-sitter grammars into a standalone, sandboxable binary so the api server and CLI never import them and the UNTRUSTED target is parsed only inside the sandbox the ast adapter runs this binary under. Composition root only – the analysis lives in internal/infrastructure/tools/astwalk.

Exit codes: 0 = ok (JSON on stdout); 3 = the tree-sitter backend is not built in (CGO-free build), so the adapter treats the provider as unavailable rather than failed; 1 = a real error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL