Skip to content

CLI Reference

symtrace [REPO_PATH] [COMMIT_A] [COMMIT_B] [OPTIONS]
symtrace git-diff-driver <PATH> <OLD_FILE> <OLD_HEX> <OLD_MODE> <NEW_FILE> <NEW_HEX> <NEW_MODE>

All positional arguments are optional and feature intelligent default resolution:

ArgumentDefaultDescription
REPO_PATH.Path to local Git repository (defaults to current working directory)
COMMIT_AHEAD~1Older commit ref, tag, branch, or commit hash
COMMIT_BWorking TreeNewer commit ref, tag, branch, or commit hash. Defaults to uncommitted working tree (or HEAD if --staged is used)

FlagShortDefaultDescription
--staged / --cachedoffCompare staged index changes against COMMIT_A
--path <GLOB>-pRestrict diff analysis to file paths matching glob pattern (e.g. "src/**/*.rs")
--color <WHEN>autoTerminal ANSI color output mode (auto, always, never). Respects NO_COLOR
--no-pageroffDisable piping terminal output to $PAGER
--logic-onlyoffFilter out comments and formatting/whitespace AST nodes
--jsonoffEmit machine-readable JSON report instead of colored text
--no-incrementaloffDisable incremental AST parsing and cache reuse
--max-file-size <BYTES>5242880 (5 MiB)Skip files larger than specified byte size
--max-ast-nodes <N>200000Skip files exceeding specified AST node count
--max-recursion-depth <N>2048Maximum AST parsing recursion depth
--parse-timeout-ms <MS>2000 (2s)Per-file Tree-sitter parse timeout in milliseconds (0 = disabled)
--help-hPrint command help
--version-VPrint version number

Native integration subcommand used when symtrace is configured as a git diff driver in .gitconfig and .gitattributes.

Terminal window
symtrace git-diff-driver <path> <old-file> <old-hex> <old-mode> <new-file> <new-hex> <new-mode>

See Native Git Diff Driver Guide → for configuration instructions.


symtrace automatically reads configuration options from repository .symtracerc or symtrace.toml files, as well as ~/.config/symtrace/symtrace.toml.

CLI flags passed on the command line override configuration file values.

See Configuration File Guide → for full TOML schema details.


Terminal window
symtrace
Terminal window
symtrace . HEAD --staged
Terminal window
# Filter for Rust files in src directory
symtrace . HEAD~1 HEAD -p "src/**/*.rs"
# Filter for C/C++ header files
symtrace . HEAD~1 HEAD -p "**/*.h"
Terminal window
symtrace /path/to/repo main feature/login-page
Terminal window
symtrace . HEAD~1 HEAD --logic-only --json

Custom Resource Limits for Heavy Repositories

Section titled “Custom Resource Limits for Heavy Repositories”
Terminal window
symtrace . HEAD~1 HEAD --max-file-size 10485760 --max-ast-nodes 500000 --parse-timeout-ms 5000