# grepai trace graph

> CLI reference for grepai trace graph

## grepai trace graph

Build a call graph around the specified symbol

### Synopsis

Build a call graph showing callers and callees around a symbol.

Examples:
  grepai trace graph "Login" --depth 2
  grepai trace graph "HandleRequest" --depth 3 --json

```
grepai trace graph <symbol> [flags]
```

### Options

```
  -c, --compact            Output minimal format without call-site context (requires --json or --toon)
  -d, --depth int          Maximum depth for graph traversal (default 2)
  -h, --help               help for graph
      --json               Output results in JSON format
      --project string     Project name within workspace (requires --workspace)
  -t, --toon               Output results in TOON format (token-efficient for AI agents)
      --ui                 Show interactive UI output
      --workspace string   Workspace name for cross-project trace
```

### SEE ALSO

* [grepai trace](/grepai/commands/grepai_trace/)	 - Trace symbol callers and callees

###### Auto generated by spf13/cobra on 30-Oct-2026
