tree-sitter-debugger

command module
v0.0.0-...-29153cf Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

README

Tree-Sitter Debugger

A debugging tool for tree-sitter grammars and queries.

Installation

go install github.com/meain/tree-sitter-debugger@latest

Or clone the repo and build it:

git clone https://github.com/meain/tree-sitter-debugger.git
cd tree-sitter-debugger
go build

Usage

Basic Usage
# Parse a file with a specific language
tree-sitter-debugger --lang <language> filename

# Parse stdin
tree-sitter-debugger --lang <language> < input.txt

# Run a specific query
tree-sitter-debugger --lang <language> --query <query> filename
Available Commands
  • List supported languages: tree-sitter-debugger --list-languages
  • Parse with language: tree-sitter-debugger --lang <language> [filename]
  • Run query: tree-sitter-debugger --lang <language> --query <query> [filename]

Examples

# List all supported languages
tree-sitter-debugger --list-languages

# Parse a Go file
tree-sitter-debugger --lang go main.go

# Parse a string
echo "package main" | tree-sitter-debugger --lang go

# Run a query on a file
tree-sitter-debugger --lang go --query "(package_clause (package_identifier) @package)" main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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