tanishqkancharla/calldiff

Diffs for function call stacks across git commits. 22 languages supported (AST-based, built using Tree-sitter). Great for agentic review.

What it solves

calldiff solves the problem of understanding how code execution flow changes between different git commits. While standard line-based diffs show which lines of code changed, they often obscure the "shape" of the change—specifically, which functions are now calling which other functions. This is particularly useful for agentic code reviews where an AI agent or developer rewires the call flow of a program.

How it works

The tool reads source code from git trees and uses tree-sitter grammars to parse the code across 23 different languages. It builds lists of callees for each function and expands these into call trees. By comparing these trees across different commits or branches, it can identify which callees appeared, disappeared, or moved. Because it is AST-based (syntactic) rather than using a full typechecker, it does not resolve dynamic calls.

Who it’s for

It is designed for developers and AI agents performing code reviews who need to visualize changes in call stacks and function dependencies rather than just line-by-line text changes.

Highlights

  • Multi-language Support: Works with 23 languages, including TypeScript, Python, Go, Rust, Java, and C++.
  • Call Flow Diffing: Visualizes additions and removals in call stacks using a git-diff style format.
  • Reachability Analysis: Can find all call paths from one specific symbol to another.
  • Agent-Ready: Provides structured output (JSON, YAML, Markdown) and supports MCP (Model Context Protocol) server registration for integration with LLMs.
  • Call Tree Visualization: Generates ASCII call trees for specific entry points or files.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project