# Dependencies for moeru-ai/airi: Complete Monorepo Package Guide

> Understand the moeru-ai/airi dependencies. Explore its PNPM workspace monorepo structure, root package.json, and individual workspace configurations for a clear dependency overview.

- Repository: [Moeru AI/airi](https://github.com/moeru-ai/airi)
- Tags: how-to-guide
- Published: 2026-03-08

---

**The moeru-ai/airi repository uses a PNPM workspace monorepo structure where dependencies are declared hierarchically across a root [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) for development tooling and individual workspace [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) files for runtime libraries, with internal packages linked via the `workspace:` protocol.**

The **dependencies for moeru-ai/airi** span a complex monorepo architecture that powers a multi-platform AI companion application. This guide maps the dependency hierarchy from root development tools down to specialized 3-D rendering packages, showing exactly where each dependency lives and how workspaces interconnect.

## Root package.json: Development Ecosystem

The root [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) defines the monorepo's development toolchain and workspace configuration. Located at the repository root, this file declares **PNPM** (`"packageManager": "pnpm@10.30.3"`) as the package manager and lists all workspaces under the `"workspaces"` field.

Key development dependencies include:

- **Build orchestration**: `turbo` for task running and caching across workspaces
- **Linting**: `@antfu/eslint-config` for code quality
- **Type checking**: `typescript` with strict configuration
- **Testing**: `vitest` for unit tests

The root file does not declare runtime application dependencies; those live in individual workspace packages under `packages/`, `plugins/`, `services/`, and `apps/`.

## Core UI Library Dependencies (@proj-airi/stage-ui)

The [`packages/stage-ui/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/package.json) contains the central UI library used by the web, desktop, and mobile clients. This package aggregates Vue ecosystem tools, AI SDKs, and utility libraries.

**Vue ecosystem dependencies**:
- `vue` (catalog version)
- `pinia` for state management
- `vue-router` for navigation
- `vue-i18n` for internationalization
- `@vueuse/core` for composable utilities

**AI and media processing**:
- `@huggingface/transformers` for local ML inference
- `@ricky0123/vad-web` for voice activity detection
- `@moeru/eventa` for event bus communication

**Validation and utilities**:
- `zod` and `valibot` for schema validation
- `date-fns` with `@date-fns/utc` for date handling
- `dompurify` for HTML sanitization
- `animejs` for animations

Internal dependencies use the `workspace:^` protocol to link sibling packages like `@proj-airi/audio` and `@proj-airi/core-character`.

## 3-D Scene Dependencies (@proj-airi/stage-ui-three)

The [`packages/stage-ui-three/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui-three/package.json) extends the UI library with Three.js and VRM (Virtual Reality Model) support for 3-D avatar rendering.

**Core 3-D rendering**:
- `three` at version `^0.183.1`
- `@pixiv/three-vrm`, `@pixiv/three-vrm-core`, and `@pixiv/three-vrm-animation` for VRM avatar loading and animation

**Vue integration**:
- `@tresjs/core` for Vue 3 integration with Three.js
- `@tresjs/cientos` for additional Tres.js utilities
- `@tresjs/post-processing` for visual effects

**Post-processing**:
- `postprocessing` for advanced rendering effects

**Lip sync**:
- `wlipsync` for automated lip synchronization with audio

This package uses `workspace:*` for internal dependencies, ensuring exact version matching with sibling packages.

## Specialized Workspace Dependencies

Individual services and plugins declare minimal, focused dependency sets:

- **`services/discord-bot`**: [`discord.js`](https://github.com/moeru-ai/airi/blob/main/discord.js) for Discord API integration
- **`plugins/airi-plugin-homeassistant`**: `home-assistant-js-websocket` for IoT device control
- **`packages/audio-pipelines-transcribe`**: `@ffmpeg/ffmpeg` and [`whisper.cpp`](https://github.com/moeru-ai/airi/blob/main/whisper.cpp) for audio transcription
- **`apps/stage-web`**: `vite`, `vue`, and `unocss` (inherited from root configuration)

Each workspace references shared internal libraries using the `workspace:` protocol, preventing duplicate installations of Vue, Pinia, or Three.js across the monorepo.

## Installing the Monorepo

To install all dependencies across the workspace hierarchy:

```bash
git clone https://github.com/moeru-ai/airi.git
cd airi
pnpm install

```

The `pnpm install` command:

1. Resolves root `devDependencies` for build tools, linting, and testing
2. Links each workspace package, satisfying internal `workspace:*` and `workspace:^` references
3. Hoists common external libraries (Vue, Three.js, Pinia) to the top-level `node_modules` for deduplication

## Importing Dependencies in Practice

### Import a UI component from the core library

```typescript
// src/components/MyCharacter.vue
<script setup lang="ts">
import { CharacterViewer } from '@proj-airi/stage-ui/components/scenes'
</script>

<template>
  <CharacterViewer :model="myModelId" />
</template>

```

The component is exported from [`packages/stage-ui/src/components/scenes/index.ts`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/src/components/scenes/index.ts) via the package's `exports` field.

### Use the VRM composable from the 3-D add-on

```typescript
import { useVrm } from '@proj-airi/stage-ui-three/composables/vrm'

const { loadVrm, vrm } = useVrm()
await loadVrm('/assets/avatar.vrm')

```

This composable resides in [`packages/stage-ui-three/src/composables/vrm/index.ts`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui-three/src/composables/vrm/index.ts).

### Access a shared store across applications

```typescript
import { useCharacterStore } from '@proj-airi/stage-ui/stores/character'

const character = useCharacterStore()
character.setName('Airi')

```

The store definition lives in [`packages/stage-ui/src/stores/character/index.ts`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/src/stores/character/index.ts).

## Key Dependency Files Reference

| File | Purpose |
|------|---------|
| [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) | Root development tools, workspace definitions, and PNPM configuration |
| [`packages/stage-ui/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/package.json) | Core UI library with Vue, Pinia, AI SDKs, and utility dependencies |
| [`packages/stage-ui-three/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui-three/package.json) | Three.js, VRM, and Tres.js dependencies for 3-D rendering |
| [`pnpm-workspace.yaml`](https://github.com/moeru-ai/airi/blob/main/pnpm-workspace.yaml) | Implicit workspace configuration via root [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) `workspaces` field |
| [`packages/stage-ui/src/components/scenes/index.ts`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/src/components/scenes/index.ts) | Source of exported UI components imported by downstream apps |
| [`packages/stage-ui-three/src/composables/vrm/index.ts`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui-three/src/composables/vrm/index.ts) | VRM composable implementation for 3-D avatar control |
| [`apps/stage-web/vite.config.ts`](https://github.com/moeru-ai/airi/blob/main/apps/stage-web/vite.config.ts) | Web app bundler configuration consuming workspace dependencies |
| [`apps/stage-tamagotchi/electron.vite.config.ts`](https://github.com/moeru-ai/airi/blob/main/apps/stage-tamagotchi/electron.vite.config.ts) | Electron-specific bundling for desktop client dependencies |

## Summary

- **The moeru-ai/airi repository** organizes dependencies hierarchically across a PNPM workspace monorepo, with root `devDependencies` for tooling and workspace-specific `dependencies` for runtime functionality.
- **Internal linking** uses the `workspace:` protocol (`workspace:^` for compatible versions, `workspace:*` for exact matches) to share code between `packages/`, `apps/`, `services/`, and `plugins/` without duplication.
- **Core runtime dependencies** reside in [`packages/stage-ui/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/package.json) (Vue ecosystem, AI SDKs, utilities) and [`packages/stage-ui-three/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui-three/package.json) (Three.js, VRM, Tres.js), powering the web, desktop, and mobile clients.

## Frequently Asked Questions

### What package manager does moeru-ai/airi use?

The repository uses **PNPM** version `10.30.3` as specified in the root [`package.json`](https://github.com/moeru-ai/airi/blob/main/package.json) under the `"packageManager"` field. PNPM handles workspace linking, dependency deduplication, and the `workspace:` protocol resolution across the monorepo.

### How do I install all dependencies for the entire monorepo?

Run `pnpm install` from the repository root after cloning. This command installs root `devDependencies` (build tools, linters, TypeScript), links all workspace packages, and hoists common external dependencies like Vue and Three.js to the top-level `node_modules` for shared use across workspaces.

### What is the difference between `workspace:^` and `workspace:*` in the dependencies?

`workspace:^` allows the package to use any version of the internal dependency that matches the major version, similar to the standard npm `^` semver range but for local workspaces. `workspace:*` requires an exact match with the workspace package version, ensuring strict synchronization between tightly coupled packages like `@proj-airi/stage-ui-three` and its sibling libraries.

### Where are the AI and machine learning dependencies declared?

AI-specific dependencies like `@huggingface/transformers` for local ML inference and `@ricky0123/vad-web` for voice activity detection are declared in [`packages/stage-ui/package.json`](https://github.com/moeru-ai/airi/blob/main/packages/stage-ui/package.json). This centralizes AI capabilities in the core UI library, making them available to all client applications through the workspace linking system.