Skip to content

CLI Reference

Terminal window
symtrace [REPO_PATH] [COMMIT_A] [COMMIT_B] [OPTIONS]
symtrace lint [PATH] [OPTIONS]
symtrace tui [REPO_PATH] [COMMIT_A] [COMMIT_B] [OPTIONS]
symtrace merge-driver <BASE_FILE> <OURS_FILE> <THEIRS_FILE> <TARGET_PATH>
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 (or -r / --repo flag)
COMMIT_AHEAD~1Older commit ref, tag, branch, or commit hash
COMMIT_BWorking TreeNewer commit ref, tag, branch, or commit hash (defaults to working tree, or HEAD if --staged is used)
FlagShortDefaultDescription
--compactoffForce micro-compact inline token diff output for small edits (1–3 lines)
--full-headers / --verboseoffForce full structural banners, timing diagnostics, and blast radius tables
--format <FMT>ansiOutput format: ansi, json, jsonl, markdown, html, sarif, prompt
--stat-soffOutput high-level semantic summary table across modified files
--checkoffExit code 1 if structural logic changes exist (CI / pre-commit guard)
--name-onlyoffList only changed file paths containing structural AST changes
--staged / --cachedoffCompare staged index changes against COMMIT_A
--logic-onlyoffIgnore comments and whitespace-only modifications
--jsonoffAlias for --format json
--path <GLOB>-pFilter changed files matching glob pattern (e.g. "src/**/*.rs")
--color <WHEN>autoTerminal color output mode (auto, always, never). Respects NO_COLOR
--no-pageroffDisable piping terminal output to $PAGER
--config <PATH>Custom configuration file path (.symtracerc / symtrace.toml)
--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 parser recursion depth
--parse-timeout-ms <MS>2000 (2s)Per-file Tree-sitter parse timeout in milliseconds (0 = disabled)
--help-hPrint help message
--version-VPrint version information

Declarative AST semantic linter evaluating custom Tree-sitter .scm rules with automated CI thresholds:

Terminal window
symtrace lint [PATH] [OPTIONS]
Subcommand FlagDefaultDescription
PATH.Target path or directory to lint
--queries-dir <DIR>.symtrace/queriesCustom directory containing .scm rule files
--max-warnings <N>0Maximum allowed warnings before non-zero CI exit code
--format <FMT>cliLinter output format (cli, json, sarif)

See Custom Query DSL & Linter Guide →.

Launch the interactive terminal workspace with split-pane refactor navigation and call graph visualization:

Terminal window
symtrace tui [REPO_PATH] [COMMIT_A] [COMMIT_B] [OPTIONS]

See Interactive TUI Inspector Guide →.

Native 3-way AST merge driver for resolving Git rebases and merge conflicts:

Terminal window
symtrace merge-driver <BASE_FILE> <OURS_FILE> <THEIRS_FILE> <TARGET_PATH>

See 3-Way AST Merge Driver Guide →.

Repo context-aware integration driver for native git diff commands:

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 →.

Exit CodeMeaning
0Clean execution: no structural changes detected (when --check is enabled), 0 linter rule violations (or within max-warnings limit), or clean 3-way AST merge
1Structural logic changes detected (when --check is set), linter rule violations exceeded threshold (symtrace lint), or merge conflicts written
130Execution interrupted by user (Ctrl+C)