---
slug: "pi-explorer"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/AlvaroRausell/pi-explorer@main/README.md"
repo: "https://github.com/AlvaroRausell/pi-explorer"
source_file: "README.md"
branch: "main"
---
# pi-explorer

A Pi package that adds:

- `explorer` skill: deeply explores the **current repo** and generates an HTML architecture/pattern report
- `/explorer` command: indexes report directories, lets you browse them in a TUI, and opens the selected HTML in your browser

## Install

From npm:

```bash
pi install npm:pi-explorer
```

From GitHub:

```bash
pi install git:github.com/AlvaroRausell/pi-explorer
```

Then reload Pi:

```text
/reload
```

## Contents

- `skills/explorer/` — skill instructions, references, and report publishing script
- `extensions/explorer.js` — `/explorer` command

## Report location

By default, reports are written into the repo you are currently in:

```text
<repo>/.pi/explorer-reports
```

Example:

```text
/home/a/repos/my-app/.pi/explorer-reports
```

## Usage

Generate a report for the repo you are currently inside:

```text
/skill:explorer
```

Index the current repo's report directory so `/explorer` can browse it later:

```text
/explorer index
```

Browse reports from the current repo only:

```text
/explorer here
/explorer latest here
```

Browse reports across indexed report directories:

```text
/explorer
/explorer latest
```

Unindex the current repo's report directory:

```text
/explorer unindex
```

## How it works

- The skill always explores the current working directory.
- Reports are stored per-repo instead of in one global report store.
- `/explorer` uses `~/.pi/agent/explorer-index.json` to remember which report directories you indexed.
- Published reports include an `index.json` manifest in each repo's `.pi/explorer-reports` directory.
