> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.io/llms.txt
> Use this file to discover all available pages before exploring further.

# entire-graph

> Search and analyze your codebase from the Entire CLI.

entire-graph is an installable [plugin](/cli-reference/plugin) for the [Entire CLI](/overview) that gives your coding agent a map of your codebase. It helps your agent find the right code, understand how it connects, and see what a change could affect before it starts editing.

Install entire-graph before running `entire graph`:

```bash theme={null}
entire plugin install graph
```

Then run entire-graph commands with:

```bash theme={null}
entire graph COMMAND [flags]
```

Run `entire graph help` to see every command in your installed version, and `entire graph COMMAND --help` for command-specific flags.

Pass `--repo .` when you run these outside an Entire session.

## graph init-agents

Write `.entire/graph-agent.md` and add managed blocks to `AGENTS.md` and `CLAUDE.md`.

```bash theme={null}
entire graph init-agents [--repo PATH]
```

See [Install and Enable entire-graph](/guides/graph/set-up-graph) for the complete setup workflow.

## graph agent-guide

Print the coding-agent guide that `init-agents` installs.

```bash theme={null}
entire graph agent-guide
```

## graph index

Build a committed-tree cache before running a batch of `--head` queries. The default profile is `full`.

```bash theme={null}
entire graph index --repo . [flags]
```

## graph capabilities

Report supported languages, parsing coverage, relation types, and features as JSON.

```bash theme={null}
entire graph capabilities --json
```

## graph search

Return ranked source regions for a plain-language description of a task or bug.

```bash theme={null}
entire graph search --repo . --profile full --query "token refresh returns 401"
```

Search reads the working tree by default, so results include uncommitted changes. Use `--head` to search the committed tree instead.

Results fit within a byte budget. Top results include full function bodies, while later results may contain only locations. Use `--max-context-bytes` to change the total.

| Flag                                 | Description                                                                                                      |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `--query TEXT`                       | The task or bug in one plain sentence. Required.                                                                 |
| `--top-k N`                          | Number of results. Default is `10`.                                                                              |
| `--format text\|json\|ndjson\|agent` | Default is `json`. `text` is tiered for reading, `agent` is compact.                                             |
| `--profile syntax-only\|fast\|full`  | Parsing depth. Default is `fast`, but the installed agent guide asks for `full`, which activates the call graph. |
| `--deep`                             | Also run the exhaustive BM25 pass and fuse it in. Slower, and reads every eligible file.                         |
| `--head`                             | Search the committed tree instead of the working tree.                                                           |
| `--max-context-bytes N`              | Output byte budget. `0` removes the bound. Default is `24576`.                                                   |

Each result includes a `signals` array that explains why it ranked, such as `path`, `body`, `symbol-name`, or `graph:callers`.

## graph impact

Show callers, callees, type consumers, data flows, related files, and same-container symbols for one symbol.

```bash theme={null}
entire graph impact --repo . --symbol Router.Match
```

Impact reads the working tree by default. Use `--head` to inspect the committed tree instead.

```text theme={null}
Index: cache-hit (64ms) | Query: 0ms | Total: 64ms
Impact: Router.Match (mux.go:151) def=151 span=151-182 [method in Router]
Blast radius: 1 caller (1 direct, 0 transitive), 0 callees, 3 type consumers,
  1 data flow, 7 co-change files, 29 siblings.
Callers (1 direct, 0 transitive; who breaks if behavior changes):
- Router.ServeHTTP (mux.go:203, def :188)
```

| Flag                         | Description                               |
| ---------------------------- | ----------------------------------------- |
| `--symbol NAME\|FILE:LINE`   | Symbol to analyze. Required.              |
| `--depth 1\|2`               | Caller traversal depth. Default is `2`.   |
| `--limit N`                  | Max entries per section. Default is `15`. |
| `--exclude-tests`            | Drop test-only entries.                   |
| `--file`, `--line`, `--kind` | Disambiguate an ambiguous name.           |

Text output begins with `Index: cache-hit` or `Index: cache-miss`.

## graph neighbors

Show direct relationships for one symbol, filtered by relation and direction.

```bash theme={null}
entire graph neighbors --repo . --symbol validateToken --relation CALLS --direction in
```

Neighbors reads the working tree by default. Use `--head` to inspect the committed tree instead.

| Flag                        | Description                                           |
| --------------------------- | ----------------------------------------------------- |
| `--symbol NAME\|FILE:LINE`  | Symbol to inspect. Required.                          |
| `--relation TYPE`           | Relation family to follow. Default is `CALLS`.        |
| `--direction both\|in\|out` | `in` is callers, `out` is callees. Default is `both`. |
| `--depth 1\|2`              | Hops to traverse. Default is `1`.                     |
| `--limit N`                 | Max neighbors per direction. Default is `20`.         |
| `--internal-only`           | Drop unresolved external endpoints.                   |

Text output begins with `Index: cache-hit` or `Index: cache-miss`.

## graph def

Show a symbol's declaration. For a type, include its fields, methods, and implementations.

```bash theme={null}
entire graph def RouteMatch --repo .
```

This command reads the working tree by default. Use `--head` to inspect the committed tree instead.

## graph explain

Read a build or test failure from standard input and append the declarations of the symbols it names.

```bash theme={null}
go test ./... 2>&1 | entire graph explain --repo .
```

Explain reads the working tree by default, so its declarations match the code that produced the failure. Use `--head` to inspect the committed tree instead.

## graph commit

List entity-level changes in a commit relative to its first parent, including added, removed, renamed, signature-changed, and body-changed symbols.

```bash theme={null}
entire graph commit [REV] [flags]
```

Each change includes an estimated dependent count.

## graph diff

List entity-level changes between two Git references. `analyze` is an alias for this command.

```bash theme={null}
entire graph diff --base BASE --head HEAD [flags]
```

## graph checkpoint

Analyze the commit associated with an [Entire checkpoint](/guides/checkpoints/overview).

```bash theme={null}
entire graph checkpoint CHECKPOINT_ID [flags]
```

## graph verify

Run a test command and report which tests changed state.

```bash theme={null}
entire graph verify --repo . --test "COMMAND" [flags]
```

<Warning>
  `entire graph verify` executes the command you give it, with your privileges. So does `--setup`. Pass only commands you would run yourself.
</Warning>

Record a baseline on a clean tree to distinguish existing failures from failures introduced by a change:

```bash theme={null}
entire graph verify --repo . --test "pytest tests/" --record-baseline /tmp/base.json
# make your edit
entire graph verify --repo . --test "pytest tests/" --pre-edit-baseline /tmp/base.json
```

## graph snapshot

Export the complete graph as NDJSON, including files, external endpoints, symbols, relations, and a summary.

```bash theme={null}
entire graph snapshot --repo . --format ndjson [flags]
```

Snapshot reads the committed tree by default. Use `--worktree` to include uncommitted changes. It also supports `--format compact-ndjson`.

## graph symbols

Export symbol records as NDJSON.

```bash theme={null}
entire graph symbols --repo . --format ndjson [flags]
```

Symbols reads the committed tree by default. Use `--worktree` to include uncommitted changes. Use `search` or `def` for targeted lookups because this command does not filter by name.

## graph edges

Export relation records as NDJSON. Filter the output with `--to`, `--from`, and `--relation`.

```bash theme={null}
entire graph edges --repo . --format ndjson [flags]
```

Edges reads the committed tree by default. Use `--worktree` to include uncommitted changes.

## graph snapshot-query

Query a saved compact snapshot without rebuilding the graph.

```bash theme={null}
entire graph snapshot --repo . --format compact-ndjson > graph.compact.ndjson
entire graph snapshot-query --input graph.compact.ndjson --symbol Cache.Refresh
```

## graph doctor

Report the resolved repository, Entire environment variables, plugin data directory access, and whether network access is disabled.

```bash theme={null}
entire graph doctor [--json]
```

`doctor --assert` is a preflight. It parses a command line against your installed binary and tells you whether it would be rejected, without running anything:

```bash theme={null}
entire graph doctor --assert "search --profile full --top-k 10 --format text"
```

## graph version

Print the installed entire-graph plugin version. Add `--json` to include the provider name.

```bash theme={null}
entire graph version [--json]
```

## graph stats

Compare entire-graph usage with grep and file reads in local coding-agent transcripts, including an estimated token saving.

```bash theme={null}
entire graph stats [flags]
```

<Note>
  `stats` reads local coding-agent session transcripts from disk. It is for humans, not part of the agent workflow, and the installed guide tells agents not to run it unless asked.
</Note>

## Continue with

<CardGroup cols={2}>
  <Card title="Use entire-graph with Your Coding Agent" icon="robot" href="/guides/graph/use-graph">
    Learn what to ask and what happens after you prompt your agent.
  </Card>

  <Card title="Install and Enable entire-graph" icon="wrench" href="/guides/graph/set-up-graph">
    Install the plugin and turn it on for a repository.
  </Card>

  <Card title="entire-graph Troubleshooting" icon="stethoscope" href="/guides/graph/troubleshooting">
    Fix install, adoption, and cache problems.
  </Card>

  <Card title="entire-graph Overview" icon="chart-network" href="/guides/graph/overview">
    Understand what entire-graph is for.
  </Card>

  <Card title="entire-graph Repository" icon="github" href="https://github.com/entireio/entire-graph">
    Browse the source and the full reference docs.
  </Card>
</CardGroup>
