---
title: Examples
description: Explore Spyglass's map of the Foundry repository.
---

import { withBase } from "blume/components/islands/base-path.ts";

## Foundry

This is Spyglass reading its own repository. Each documentation build scans the
current checkout and includes the saved dataset with the same viewer shipped
in the CLI.

<div style={{ display: "flex", flexWrap: "wrap", gap: "1rem" }}>
  <a href={withBase("/spyglass/examples/foundry/?view=map")} target="_blank" rel="noopener noreferrer">
    Open the full-screen map
  </a>
  <a href={withBase("/spyglass/examples/foundry/data/manifest.json")}>
    Read the dataset manifest
  </a>
</div>

<iframe
  src={withBase("/spyglass/examples/foundry/?view=map")}
  title="Spyglass map of the Foundry repository"
  loading="lazy"
  allowFullScreen
  style={{ width: "100%", height: "720px", border: "1px solid var(--border)", borderRadius: "12px" }}
/>

Drag or zoom to explore the map above. Open the full-screen map for more room.

The viewer loads static files. It does not scan your machine or need a running
Spyglass server. The manifest records the scan time, coverage, and any skipped
packages. Historical checkpoints are not included in this example.

## Build the example locally

From the Foundry repository root:

```sh
bun install --frozen-lockfile
bun run docs:build
```

The build runs `spyglass scan` on the checkout, then
`spyglass export docs/public/spyglass/examples/foundry`, which writes the static
viewer there, and the docs build copies it into
`docs/dist/spyglass/examples/foundry/`. Any workspace can be published the same
way; see [export](/spyglass/reference/cli#export). Generated files are ignored
by Git. `bun run docs:dev` refreshes the example before starting the docs server.
