CLI Overview
The Beacon CLI provides command-line tools for parsing, type checking, and analyzing Python code using Hindley-Milner type inference.
Available Commands
Core Commands
parse- Parse Python files and display the ASThighlight- Syntax highlighting with optional colorscheck- Validate Python syntax for parse errorsresolve- Analyze name resolution and display symbol tablesformat- Run the Beacon formatter without starting the language server
Static Analysis
analyze- Run static analysis on Python code (linting and data flow)lint- Run linter on Python code
Type Checking
typecheck- Perform Hindley-Milner type inference and report type errors
Language Server
lsp- Start the Beacon Language Server Protocol server
Debug Tools (Debug Builds Only)
debug tree- Display tree-sitter CST structuredebug ast- Show AST with inferred typesdebug constraints- Display generated type constraintsdebug unify- Show unification trace
Installation
Build from source:
cargo build --release
The binary will be available at target/release/beacon-cli.
Basic Usage
All commands accept either a file path or read from stdin:
# From file
beacon-cli typecheck example.py
# From stdin
cat example.py | beacon-cli typecheck
Getting Help
For detailed help on any command:
beacon-cli help <command>
For the complete list of options:
beacon-cli --help