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

# unpage graph

> Build and manage the infrastructure knowledge graph

The `graph` command enables you to build and manage the infrastructure knowledge graph, which represents your cloud resources and their relationships.

## Usage

```shell theme={null}
unpage graph [OPTIONS] COMMAND [ARGS]...
```

## Commands

| Command  | Description                                           |
| -------- | ----------------------------------------------------- |
| `build`  | Build a knowledge graph for your cloud infrastructure |
| `logs`   | View graph build logs                                 |
| `status` | Check if graph build is running                       |
| `stop`   | Stop running graph build                              |

## Subcommand: build

Builds a knowledge graph by collecting information from all configured infrastructure sources and establishing relationships between resources.

### Usage

```shell theme={null}
unpage graph build [OPTIONS]
```

### Options

| Option               | Description                                                                            |
| -------------------- | -------------------------------------------------------------------------------------- |
| `--profile TEXT`     | Use profiles to manage multiple graphs \[env var: UNPAGE\_PROFILE] \[default: default] |
| `--interval INTEGER` | Rebuild the graph continuously, pausing for the specified seconds between builds       |
| `--background`       | Run in background and return immediately                                               |
| `-h, --help`         | Show help message and exit                                                             |

### Examples

```shell theme={null}
# Build the graph once
unpage graph build

# Build the graph in the background
unpage graph build --background

# Rebuild the graph every 15 minutes
unpage graph build --interval 900

# Build the graph for a specific profile
unpage graph build --profile production
```

## Subcommand: logs

Shows logs from the most recent graph build or from a currently running background graph build.

### Usage

```shell theme={null}
unpage graph logs [OPTIONS]
```

### Options

| Option           | Description                                                                            |
| ---------------- | -------------------------------------------------------------------------------------- |
| `--profile TEXT` | Use profiles to manage multiple graphs \[env var: UNPAGE\_PROFILE] \[default: default] |
| `--follow`, `-f` | Follow log output                                                                      |
| `-h, --help`     | Show help message and exit                                                             |

## Subcommand: status

Checks if a background graph build is currently running.

### Usage

```shell theme={null}
unpage graph status [OPTIONS]
```

## Subcommand: stop

Stops a currently running background graph build.

### Usage

```shell theme={null}
unpage graph stop [OPTIONS]
```
