> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/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](https://docs.entire.com/cli-reference/plugin.md) for the [Entire CLI](https://docs.entire.com/cli-reference) 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 setup

Write `.entire/agent-guide.md`, add managed blocks to `AGENTS.md` and `CLAUDE.md`, and register the Claude Code SubagentStart hook in the per-user `.claude/settings.local.json` (skip the hook with `--no-claude-hook`). Replaces the removed `init-agents` command.

```bash theme={null}
entire graph setup [--repo PATH] [--strict | --normal] [--no-claude-hook]
```

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

## graph agent-guide

Print the coding-agent guide that `setup` 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 query

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

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

You can also pass the text as the final argument instead of using `--query`:

```bash theme={null}
entire graph query --repo . --format text "token refresh returns 401"
```

Query 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 unless you pass the text as the final argument. |
| `--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](https://docs.entire.com/guides/sessions/overview.md#what-is-a-checkpoint).

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

## 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 `query` 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 "query --profile full --top-k 10 --format text"
```

## graph health

Report how completely entire-graph indexed the committed tree, including when the result is healthy.

```bash theme={null}
entire graph health [--repo PATH] [--json] [--refresh]
```

The report lists flagged source files and their percentage of the total, the 5% threshold at which coverage counts as degraded, a breakdown by language and diagnostic type, and the affected files with parser diagnostic locations. Documentation, configuration, and data files are not counted as source files. Files skipped on purpose, such as oversized or minified files, are listed separately.

A parser diagnostic means entire-graph could not fully analyze a file. It does not mean the source code is invalid.

Health always uses the committed tree at `HEAD` and the `full` profile, so it does not include uncommitted changes. It reuses a matching index or builds one first.

| Flag | Description |
| - | - |
| `--json` | Print structured health JSON instead of text. |
| `--refresh` | Rebuild the index even when a matching one exists, and invalidate derived query caches. |
| `--profile syntax-only\|fast\|full` | Index profile. Default is `full`. |
| `--ignore-file PATH` | Extra exclude rules in gitignore syntax. Repeatable. |
| `--include-file PATH` | Re-include ignored paths. Repeatable. |

Use `doctor` to check the environment and `health` to check index coverage.

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

## Continue with

> [card] [Use entire-graph with Your Coding Agent](https://docs.entire.com/guides/graph/use-graph.md)
>
> Learn what to ask and what happens after you prompt your agent.

> [card] [Install and Enable entire-graph](https://docs.entire.com/guides/graph/set-up-graph.md)
>
> Install the plugin and turn it on for a repository.

> [card] [entire-graph Troubleshooting](https://docs.entire.com/guides/graph/troubleshooting.md)
>
> Fix install, adoption, and cache problems.

> [card] [entire-graph Overview](https://docs.entire.com/guides/graph/overview.md)
>
> Understand what entire-graph is for.

> [card] [entire-graph Repository](https://github.com/entireio/entire-graph)
>
> Browse the source and the full reference docs.
