Dependencies for moeru-ai/airi: Complete Monorepo Package Guide
The moeru-ai/airi repository uses a PNPM workspace monorepo structure where dependencies are declared hierarchically across a root package.json for development tooling and individual workspace 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 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:
turbofor task running and caching across workspaces - Linting:
@antfu/eslint-configfor code quality - Type checking:
typescriptwith strict configuration - Testing:
vitestfor 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 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)piniafor state managementvue-routerfor navigationvue-i18nfor internationalization@vueuse/corefor composable utilities
AI and media processing:
@huggingface/transformersfor local ML inference@ricky0123/vad-webfor voice activity detection@moeru/eventafor event bus communication
Validation and utilities:
zodandvalibotfor schema validationdate-fnswith@date-fns/utcfor date handlingdompurifyfor HTML sanitizationanimejsfor 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 extends the UI library with Three.js and VRM (Virtual Reality Model) support for 3-D avatar rendering.
Core 3-D rendering:
threeat version^0.183.1@pixiv/three-vrm,@pixiv/three-vrm-core, and@pixiv/three-vrm-animationfor VRM avatar loading and animation
Vue integration:
@tresjs/corefor Vue 3 integration with Three.js@tresjs/cientosfor additional Tres.js utilities@tresjs/post-processingfor visual effects
Post-processing:
postprocessingfor advanced rendering effects
Lip sync:
wlipsyncfor 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.jsfor Discord API integrationplugins/airi-plugin-homeassistant:home-assistant-js-websocketfor IoT device controlpackages/audio-pipelines-transcribe:@ffmpeg/ffmpegandwhisper.cppfor audio transcriptionapps/stage-web:vite,vue, andunocss(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:
git clone https://github.com/moeru-ai/airi.git
cd airi
pnpm install
The pnpm install command:
- Resolves root
devDependenciesfor build tools, linting, and testing - Links each workspace package, satisfying internal
workspace:*andworkspace:^references - Hoists common external libraries (Vue, Three.js, Pinia) to the top-level
node_modulesfor deduplication
Importing Dependencies in Practice
Import a UI component from the core library
// 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 via the package's exports field.
Use the VRM composable from the 3-D add-on
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.
Access a shared store across applications
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.
Key Dependency Files Reference
| File | Purpose |
|---|---|
package.json |
Root development tools, workspace definitions, and PNPM configuration |
packages/stage-ui/package.json |
Core UI library with Vue, Pinia, AI SDKs, and utility dependencies |
packages/stage-ui-three/package.json |
Three.js, VRM, and Tres.js dependencies for 3-D rendering |
pnpm-workspace.yaml |
Implicit workspace configuration via root package.json workspaces field |
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 |
VRM composable implementation for 3-D avatar control |
apps/stage-web/vite.config.ts |
Web app bundler configuration consuming workspace dependencies |
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
devDependenciesfor tooling and workspace-specificdependenciesfor runtime functionality. - Internal linking uses the
workspace:protocol (workspace:^for compatible versions,workspace:*for exact matches) to share code betweenpackages/,apps/,services/, andplugins/without duplication. - Core runtime dependencies reside in
packages/stage-ui/package.json(Vue ecosystem, AI SDKs, utilities) andpackages/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 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. This centralizes AI capabilities in the core UI library, making them available to all client applications through the workspace linking system.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →