Skip to content

symtrace

See what actually changed in your code. symtrace compares Git commits at the AST structure level -- showing you moved functions, renamed variables, and real logic modifications instead of noisy line diffs.

git diff tells you which lines changed. But it can’t tell you that a function was moved, a variable was renamed, or that a “large diff” is actually just reformatted code with zero logic changes.

symtrace reads the actual code structure using Tree-sitter parsers and tells you exactly what happened:

━━━ src/handler.rs
+ [INSERT] function_item 'handle_request' inserted (L42)
~ [MODIFY] function_item 'parse_body' modified (L10 → L10) [75% similarity, medium]
✎ [RENAME] function_item renamed from 'process' to 'execute' (L5 → L5) [98% similarity, low]
- [DELETE] function_item 'deprecated_fn' deleted (L88)
↔ [MOVE] function_item 'helper' moved (L20 → L35) [100% similarity, low]
── Refactor Patterns ──
▸ 'process' renamed to 'execute' (confidence: 100%)

9 Supported Languages

First-class AST analysis for Rust, JavaScript, TypeScript, Python, Java, C, C++, Go, and JSON files.

Native Git Diff Driver

Configure symtrace directly into git config and .gitattributes to drive standard git diff commands.

Path Glob Filtering

Filter diffs to specific files or directories with --path <GLOB> (-p "src/**/*.rs").

Zero Overhead Rust Engine

Blazing fast tree-sitter AST parser compiled to native code with zero allocation hot paths and minimal memory footprint.

Meaningful AST Diffs

Detect MOVEs, RENAMEs, MODIFYs, INSERTs, and DELETEs — not raw line changes. Formatting and comment edits are filtered out.

Refactor Pattern Detection

Automatically spots extract method, move method, and rename patterns across files with confidence metrics.

Config Loader

Hierarchical .symtracerc / symtrace.toml file loader with customizable resource limits and ANSI color controls.

Interactive Pager & JSON

Automatic routing to $PAGER (less -RFX) for TTYs, or structured --json output for CI/CD pipelines.

LanguageExtensions
Rust.rs
JavaScript.js, .jsx, .mjs, .cjs
TypeScript.ts, .tsx
Python.py, .pyi
Java.java
C.c, .h
C++.cpp, .hpp, .cc, .cxx, .h++
Go.go
JSON.json, .jsonc
Terminal window
# Compare working directory against HEAD in current folder
symtrace
# Compare staged index against HEAD
symtrace . HEAD --staged
# Compare specific commits with path glob filtering
symtrace . HEAD~1 HEAD -p "src/**/*.rs"

See Quick Start Guide → or Installation Options →.