# olorehq/olore architecture

> Architecture diagram of the GitHub repository olorehq/olore, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/olorehq/olore
- Repository: https://github.com/olorehq/olore

## Overview

olore is a local-first package manager that installs versioned documentation skills for AI coding agents. Its main workflow is to search the registry, install a package into local storage, and make it available in agent skill directories; users can also manage installs, repair local state, and inject skill references into project instructions. The repository also includes a documentation-packaging skill, a package registry website, and a large documentation corpus. The graph draws on README workflow statements and indexed source references; unsampled subsystem links are omitted or marked unverified.

Main entry points: [`cli/src/cli.ts`](https://github.com/olorehq/olore/blob/main/cli/src/cli.ts) (CLI dispatcher), [`cli/src/commands/install.ts`](https://github.com/olorehq/olore/blob/main/cli/src/commands/install.ts) (Install packages), [`cli/src/core/paths.ts`](https://github.com/olorehq/olore/blob/main/cli/src/core/paths.ts) (Local paths and installs), [`cli/src/commands/search.ts`](https://github.com/olorehq/olore/blob/main/cli/src/commands/search.ts) (Search packages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_entry["CLI dispatcher<br/>[cli.ts]"]
  node_search["Search packages<br/>[search.ts]"]
  node_install["Install packages<br/>[install.ts]"]
  node_manage["Package commands<br/>[list.ts]"]
  node_inject["Inject references<br/>[inject.ts]"]
  node_init["Initialize docs<br/>[init.ts]"]
  node_doctorcmd["Doctor command<br/>[doctor.ts]"]
end

subgraph group_local["Local package management"]
  node_registry["Registry index<br/>[registry.ts]"]
  node_download["Package download<br/>[download.ts]"]
  node_paths["Local paths and installs<br/>[paths.ts]"]
  node_platform["Platform handling<br/>[platform.ts]"]
  node_diagnostics["Install diagnostics<br/>[doctor.ts]"]
  node_version["Update check<br/>[version-check.ts]"]
end

subgraph group_web["Registry website"]
  node_website["Marketing pages<br/>[page.tsx]"]
  node_registrypage["Browse registry<br/>[page.tsx]"]
  node_registryui["Registry search UI"]
  node_downloadroute["Download endpoint<br/>[route.ts]"]
end

subgraph group_content["Documentation content"]
  node_packager["Docs packager<br/>[copy-docs.py]"]
  node_vault["Versioned package corpus"]
  node_stripecore["Stripe SDK content<br/>[stripe.core.ts]"]
  node_stripehttp["Stripe HTTP client content<br/>[HttpClient.ts]"]
  node_striperesources["Stripe API resources<br/>[Accounts.ts]"]
  node_sampleverify["Sample verifier content<br/>[SampleVerifier.cs]"]
end

node_user(("Developer"))
node_agent(("AI coding agent"))

node_user -->|"runs commands"| node_entry
node_entry -->|"routes to"| node_search
node_entry -->|"routes to"| node_install
node_entry -->|"routes to"| node_manage
node_entry -->|"routes to"| node_inject
node_entry -->|"routes to"| node_init
node_entry -->|"routes to"| node_doctorcmd
node_search -->|"fetches index"| node_registry
node_search -->|"reads installs"| node_paths
node_install -->|"resolves package"| node_registry
node_install -->|"downloads files"| node_download
node_install -->|"uses install paths"| node_paths
node_install -->|"handles platform"| node_platform
node_doctorcmd -->|"runs checks"| node_diagnostics
node_diagnostics -->|"checks agent paths"| node_paths
node_diagnostics -->|"formats sizes"| node_download
node_paths -->|"checks path prefix"| node_platform
node_entry -->|"checks updates"| node_version
node_install -.->|"links installed skills"| node_agent
node_init -.->|"prepares docs package"| node_packager
node_packager -.->|"creates package content"| node_vault
node_agent -.->|"loads local docs"| node_vault
node_user -.->|"views site"| node_website
node_website -.->|"links registry"| node_registrypage
node_registrypage -->|"renders browser"| node_registryui
node_user -.->|"requests package"| node_downloadroute
node_stripecore -->|"uses HTTP interface"| node_stripehttp
node_striperesources -.->|"uses SDK core"| node_stripecore

click node_entry "https://github.com/olorehq/olore/blob/main/cli/src/cli.ts"
click node_search "https://github.com/olorehq/olore/blob/main/cli/src/commands/search.ts"
click node_install "https://github.com/olorehq/olore/blob/main/cli/src/commands/install.ts"
click node_manage "https://github.com/olorehq/olore/blob/main/cli/src/commands/list.ts"
click node_inject "https://github.com/olorehq/olore/blob/main/cli/src/commands/inject.ts"
click node_init "https://github.com/olorehq/olore/blob/main/cli/src/commands/init.ts"
click node_doctorcmd "https://github.com/olorehq/olore/blob/main/cli/src/commands/doctor.ts"
click node_registry "https://github.com/olorehq/olore/blob/main/cli/src/core/registry.ts"
click node_download "https://github.com/olorehq/olore/blob/main/cli/src/core/download.ts"
click node_paths "https://github.com/olorehq/olore/blob/main/cli/src/core/paths.ts"
click node_platform "https://github.com/olorehq/olore/blob/main/cli/src/core/platform.ts"
click node_diagnostics "https://github.com/olorehq/olore/blob/main/cli/src/core/doctor.ts"
click node_version "https://github.com/olorehq/olore/blob/main/cli/src/core/version-check.ts"
click node_website "https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/page.tsx"
click node_registrypage "https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/registry/page.tsx"
click node_registryui "https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/registry/_components/registry-client.tsx"
click node_downloadroute "https://github.com/olorehq/olore/blob/main/web/src/app/api/dl/%5Bname%5D/%5Bversion%5D/route.ts"
click node_packager "https://github.com/olorehq/olore/blob/main/vault/packages/docs-packager/1.0.0/scripts/copy-docs.py"
click node_vault "https://github.com/olorehq/olore/tree/main/vault/packages"
click node_stripecore "https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/stripe.core.ts"
click node_stripehttp "https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/net/HttpClient.ts"
click node_striperesources "https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/resources/Accounts.ts"
click node_sampleverify "https://github.com/olorehq/olore/blob/main/vault/packages/ms-agent-framework/latest/contents/dotnet/eng/verify-samples/SampleVerifier.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_search,node_install,node_manage,node_inject,node_init,node_doctorcmd toneBlue
class node_registry,node_download,node_paths,node_platform,node_diagnostics,node_version toneAmber
class node_website,node_registrypage,node_registryui,node_downloadroute toneMint
class node_packager,node_vault,node_stripecore,node_stripehttp,node_striperesources,node_sampleverify toneRose
class node_user,node_agent toneIndigo
```

## Components

### CLI workflows

- [CLI dispatcher](https://github.com/olorehq/olore/blob/main/cli/src/cli.ts): `cli/src/cli.ts`
- [Search packages](https://github.com/olorehq/olore/blob/main/cli/src/commands/search.ts): `cli/src/commands/search.ts`
- [Install packages](https://github.com/olorehq/olore/blob/main/cli/src/commands/install.ts): `cli/src/commands/install.ts`
- [Package commands](https://github.com/olorehq/olore/blob/main/cli/src/commands/list.ts): `cli/src/commands/list.ts`
- [Inject references](https://github.com/olorehq/olore/blob/main/cli/src/commands/inject.ts): `cli/src/commands/inject.ts`
- [Initialize docs](https://github.com/olorehq/olore/blob/main/cli/src/commands/init.ts): `cli/src/commands/init.ts`
- [Doctor command](https://github.com/olorehq/olore/blob/main/cli/src/commands/doctor.ts): `cli/src/commands/doctor.ts`

### Local package management

- [Registry index](https://github.com/olorehq/olore/blob/main/cli/src/core/registry.ts): `cli/src/core/registry.ts`
- [Package download](https://github.com/olorehq/olore/blob/main/cli/src/core/download.ts): `cli/src/core/download.ts`
- [Local paths and installs](https://github.com/olorehq/olore/blob/main/cli/src/core/paths.ts): `cli/src/core/paths.ts`
- [Platform handling](https://github.com/olorehq/olore/blob/main/cli/src/core/platform.ts): `cli/src/core/platform.ts`
- [Install diagnostics](https://github.com/olorehq/olore/blob/main/cli/src/core/doctor.ts): `cli/src/core/doctor.ts`
- [Update check](https://github.com/olorehq/olore/blob/main/cli/src/core/version-check.ts): `cli/src/core/version-check.ts`

### Registry website

- [Marketing pages](https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/page.tsx): `web/src/app/(marketing)/page.tsx`
- [Browse registry](https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/registry/page.tsx): `web/src/app/(marketing)/registry/page.tsx`
- [Registry search UI](https://github.com/olorehq/olore/blob/main/web/src/app/(marketing)/registry/_components/registry-client.tsx): `web/src/app/(marketing)/registry/_components/registry-client.tsx`
- [Download endpoint](https://github.com/olorehq/olore/blob/main/web/src/app/api/dl/%5Bname%5D/%5Bversion%5D/route.ts): `web/src/app/api/dl/[name]/[version]/route.ts`

### Documentation content

- [Docs packager](https://github.com/olorehq/olore/blob/main/vault/packages/docs-packager/1.0.0/scripts/copy-docs.py): `vault/packages/docs-packager/1.0.0/scripts/copy-docs.py`
- [Versioned package corpus](https://github.com/olorehq/olore/tree/main/vault/packages): `vault/packages`
- [Stripe SDK content](https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/stripe.core.ts): `vault/packages/stripe/22.2.1/contents/src/stripe.core.ts`
- [Stripe HTTP client content](https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/net/HttpClient.ts): `vault/packages/stripe/22.2.1/contents/src/net/HttpClient.ts`
- [Stripe API resources](https://github.com/olorehq/olore/blob/main/vault/packages/stripe/22.2.1/contents/src/resources/Accounts.ts): `vault/packages/stripe/22.2.1/contents/src/resources/Accounts.ts`
- [Sample verifier content](https://github.com/olorehq/olore/blob/main/vault/packages/ms-agent-framework/latest/contents/dotnet/eng/verify-samples/SampleVerifier.cs): `vault/packages/ms-agent-framework/latest/contents/dotnet/eng/verify-samples/SampleVerifier.cs`

### Other components

- **Developer**
- **AI coding agent**

## Connections

- Developer → CLI dispatcher: runs commands
- CLI dispatcher → Search packages: routes to (evidence: `cli/src/cli.ts`)
- CLI dispatcher → Install packages: routes to (evidence: `cli/src/cli.ts`)
- CLI dispatcher → Package commands: routes to (evidence: `cli/src/cli.ts`)
- CLI dispatcher → Inject references: routes to (evidence: `cli/src/cli.ts`)
- CLI dispatcher → Initialize docs: routes to (evidence: `cli/src/cli.ts`)
- CLI dispatcher → Doctor command: routes to (evidence: `cli/src/cli.ts`)
- Search packages → Registry index: fetches index (evidence: `cli/src/commands/search.ts`)
- Search packages → Local paths and installs: reads installs (evidence: `cli/src/commands/search.ts`)
- Install packages → Registry index: resolves package (evidence: `cli/src/commands/install.ts`)
- Install packages → Package download: downloads files (evidence: `cli/src/commands/install.ts`)
- Install packages → Local paths and installs: uses install paths (evidence: `cli/src/commands/install.ts`)
- Install packages → Platform handling: handles platform (evidence: `cli/src/commands/install.ts`)
- Doctor command → Install diagnostics: runs checks (evidence: `cli/src/commands/doctor.ts`)
- Install diagnostics → Local paths and installs: checks agent paths (evidence: `cli/src/core/doctor.ts`)
- Install diagnostics → Package download: formats sizes (evidence: `cli/src/core/doctor.ts`)
- Local paths and installs → Platform handling: checks path prefix (evidence: `cli/src/core/paths.ts`)
- CLI dispatcher → Update check: checks updates (evidence: `cli/src/cli.ts`)
- Install packages → AI coding agent: links installed skills
- Initialize docs → Docs packager: prepares docs package
- Docs packager → Versioned package corpus: creates package content
- AI coding agent → Versioned package corpus: loads local docs
- Developer → Marketing pages: views site
- Marketing pages → Browse registry: links registry
- Browse registry → Registry search UI: renders browser (evidence: `web/src/app/(marketing)/registry/page.tsx`)
- Developer → Download endpoint: requests package
- Stripe SDK content → Stripe HTTP client content: uses HTTP interface
- Stripe API resources → Stripe SDK content: uses SDK core
