[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94504":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},94504,"calldiff","tanishqkancharla\u002Fcalldiff","tanishqkancharla","Diffs for function call stacks across git commits. 22 languages supported (AST-based, built using Tree-sitter). Great for agentic review.",null,"TypeScript",369,14,113,3,0,256,53.53,"MIT License",false,"main",true,[],"2026-08-24 04:01:22","# calldiff\n\nDiff call stacks across git commits — like `git diff`, but for who-calls-whom.\n\nBuilt for **agentic code review**: when an agent (or you) rewires call flow, plain line diffs bury the shape of the change. `calldiff` shows which callees appeared, disappeared, or moved under an entrypoint — across **23 languages**.\n\n```diff\n  PiService.createAgentSession(options)\n- ├─ AuthStorage.create()\n- ├─ new ModelRegistry\n- ├─ createCodingTools()\n+ ├─ PiService.getServices()\n+ │  ├─ SettingsManager.create()\n+ │  ├─ AuthStorage.create()\n+ │  └─ new ModelRegistry\n```\n\n## Prompt for agents\n\nPaste this when you want a walkthrough of call-flow changes:\n\n> dearest clod, walk me through the code changes you made using `npx calldiff@latest`\n\n## Install\n\n```bash\nnpx calldiff@latest\n# or\nnpm install -g calldiff\n```\n\n## Usage\n\n```bash\n# HEAD vs working tree\ncalldiff diff\n\n# one ref vs working tree\ncalldiff diff main\n\n# two commits \u002F branches\ncalldiff diff abc123 def456\ncalldiff diff --from main --to feature\n\n# force entrypoints (functionName or ClassName.method)\ncalldiff diff main feature --entry createAgentSession\ncalldiff diff main feature -e PiService.createAgentSession -e boot\n\n# file as entrypoint (every export in that indexed source file)\ncalldiff tree --file src\u002Froutes.ts\ncalldiff tree -F packages\u002Fapi\u002Fsrc\u002Fboot.ts\ncalldiff diff main HEAD --file src\u002Froutes.ts\n\n# limit to paths (trailing positionals; leading -- also accepted)\ncalldiff diff main feature src\u002Flib\n\n# view a call tree (no diff) — requires --entry\ncalldiff tree -e createAgentSession\ncalldiff tree HEAD -e PiService.createAgentSession\ncalldiff tree main -e boot --max-depth 8 src\u002Flib\ncalldiff tree -e runCheckout --locs examples\u002Fcheckout\n\n# find all call paths from one symbol to another — requires --entry and --to\ncalldiff reach -e runCheckout --to sendEmail\ncalldiff reach HEAD -e runCheckout --to sendEmail examples\u002Fcheckout\n\n# agent \u002F machine-readable output (via incur)\ncalldiff diff --format json\ncalldiff --llms\ncalldiff skills add   # install agent skill files\ncalldiff mcp add      # register as MCP server\n```\n\n### `diff` semantics (git-diff shaped)\n\n| Invocation | From | To |\n|---|---|---|\n| `calldiff diff` | `HEAD` | working tree |\n| `calldiff diff \u003Cfrom>` | `\u003Cfrom>` | working tree |\n| `calldiff diff \u003Cfrom> \u003Cto>` | `\u003Cfrom>` | `\u003Cto>` |\n\n`-` lines were present in **from** and gone in **to**.  \n`+` lines are new in **to**.\n\nIf you omit `--entry` \u002F `--file`, calldiff infers exported functions whose expanded call trees changed (and may show several).\n\n`--file` \u002F `-F` takes an indexed source path and expands to every **exported** symbol defined in that file (useful in monorepos). Matching is exact path, or a unique suffix (`boot.ts` → `packages\u002Fapi\u002Fsrc\u002Fboot.ts`). Ambiguous matches error so you can pass a more specific path. `--entry` \u002F `-e` is symbols only.\n\n### `tree`\n\n| Invocation | Tree from |\n|---|---|\n| `calldiff tree -e \u003Cname>` | working tree |\n| `calldiff tree \u003Cref> -e \u003Cname>` | that commit\u002Fref |\n\nPrints a plain ASCII call tree (no `+\u002F−` markers). `--entry` \u002F `-e` or `--file` \u002F `-F` is required.\nWith `--locs`, each node shows a source location: the root uses the definition\n`file:line`, and children use the **call site** in the parent (`file:line` or\n`file:line-line`) — same idea as LSP Call Hierarchy `fromRanges`, not Go to\nDefinition.\n\n### `reach`\n\n| Invocation | Paths from |\n|---|---|\n| `calldiff reach -e \u003Cfrom> --to \u003Ctarget>` | working tree |\n| `calldiff reach \u003Cref> -e \u003Cfrom> --to \u003Ctarget>` | that commit\u002Fref |\n\nPrints every call path from the entrypoint to the target (including alternate `if` \u002F `else` arms). `--entry` \u002F `-e` or `--file` \u002F `-F`, plus `--to`, are required.\n\n### Labels\n\n- `functionName` — free function\n- `ClassName.method` — class method\n- `new ClassName` — constructor \u002F `new` call\n- `Component` — JSX\u002FTSX component tags (`\u003CButton \u002F>`); children nest under the parent\n- `if (cond)` \u002F `else` \u002F `else if (cond)` — conditional arms (no continuing `│` rail)\n- `file:line` — call-site (or root definition) location; enable with `--locs` (default off)\n\n### Supported languages\n\nTypeScript, TSX, JavaScript, JSX, Python, Go, Rust, Java, Ruby, C, C++, C#, PHP, Kotlin, Swift, Scala, Lua, Elixir, Bash, Haskell, Zig, Solidity, OCaml, Perl.\n\n## Output\n\n- **Default:** colored ASCII callstack trees (TTY) \u002F colorless ASCII when piped — same shape as before.\n- **`--format json|yaml|md|jsonl`:** structured result (`from`\u002F`to`\u002F`trees` or `paths` with nested nodes + per-entry `ascii`) for agents and scripts.\n- Built on [incur](https:\u002F\u002Fgithub.com\u002Fwevm\u002Fincur): `skills add`, `mcp add`, `--llms`, CTAs after diffs, typed flags.\n\n## How it works\n\n1. Reads source from both git trees (`git show` \u002F working tree)\n2. Detects language by file extension, loads a [tree-sitter](https:\u002F\u002Ftree-sitter.github.io\u002Ftree-sitter\u002F) grammar (bundled or on-demand into `~\u002F.cache\u002Fcalldiff\u002Fgrammars`), and parses\n3. Builds per-function callee lists and expands them into call trees\n4. Diffs the trees, prints a tree, or searches paths — plus structured output for agents\n\nGrammars install on first use (override cache with `CALLDIFF_GRAMMAR_CACHE`). This is syntactic (AST-based), not a full typechecker — dynamic calls won’t resolve.\n\n## Dev\n\n```bash\nnpm run dev -- diff main HEAD --entry PiService.createAgentSession\nnpm run dev -- tree -e runCheckout -- examples\u002Fcheckout\nnpm run dev -- reach -e runCheckout --to sendEmail -- examples\u002Fcheckout\n```\n","calldiff 是一个基于 AST 的跨 Git 提交调用栈差异分析工具，用于可视化函数调用关系（who-calls-whom）的变化。它支持 23 种编程语言（通过 Tree-sitter 解析），可精准识别入口点下新增、消失或重定位的被调用函数，并提供 diff、tree、reach 等子命令，支持 JSON 输出与 LLM\u002FMCP 集成，专为自动化代码审查（agentic review）设计。适用于重构验证、影响分析、微服务调用链演进追踪等场景，尤其在大型多语言单体或 monorepo 中高效定位调用拓扑变更。",2,"2026-08-10 02:30:09","CREATED_QUERY"]