# Parse

> Parse SQL and inspect the AST using syntaqlite. Use when the user wants to see the parse tree, debug SQL syntax, or understand how a query is structured.

- Skill: `lalitmaganti/parse` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lalitmaganti/parse`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lalitmaganti/parse/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: lalitmaganti (https://skillmd.com/u/lalitmaganti)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lalitmaganti/parse

---


# Parse SQL

Parse SQLite SQL and display the abstract syntax tree (AST) using the syntaqlite CLI.

## Usage

```bash
# Print AST from a file
syntaqlite parse query.sql

# Print AST from stdin
echo "SELECT 1 + 2 FROM t" | syntaqlite parse

# Parse an inline expression
syntaqlite parse -e "SELECT 1"

# Output as JSON
syntaqlite parse -o json query.sql
```

## Options

- `-e, --expression <SQL>`: parse an inline SQL expression instead of files
- `-o, --output <FORMAT>`: output format (default: text)

## Output modes

- `text`: Human-readable indented AST tree (default)
- `json`: Machine-readable JSON AST

## Notes

- Use the default `text` output for quick inspection and `json` for programmatic use.

